Propositional Logic & the Architecture of Proof

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

What this lesson covers

The lesson, slide by slide

1. What you will be able to do

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.

2. A proposition has one of two truth values

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.

3. Break it if you can: A proposition has one of two truth values

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.

4. Two worlds: shape versus meaning

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.

5. By analogy: Two worlds: shape versus meaning

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.

6. Keep the two questions apart

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.

7. Teach it back: Keep the two questions apart

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.

8. Atoms and the five connectives

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).

9. Well-formed formulas, defined by induction

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.

10. What has to happen first: Worked example: is this string a formula?

Ranking

Put in order

Put the moves of Worked example: is this string a formula? into the order they have to happen.

  1. Atoms are formulas
  2. Apply the AND rule
  3. Apply the NOT rule
  4. Apply the conditional rule
  5. Verify by re-parsing top down

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.

11. Worked example: is this string a formula?

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.

12. is this string a formula? — line by line

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.

13. Unique readability makes recursion legal

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.

14. Take the definitions apart: bivalence vs unique readability

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.

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.
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.
b1
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.
b2
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.

15. A valuation fixes the atoms

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} \]

16. The semantic function extends a valuation

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.

17. Plan first: Worked example: evaluate under a valuation

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:

  1. Plug in the atoms
  2. Reduce the conjunction
  3. Reduce the negation
  4. Reduce the conditional
  5. Verify the one risky node

18. Worked example: evaluate under a valuation

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.

19. evaluate under a valuation — line by line

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.

20. Truth tables of not, and, or

Concept

Each connective is defined by a tiny table giving its output for every combination of inputs.

pqnot pp and qp or q
TTFTT
TFFFT
FTTFT
FFTFF

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.

21. Watch it run: Truth tables of not, and, or

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?

  1. Step 1: p is T
  2. Step 2: p is T
  3. Step 3: p is F
  4. Step 4: p is F

22. The material conditional

Concept

The conditional is the trickiest connective. Read it as a promise: if the antecedent holds, the consequent must hold.

\[ p \to q \]

pqp implies q
TTT
TFF
FTT
FFT

The promise is broken - and the conditional false - in exactly one case: a true antecedent with a false consequent. Every other row is true.

23. Watch it run: The material conditional

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?

  1. Step 1: p is T
  2. Step 2: p is T
  3. Step 3: p is F
  4. Step 4: p is F

24. Why only true-then-false is false

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.

25. Something is wrong here: reading a vacuous truth as false

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.

26. Trap: reading a vacuous truth as false

Trap

The 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.

antecedentconsequentclaimedactual
FFfalsetrue

The fix

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.

27. Decode the notation: Trap: reading a vacuous truth as false

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}) \)

  • 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.
  • A conditional is false only in the true-then-false row. A false antecedent lands us in a true row every time.

28. The biconditional bundles both directions

Concept

The biconditional is true exactly when both sides carry the same truth value.

\[ p \leftrightarrow q \]

pqp iff q
TTT
TFF
FTF
FFT

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) \]

29. Watch it run: The biconditional bundles both directions

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?

  1. Step 1: p is T
  2. Step 2: p is T
  3. Step 3: p is F
  4. Step 4: p is F

30. Tautology, contradiction, contingency

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.

31. Term to definition: Propositional Logic & the Architecture of Proof

Matching

Match the pairs

Match each term to the definition this lesson gave it — not the one you would guess from the word.

  • t1. inductive definition
  • t2. valuation
  • t3. vacuous truth
  • t4. tautology
  • t5. contradiction
  • d1. 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.
  • d2. 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.
  • d3. A conditional with a false antecedent is automatically true, because the promise was never triggered. False antecedent means true conditional, no matter the consequent.
  • d4. A formula true under every valuation - the column is all true. Example: p or not p, the law of excluded middle.
  • d5. A formula false under every valuation - the column is all false. Example: p and not p.

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.

32. Guess the shape of the answer: Worked example: classify by truth table

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.

33. Worked example: classify by truth table

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.

pqp to qq to pwhole
TTTTT
TFFTT
FTTFT
FFTTT

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.

34. classify by truth table — line by line

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.

35. Satisfiability and the SAT/TAUT duality

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} \]

36. One engine, pointed two ways

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.

37. Plan first: Worked example: tautology or merely satisfiable?

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:

  1. Tabulate it
  2. Read the column
  3. Verify with explicit witnesses

38. Worked example: tautology or merely satisfiable?

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.

pqp to qwhole
TTTT
TFFT
FTTF
FFTF

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.)

39. Watch it run: Worked example: tautology or merely satisfiable?

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?

  1. Step 1: p is T
  2. Step 2: p is T
  3. Step 3: p is F
  4. Step 4: p is F

40. Pattern: the truth-table method

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.

41. Rule out three: Check: when is a conditional false?

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.

  • A. p true, q false
  • B. p false, q true
  • C. p false, q false
  • D. p true, q true

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.

