Mathematical Quantum Aspects of Relativity and Cosmology