Formal logic is the fundamental language which underlies modern mathematics and computer science. And yet students are rarely exposed to it before college, if ever. This has led to it having a reputation for difficulty and obscurity. Nothing could be further from the truth!
During my time at the University of Washington, the philosophy department’s “Introduction to Formal Logic” course was one of my favorites to teach. These classes would often see a wide range of students, from curious math majors looking to supplement their patchy knowledge of the topic, to math-phobic students looking to skirt the university’s math requirement. What all of my students would leave with, however, was an appreciation for the power of logical reasoning and a glimpse of the vast and remarkable interconnections between language, math, and machines.
What is logic? This is not an easy question to answer, but I’ll do my best here: Logic has to do first and foremost with reasons. And what are reasons? Reasons are justifications for belief. Presumably we all have many beliefs—I believe that 2+2=4, that all mammals have kidneys, and that the capital of Belgium is at a higher latitude than is the capital of Italy. No doubt, some of our beliefs can be checked by hand to verify that they are true. But not all of them! Am I sure that all mammals have kidneys?
Regardless of the details of which beliefs we do or don’t hold, it’s generally expected that it is better (and therefore we should want) to believe true things. That is, we want to ensure that a high percentage of our beliefs are true.Historically, philosophers have wondered if there were any patterns of reasoning, any rules, which we could rely upon to generate true beliefs. Starting with Aristotle, philosophers have codified these rules, rules which—if followed—guarantee the truth of their conclusions! You and I instinctively know how to apply some of these rules: If it’s true that all vertebrates have kidneys, and all mammals are vertebrates, then it follows with certainty that all mammals have kidneys.
Logic is thus a powerful tool for truth: From true premises, the application of the rules of logic will permit me to always and only derive true conclusions. At the end of the 19th century several technical innovations permitted the translation of mathematics into this logical language, and soon thereafter, these rules were discovered to provide the basis for computation. The very same rules which permit us to confidently conclude that all mammals have kidneys can be implemented in mechanical devices which can then be programmed to achieve remarkable calculational feats! The prevalence and importance of logic can be seen in computers from the electronic components themselves (it’s no accident they’re called “logic” gates), all the way to high-level computer programming languages like Python.
Why don’t we teach logic at an earlier age? Frankly, I see no reason other than inertia and the institutional status quo.