42. Check: when is a conditional false?

Check

The conditional is false in exactly one row. Find it.

Check your understanding

Which single valuation makes p implies q false?

  • A. p true, q false (correct)
  • B. p false, q true
  • C. p false, q false
  • D. p true, q true

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.

Why B tempts people
A false antecedent makes the conditional vacuously true, not false.
Why C tempts people
Both false still means a false antecedent, so the conditional is again vacuously true.
Why D tempts people
A true antecedent with a true consequent keeps the promise, so the conditional is true.

43. Logical equivalence

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.

44. Equivalence is an equivalence relation

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.

45. The three workhorse equivalences

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 \]

46. State the rule before it runs: Worked example: simplify the negation of…

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.

47. Worked example: simplify the negation of a conditional

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 \]

48. simplify the negation of a conditional — line by line

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.

49. Something is wrong here: a conditional is not its converse

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.

50. Trap: a conditional is not its converse

Trap

The 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.

pqp to qq to p
FTTF

The fix

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 \]

51. Break it on purpose: a conditional is not its converse

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.

52. Answer it before you see the options: Check: contrapositive versus converse

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.

53. Check: contrapositive versus converse

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?

  • A. if not q then not p (correct)
  • B. if q then p
  • C. if not p then not q
  • D. if p then not 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.

Why B tempts people
This is the converse, which swaps antecedent and consequent; it is not equivalent to the original.
Why C tempts people
This is the inverse, which negates both parts without swapping - it equals the converse, not the original.
Why D tempts people
This negates only the consequent, giving the pattern of not(p implies q), the opposite of the conditional.

54. Semantic entailment

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.

55. What has to happen first: Worked example: check an entailment

Ranking

Put in order

Put the moves of Worked example: check an entailment into the order they have to happen.

  1. Tabulate premises and conclusion
  2. Keep only premise-satisfying rows
  3. Verify the conclusion there

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.

56. Worked example: check an entailment

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.

pqp or qnot pq
TTTFT
TFTFF
FTTTT
FFFTF

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.

57. check an entailment — line by line

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.

58. Something is wrong here: affirming the consequent

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.

59. Trap: affirming the consequent

Trap

The 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.

pqp to qqp
FTTTF

The fix

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.

60. Say it in words: Trap: affirming the consequent

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.

61. Check: spot the fallacy

Check

Three of these argument forms are valid. One is a classic fallacy.

Check your understanding

Which argument form is INVALID?

  • A. from p implies q and q, infer p (correct)
  • B. from p implies q and p, infer q
  • C. from p implies q and not q, infer not p
  • D. from p or q and not p, infer q

Answer: 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.

Why B tempts people
This is modus ponens, a valid form: affirming the antecedent forces the consequent.
Why C tempts people
This is modus tollens, a valid form: denying the consequent forces denial of the antecedent.
Why D tempts people
This is disjunctive syllogism, a valid form: ruling out one disjunct forces the other.

62. In logic, 'or' is inclusive

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) \]

63. Something is wrong here: reading 'or' as exclusive

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.

64. Trap: reading 'or' as exclusive

Trap

The 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.

pqclaimed oractual or
TTFT

The fix

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 \]

65. Decode the notation: Trap: reading 'or' as exclusive

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} \)

  • The reader marks the row p true, q true as false, secretly substituting exclusive or for inclusive or.
  • Use XOR only when you truly mean one but not both; the bare or always includes the overlap.

66. Two normal forms: DNF and CNF

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.

67. Canonical forms straight from the table

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.

68. Plan first: Worked example: canonical DNF of XOR

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:

  1. Select the true rows
  2. Write each minterm
  3. OR the minterms
  4. Verify against the table

69. Worked example: canonical DNF of XOR

Worked example

Build the canonical DNF of exclusive or from its truth table.

pqp xor q
TTF
TFT
FTT
FFF

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.

70. canonical DNF of XOR — line by line

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.

71. Guess the shape of the answer: Worked example: canonical CNF of XOR

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.

72. Worked example: canonical CNF of XOR

Worked example

Now build the canonical CNF of the same exclusive or.

pqp xor q
TTF
TFT
FTT
FFF

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.

73. canonical CNF of XOR — line by line

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.

74. Pattern: table to canonical DNF and CNF

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).

75. Answer it before you see the options: Check: pick the canonical DNF

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.

76. Check: pick the canonical DNF

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?

  • A. (p and not q) or (not p and q) (correct)
  • B. (p and q) or (not p and not q)
  • C. (not p or not q) and (p or q)
  • D. (p or not q) and (not p or q)

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.

Why B tempts people
This used the false rows instead of the true rows, so it builds XNOR, the negation of XOR.
Why C tempts people
This is the canonical CNF of XOR - a conjunction of maxterms, not a disjunction of minterms.
Why D tempts people
This is a conjunction of OR-clauses (a CNF shape), and it actually encodes the biconditional, again the negation of XOR.

