Marginal

Mathematical Logic

Formal logic from truth tables to self-reference: propositional logic and normal forms, first-order logic and its structures, soundness and completeness, Peano arithmetic and Gödel numbering, the incompleteness theorems, the provability predicate, Löb's theorem and the modal logic of provability.

19 lessons in 2 units

Start your free trial14 days free. No card needed.
What you'll learn

19 lessons, one small step at a time

Each lesson states its goal, then works up to it in short steps with practice after each. A placement test at the start skips what you already know.

Propositional & First-Order Logic

10 lessons
  1. Connectives & truth valuesEvaluate compound formulas built with the connectives, and translate English sentences into formulas.
  2. Truth tablesBuild the truth table of a formula, count its rows and its true rows, and classify formulas as tautologies, contradictions or satisfiable.
  3. Tautologies & equivalenceRecognize tautologies, use the standard equivalences for implication and negation, and decide whether a conclusion follows from premises.
  4. Normal formsRecognize CNF and DNF, convert a formula to them by rewriting, read canonical forms off a truth table, and show that a few connectives express every Boolean function.
  5. SatisfiabilityCheck whether an assignment satisfies a CNF formula, and tell which special cases of SAT are easy.
  6. ResolutionResolve two clauses, refute an unsatisfiable set of clauses, and describe the power and limits of resolution.
  7. QuantifiersWrite first-order formulas, and evaluate existential and universal claims over a finite domain.
  8. Quantifier order & negationEvaluate formulas whose quantifier order matters, negate quantified sentences, and put formulas in prenex form.
  9. Rules of inferenceApply the valid rules of inference, spot the common fallacies, and write a formal derivation.
  10. Soundness & completenessTell provability from truth using soundness and completeness, and apply compactness.

Arithmetic & Self-Reference

9 lessons
  1. Peano arithmeticCompute with numerals and the recursive equations of Peano arithmetic, prove laws for every number by induction, and explain why PA has nonstandard models.
  2. Gödel numberingEncode sequences as Gödel numbers and decode them, and explain how arithmetization lets a theory talk about its own proofs.
  3. The diagonal lemmaApply the diagonal lemma to build self-referential sentences, outline its construction, and explain why truth is not definable in arithmetic.
  4. The incompleteness theoremsExplain Gödel's first incompleteness theorem and which theories it applies to, and the second theorem's limit on proving consistency.
  5. Provability as □Translate statements about provability into □ notation, and read boxed formulas.
  6. Derivability conditionsState the derivability conditions, use them in short derivations, and explain the Löbian obstacle.
  7. Löb's theoremApply Löb's theorem to decide what PA proves about its own provability, and follow its proof.
  8. Kripke framesEvaluate □ and ◇ at the worlds of a Kripke frame, and match frame properties with modal axioms.
  9. The logic of provabilityEvaluate □⊥ in the frames of provability logic, and state what Solovay's theorem says about GL.
Sample lesson

Connectives & truth values

Goal: Evaluate compound formulas built with the connectives, and translate English sentences into formulas.

Logic studies which conclusions follow from which premises, independent of what the statements are about. Its simplest layer, propositional logic, builds compound statements from simple ones with a handful of connectives, the same operations computer circuits are built from.

We will meet the connectives, evaluate formulas, and finish with translating English.

Step 1: The connectives

Each connective has a fixed truth table:

¬p: true exactly when p is false; p ∧ q: both true; p ∨ q: at least one true (false only when both are false)
p → q: false only when p is true and q false
p ↔ q: same truth value; p ⊕ q: different truth values (exclusive or)

The implication p → q is true whenever p is false: a promise is only broken if its condition is met and it is not kept. So with p = F and q = F, the true formulas are p → q, p ↔ q and ¬p, while p ∧ q, p ∨ q and p ⊕ q are false. With p = T and q = F, p ∨ q and p ⊕ q are true.

Step 2: Evaluating formulas

To evaluate a compound formula, work from the innermost parentheses outward. With p = T, q = F and r = T: (p → q) ∨ r = F ∨ T = T, and (p → q) → r = F → T = T, while (p → q) ∧ r = F. Chains of ⊕ count parity: p ⊕ q ⊕ r is true exactly when an odd number of the three are true. To find an assignment that makes a formula true, work backward: (p ∧ q) ∨ (¬p ∧ r) is true when p and q are both true, or when p is false and r true.

Step 3: Translating English

Translating English into formulas starts by naming the simple statements, then reading the connective words. "And" and "but" both become ∧. "Or" is usually inclusive, ∨, unless the sentence says "but not both", which is ⊕. "If p, then q", "q if p" and "p only if q" are all p → q. "Unless" works like ∨: "I walk unless it rains" is w ∨ r. So "the market clears only if prices adjust" is c → a.

In the app, each step ends with practice questions, new ones every time, and the lesson comes back later in spaced reviews.

Start Mathematical Logic

Lessons that need something you haven't learned yet bring it in first, from any course.

Start your free trial14 days free. No card needed.