Semi-Riemannian Geometry With Applications to Relativity