“Contrariwise,’ continued Tweedledee, ‘if it was so, it might be; and if it were so, it would be; but as it isn’t, it ain’t. That’s logic.”

Tweedledee and Tweedledum – Through the Looking-Glass, and What Alice Found There

## Definition

### Logic

Logic is a branch of science that studies correct forms of reasoning. It plays a fundamental role in such disciplines as philosophy, *mathematics*, and *computer science*. Like philosophy and mathematics, logic has ancient roots. The earliest treatises on the nature of correct reasoning were written over 2000 years ago. Some of the most prominent philosophers of ancient Greece wrote of the nature of deduction more than 2300 years ago, and thinkers in ancient China wrote of logical paradoxes around the same time. However, though its roots may be in the distant past, logic continues to be a vibrant field of study to this day.^{1}

### Symbolic Logic

Symbolic logic, also called formal logic, is a set of methods for determining whether an argument is valid or invalid. Formal logic represents statements with placeholders called constants and variables, and uses five logical operators for connecting simple statements into more complex ones.

Gottlob Frege (1848–1925) invented the first real system of formal logic. The system he invented is really one logical system embedded within another. The smaller system, sentential logic (SL) — also known as propositional logic^{2} — uses letters to stand for simple statements, which are then linked together using symbols for five key concepts: not, and, or, if, and if and only if.

The larger system, quantifier logic — also known as predicate logic^{5} — includes all of the rules from sentential logic, but expands upon them. Quantifier logic uses different letters to stand for the subject and the predicate of a simple statement.^{3}

### Boolean Algebra

The earliest version of formal logic — that is, logic with symbols rather than English words — made use of the fact that you can get along with only three operators. Boolean algebra was the first attempt at turning philosophical logic into a rigorous mathematical system. Boolean algebra is really just a version of SL that uses different symbols, so in this section I start exploring Boolean algebra by making just a few little changes to SL.^{3}

## Who

You should know some level of logic if you are going to be in any field that uses computers (e.g., computer science), electrical engineer and even a mathematician.

## What

This page introduces you to logic and how the various forms of logic can be, and are, used. It’s up to you to decide what breadth and depth you need to learn to be useful to you.

## Why

Propositional logic is also known by the names sentential logic, propositional calculus and sentential calculus. It is useful in a variety of fields, including, but not limited to:^{4}

- workflow problems
- computer logic gates
- computer science
- game strategies
- designing electrical systems

Predicate logic’s most current application in the real world is the development of artificial intelligence (AI). See *Predicate logic in AI | First order logic in Artificial Intelligence* in the **Videos** section below.

See Theoretical Knowledge Vs Practical Application.

## How

Many of the **References** and **Additional Reading** links, and **Videos** will assist you with Boolean algebra, symbolic logic and logic. As some professors say: “It is intuitively obvious to even the most casual observer.”

## References

^{1} “An Introduction To Symbolic Logic | Mathematical Association Of America”. 2021. *maa.org*. https://www.maa.org/press/periodicals/convergence/an-introduction-to-symbolic-logic.

^{2} As the name suggests propositional logic is a branch of mathematical logic which studies the logical relationships between propositions (or statements, sentences, assertions) taken as a whole, and connected via logical connectives.

^{3} Zegarelli, Mark. *Logic for Dummies*. Hoboken, NJ: Wiley Publishing Inc., 2007.

^{4} “Propositional Logic | Brilliant Math & Science Wiki”. 2021. *brilliant.org*. https://brilliant.org/wiki/propositional-logic/.

^{5} Predicate logic, first-order logic or quantified logic is a formal language in which propositions are expressed in terms of predicates, variables and quantifiers. It is different from propositional logic which lacks quantifiers. It should be viewed as an extension to propositional logic, in which the notions of truth values, logical connectives, etc., still apply but propositional letters, will be replaced by a newer notion of proposition involving predicates and quantifiers.^{6}

^{6} “Predicate Logic | Brilliant Math & Science Wiki”. 2021. *brilliant.org*. https://brilliant.org/wiki/predicate-logic/.

## Additional Reading

“Boolean Algebra (Boolean Expression, Rules, Theorems And Examples)”. 2021. *BYJUS*. https://byjus.com/maths/boolean-algebra/.

Bucamp, Eugene. “Why Do We Use Predicate Logic?” 2021. *Quora*. https://www.quora.com/Why-do-we-use-predicate-logic.

Meyer, Jan Christian. “Is Predicate Logic Still Used Today? If Yes, What Are Its Applications In Today’s Life?”. 2021. *Quora*. https://www.quora.com/Is-predicate-logic-still-used-today-If-yes-what-are-its-applications-in-todays-life.

## Videos

After George Boole‘s introduction of an algebraic approach to logic, the subject morphed towards a more set theoretic formulation, with so called Boolean algebra initiated by John Venn and Charles Peirce. Venn diagrams (originally going back to Euler), give us a visual way of representing relations between subsets of a universal set. The operations of meet and join, or intersection and union, together with taking complements become replacements for the product and sum of the Algebra of Boole. In this set theoretic context, de Morgan’s laws clarify how to compute complements of unions and intersections, and the two distributive laws involve 3 sets, and either a union of an intersection, or the intersection of a union. We illustrate how to verify these laws from, first of all a truth table perspective, and then with computations using the Algebra of Boole. There is a heretical message here: professors teaching circuit analysis to engineers might want to start thinking about revamping their subject, and replacing Boolean algebra with the original, more powerful and simpler Algebra of Boole!

We begin to introduce the Algebra of Boole, starting with the bifield of two elements, namely {0,1}, and using that to build the algebra of n-tuples, which is a linear space over the bifield with an additional multiplicative structure. This important abstract development played a key role in the application of logic to circuit and logic gate analysis. Surprisingly it is not quite the same as Boolean algebra, which is closer to the arithmetic of sets. We will move towards understanding the critical difference between these two mathematical approaches to logic. However in both cases, the situation is that mathematics was introduced to make logic more precise and rigorous—- not the other way around! This understanding has major ramifications for an appreciation of why 20th century mathematics got things so fundamentally wrong!

## Games

“WFF `N PROOF: The Game of Modern Logic”. 2021. WFF ‘N PROOF. https://www.wff-n-proof.com/store/math-logic/product_0001.html.

Hailed as “the granddaddy of educational games”, this is the original 1961 classic that teaches propositional logic and develops careful reasoning skills. Reviewers say WFF ‘N PROOF “has the complexity of chess and the excitement of poker”. It was the first resource allocation game – a format in which players explore diverse, creative ways of using fundamental concepts. WFF ‘N PROOF is a subtle sequence of twenty-one game levels with increasing challenge and sophistication. The beginning levels are speed games that can teach six-year olds how to recognize WFFs. (WFFs are Well Formed Formulas – expressions that are to symbolic logic what sentences are to English). Advanced games deal with the rules of inference, logical proof and the nature of formal systems, and will challenge intelligent adults.