Foundations of Mathematical Reasoning