This deck builds propositional logic from the ground up. It separates syntax from semantics, defines well-formed formulas by induction, and covers truth tables and the material conditional, tautologies and satisfiability, logical equivalence, and the canonical DNF and CNF forms. It then proves an impossibility result about functional completeness, works through natural deduction, states soundness and completeness, and closes with the Curry-Howard bridge. It targets the classic traps: reading vacuous truth as falsity, affirming the consequent, confusing a conditional with its converse, and treating "or" as exclusive.
Subject: Foundations of Higher Mathematics · 110 slides · symbolic lesson
Open the interactive version of this deck · Homework for this lesson
Objectives
By the end of this deck you will be able to:
1. Separate the syntax of a formula from its semantics, and build well-formed formulas by the grammar.
2. Compute truth tables and classify a formula as a tautology, a contradiction, or a contingency.
3. Reason about the conditional without falling for vacuous truth, the converse, or affirming the consequent.
4. Put any formula into canonical DNF and CNF straight from its truth table.
5. Say precisely what functional completeness means, and prove one connective set cannot express another.
6. Connect entailment, natural deduction, soundness and completeness, and the Curry-Howard view of proofs as programs.
Concept
A proposition is a declarative statement that is definitely true or definitely false - never both, never neither.
It is raining and 7 is prime are propositions. Close the door and x plus 1 are not: a command and an open expression carry no truth value.
bivalence — The governing assumption of classical propositional logic: every proposition has exactly one of two truth values, true or false. This is what makes truth tables finite and total.
Counterexample
Discussion prompt
A proposition is a declarative statement that is definitely true or definitely false - never both, never neither.
That is stated as though it always holds. Do one of two things: produce a case where it fails, or say precisely what rules such a case out. "It just does" is not on the menu.
Hint: Hunt at the extremes first — zero, one, negative, empty, equal. If every extreme survives, the reason they survive is the proof.
Answer:
It is raining and 7 is prime are propositions. Close the door and x plus 1 are not: a command and an open expression carry no truth value.
Intuition
Two different worlds are in play, and beginners blur them together.
Syntax is about shape: which strings of symbols count as legal formulas. It is pure grammar, like checking that source code parses.
Semantics is about meaning: given truth values for the atoms, what value does the whole formula take. This is like running the parsed program.
Analogy
Discussion prompt
Explain Two worlds: shape versus meaning by analogy to something with no Foundations of Higher Mathematics in it at all — a queue, a recipe, a map, a bank balance, whatever fits. Then say where your analogy breaks.
Hint: An analogy that never breaks is not an analogy, it is the same idea wearing a hat. Find the seam — that is the part that is actually new.
Answer:
Two different worlds are in play, and beginners blur them together.
Concept
Ask the two questions on purpose, one at a time.
Syntactic question: is this string a legal formula? Answered by the grammar alone, with no truth values in sight.
Semantic question: is this formula true? Answered only once you fix a truth value for every atom that appears in it.
Explain it
Discussion prompt
Explain Keep the two questions apart to a student a year behind you. No notation, no jargon they have not met — and it still has to be true.
Hint: If your explanation needs a symbol they have never seen, you are describing the notation rather than the idea.
Answer:
Ask the two questions on purpose, one at a time.
Concept
Start from atomic propositions - indivisible truth-valued letters, written p, q, r.
Five connectives build bigger formulas from smaller ones:
\[ \neg \qquad \land \qquad \lor \qquad \to \qquad \leftrightarrow \]
Read in order: not, and, or, implies (the conditional), and if and only if (the biconditional).
Concept
A well-formed formula is defined inductively: a few base cases, then rules that build new formulas from old ones.
\[ \varphi \;::=\; p \;\mid\; \neg \varphi \;\mid\; (\varphi \land \varphi) \;\mid\; (\varphi \lor \varphi) \;\mid\; (\varphi \to \varphi) \;\mid\; (\varphi \leftrightarrow \varphi) \]
Base case: every atom is a formula. Inductive step: wrap existing formulas in a connective. Nothing else counts.
inductive definition — A definition with base cases plus construction rules, naming the smallest set closed under those rules - the logic analogue of an algebraic data type in a typed language.
Ranking
Put in order
Put the moves of Worked example: is this string a formula? into the order they have to happen.
Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. By the base case, each of p, q, and r is well-formed on its own.
Worked example
Decide whether the string below is a legal formula, and show how the grammar builds it.
\[ ((p \land q) \to \neg r) \]
Atoms are formulas
Why: By the base case, each of p, q, and r is well-formed on its own.
Apply the AND rule
Why: The conjunction rule combines the two formulas p and q into one parenthesized formula.
\[ (p \land q) \]
Apply the NOT rule
Why: The negation rule turns the formula r into a new formula.
\[ \neg r \]
Apply the conditional rule
Why: The implication rule joins the two sub-formulas into the whole thing.
\[ ((p \land q) \to \neg r) \]
Verify by re-parsing top down
Why: The outermost connective is the conditional; its left side is the conjunction and its right side is a negation, each already shown legal. So the string is a well-formed formula.
Picture it
Animation
Shows: Each line of the worked example "is this string a formula?", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: The outermost connective is the conditional; its left side is the conjunction and its right side is a negation, each already shown legal. So the string is a well-formed formula.
Concept
Because each non-atomic formula was built by exactly one rule at its top, it has a single main connective and one parse tree.
unique readability — Every formula is either an atom or has exactly one main connective with uniquely determined immediate sub-formulas. Parsing is unambiguous - there is only one way to take a formula apart.
That single decomposition is exactly what lets us define a formula's truth value by recursion on its structure: one way down means the recursive definition is well-defined.
Definition probe
Sort into buckets
Every line below is part of the definition of bivalence or of unique readability — one or the other, never both. Put each where it belongs.
Concept
To give a formula meaning, first fix the meaning of its atoms.
valuation — A function assigning a truth value, true or false, to every atomic proposition. Also called a truth assignment - it is one row of the truth table.
With n atoms there are exactly two to the power n valuations, one for each row of the truth table:
\[ 2^{n} \]
Concept
A valuation only knows about atoms. Extend it to every formula by recursion on structure.
The extended map, the semantic function, reads a formula's main connective and combines the values of its parts using that connective's truth table:
\[ \overline{v}(\neg\varphi)=\mathsf{T} \iff \overline{v}(\varphi)=\mathsf{F}, \qquad \overline{v}(\varphi\land\psi)=\mathsf{T} \iff \overline{v}(\varphi)=\mathsf{T}\ \text{and}\ \overline{v}(\psi)=\mathsf{T} \]
Unique readability from the last slide is precisely what makes this recursion well-defined.
Step zero
Discussion prompt
Worked example: evaluate under a valuation — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Plug in the atoms
Answer:
Worked example
Evaluate the formula under the valuation that makes p true, q true, and r false.
\[ ((p \land q) \to \neg r) \]
Plug in the atoms
Why: Substitute each atom's assigned value: p and q become true, r becomes false.
\[ ((\mathsf{T} \land \mathsf{T}) \to \neg \mathsf{F}) \]
Reduce the conjunction
Why: True and true is true, so the antecedent collapses to true.
\[ (\mathsf{T} \to \neg \mathsf{F}) \]
Reduce the negation
Why: Not false is true, so the consequent is true.
\[ (\mathsf{T} \to \mathsf{T}) \]
Reduce the conditional
Why: True implies true is true.
\[ \mathsf{T} \]
Verify the one risky node
Why: A conditional is false only for a true antecedent with a false consequent; here the consequent is true, so the value true is correct. The formula is true under this valuation.
Picture it
Animation
Shows: Each line of the worked example "evaluate under a valuation", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: A conditional is false only for a true antecedent with a false consequent; here the consequent is true, so the value true is correct. The formula is true under this valuation.
Concept
Each connective is defined by a tiny table giving its output for every combination of inputs.
| p | q | not p | p and q | p or q |
|---|---|---|---|---|
| T | T | F | T | T |
| T | F | F | F | T |
| F | T | T | F | T |
| F | F | T | F | F |
and is true only when both parts are true. or is true when at least one is true - the inclusive or. Hold that word; it becomes a trap later.
Pattern
Step through it
Step through Truth tables of not, and, or one row at a time. What is driving the change, and what would the row after the last one be?
Concept
The conditional is the trickiest connective. Read it as a promise: if the antecedent holds, the consequent must hold.
\[ p \to q \]
| p | q | p implies q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
The promise is broken - and the conditional false - in exactly one case: a true antecedent with a false consequent. Every other row is true.
Pattern
Step through it
Step through The material conditional one row at a time. What is driving the change, and what would the row after the last one be?
Intuition
Picture the promise if it rains, I bring an umbrella.
It rains and I bring one: promise kept, true. It rains and I forget: promise broken, false.
It does not rain at all: I was never obligated to do anything, so the promise cannot have been broken - it counts as true. That is vacuous truth.
vacuous truth — A conditional with a false antecedent is automatically true, because the promise was never triggered. False antecedent means true conditional, no matter the consequent.
Anomaly
Predict first
A student writes this, and it looks reasonable:
Claim: if 3 is even, then 3 is odd must be false, because its conclusion is false.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: The reader judges the conditional by the consequent alone and ignores the antecedent.
A false antecedent makes the conditional vacuously true, whatever the consequent says.
Why: The reader judges the conditional by the consequent alone and ignores the antecedent. But 3 is even is false, so the promise was never triggered.
Trap
Claim: if 3 is even, then 3 is odd must be false, because its conclusion is false.
\[ (\mathsf{F} \to \mathsf{F}) \]
Where it goes wrong
Why: The reader judges the conditional by the consequent alone and ignores the antecedent. But 3 is even is false, so the promise was never triggered.
| antecedent | consequent | claimed | actual |
|---|---|---|---|
| F | F | false | true |
A false antecedent makes the conditional vacuously true, whatever the consequent says.
\[ (\mathsf{F} \to \mathsf{F}) = \mathsf{T} \]
The correct read
Why: A conditional is false only in the true-then-false row. A false antecedent lands us in a true row every time.
Notation
Annotate
From Trap: reading a vacuous truth as false — read this one piece at a time. What is each part doing?
On: \( (\mathsf{F} \to \mathsf{F}) \)
3 is even is false, so the promise was never triggered.Concept
The biconditional is true exactly when both sides carry the same truth value.
\[ p \leftrightarrow q \]
| p | q | p iff q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | T |
It packs two conditionals together - the forward one and its converse - which is exactly why proving an if and only if requires both directions.
\[ (p \to q) \land (q \to p) \]
Pattern
Step through it
Step through The biconditional bundles both directions one row at a time. What is driving the change, and what would the row after the last one be?
Concept
Classify a formula by looking down its entire truth-table column.
tautology — A formula true under every valuation - the column is all true. Example: p or not p, the law of excluded middle.
contradiction — A formula false under every valuation - the column is all false. Example: p and not p.
contingency — A formula true under some valuations and false under others - the column is mixed.
Matching
Match the pairs
Match each term to the definition this lesson gave it — not the one you would guess from the word.
Why: These are the working definitions of inductive definition, valuation, vacuous truth, tautology, contradiction as Propositional Logic & the Architecture of Proof uses them. Pairing them correctly is the test of whether you could state each one with the slide switched off.
Estimation
Predict first
Classify the formula below as a tautology, a contradiction, or a contingency.
Commit before you compute: what does Worked example: classify by truth table come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.
Correct: Verify the one suspicious row
Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. An OR is false only when both parts are false.
Worked example
Classify the formula below as a tautology, a contradiction, or a contingency.
\[ (p \to q) \lor (q \to p) \]
Build the columns
Why: Evaluate both conditionals across all four valuations, then combine them with OR.
| p | q | p to q | q to p | whole |
|---|---|---|---|---|
| T | T | T | T | T |
| T | F | F | T | T |
| F | T | T | F | T |
| F | F | T | T | T |
Scan the final column
Why: Every entry in the last column is true.
Verify the one suspicious row
Why: An OR is false only when both parts are false. But a conditional and its converse cannot both be false at once - that would demand p true with q false and simultaneously q true with p false. So the column is all true: the formula is a tautology.
Picture it
Animation
Shows: Each line of the worked example "classify by truth table", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: An OR is false only when both parts are false. But a conditional and its converse cannot both be false at once - that would demand p true with q false and simultaneously q true with p false. So the column is all true: the formula is a tautology.
Concept
A formula is satisfiable when at least one valuation makes it true - its column has at least one true entry.
satisfiable — Some valuation makes the formula true. Unsatisfiable means every valuation makes it false, i.e. the formula is a contradiction.
Validity and satisfiability are two sides of one coin, linked by negation:
\[ \varphi \text{ is a tautology} \iff \neg\varphi \text{ is unsatisfiable} \]
Intuition
Checking always true and checking ever true are the same machine aimed in opposite directions.
To test whether a formula is a tautology, hunt for a single falsifying row. Find one and it is not a tautology; find none and it is.
That hunt is exactly a satisfiability search on the negation. This is why a single SAT solver answers both questions - the workhorse behind modern hardware and software verification.
Step zero
Discussion prompt
Worked example: tautology or merely satisfiable? — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Tabulate it
Answer:
Worked example
Is the formula below a tautology? If not, is it at least satisfiable?
\[ (p \to q) \to p \]
Tabulate it
Why: Compute the inner conditional first, then feed it into the outer conditional.
| p | q | p to q | whole |
|---|---|---|---|
| T | T | T | T |
| T | F | F | T |
| F | T | T | F |
| F | F | T | F |
Read the column
Why: The whole column is true, true, false, false: neither all true nor all false.
Verify with explicit witnesses
Why: Row p true, q true makes it true, so it is satisfiable. Row p false, q true makes it false, so it is not a tautology. It is a contingency. (Wrapping one more conditional around it gives Peirce's law, which IS a tautology - watch for that later.)
Pattern
Step through it
Step through Worked example: tautology or merely satisfiable? one row at a time. What is driving the change, and what would the row after the last one be?
Pattern
1. One column per atom
Why: List every distinct atom; for n atoms there are two to the n rows covering all valuations.
2. Fill sub-formulas bottom up
Why: Work outward from the atoms, one connective at a time, using that connective's truth table.
3. Read the final column
Why: All true means tautology; all false means contradiction and unsatisfiable; mixed means contingency and satisfiable.
4. For validity, hunt a false row
Why: A single false row disproves a tautology; equivalently, run a satisfiability search on the negation.
Elimination
Eliminate the wrong options
Which single valuation makes p implies q false?
3 of these 4 are wrong. Strike them one at a time, and say what rules each one out before you strike the next. The survivor is the answer.
Survives elimination: A
Why: The material conditional is false only when the antecedent is true and the consequent is false - that is the single row p true, q false. Every other combination makes the conditional true.
Check
The conditional is false in exactly one row. Find it.
Check your understanding
Which single valuation makes p implies q false?
Answer: A
Why: The material conditional is false only when the antecedent is true and the consequent is false - that is the single row p true, q false. Every other combination makes the conditional true.
Concept
Two formulas are logically equivalent when they carry the same truth value under every valuation - identical truth-table columns.
\[ \varphi \equiv \psi \]
logical equivalence — The two formulas agree on every row of the truth table; equivalently, their biconditional is a tautology.
Equivalent formulas are interchangeable inside any larger formula without changing that formula's meaning - substitution of equals for equals.
Concept
Logical equivalence is itself an equivalence relation on the set of all formulas.
It is reflexive (a formula matches itself), symmetric (order does not matter), and transitive (equivalence chains compose).
So formulas partition into classes, and each class is exactly one Boolean function. This quotient is the Lindenbaum-Tarski algebra - your first taste of quotienting by a congruence, a theme that returns for groups and rings.
Concept
Three equivalences do most of the everyday rewriting. Memorize them.
De Morgan - a negation distributes over and/or by flipping the connective:
\[ \neg(p \land q) \equiv \neg p \lor \neg q, \qquad \neg(p \lor q) \equiv \neg p \land \neg q \]
Implication as or - a conditional is a disjunction in disguise:
\[ p \to q \equiv \neg p \lor q \]
Contrapositive - a conditional equals its contrapositive:
\[ p \to q \equiv \neg q \to \neg p \]
Hypothesis
Predict first
Worked example: simplify the negation of a conditional is about to be worked. State your hypothesis first: which rule or definition decides this one, and what is the first move it forces? Then watch whether the example agrees with you.
Correct: Rewrite the conditional as a disjunction
Why: Implication-as-or replaces the conditional by not-p or q.
A hypothesis you wrote down is falsifiable; a vague sense of how it will go is not. If the example opens somewhere else, that gap is the thing worth chasing.
Worked example
Rewrite the negation of a conditional as a conjunction, using an equivalence chain.
\[ \neg(p \to q) \]
Rewrite the conditional as a disjunction
Why: Implication-as-or replaces the conditional by not-p or q.
\[ \neg(\neg p \lor q) \]
Push the negation inward
Why: De Morgan turns a negated OR into an AND of negations.
\[ \neg\neg p \land \neg q \]
Cancel the double negation
Why: Not-not-p is just p.
\[ p \land \neg q \]
Verify against the truth table
Why: The negation of the conditional is true exactly when the conditional is false, namely p true and q false. The conjunction p and not-q is also true only when p true and q false. Same column, so the equivalence is correct.
\[ \neg(p \to q) \equiv p \land \neg q \]
Picture it
Animation
Shows: Each line of the worked example "simplify the negation of a conditional", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: The negation of the conditional is true exactly when the conditional is false, namely p true and q false. The conjunction p and not-q is also true only when p true and q false. Same column, so the equivalence is correct.
Anomaly
Predict first
A student writes this, and it looks reasonable:
Claim: if it is a dog, then it is a mammal says the same thing as if it is a mammal, then it is a dog.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: Swapping antecedent and consequent gives the converse - a different formula.
A conditional and its converse are not equivalent; the row p false, q true tells them apart.
Why: Swapping antecedent and consequent gives the converse - a different formula. A cat is a mammal but not a dog, so the row p false, q true splits them.
Trap
Claim: if it is a dog, then it is a mammal says the same thing as if it is a mammal, then it is a dog.
\[ p \to q \quad\text{versus}\quad q \to p \]
Where it breaks
Why: Swapping antecedent and consequent gives the converse - a different formula. A cat is a mammal but not a dog, so the row p false, q true splits them.
| p | q | p to q | q to p |
|---|---|---|---|
| F | T | T | F |
A conditional and its converse are not equivalent; the row p false, q true tells them apart.
What actually is equivalent
Why: A conditional equals its contrapositive, not its converse.
\[ p \to q \equiv \neg q \to \neg p \]
Break the constraint
Discussion prompt
The rule this trap just fixed:
A conditional equals its contrapositive, not its converse.
Now break it on purpose. Build a case that violates it and follow the consequences until something visibly fails. Where does the failure first show up — and would you have noticed it if you had not been looking?
Hint: The dangerous rules are the ones whose violation still produces an answer. If yours fails loudly, try to find one that fails quietly.
Answer:
Swapping antecedent and consequent gives the converse - a different formula. A cat is a mammal but not a dog, so the row p false, q true splits them.
Prediction
Predict first
Which formula is logically equivalent to if p then q?
Answer it in your own words, now, with nothing to choose from. The options are on the next slide — and picking the right one off a list is an easier skill than producing it.
Correct: if not q then not p
Why: A conditional is equivalent to its contrapositive: if p then q shares its truth table with if not q then not p, both false only when p is true and q is false.
Check
Exactly one of these matches if p then q in every row.
Check your understanding
Which formula is logically equivalent to if p then q?
Answer: A
Why: A conditional is equivalent to its contrapositive: if p then q shares its truth table with if not q then not p, both false only when p is true and q is false.
Concept
Move from single formulas to arguments: a set of premises entails a conclusion.
\[ \Gamma \models \varphi \]
semantic entailment — The premises entail the conclusion when every valuation making all the premises true also makes the conclusion true. Equivalently: there is no countermodel - no row with true premises and a false conclusion.
This is the semantic meaning of a valid argument: truth of the premises guarantees truth of the conclusion, by meaning alone.
Ranking
Put in order
Put the moves of Worked example: check an entailment into the order they have to happen.
Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. Lay out both premises and the conclusion across every valuation.
Worked example
Does the argument hold? Premises: p or q and not p. Conclusion: q.
\[ \{\, p \lor q,\ \neg p \,\} \models q \;? \]
Tabulate premises and conclusion
Why: Lay out both premises and the conclusion across every valuation.
| p | q | p or q | not p | q |
|---|---|---|---|---|
| T | T | T | F | T |
| T | F | T | F | F |
| F | T | T | T | T |
| F | F | F | T | F |
Keep only premise-satisfying rows
Why: Both premises are true only in the row p false, q true - the only row where p-or-q and not-p hold together.
Verify the conclusion there
Why: In that single surviving row the conclusion q is true. Every premise-true row makes q true, so the entailment holds. This is disjunctive syllogism.
Picture it
Animation
Shows: Each line of the worked example "check an entailment", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: In that single surviving row the conclusion q is true. Every premise-true row makes q true, so the entailment holds. This is disjunctive syllogism.
Anomaly
Predict first
A student writes this, and it looks reasonable:
Tempting argument: from p implies q and q, conclude p.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: This affirms the consequent. The countermodel p false, q true makes both premises true while the conclusion p is false - so the premises do not guarantee the conclusion.
The valid move is modus ponens: from p implies q and p, conclude q.
Why: This affirms the consequent. The countermodel p false, q true makes both premises true while the conclusion p is false - so the premises do not guarantee the conclusion.
Trap
Tempting argument: from p implies q and q, conclude p.
\[ p \to q,\quad q \;\;\Rightarrow?\;\; p \]
Why it fails
Why: This affirms the consequent. The countermodel p false, q true makes both premises true while the conclusion p is false - so the premises do not guarantee the conclusion.
| p | q | p to q | q | p |
|---|---|---|---|---|
| F | T | T | T | F |
The valid move is modus ponens: from p implies q and p, conclude q.
\[ p \to q,\quad p \;\;\Rightarrow\;\; q \]
The fix
Why: Affirm the antecedent, not the consequent. The countermodel p false, q true no longer satisfies the premises, because now p itself must be true.
Translation
\( p \to q,\quad q \;\;\Rightarrow?\;\; p \)
Draw it
Translate both ways. First write the expression above as a sentence with no symbols in it at all. Then cover it, and write your sentence back as notation. If the two versions disagree, the disagreement is the thing to fix.
Check
Three of these argument forms are valid. One is a classic fallacy.
Check your understanding
Which argument form is INVALID?
p implies q and q, infer p (correct)p implies q and p, infer qp implies q and not q, infer not pp or q and not p, infer qAnswer: A
Why: Form A affirms the consequent: from a conditional plus its consequent it wrongly infers the antecedent. The countermodel p false, q true makes both premises true but the conclusion false.
Concept
In logic, or is inclusive: it is true when at least one side is true, including when both are.
\[ p \lor q \]
Everyday speech often means exclusive or - soup or salad suggests one, not both. Logic does not, unless you build the exclusive version by hand.
Exclusive or, written XOR, is true exactly when the two sides differ:
\[ p \oplus q \equiv (p \lor q) \land \neg(p \land q) \]
Anomaly
Predict first
A student writes this, and it looks reasonable:
Reading p or q as excluding the both-true case.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: The reader marks the row p true, q true as false, secretly substituting exclusive or for inclusive or.
Inclusive or is true in the both-true row as well.
Why: The reader marks the row p true, q true as false, secretly substituting exclusive or for inclusive or.
Trap
Reading p or q as excluding the both-true case.
\[ p \lor q \]
The slip
Why: The reader marks the row p true, q true as false, secretly substituting exclusive or for inclusive or.
| p | q | claimed or | actual or |
|---|---|---|---|
| T | T | F | T |
Inclusive or is true in the both-true row as well.
\[ (\mathsf{T} \lor \mathsf{T}) = \mathsf{T} \]
The fix
Why: Use XOR only when you truly mean one but not both; the bare or always includes the overlap.
\[ p \oplus q \]
Notation
Annotate
From Trap: reading 'or' as exclusive — read this one piece at a time. What is each part doing?
On: \( (\mathsf{T} \lor \mathsf{T}) = \mathsf{T} \)
one but not both; the bare or always includes the overlap.Concept
Every formula can be rewritten into two standard shapes, prized by solvers and circuit designers. A literal is an atom or its negation, like p or not p.
DNF — Disjunctive normal form: an OR of ANDs. Each AND-clause is a minterm - a full combination of literals that is true on exactly one row.
CNF — Conjunctive normal form: an AND of ORs. Each OR-clause is a maxterm - false on exactly one row. This is the standard input shape for SAT solvers.
Concept
The truth table hands you both normal forms directly - no clever algebra needed.
Canonical DNF: for every row where the formula is true, write the minterm true on exactly that row, then OR them all together.
Canonical CNF: for every row where the formula is false, write the maxterm false on exactly that row, then AND them all together.
Minterm rule: use p where p is true in the row, not p where p is false. Maxterm rule is the mirror image: p where p is false, not p where p is true.
Step zero
Discussion prompt
Worked example: canonical DNF of XOR — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Select the true rows
Answer:
Worked example
Build the canonical DNF of exclusive or from its truth table.
| p | q | p xor q |
|---|---|---|
| T | T | F |
| T | F | T |
| F | T | T |
| F | F | F |
Select the true rows
Why: The formula is true in rows p true, q false and p false, q true.
Write each minterm
Why: Row p true, q false gives p and not-q. Row p false, q true gives not-p and q.
\[ (p \land \neg q), \qquad (\neg p \land q) \]
OR the minterms
Why: Disjoin the two minterms into one formula.
\[ (p \land \neg q) \lor (\neg p \land q) \]
Verify against the table
Why: Row (T,F): first minterm true, so the OR is true - matches. Row (F,T): second minterm true - matches. Rows (T,T) and (F,F): both minterms false, so the OR is false - matches. The DNF reproduces the XOR column exactly.
Picture it
Animation
Shows: Each line of the worked example "canonical DNF of XOR", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Row (T,F): first minterm true, so the OR is true - matches. Row (F,T): second minterm true - matches. Rows (T,T) and (F,F): both minterms false, so the OR is false - matches. The DNF reproduces the XOR column exactly.
Estimation
Predict first
Now build the canonical CNF of the same exclusive or.
Commit before you compute: what does Worked example: canonical CNF of XOR come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.
Correct: Verify against the table
Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. Row (T,T): first maxterm is false-or-false, so the AND is false - matches.
Worked example
Now build the canonical CNF of the same exclusive or.
| p | q | p xor q |
|---|---|---|
| T | T | F |
| T | F | T |
| F | T | T |
| F | F | F |
Select the false rows
Why: The formula is false in rows p true, q true and p false, q false.
Write each maxterm
Why: Flip each literal for a maxterm: row p true, q true gives not-p or not-q; row p false, q false gives p or q.
\[ (\neg p \lor \neg q), \qquad (p \lor q) \]
AND the maxterms
Why: Conjoin the two maxterms into one formula.
\[ (\neg p \lor \neg q) \land (p \lor q) \]
Verify against the table
Why: Row (T,T): first maxterm is false-or-false, so the AND is false - matches. Row (F,F): second maxterm false-or-false - matches. Rows (T,F) and (F,T): both maxterms true, so the AND is true - matches. The CNF reproduces the XOR column exactly.
Picture it
Animation
Shows: Each line of the worked example "canonical CNF of XOR", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Row (T,T): first maxterm is false-or-false, so the AND is false - matches. Row (F,F): second maxterm false-or-false - matches. Rows (T,F) and (F,T): both maxterms true, so the AND is true - matches. The CNF reproduces the XOR column exactly.
Pattern
1. Compute the full truth table
Why: One output column across all valuations - this is the ground truth every form must match.
2. For DNF, mine the true rows
Why: Each true row yields one minterm (p where true, not-p where false); OR them all.
3. For CNF, mine the false rows
Why: Each false row yields one maxterm (p where false, not-p where true); AND them all.
4. Handle the edge cases
Why: A tautology has no false rows, so its canonical CNF is empty (always true); a contradiction has no true rows, so its canonical DNF is empty (always false).
Prediction
Predict first
Which formula is the canonical DNF of that truth table?
Answer it in your own words, now, with nothing to choose from. The options are on the next slide — and picking the right one off a list is an easier skill than producing it.
Correct: (p and not q) or (not p and q)
Why: Canonical DNF ORs the minterms of the true rows: p and not-q for row (T,F), not-p and q for row (F,T). That disjunction reproduces the XOR column.
Check
A formula is true exactly on rows p true q false and p false q true (that is XOR). Which is its canonical DNF?
Check your understanding
Which formula is the canonical DNF of that truth table?
Answer: A
Why: Canonical DNF ORs the minterms of the true rows: p and not-q for row (T,F), not-p and q for row (F,T). That disjunction reproduces the XOR column.
Concept
A set of connectives is functionally complete if it can express every Boolean function whatsoever.
functional completeness — A connective set is complete when every truth table - every Boolean function of any number of inputs - is definable using only those connectives.
The canonical DNF construction already proves one set is complete: it builds any table from not, and, and or alone.
\[ \{\neg, \land, \lor\} \]
Concept
You can shrink the toolkit to a single connective. NAND is functionally complete by itself.
\[ p \uparrow q \;\equiv\; \neg(p \land q) \]
The strategy: if NAND can build not, and, and or, then by the previous slide it can build every Boolean function.
This is why real hardware is fabricated almost entirely from NAND gates - one primitive suffices for all of logic.
Estimation
Predict first
Show that NAND alone expresses not, and, or - and hence every Boolean function.
Commit before you compute: what does Worked example: NAND builds everything come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.
Correct: Verify OR on a row
Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. Take p false, q false: p NAND p is true, q NAND q is true, and true NAND true is false - matching p or q, which is false there.
Worked example
Show that NAND alone expresses not, and, or - and hence every Boolean function.
\[ p \uparrow q \equiv \neg(p \land q) \]
Build NOT
Why: Feed the same input to both ports: not-p is p NAND p.
\[ p \uparrow p \equiv \neg(p \land p) \equiv \neg p \]
Build AND
Why: AND is a negated NAND, and negation is itself a self-NAND: NAND the output with itself.
\[ (p \uparrow q) \uparrow (p \uparrow q) \equiv \neg(p \uparrow q) \equiv p \land q \]
Build OR
Why: By De Morgan, or is the NAND of the two negations, each negation a self-NAND.
\[ (p \uparrow p) \uparrow (q \uparrow q) \equiv \neg p \uparrow \neg q \equiv \neg(\neg p \land \neg q) \equiv p \lor q \]
Verify OR on a row
Why: Take p false, q false: p NAND p is true, q NAND q is true, and true NAND true is false - matching p or q, which is false there. The remaining rows check the same way, so all three connectives are reproduced correctly.
Picture it
Animation
Shows: Each line of the worked example "NAND builds everything", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Take p false, q false: p NAND p is true, q NAND q is true, and true NAND true is false - matching p or q, which is false there. The remaining rows check the same way, so all three connectives are reproduced correctly.
Intuition
Why should one connective set be unable to reach another? The reason is an invariant that some connectives preserve and others wreck.
Both and and or are monotone: raising an input from false to true can only keep the output the same or raise it - never lower it.
Negation does the opposite: it turns a rise into a fall. No stack of monotone parts can manufacture that fall, and that gap is the entire impossibility proof.
Step zero
Discussion prompt
Worked example: and/or cannot express not — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: State the invariant
Answer:
Worked example
Prove that the connectives and, or alone cannot express negation.
\[ \{\land, \lor\} \ \text{cannot define}\ \neg \]
State the invariant
Why: Claim: any formula built from atoms using only and and or is true under the all-true valuation - the assignment that sets every atom to true.
Prove it by structural induction
Why: Base case: a bare atom is true under the all-true valuation. Inductive step: if two sub-formulas are both true there, then their AND is true and their OR is true. So every and/or formula is true under all-true.
Apply it to negation
Why: Under the all-true valuation, p is true, so not-p is false. But the invariant forces every and/or formula to be true there.
Verify the contradiction
Why: If some and/or formula equaled not-p, it would be both true (by the invariant) and false (equal to not-p) under the all-true valuation - impossible. Hence no such formula exists: and and or cannot express not.
Picture it
Animation
Shows: Each line of the worked example "and/or cannot express not", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: If some and/or formula equaled not-p, it would be both true (by the invariant) and false (equal to not-p) under the all-true valuation - impossible. Hence no such formula exists: and and or cannot express not.
Anomaly
Predict first
A student writes this, and it looks reasonable:
Claim: since and, or, and the constants let me write a huge variety of formulas, the set {and, or} must be functionally complete.
It is wrong. Say what breaks — and say it before you turn the page.
Correct: Completeness means reaching EVERY Boolean function, including negation.
You need a non-monotone ingredient. Adding not restores completeness.
Why: Completeness means reaching EVERY Boolean function, including negation. The monotonicity invariant shows not-p is unreachable, so the set is incomplete no matter how many formulas you build.
Trap
Claim: since and, or, and the constants let me write a huge variety of formulas, the set {and, or} must be functionally complete.
Where it breaks
Why: Completeness means reaching EVERY Boolean function, including negation. The monotonicity invariant shows not-p is unreachable, so the set is incomplete no matter how many formulas you build.
You need a non-monotone ingredient. Adding not restores completeness.
\[ \{\neg, \land, \lor\} \]
The fix
Why: Any complete set must contain something non-monotone, like not or NAND. Monotone-only sets can never flip an input, so they miss half of all Boolean functions.
Two truths and a lie
Sort into buckets
Some of these hold up and some are the exact mistakes this lesson is built to prevent. Sort them.
if 3 is even, then 3 is odd must be false, because its conclusion is false.; Claim: if it is a dog, then it is a mammal says the same thing as if it is a mammal, then it is a dog.Check
Name the real obstruction to expressing negation with and/or.
Check your understanding
Why can {and, or} not express not?
Answer: A
Why: The monotonicity invariant: every formula built from atoms with only and/or is true under the all-true valuation, whereas not-p is false there, so no such formula can equal not-p.
Concept
Truth tables are semantic. Natural deduction is the syntactic counterpart: proof as a game of licensed moves, with no mention of truth values.
natural deduction — A proof system where each connective has introduction rules (how to build it) and elimination rules (how to use it). A proof is a finite tree of rule applications leading from assumptions to a conclusion.
Sample rules: to prove a conditional, assume the antecedent, derive the consequent, then discharge the assumption. To prove an AND, prove both parts and combine them.
Concept
Two elimination-style rules for the conditional show up constantly.
Modus ponens - from a conditional and its antecedent, detach the consequent:
\[ \dfrac{\; p \to q \qquad p \;}{q} \]
Modus tollens - from a conditional and the denial of its consequent, derive the denial of the antecedent:
\[ \dfrac{\; p \to q \qquad \neg q \;}{\neg p} \]
Modus tollens is just modus ponens applied to the contrapositive.
Ranking
Put in order
Put the moves of Worked example: derive the contrapositive into the order they have to happen.
Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. Assume p implies q; the remaining goal is to derive not-q implies not-p, which we will later discharge.
Worked example
Derive the contrapositive law in natural deduction, discharging every assumption.
\[ \vdash (p \to q) \to (\neg q \to \neg p) \]
Open the outer conditional
Why: Assume p implies q; the remaining goal is to derive not-q implies not-p, which we will later discharge.
\[ \text{assume}\ (p \to q) \]
Open the inner conditional
Why: Assume not-q; the goal narrows to deriving not-p, to be discharged in turn.
\[ \text{assume}\ \neg q \]
Set up negation-introduction
Why: To prove not-p, assume p and aim for a contradiction.
\[ \text{assume}\ p \]
Fire modus ponens
Why: From p implies q and p, detach q.
\[ p \to q,\ p \ \Rightarrow\ q \]
Reach a contradiction
Why: We now have q from modus ponens and not-q by assumption; together they are absurd, so the assumption p yields not-p.
\[ q,\ \neg q \ \Rightarrow\ \bot \ \Rightarrow\ \neg p \]
Verify by discharging and cross-checking
Why: Discharge not-q to get not-q implies not-p, then discharge p implies q to get the whole formula, which now depends on no assumptions. Cross-check by table: the formula is false only if p implies q is true while not-q implies not-p is false, but those two are equivalent, so that never occurs - it is a tautology, confirming the derivation.
Picture it
Animation
Shows: Each line of the worked example "derive the contrapositive", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Discharge not-q to get not-q implies not-p, then discharge p implies q to get the whole formula, which now depends on no assumptions. Cross-check by table: the formula is false only if p implies q is true while not-q implies not-p is false, but those two are equivalent, so that never occurs - it is a tautology, confirming the derivation.
Concept
Two different arrows now sit side by side, and keeping them apart is the crux of the subject.
Entailment is semantic - about all valuations. Derivability is syntactic - about the existence of a proof:
\[ \Gamma \models \varphi \qquad \text{versus} \qquad \Gamma \vdash \varphi \]
One is defined by meaning (truth tables); the other by pushing symbols according to rules, with truth never mentioned.
Concept
For propositional logic the two arrows coincide - the central theorem tying syntax to semantics:
\[ \Gamma \vdash \varphi \iff \Gamma \models \varphi \]
soundness — Everything provable is true: if a proof exists, the premises genuinely entail the conclusion. The proof system never lies (the left-to-right direction).
completeness — Everything true is provable: if the premises entail the conclusion, some proof exists. The proof system misses nothing (the right-to-left direction).
Soundness keeps the syntax honest; completeness keeps it powerful. Together they let you switch freely between tables and proofs.
Concept
Propositional validity is decidable: an algorithm always halts with a correct yes or no.
The truth-table method is that algorithm - finitely many rows to check. So testing for tautology or for satisfiability is solvable in principle, even though the table is exponentially large in the number of atoms.
That decidability is special. First-order validity, in the next deck, is only semi-decidable - a genuine cliff, not just a harder computation.
Explain it
Discussion prompt
Explain Propositional validity is decidable to a student a year behind you. No notation, no jargon they have not met — and it still has to be true.
Hint: If your explanation needs a symbol they have never seen, you are describing the notation rather than the idea.
Answer:
Propositional validity is decidable: an algorithm always halts with a correct yes or no.
Concept
A stunning bridge closes the loop: logic and computation turn out to be the same structure, read two ways.
Curry-Howard correspondence — Propositions correspond to types, and proofs correspond to programs. Proving a proposition is exactly writing a well-typed program of the matching type.
A proof of a conditional is a function: hand it a proof of the antecedent and it returns a proof of the consequent - which is precisely modus ponens read as function application.
Analogy
Discussion prompt
Explain Curry-Howard: proofs are programs by analogy to something with no Foundations of Higher Mathematics in it at all — a queue, a recipe, a map, a bank balance, whatever fits. Then say where your analogy breaks.
Hint: An analogy that never breaks is not an analogy, it is the same idea wearing a hat. Find the seam — that is the part that is actually new.
Answer:
A stunning bridge closes the loop: logic and computation turn out to be the same structure, read two ways.
Concept
The correspondence is a precise dictionary between connectives and type constructors.
| logic | type | program |
|---|---|---|
| and | product / pair | a pair of values |
| or | sum / tagged union | a tagged choice |
| implies | function | a function value |
| false | empty type | no value exists |
Proving A and B means producing both, hence a pair. Proving A or B means producing one tagged side. Proving false is impossible - the empty type has no inhabitant.
Comparison
Comparison matrix
From The logic-to-types dictionary: refill the type column from what you know. The rest of the table is as it appeared.
| logic | type | program |
|---|---|---|
| and | product / pair | a pair of values |
| or | sum / tagged union | a tagged choice |
| implies | function | a function value |
| false | empty type | no value exists |
Concept
Not every classical tautology comes with a program. Intuitionistic logic keeps only the constructively provable ones.
The measuring sticks are the law of excluded middle and Peirce's law - classical theorems with no intuitionistic proof and no closed program of their type:
\[ p \lor \neg p, \qquad ((p \to q) \to p) \to p \]
Classical logic accepts truth by exhausting cases; intuitionistic logic demands an explicit witness. Curry-Howard makes the difference concrete: a proof you can run versus one you cannot.
Counterexample
Discussion prompt
Not every classical tautology comes with a program. Intuitionistic logic keeps only the constructively provable ones.
That is stated as though it always holds. Do one of two things: produce a case where it fails, or say precisely what rules such a case out. "It just does" is not on the menu.
Hint: Hunt at the extremes first — zero, one, negative, empty, equal. If every extreme survives, the reason they survive is the proof.
Answer:
The measuring sticks are the law of excluded middle and Peirce's law - classical theorems with no intuitionistic proof and no closed program of their type:
Elimination
Eliminate the wrong options
In Curry-Howard, the type corresponding to p or q is?
3 of these 4 are wrong. Strike them one at a time, and say what rules each one out before you strike the next. The survivor is the answer.
Survives elimination: A
Why: Under Curry-Howard, disjunction corresponds to a sum type: a proof of p-or-q is a tagged value that is either a proof of p or a proof of q, carrying the tag of which side holds.
Check
Translate a connective into its type-theory partner.
Check your understanding
In Curry-Howard, the type corresponding to p or q is?
Answer: A
Why: Under Curry-Howard, disjunction corresponds to a sum type: a proof of p-or-q is a tagged value that is either a proof of p or a proof of q, carrying the tag of which side holds.
p and q, not disjunction.p implies q, not disjunction.Pattern
1. Fix the syntax
Why: Define formulas inductively; unique readability makes recursion over their structure well-defined.
2. Give them semantics
Why: A valuation plus the semantic function assigns each formula a truth value; tautology, satisfiability, and entailment are all read off the table.
3. Build a proof system
Why: Natural deduction derives conclusions by licensed introduction and elimination rules, entirely on the syntactic side.
4. Tie the two together
Why: Soundness and completeness prove derivability and entailment coincide; decidability makes the whole thing checkable; Curry-Howard reveals proofs as programs.
Real world
Discussion prompt
Outside this lesson: where does Propositional Logic & the Architecture of Proof actually turn up? Name one concrete situation — a job, a piece of software someone ships, a decision somebody has to make — and say which part of Pattern: the architecture of proof is doing the work in it.
Hint: Vague is the failure mode here. "Engineering" is not a situation; "deciding whether this build is fast enough to ship" is.
Answer:
That deck builds propositional logic from the ground up. It separates syntax from semantics, defines well-formed formulas by induction, and covers truth tables and the material conditional, tautologies and satisfiability, logical equivalence, and the canonical DNF and CNF forms. It then proves an impossibility result about functional completeness, works through natural deduction, states soundness and completeness, and closes with the Curry-Howard bridge. It targets the classic traps: reading vacuous truth as falsity, affirming the consequent, confusing a conditional with its converse, and treating "or" as exclusive.
Connect it up
Draw it
One page, no notation unless you need it: draw how these connect — Pattern: the truth-table method · Pattern: table to canonical DNF and CNF · Pattern: the architecture of proof · A proposition has one of two truth values · Two worlds: shape versus meaning. Put an arrow wherever one of them is what makes another possible, and label the arrow with why.
Recap
You separated syntax from semantics, built formulas by induction, and evaluated them with the semantic function.
You classified formulas as tautology, contradiction, or contingency; linked validity to satisfiability; and mastered the conditional - dodging the vacuous-truth, converse, affirming-the-consequent, and exclusive-or traps.
You put formulas into canonical DNF and CNF, proved {not, and, or} and NAND complete, and proved {and, or} incomplete with a monotonicity invariant.
Finally you met natural deduction, the soundness and completeness bridge provable if and only if entailed, decidability, and Curry-Howard - propositions as types, proofs as programs. This architecture underlies every later proof in the course.
Want this taught 1-on-1? Alexander tutors Foundations of Higher Mathematics — $55/session, free consultation.