The Mathematical Theory of Special and General Relativity