77. Functional completeness

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\} \]

78. NAND alone is complete

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.

79. Guess the shape of the answer: Worked example: NAND builds everything

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.

80. Worked example: NAND builds everything

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.

81. NAND builds everything — line by line

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.

82. An invariant that negation destroys

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.

83. Plan first: Worked example: and/or cannot express not

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:

  1. State the invariant
  2. Prove it by structural induction
  3. Apply it to negation
  4. Verify the contradiction

84. Worked example: and/or cannot express not

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.

85. and/or cannot express not — line by line

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.

86. Something is wrong here: assuming and/or is complete

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.

87. Trap: assuming and/or is complete

Trap

The 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.

The fix

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.

88. Which of these survive contact with Propositional Logic & the Architecture of…?

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.

Holds up
A proposition is a declarative statement that is definitely true or definitely false - never both, never neither.; Two different worlds are in play, and beginners blur them together.; Ask the two questions on purpose, one at a time.
Breaks
Claim: 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.
sound
These are stated as this lesson states them — each one survives the edge cases Propositional Logic & the Architecture of Proof puts it through.
flawed
Each of these is lifted from a trap in this deck: reasonable-sounding, and wrong in a way that only shows up once you rely on it.

89. Check: why and/or falls short

Check

Name the real obstruction to expressing negation with and/or.

Check your understanding

Why can {and, or} not express not?

  • A. every and/or formula is true when all atoms are true, but not-p is false there (correct)
  • B. because and and or each take two arguments while not takes one
  • C. because and and or are commutative and not is not
  • D. because there are infinitely many Boolean functions to express

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.

Why B tempts people
Arity is irrelevant - you could nest binary connectives freely; the obstruction is monotonicity, not the number of inputs.
Why C tempts people
Commutativity has nothing to do with which functions are expressible; the real invariant is monotonicity.
Why D tempts people
For n inputs there are only finitely many Boolean functions, so cardinality is not the obstacle.

90. Natural deduction: proof as licensed moves

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.

91. Modus ponens and modus tollens

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.

92. What has to happen first: Worked example: derive the contrapositive

Ranking

Put in order

Put the moves of Worked example: derive the contrapositive into the order they have to happen.

  1. Open the outer conditional
  2. Open the inner conditional
  3. Set up negation-introduction
  4. Fire modus ponens
  5. Reach a contradiction
  6. Verify by discharging and cross-checking

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.

93. Worked example: derive the contrapositive

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.

94. derive the contrapositive — line by line

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.

95. Two arrows: entailment and derivability

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.

96. Soundness and completeness

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.

97. Propositional validity is decidable

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.

98. Teach it back: Propositional validity is decidable

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.

99. Curry-Howard: proofs are programs

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.

100. By analogy: Curry-Howard: proofs are programs

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.

101. The logic-to-types dictionary

Concept

The correspondence is a precise dictionary between connectives and type constructors.

logictypeprogram
andproduct / paira pair of values
orsum / tagged uniona tagged choice
impliesfunctiona function value
falseempty typeno 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.

102. Fill in: type for The logic-to-types dictionary

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.

logictypeprogram
andproduct / paira pair of values
orsum / tagged uniona tagged choice
impliesfunctiona function value
falseempty typeno value exists

103. Classical versus intuitionistic logic

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.

104. Break it if you can: Classical versus intuitionistic logic

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:

105. Rule out three: Check: reading the dictionary

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.

  • A. a sum (tagged union) type
  • B. a product (pair) type
  • C. a function type
  • D. the empty type

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.

106. Check: reading the dictionary

Check

Translate a connective into its type-theory partner.

Check your understanding

In Curry-Howard, the type corresponding to p or q is?

  • A. a sum (tagged union) type (correct)
  • B. a product (pair) type
  • C. a function type
  • D. the empty type

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.

Why B tempts people
A product (pair) type corresponds to conjunction, p and q, not disjunction.
Why C tempts people
A function type corresponds to implication, p implies q, not disjunction.
Why D tempts people
The empty type corresponds to falsehood, the uninhabited proposition, not disjunction.

107. Pattern: the architecture of proof

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.

108. Where this shows up: Propositional Logic & the Architecture of Proof

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.

109. Connect it up: Propositional Logic & the Architecture of Proof

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.

110. What you can do now

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.

Sources

  1. Enderton, A Mathematical Introduction to Logic, Ch. 1 (Sentential Logic)
  2. All truth tables, equivalence chains, the XOR normal forms, the NAND-completeness constructions, the monotonicity impossibility proof, the countermodels, and the contrapositive derivation were re-derived and checked by hand. — Verified 2026-07-21.

Want this taught 1-on-1? Alexander tutors Foundations of Higher Mathematics — $55/session, free consultation.

Book on Wyzant · Text (657) 465-8108