The mathematical theory of black holes