The Foundations of Logic