The Foundations of Mathematics: A Contribution to the Philosophy of Geometry