Act I · The Machinery of Reason
Part 3 of 42All and Some
first-order logic
What do 'all' and 'some' add to logic, and why can no machine decide which arguments that use them are valid?
De Morgan's argument about horses' heads, which no syllogism captures, is written in Frege's notation and checked by a tableau in 29 steps. The part builds first-order logic: variables, scope and capture, then Tarski's definition of truth in a structure, run on four people and on all 512 relations among three, where 'everyone loves someone' holds in 343 and 'someone is loved by everyone' in 169. The new language counts with identity, states Russell's theory of descriptions and contains all of Aristotle's moods. Gentzen's quantifier rules and tableaux that return a countermodel from an open branch lead to Gödel's completeness theorem by Henkin's construction. Then the turn: compactness gives numbers larger than every natural number, Löwenheim and Skolem give a countable model of the theory of uncountable sets, and Church and Turing show that validity can be confirmed by calculation but not decided. The part ends by asking why this logic is the standard one: second-order logic, Lindström's theorem, and Quine's criterion of what a theory says there is.
What you need. The propositional logic of Part 2; no mathematics beyond the idea of a function and a set.
- The calculation
- first-order models and proof
- The wall
- undecidability (Church 1936), Lindström
- Built toy
- tableau prover; nonstandard models
What you will be able to do
Introductory
- Translate English sentences with 'all', 'some' and relations into first-order formulas, and show by a small structure that the order of two quantifiers matters.
- Evaluate a sentence in a finite structure by Tarski's clauses, object by object.
- Write 'at least two', 'exactly one' and Russell's 'the' with identity.
Advanced
- Build a tableau for an argument and read a countermodel off an open branch.
- Prove from compactness that 'the domain is finite' is not expressible and that arithmetic has nonstandard models.
- Explain why validity is semi-decidable and why a decision procedure would decide halting.
Research
- Carry out Henkin's proof of completeness: witnesses, a maximal consistent set, the term model.
- State Lindström's theorem and place second-order logic, the infinitary logics and the generalized quantifiers on the map of what each gives up.
Applied
- Compute a most general unifier, run the occurs check, and refute a small clause set by resolution as an automated prover does.
- Name a decidable fragment (monadic, two-variable, guarded) and say where description logics and SMT solvers use it.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Introductory 25 min · Advanced 52 min · Research 65 min · Applied 30 min.
- 0The logic inside sentencesIntroductory3 min
- 1Frege's concept-scriptIntroductory2 min
- 2Variables, quantifiers and captureIntroductory4 min
- 3Truth in a structureIntroductory5 min
- 4Saying things exactlyIntroductory4 min
- 5Proving with quantifiersAdvanced4 min
- 6Trees that find countermodelsAdvanced4 min
- 7Gödel's completeness theoremResearch5 min
- 8Compactness and the infiniteAdvanced4 min
- 9Löwenheim, Skolem and the paradoxAdvanced4 min
- 10No machine decides validityAdvanced5 min
- 11Machines that proveApplied5 min
- 12Second-order logicResearch4 min
- 13Why first-order logic?Research4 min
- 14To be is to be the value of a variableIntroductory4 min
- Recap, problems, and where this comes backAll tracks2 min
Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · 中文 · Build the film.
Lecture
The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.
The logic inside sentencesIntroductory3 min
In Part 1, Aristotle's logic stumbled on an argument a child can see is valid. In Part 2 we built a complete logic of whole sentences, and it could not see inside a sentence at all. This part opens sentences up. Its logic, first-order logic, is the logic of 'all', 'some', and relations between things, and it is still the standard language of mathematics and of analytic philosophy.
Here is De Morgan's argument again. In the new notation: for every x, if x is a horse, x is an animal. Therefore, for every x, if there is a y such that x is a head of y and y is a horse, then there is a y such that x is a head of y and y is an animal. The relation 'head of' is now visible, and so is the order of the quantifiers. The Reasoner's new prover, built in Chapter six, checks it in steps: valid.
The same notation writes mathematics. A function is continuous at a when for every epsilon there is a delta such that for every x, if x is within delta of a, then f of x is within epsilon of f of a. Three quantifiers, nested, in an order that matters. And it writes philosophy: Bertrand Russell's analysis of 'the present king of France is bald' is one sentence of first-order logic. This power has a price. Its brick in the Wall: in full first-order logic no machine can decide validity. Every valid argument can be confirmed by calculation, but on an invalid argument, proof search may run forever without returning a negative answer.
So: Frege's notation, and what variables and quantifiers do. Tarski's definition of truth in a structure. How to say exactly 'at least two', 'the', and all of Aristotle's logic. Proofs with quantifiers, and trees that hunt for countermodels. Gödel's completeness theorem, and its strange consequences: numbers larger than all the natural numbers, and a countable model of the theory of uncountable sets. Then the limits: undecidability, second-order logic, Lindström's theorem on why this logic is special, and Quine's criterion of what exists.
What it establishes: De Morgan's horse heads in the new notation; continuity's three quantifiers; Russell's king; the plan; the Wall's third brick.; Computed on screen: the horse-heads tableau: closed, 29 steps, 9 branches
1Frege's concept-scriptIntroductory2 min
In 1879 Gottlob Frege, a mathematician at Jena, published a short book with a long subtitle: a formula language of pure thought, modelled on that of arithmetic. He called it Begriffsschrift, concept-script. It was written in two dimensions. A vertical stroke at the left asserts what follows. 'If A then B' puts B on the top line and A below, joined by a vertical stroke. And 'for every a, F of a' is a small cup in the line, holding a Gothic letter. It looks nothing like what we write today, but it is the same logic, and it was complete.
Frege's deepest move was to drop subject and predicate. For Aristotle, 'Socrates is mortal' joins a subject to a predicate with the copula 'is'. For Frege, 'mortal' is a function, and Socrates its argument. The function maps each object to a truth value: true for the mortals, false for everything else. Frege called such functions concepts. And nothing limits a function to one argument. 'Loves' takes two, 'between' takes three. The relations that defeated Aristotle are just functions of several arguments.
Almost no one read the Begriffsschrift. Its notation was mocked as unreadable, and Frege spent his life in obscurity at Jena. The logic spread in other people's notation: Giuseppe Peano's linear symbols, Whitehead and Russell's Principia Mathematica, and the upside-down A for 'all', introduced by Gentzen in 1935. In 1902 Russell wrote to Frege that he found in his work distinctions one seeks in vain in other logicians. The same letter contained a paradox that destroyed the system Frege had built on this logic, as we will see in Part 6.
What it establishes: the Begriffsschrift (1879) and its two-dimensional notation; function and argument replace subject and predicate; relations as many-place functions; reception (Peano, Principia, Gentzen's ∀); Russell's letter (1902).
2Variables, quantifiers and captureIntroductory4 min
First the grammar, which is short. There are two kinds of expression. Terms name objects: a variable like x, a constant like Socrates, or a function applied to terms, like the father of the father of x, which names x's paternal grandfather. Formulas say things: a relation applied to terms, an identity between two terms, and then the connectives of Part 2, and two new operators, for every x, and there exists an x. So 'Socrates is older than Plato' is an atomic formula, and 'for every x there is a y such that x loves y' is a sentence. The logic is called first-order because its variables range over objects only. There is no variable for 'every property'. That restriction looks arbitrary, and Chapter thirteen will show that it is exactly what makes this logic behave so well.
A quantifier binds the variable it names, throughout its scope. In this formula, the 'for all x' at the front binds every x that follows, here and here. Its scope is everything in the brackets after it. The 'there exists a y' binds the y inside its own, smaller scope. But z is bound by nothing. It is free: like a pronoun with no antecedent, it waits for someone to say what it refers to. A formula with no free variables is a sentence, and only sentences are true or false outright. 'x is older than Plato' is neither until we know who x is.
English hides scope, and logic exposes it. 'Every student read some book.' Does it say that each student read a book, perhaps a different one each? Or that there is one book that every student read? The two readings differ only in the order of the quantifiers. The second entails the first, but not the other way round, and in Chapter five the Reasoner will prove one direction and refute the other. Linguists call this a scope ambiguity, and translating English into logic means choosing a reading.
Now the most important operation in logic, and the most error-prone: substitution. Take the formula 'there is a y such that x loves y', which says that x loves somebody. Replace the free x by the constant a, and you get 'a loves somebody'. Fine. Now replace x by the variable y, naively. You get 'there is a y such that y loves y': somebody loves themselves. The y we put in has been captured by the quantifier, and the meaning has changed completely. The cure is to rename the bound variable first. Bound variables are placeholders, and their names do not matter: 'there is a z such that x loves z' says exactly the same thing. Now substitute, and you get 'y loves somebody', as intended. The official rule: a term is free for x when substituting it captures nothing.
Why care? Because the basic rule for 'all', that what holds of everything holds of any particular term, is only sound when the term is free for the variable. For everything, there is something different from it: true in every world with at least two things. Instantiate x with the variable y, carelessly, and the y is captured. You have derived 'something is not identical to itself', which is false in every world. A true premise, a false conclusion, one careless step. The same bug haunts software. Compilers and proof assistants either rename very carefully, or do away with variable names altogether, using the numbered placeholders Nicolaas de Bruijn introduced in 1972 for his proof checker Automath.
What it establishes: terms and formulas; "first-order"; scope, binding, free variables, sentences; scope ambiguity; substitution, capture, renaming; why ∀E needs "free for"; de Bruijn indices (1972).; Computed on screen: the capture example; ∀x∃y x≠y true at sizes 2–4, ∃y y≠y false everywhere
3Truth in a structureIntroductory5 min
In 1933 Alfred Tarski, in Warsaw, published a long paper on the concept of truth in formalized languages. It begins from a platitude. 'Snow is white' is true if and only if snow is white. Any adequate definition of truth, Tarski said, must yield every sentence of this form. Notice the two levels. The sentence in quotation marks belongs to the language we are talking about, the object language. The sentence after 'if and only if' belongs to the language we are talking in, the metalanguage. Tarski's achievement was to define truth for a formal language, recursively, inside a metalanguage, and his definition is the one every logic textbook still uses.
Truth for a first-order sentence is truth in a structure. A structure is a non-empty collection of objects, the domain, together with an interpretation: for each relation symbol, which objects stand in that relation. Here is a small one. Four people, Ann, Bo, Cy and Di. And one relation, loves, drawn as arrows: Ann loves Bo, Bo loves Cy, Cy loves Ann, and Di loves Cy. Notice that nobody's love is returned.
Here is the definition. Because formulas may have free variables, Tarski defines truth relative to an assignment, which says what object each variable names. An atomic formula is true when the objects its terms name stand in the relation. Negation and conjunction work exactly as in Part 2. And the new clauses: 'for all x, phi' is true when phi is true however we reassign x to an object of the domain, every single one. 'There exists an x' is true when at least one reassignment works. Every clause refers only to smaller formulas, so this is a definition by recursion, exactly like evaluating a formula tree from the leaves up. The difference is that a quantifier node now asks a question about every object in the domain.
Now evaluate 'for every x there is a y such that x loves y' on our four people. The outer quantifier says: go through every choice of x. x is Ann. Is there a y she loves? Yes, Bo. x is Bo: he loves Cy. x is Cy: she loves Ann. x is Di: she loves Cy. Every choice of x found a witness, so the sentence is true in this structure. Notice that the witness depends on x: for Ann it is Bo, for Cy it is Ann.
Swap the quantifiers: there is a y such that every x loves y. Now the outer choice is y, and it must work for every x at once. y is Ann: only Cy loves her. y is Bo: only Ann. y is Cy: Bo and Di, but not Ann, and not Cy herself. y is Di: nobody at all. No choice survives, so this sentence is false here. Same words, same relation, a different order of quantifiers, and a different truth value.
How different are the two sentences? With three people there are nine possible arrows, so two to the nine, , possible love relations. The Reasoner checked both sentences on all of them. 'Everyone loves someone' is true in . 'Someone is loved by everyone' is true in only . Both numbers have a reason. Three hundred and forty-three is seven cubed: each person must love some non-empty set of the three people, and there are seven of those. And one hundred and sixty-nine is five hundred and twelve minus seven cubed: switch every arrow on or off and reverse it, and 'no one is loved by everyone' turns into 'everyone loves someone', so the two are counted alike. Finally, in every structure where the second sentence is true, the first is true too. That is the entailment, checked one structure at a time.
With truth in a structure, validity is defined as before. A sentence is valid when it is true in every structure, and an argument is valid when every structure that makes the premises true makes the conclusion true. But look at what 'every structure' now means. Structures of every finite size, and infinite ones: the natural numbers, the rationals, the reals, and far larger. There is no truth table with a row for each. So it is not at all obvious that validity can be checked by anything finite. That question drives the rest of this part.
What it establishes: Convention T (1933); object language and metalanguage; structures; the satisfaction clauses; ∀∃ and ∃∀ evaluated object by object; validity over all structures.; Computed on screen: four people evaluated quantifier by quantifier; all 512 relations on 3 people: 343 = 7³ and 169 = 512 − 7³, entailment checked on each
4Saying things exactlyIntroductory4 min
With identity, first-order logic can count. 'There are at least two Ps': there is an x and a y, both P, and x is not y. Without that last clause, x and y could be the same thing. 'Exactly one P': there is a P, and every P is identical to it. 'Exactly two': two different Ps, and every P is one of them. Any finite number works the same way, with as many variables as the number. The Reasoner checked each formula against every structure with up to four objects and every possible set of Ps. But there is no single sentence that says 'there are infinitely many Ps'. Chapter eight will prove it.
In 1905 Bertrand Russell used this logic to dissolve a philosophical puzzle. 'The present King of France is bald.' France has no king. So is the sentence true, false, or about nothing at all? And if it is about nothing, how can it mean anything? Russell's answer: the sentence only looks like it names someone. Its logical form is three claims. There is a king of France; there is at most one; and he is bald. Since there is no king, the first claim fails and the whole sentence is plainly false. No mysterious non-existent king is needed. 'The King of France' is not a name at all; it disappears when the sentence is analysed. Frank Ramsey called this theory a paradigm of philosophy.
The theory also explains an ambiguity. 'The King of France is not bald' can mean that there is exactly one king and he is not bald. Or it can mean: it is not the case that there is exactly one king who is bald. The difference is the scope of 'not'. The Reasoner evaluated all three sentences in four small worlds. With no king, the first two are false, and the second reading of 'not bald' is true. With two kings, the same. Only in a world with exactly one king do the two readings agree. In 1950 Peter Strawson objected that, with no king, the sentence is neither true nor false: it presupposes something that fails. That objection opens Part 5.
Aristotle's logic now becomes a small corner of the new one. Each of the four categorical forms is one first-order sentence. 'All S are P': for every x, if x is S, x is P. 'Some S are P': there is an x that is both. The Reasoner translated all two hundred and fifty-six moods and handed each to its first-order model finder. Fifteen have no countermodel. Add the three sentences saying that S, M and P each have members, and twenty-four survive. Exactly the fifteen and the twenty-four that Part 1 found with Venn diagrams: two different methods, one answer. The countermodels are tiny. Most invalid moods fail in a world with a single object, and only one needs three: some P is not M, some M is not S, so all S are P. To refute it you need three different things, one for each premise and one for the failure.
Here is an argument that sounds like a joke and is perfectly valid. Everybody loves a lover. Romeo loves Juliet. Therefore, I love you. Read 'everybody loves a lover' as: whenever x loves anyone, everyone loves x. Romeo loves Juliet, so Romeo is a lover, and everyone loves Romeo. In particular, you love Romeo. So you are a lover, and everyone loves you, including me. Five lines. The Reasoner's tableau proves it too, but blindly: steps, because it tries every person in every rule. Choosing the right instances is the whole art of proof, and Chapter eleven is about machines that learned it.
What it establishes: counting with identity; Russell's theory of descriptions (1905) and its scope ambiguity; Strawson (1950); the 256 moods inside first-order logic; "everybody loves a lover".; Computed on screen: the counting formulas on every structure of size ≤ 4; the King of France in four worlds; 15 and 24 valid moods (agreeing with Part 1), countermodel sizes 1/2/3 = 159/81/1; the lover argument's tableau (718 steps)
5Proving with quantifiersAdvanced4 min
In 1935 Gerhard Gentzen gave the rules for proving with quantifiers that most textbooks still teach, in his system of natural deduction. As in Part 2, each symbol has a rule to bring it in and a rule to take it out. Two of them are easy. What holds of everything holds of any particular thing: from 'for all x, phi', infer phi of any term. And what holds of a particular thing holds of something: from phi of t, infer 'there exists an x such that phi'. The other two carry conditions, and the conditions are the whole point. To prove that everything is phi, prove it of an arbitrary object a, one you have assumed nothing about. And to use 'something is phi', give that something a brand-new name, a, reason about it, and draw only conclusions that do not mention a.
Here is what the condition prevents. Socrates is a philosopher; so everything is a philosopher. As a proof: from P of a, generalize to 'for all x, P of x'. The Reasoner's proof checker refuses line two. The object a is not arbitrary: the premise says something about it. And the model finder shows why it must refuse: a world of two objects, a philosopher and something else.
Now a real proof, of the direction that holds. Someone is loved by everyone. Give that someone a new name, b: assume that everyone loves b. Then, in particular, a loves b, so a loves someone. We assumed nothing about a, so we may generalize: everyone loves someone. That conclusion does not mention b, so it follows from the original premise, and the subproof closes. The Reasoner checks every line, including both side conditions.
Try the converse, and watch where it breaks. Everyone loves someone; so in particular a loves someone. Call that someone b. Now a loves b, and we would like to generalize over the lover. But a is not arbitrary any more: the assumption we are working under is about a. The Reasoner rejects line four. No other proof will succeed either, because the argument is invalid. Two people who love each other: everyone loves someone, but nobody is loved by everyone, since nobody loves themselves.
Logic students meet a famous oddity, named the drinking principle by Raymond Smullyan. There is someone in the pub such that, if they are drinking, everyone is drinking. It sounds absurd, and it is valid. Either everyone is drinking, and then anyone will do, because the 'then' part is true. Or someone is not drinking, and then pick them: the 'if' part is false, so the conditional is true. The tableau in the next chapter closes it in steps. It depends on one assumption that first-order logic makes silently: the domain is never empty. In an empty pub there is no one to pick. Free logic, which allows empty domains and empty names, rejects it, and we meet it again in Parts 5 and 20.
Gentzen's paper did something deeper. He also wrote proofs as trees of sequents: statements that if everything on the left is true, something on the right is. One rule, cut, lets a proof go through a lemma, a formula A that is proved and then used. Gentzen's main theorem says cut can always be eliminated: any proof can be rebuilt without cut lemmas, using pieces of its final premises and conclusion, with term substitutions for quantifiers. The price is length: without lemmas, some proofs grow beyond any tower of exponentials. The payoff is search over those formula shapes. A machine still has to choose terms, so the search can go on forever. The next chapter's trees show both the power and that limit.
What it establishes: Gentzen's quantifier rules and their conditions (1935); hasty generalization refused; a proof of ∃∀ ⊢ ∀∃ and the failed converse; the drinker principle and empty domains; sequents, cut elimination, and why it makes search possible.; Computed on screen: the Reasoner's Fitch checker accepting one proof and rejecting two; the 2-object and 2-person countermodels; the drinker's 6-step tableau
6Trees that find countermodelsAdvanced4 min
In 1955 Evert Beth and Jaakko Hintikka, independently, turned the definition of validity into a search. Raymond Smullyan's book of 1968 gave the method its cleanest form. To test whether a conclusion follows, try to build a world where the premises are true and the conclusion false. Break each formula into what it demands of the world, and wherever there is an 'or', split the search in two. A branch that demands both A and not A cannot describe any world: close it. If every branch closes, no counterexample exists, and the argument is valid. And if a branch is finished and still open, it is a recipe for a countermodel.
Smullyan noticed that every rule is one of four kinds. Alpha formulas, like A and B, demand two things at once: write both on the branch. Beta formulas, like A or B, demand one of two: split. Gamma formulas, like 'for all x', demand something of every object: instantiate with any name on the branch, as often as needed. Delta formulas, like 'there exists an x', demand a witness: give it a brand-new name, exactly the condition of the last chapter.
Here is Barbara, run as a tree. The two premises, and the denial of the conclusion: not everything that is S is P. A delta rule: so some object, call it a, is S and not P. Apply the first premise to a: if a is M, a is P. That is a beta formula, so the tree splits. On the right, a is P, but we already have not P: closed. On the left, a is not M. Apply the second premise to a: if a is S, a is M. Split again. a is not S: closed, since a is S. a is M: closed, since a is not M. Every branch is closed, so there is no world where the premises hold and the conclusion fails. Barbara is valid.
Now an invalid argument. Some S are P, some P are M, so some S are M. Premises, and the denied conclusion: nothing is both S and M. Two delta rules give two new names: a is S and P; b is P and M. The denied conclusion is a gamma formula, so apply it to a: a is not both S and M. Split. Not S closes against S of a. On the other side, a is not M. Apply the gamma formula again, to b, and split. Not M of b closes. But b is not S stays open, and nothing is left to do. So read the world off the branch: a is S and P; b is P and M. In that world both premises are true and the conclusion is false. The tree did not just say 'invalid'. It built the counterexample.
Sometimes the tree never finishes. Test the bad argument of the last chapter: everyone loves someone, so someone is loved by everyone. The tree introduces a person, a zero, who must love someone: a new name, a one. But a one must love someone too: a two. And so on. Each new person brings a new demand, and the demand brings a new person. The Reasoner stops after steps with the branch still open and unfinished. A smarter search would try letting a one love a zero, and find the two-person countermodel at once. But there is no general rule for when to stop growing a tree and look for a loop, and Chapter ten will show why there never can be.
What it establishes: Beth and Hintikka (1955), Smullyan (1968); α, β, γ, δ; Barbara closed; an open branch read as a countermodel; the swap that grows forever.; Computed on screen: the Barbara tree (9 steps, 3 branches); the open tree and its model a: S, P; b: P, M; the swap tableau giving up at 12 steps; the 2-person countermodel
7Gödel's completeness theoremResearch5 min
We now have two ideas of 'follows from'. The first is proof: a finite list of steps, each checkable by a machine. The second is truth: the conclusion is true in every structure where the premises are, and there are infinitely many structures, of every size. In 1928 David Hilbert and Wilhelm Ackermann asked in their textbook whether the rules of proof catch every valid formula. The next year Kurt Gödel, a 23-year-old student in Vienna, answered yes, in his doctoral thesis.
Here is the theorem. If a conclusion follows from premises, in the sense of truth in every structure, then there is a proof of it. Together with soundness, which says that proofs never lead from truth to falsehood, proof and truth coincide exactly. There is an equivalent form that is easier to prove: every consistent set of sentences, every set from which no contradiction can be proved, has a model. Why equivalent? If phi cannot be proved from gamma, then gamma together with not-phi is consistent, and a model of that set is exactly a countermodel to the argument.
Gödel's original proof was intricate. In 1949 Leon Henkin found the proof every textbook now uses, and its idea is wonderful: build the model out of the language itself. First, give every existential claim a witness: for each 'there is an x such that phi', a new name c, and the claim phi of c. Second, decide everything. List all the sentences and take them one at a time, adding each one or its negation, whichever keeps the set consistent. This is the Lindenbaum step from Part 2. Third, let the names themselves be the objects, and let a relation hold between two names exactly when the set says it does. Finally, prove by induction on formulas that a sentence is true in this model exactly when it belongs to the set. The witnesses are what make the existential case work.
Here is the construction on a toy example. The set gamma says that a loves someone, and that nobody loves themselves. Step one: the existential claim gets a witness, a new name c, and the sentence 'a loves c'. Step two: decide every atomic sentence about a and c, in order. Does a love a? Adding that would contradict gamma, so deny it. Does a love c? Yes, already. Does c love a? That is consistent with everything so far, so add it. Does c love c? Deny. Step three: the two names become two objects, and the arrows are the atomic sentences we added. Both sentences of gamma are true in this model, made out of nothing but words. In the real proof the list of sentences is infinite, and the Reasoner's model finder is replaced by consistency, which is defined by proof.
The theorem has three consequences, and they fill the next three chapters. First, validity can be confirmed by brute force: list every possible proof and check each in turn. If the argument is valid, a proof will eventually turn up. Second, compactness: a proof uses only finitely many premises, so anything that follows from a set of premises follows from a finite part of it. Third, Henkin's model is made of names, and there are only countably many names. So every consistent theory has a countable model, even a theory that says there are uncountably many things.
One warning, because the words are confusing. Gödel's completeness theorem, of 1929, says the logic is complete: everything that follows is provable. Two years later his incompleteness theorem said that arithmetic is incomplete: there is a sentence about numbers that the axioms neither prove nor refute. These do not conflict. The undecided sentence does not follow from the axioms, because it is true in some models of them and false in others, and completeness only promises proofs of what follows. The strange models where it fails are the subject of the next chapter, and the theorem itself of Part 7.
What it establishes: Hilbert and Ackermann's question (1928); Gödel's completeness (1929); the consistent-set form; Henkin's proof (1949) step by step; three consequences; completeness vs incompleteness.; Computed on screen: Henkin's construction in miniature: witness, four atoms decided, the term model checked
8Compactness and the infiniteAdvanced4 min
The first consequence of completeness sounds harmless. A set of sentences, even an infinite set, has a model if and only if every finite part of it has a model. The proof is one line. If the whole set had no model, completeness says a contradiction could be proved from it. A proof is finite, so it uses only finitely many of the sentences, and those few already have no model. This is the compactness theorem, and it is the most-used tool in model theory. It is also where first-order logic starts to look strange.
First, counting again. For each number n there is a sentence lambda n that says there are at least n things. The Reasoner checked the first five on structures of sizes one to six: lambda n is true exactly in the structures with at least n objects. Any finite collection of these sentences has a finite model: just take enough objects. All of them together say 'there are infinitely many things', and have only infinite models. Using equality alone, no single sentence expresses that property, but this infinite set does.
Now the strange part. Suppose some sentences, call them Phi, were true in exactly the finite structures. Add to Phi every lambda n. Each finite part of this set has a model: a finite structure big enough for the largest lambda in it. So by compactness the whole set has a model. That model satisfies every lambda, so it is infinite, and it satisfies Phi, which was supposed to be true only in finite structures. Contradiction. First-order logic can say 'at least a million', but it cannot say 'finitely many'. By the same trick it cannot say that a graph is connected, that an order has no infinite descending chains, or that the numbers are just zero, one, two, and so on.
The most famous application is to arithmetic. Take every sentence that is true of the natural numbers, and add a new name c, with the sentences: c is greater than zero, c is greater than one, c is greater than two, and so on forever. Any finite part of this set is true in the ordinary numbers: just let c be a number bigger than the finitely many numerals mentioned. So by compactness the whole set has a model. It satisfies every truth of arithmetic, and yet it contains c, a number bigger than zero, one, two, and every other standard number. Since it obeys the laws of arithmetic, c has a predecessor and a successor, and c plus c is bigger still. Each nonstandard number lives in its own copy of the integers, infinitely far out. Thoralf Skolem built such a model directly in 1934. Every countable nonstandard model is ordered in the same way: the natural numbers, then densely many copies of the integers, arranged like the rationals. No first-order theory can rule them out.
Compactness also rescued an old idea. In 1961 Abraham Robinson applied the same construction to the real numbers. If c is infinitely large, then epsilon, one over c, is positive and yet smaller than every ordinary fraction: an infinitesimal. With it, the derivative becomes what Leibniz said it was: the difference quotient with an infinitesimal step, rounded to the nearest real number. For x squared, the quotient is two x plus epsilon, and rounding gives two x. Bishop Berkeley mocked Leibniz's infinitesimals in 1734 as the ghosts of departed quantities. Two hundred years later, logic proved them consistent.
What it establishes: compactness and its one-line proof; λₙ; "finite" is inexpressible; nonstandard arithmetic (Skolem 1934) and the order type ω + ℤ·ℚ; Robinson's infinitesimals (1961).; Computed on screen: λ₁ … λ₅ on sizes 1–6
9Löwenheim, Skolem and the paradoxAdvanced4 min
The third consequence is the strangest. In 1915 Leopold Löwenheim proved that a satisfiable first-order sentence always has a countable model, one whose objects can be listed first, second, third. Thoralf Skolem extended it to any countable set of sentences. So if a theory has an infinite model, it has a countable one. And going up instead of down, if it has an infinite model, it has models of every larger infinite size too. Put together: no first-order theory with an infinite model can fix how big its models are.
Why is the downward theorem true? Start with any model, however huge. Pick out the objects the sentences name. Every existential sentence that is true about them needs a witness, so add one witness for each. There are only countably many formulas, so this adds only countably many objects. Then add witnesses for the new objects, and witnesses for those, layer after layer. After countably many layers, the collected objects form a smaller model in which exactly the same sentences are true. Logicians call it a Skolem hull. Everything a first-order sentence can demand, a countable world can supply.
Now recall Cantor's theorem, which says that the real numbers cannot be listed. Given any list of reals, build a new number d whose n-th digit differs from the n-th digit of the n-th number on the list. Then d differs from every number on the list, so the list missed it. No list contains every real: there are uncountably many. This is a theorem of ZFC, the axioms of set theory on which almost all of mathematics is built, and ZFC is a first-order theory.
Put the two theorems together. If ZFC is consistent, Löwenheim and Skolem give it a countable model, M. M satisfies every theorem of ZFC, including Cantor's. So inside M there is an object that M takes to be the set of real numbers, and M satisfies the sentence 'this set is uncountable'. But M is countable, so from the outside its 'set of reals' has only countably many members, and we can list them. A model that believes in the uncountable, built from countably many things. This is Skolem's paradox.
As a Price List: four claims that cannot all be true. ZFC has a countable model. ZFC proves the reals are uncountable. What ZFC proves is true in every model of it. And 'uncountable' means the same inside a model as outside. The Reasoner finds one minimal conflict, all four together, and so four exits, one per claim. Three of them cost a theorem: Löwenheim and Skolem's, Cantor's, or soundness. The fourth is the standard resolution, and it was Skolem's own. 'Uncountable' means 'no list of it exists'. The list we drew from outside is not a set in M. Inside M, there is no such list, so M is right, by its own lights, to call its reals uncountable. Skolem concluded that set-theoretic notions are relative to a model.
In 1980 Hilary Putnam turned the paradox into an argument about language itself. Take our best total theory of the world, together with every observation we could ever make, and write it as a set of sentences. By the theorems of this chapter it has many models, of different sizes, all making every sentence true. So what makes our words pick out this world, rather than one of the others? Putnam concluded that a certain picture of truth, as correspondence to a world fixed independently of us, cannot be right. Philosophers still argue about what this argument proves. We come back to it in Parts 18 and 27.
What it establishes: Löwenheim (1915), Skolem (1920); upward and downward; the Skolem hull; Cantor's diagonal; Price List: Skolem's paradox (exit: relativity, Skolem 1922); Putnam's model-theoretic argument (1980).; Computed on screen: the MUS {C, U, T, A} and its four MCSes
10No machine decides validityAdvanced5 min
Truth tables decide propositional logic. Is there something like them for first-order logic? Hilbert and Ackermann called this the Entscheidungsproblem, the decision problem, and named it the main problem of mathematical logic: a mechanical procedure that takes any sentence and decides, in finitely many steps, whether it is valid. It would be Leibniz's calculemus, for all of logic. In 1936 Alonzo Church in Princeton and Alan Turing in Cambridge, independently and within weeks, proved that there is no such procedure.
Turing's proof starts from a question about programs. List every program, and for each one, record whether it halts or runs forever on each input. Suppose some program H could fill in this table: given any program and any input, it says whether the program halts. Then build a new program D. On input P, D asks H whether P halts when run on itself, and does the opposite: if P would halt, D loops; if P would loop, D halts. D's row disagrees with every row of the table at the diagonal, so D is not anywhere in the list. But if H existed, D would be a program, and the list contains every program. So H cannot exist: halting is undecidable. It is the same diagonal that Cantor used for the reals.
Now connect halting to logic. Given any machine T, write down a first-order sentence phi T. It describes T's tape and its rules, one step to the next, and it ends by saying that the machine reaches its halting state. Turing showed that the sentence is valid exactly when the machine halts. So a procedure that decided validity would decide halting, and nothing can. That is the answer to the Entscheidungsproblem.
So validity is lopsided. The valid sentences can be listed: by completeness, a machine that searches all proofs will eventually confirm each one. The invalid ones cannot be listed, or running both searches side by side would decide validity. Here is a sentence that shows why the second search can fail. Everything has something above it; nothing is above itself; and 'above' is transitive. It is true in the natural numbers, ordered by size. But it has no finite model: the Reasoner checked every relation on up to four objects. Follow the arrows in a finite world and you must come back to where you started. So its negation is invalid, and yet every countermodel is infinite. No finite search will ever exhibit one.
This is the third brick in the Wall. The dream: settle every question of logic by calculation. The wall: for full first-order logic, no algorithm can. What survives is semi-decidability: validity can be confirmed by calculation, but never in general refuted. The same diagonal will build the next bricks too: Gödel's incompleteness in Part 7, and Tarski's theorem on truth in Part 8.
The wall has gaps, and they matter. If every predicate takes one argument, as in Aristotle's logic, validity is decidable. Löwenheim saw why in 1915. With k predicates, each object is described by which of them it has, and two objects with the same description can be merged. So a satisfiable sentence has a model with at most two to the k objects, and a finite search settles it. The Reasoner tested this on random sentences with two predicates. The smallest models had one, two, three or four objects, and never more than four. Other decidable fragments: sentences whose existential quantifiers all come before the universal ones; sentences with only two variables; and the guarded fragment, which keeps every quantifier tied to a relation.
These islands are where industry lives. Description logics, close cousins of the two-variable and guarded fragments, are the language of ontologies on the web. The medical terminology SNOMED CT, hundreds of thousands of concepts, is classified by such a reasoner. SMT solvers combine the SAT solvers of Part 2 with decidable theories of arithmetic and data structures, and check software and hardware every day. And one more wall: Boris Trakhtenbrot proved in 1950 that if we only care about finite structures, as databases do, validity becomes even harder: not even semi-decidable.
What it establishes: the Entscheidungsproblem; Church and Turing (1936); the halting diagonal; machines as sentences; semi-decidability; a sentence with only infinite models; the Wall's third brick; monadic logic and other decidable fragments; description logics, SNOMED CT, SMT; Trakhtenbrot (1950).; Computed on screen: no model of the infinity axiom at sizes 1–4 (65,536 relations at size 4); smallest models of 300 random monadic sentences, never above 2² = 4
11Machines that proveApplied5 min
In Part 2, resolution refuted propositional clauses. In 1965 J. Alan Robinson extended it to all of first-order logic, and it became the engine of automated reasoning. First the quantifiers must go. 'Everyone loves someone' becomes 'everyone loves f of x', where f is a new function naming, for each x, someone x loves. It is the witness of Chapter nine, now a function, and it is called a Skolem function. Then the recipe: negate the conclusion, remove the existentials this way, read every remaining variable as 'for all', write everything as clauses, and resolve until the empty clause appears.
Resolution needs one new operation: unification. Can 'John knows x' and 'y knows y's mother' be made identical? Match them piece by piece. The first arguments: y must be John. The second: x must be the mother of y, which is now the mother of John. Both become 'John knows John's mother'. That substitution is the most general unifier, and Robinson proved it is unique up to renaming. Now try 'x knows x' against 'y knows y's mother'. x must be y, and then y must be the mother of y: a term that contains itself. The occurs check fails, and rightly: no finite term is its own mother.
Here is the Reasoner's new resolution prover on the lover argument from Chapter four. Three clauses: everybody loves a lover, written 'if y loves z then x loves y'; Romeo loves Juliet; and the denied conclusion, I do not love you. Resolve the first two, unifying y with Romeo and z with Juliet: everyone loves Romeo. Resolve the first with the denial, unifying x with me and y with you: you love no one. And those two clash, with x as you: the empty clause. Three resolution steps, where the blind tableau took . Unification chooses the instances for us: it is lazy, and binds a variable only when a match forces it.
Why does this work at all? Jacques Herbrand proved in 1930 that a set of clauses is unsatisfiable exactly when some finite collection of its instances, with variables replaced by variable-free terms, is already unsatisfiable as propositional logic. Take the drinker principle. Denied and Skolemized, it becomes: everyone drinks, and for every x, f of x does not drink. Three instances, D of a, not D of f of a, and D of f of a, already contradict each other. So a first-order prover can generate instances and hand them to a SAT solver, and many modern provers do exactly that. The undecidability of Chapter ten lives in one place: no one can say in advance how many instances will be needed.
Can such machines prove things people could not? In 1933 Herbert Robbins asked whether three equations, commutativity, associativity, and a strange third one, are enough to define Boolean algebra, the algebra of Part 2. Tarski and his students worked on it; nobody could prove it. In 1996 William McCune's prover EQP, at Argonne National Laboratory, found the proof after about eight days of search. The New York Times reported it. A problem open for sixty-three years, settled by equational reasoning with unification at its heart.
Automated reasoning is now an industry and a research field. Saturation provers such as Vampire and E compete every year on thousands of problems from the TPTP library. Proof assistants such as Lean, Isabelle and Coq check every step of a human-written proof against a small trusted kernel; they have verified the Four Colour Theorem and the Kepler conjecture. Hammers connect the two: they translate a goal into first-order logic, call the automatic provers, and check whatever proof comes back. And learning systems now search for proofs themselves. In 2024 DeepMind's AlphaProof, trained by reinforcement learning on Lean proofs, together with a geometry system, solved four of the six problems at the International Mathematical Olympiad. Leibniz's calculemus has become a working technology, inside the limits of Chapter ten.
What it establishes: Robinson's resolution (1965); Skolem functions; unification and the occurs check; Herbrand's theorem (1930); Robbins's problem and EQP (1996); Vampire, E, TPTP; Lean, Isabelle, Coq; hammers; AlphaProof (2024).; Computed on screen: the most general unifier of Knows(john, x) and Knows(y, mother(y)); the occurs-check failure; a 3-step resolution refutation of the lover argument
12Second-order logicResearch4 min
Chapter eight showed that no first-order theory can rule out nonstandard numbers. The culprit is induction. In first-order arithmetic, induction is a scheme: one axiom for each formula phi, and there are only countably many formulas. Allow variables for properties, written with capital letters, and induction becomes a single axiom: for every property X, if zero has X and X passes from each number to the next, every number has X. Richard Dedekind proved in 1888 that every model of these axioms is a copy of the natural numbers. A nonstandard number c would break it: take X to be 'is a standard number', which zero has, which passes to successors, and which c lacks.
With variables over properties and relations, everything compactness forbade comes back. 'The domain is finite': every one-to-one map from the domain to itself is onto. Identity itself: a and b are identical when they share every property, which is Leibniz's law. The real numbers, fixed up to isomorphism as a complete ordered field. And 'uncountable' in its intended sense, so Skolem's paradox disappears: a countable model would now get uncountability wrong.
But there is a bill. Here are the properties side by side. First-order logic has a complete proof system, compactness, the Löwenheim-Skolem theorems, and semi-decidable validity. Second-order logic loses every one of them, because it gains the power to pin down the natural numbers and to say 'finite'. Completeness cannot survive. If the second-order axioms fix the natural numbers, then a sentence of arithmetic is true exactly when it follows from them. A complete proof system would therefore list all the truths of arithmetic, and Part 7 proves that nothing can.
Is second-order logic even logic? W. V. Quine said no: it is set theory in sheep's clothing. A variable over properties ranges over all subsets of the domain, so second-order validity depends on what subsets exist. Here is how far that goes. There is a second-order sentence that is valid exactly if Cantor's continuum hypothesis is true, the hypothesis that there is no size strictly between the natural numbers and the reals. And the axioms of set theory, by the work of Gödel and Paul Cohen, cannot decide the continuum hypothesis. So either that sentence or its rival is a 'logical truth', and no one knows which. We return to this in Part 9.
In 1950 Leon Henkin offered a compromise. Let the property variables range not over all subsets, but over some chosen family of them. With these general models, second-order logic regains completeness and compactness, and it loses categoricity: nonstandard models of arithmetic return. In fact it becomes a many-sorted first-order logic. The power and the bill come together. You cannot have one without the other.
Second-order quantifiers also turn up in plain English. 'Some critics admire only one another.' The natural formalization says: there are some things, the critics in question, such that each of them admires only others among them. Peter Geach and David Kaplan showed that no first-order sentence says this, by a proof that uses nonstandard models of arithmetic. In 1984 George Boolos argued that such quantifiers are innocent: 'there exist some critics' does not posit a new object, a set of critics, only the critics themselves. To be, he wrote, is to be a value of a variable, or to be some values of some variables. That slogan rewrites a famous one, which is the subject of Chapter fourteen.
What it establishes: second-order induction and Dedekind's categoricity (1888); what second-order logic can say; what it loses; Quine's "set theory in sheep's clothing"; CH; Henkin semantics (1950); the Geach–Kaplan sentence and Boolos's plurals (1984).
13Why first-order logic?Research4 min
First-order logic gives up a lot. Why is it the logic in every textbook, rather than something stronger? To answer, logicians in the 1960s stepped back and asked what a logic is, abstractly. It has sentences, and a relation of truth between structures and sentences. It can negate, conjoin, and say 'there exists', and it can say at least what first-order logic says. And it cares only about form: two structures with the same shape make the same sentences true. Second-order logic is one such logic. So are first-order logic with a new quantifier 'there are infinitely many', and logics with infinitely long conjunctions.
Here is a rough map. First-order logic sits at the top left: limited power, excellent behaviour. Add the quantifier 'there are infinitely many', and compactness fails. Add 'there are uncountably many' instead, and, as Jerome Keisler showed, compactness survives, but the Löwenheim-Skolem theorem fails. Allow infinitely long conjunctions, and Löwenheim-Skolem survives, but compactness fails. Second-order logic loses everything. Every step to the right seems to cost a step down. Is that an accident?
It is not an accident. In 1969 the Swedish logician Per Lindström proved that any logic extending first-order logic that has both compactness and the downward Löwenheim-Skolem property can say nothing more than first-order logic. He also proved a version with semi-decidable validity in place of compactness. So the trade-off on the map is a theorem: first-order logic is the strongest logic with those properties. The weaknesses we found in Chapters eight and nine are the price of its strengths. You cannot have the strengths without them.
How do logicians prove that something cannot be said? The sharpest tool is a game, due to Roland Fraïssé and Andrzej Ehrenfeucht. Take two structures, here two orderings of points, of length eight and length nine. In each round a spoiler picks a point in either ordering, and a duplicator must answer with a point in the other, so that the points chosen so far are arranged the same way in both. The theorem: the duplicator can survive k rounds exactly when no sentence with k nested quantifiers tells the two structures apart. The Reasoner played every three-round game on orderings of lengths one to nine. The duplicator wins whenever the lengths are equal, or both are at least seven. So eight and nine agree on every sentence of depth three, and in general two to the k and two to the k plus one agree at depth k. No first-order sentence says 'the length is even'. The same games show that a database query language without recursion cannot ask whether one node can reach another.
So is first-order logic the true logic? Philosophers disagree. Quine said yes: what goes beyond it is mathematics, not logic, and Lindström's theorem gives the boundary a precise shape. Stewart Shapiro argued in 1991 that mathematics needs second-order logic, because only categorical theories capture what mathematicians mean by the natural numbers or the reals. Boolos argued that plural quantifiers are as logical as 'some'. And Tarski proposed a test in 1966: a notion is logical if no permutation of the objects can change it. 'There are at least two things' passes; 'is red' fails. Second-order quantifiers pass the test too, so the test alone does not settle the question. We meet it again in Part 9.
What it establishes: abstract logics; the map of extensions (Q₀, Q₁ and Keisler 1970, L_ω₁ω, second order); Lindström's theorem (1969); Quine, Shapiro (1991), Boolos and Tarski's permutation test (1966).
14To be is to be the value of a variableIntroductory4 min
In 1948 W. V. Quine published a short paper that set the agenda for metaphysics in English for half a century. A curious thing about the ontological problem, he wrote, is its simplicity. It can be put in three monosyllables: what is there? And it can be answered in a word: everything. The disagreement is over cases. Are there numbers? Properties? Possible worlds? And what about Pegasus?
Take a sentence that is plainly true. Pegasus does not exist. An old argument says: if it is true, it is true of something, namely Pegasus. So Pegasus must in some sense be. But then what is it that does not exist? Quine called this riddle Plato's beard: historically, he said, it has proved tough, frequently dulling the edge of Occam's razor.
Four claims, one conflict. The sentence 'Pegasus does not exist' is true. It is about Pegasus. A true sentence about something needs that thing to have being, in some sense. And whatever has being exists. The Reasoner finds one minimal conflict and four exits, and each exit is a school. Russell and Quine deny that the sentence is about Pegasus. 'Pegasus' abbreviates a description, 'the thing that pegasizes', and the sentence says that nothing pegasizes. It is Chapter four's theory of descriptions. Alexius Meinong denied that whatever has being exists: Pegasus is an object, with being of a kind, but without existence. Free logic denies the third claim: names may be empty, and some sentences containing them are true anyway. And fictional realists deny the first. Pegasus exists, as an abstract object created by a story, like a novel or a law; what does not exist is a flying horse.
Quine's own answer was a test for what a theory says there is. To be assumed as an entity is, purely and simply, to be reckoned as the value of a variable. Write the theory in first-order logic. 'Some dogs are white' says there is an x that is a dog and is white. For it to be true, the variable must range over dogs. So the sentence is committed to dogs. It is not committed to whiteness: 'white' is a predicate, not something a variable takes as a value. But 'some zoological species are cross-fertile' quantifies over species, so whoever asserts it is committed to species, which are abstract objects. Quine's slogan: to be is to be the value of a variable.
The test has teeth. 'There is a prime number bigger than ten to the hundred' is a theorem, and its variable ranges over numbers. Physics is written in mathematics, and mathematics quantifies over numbers, functions and sets. If we believe what our best science says there is, then we are committed to numbers and sets: abstract objects, outside space and time. This is the indispensability argument of Quine and Hilary Putnam, and it is one of the main arguments of Part 9.
Rudolf Carnap thought the whole enterprise was confused. Inside a language with number words, 'is there a prime above a hundred?' is an internal question, answered by proof: trivially, yes. But 'do numbers really exist?', asked about the language itself, is not a question of fact at all. It is a practical choice of which framework to use. Quine rejected the distinction in 1951, in 'Two Dogmas of Empiricism', and the dispute between them is still the starting point of metaontology, in Part 20.
What it establishes: "On What There Is" (1948); Plato's beard; Price List: four exits (Russell–Quine, Meinong, free logic, fictional realism); the criterion of ontological commitment; indispensability; Carnap's internal and external questions (1950).; Computed on screen: the MUS {N, A, B, E} and its four MCSes
Recap, problems, and where this comes backAll tracks2 min
Let's gather what this part built. Frege's language of quantifiers and relations, with its rules of scope and substitution. Tarski's definition of truth in a structure, which showed exactly how 'everyone loves someone' and 'someone is loved by everyone' differ. Counting, descriptions, and all of Aristotle's logic, inside the new one. Gentzen's rules, and trees that either close or build a counterexample. Gödel's completeness theorem, proved by a model made of words, and its consequences: compactness, nonstandard numbers, and Skolem's countable model of the uncountable. Then the wall: validity is undecidable. And beyond it, resolution provers, second-order logic, Lindström's theorem on why this logic is special, and Quine's test for what a theory says there is.
The Reasoner has a second module, for first-order logic: formulas, Tarski's satisfaction relation, a finite model finder, a tableau prover that returns countermodels, a natural-deduction checker that enforces the conditions on fresh names, and a resolution prover with unification. Each is tested against known validities and brute force. Part 4 extends the tableau to necessity and possibility. And the Wall has its third brick: in full first-order logic, validity is undecidable.
Six problems, with full solutions in this part's notes. Two on translation and countermodels, one proof with a fresh name, one on compactness, one on Skolem functions, and one for the metaphysicians. Pause here, and try them.
Where this comes back. The tableau returns in Part 4 for necessity and possibility, and in Part 22 for possible worlds. Russell's descriptions return with Frege's sense and reference. Completeness and nonstandard models return in Gödel's incompleteness theorems and the philosophy of mathematics. The diagonal returns three more times: in incompleteness, in the liar, and in the argument that minds are not machines. Putnam's argument returns in Parts 18 and 27, and Quine's criterion in Parts 9 and 20. Next, Part 4: what must be, what might have been, and the logic of possible worlds.
The books and papers this part follows are on screen, and in the notes. Thanks for watching.
Where it goes next. The halting diagonal is proved in full and builds Gödel's incompleteness in Part 7 and Tarski's theorem on truth in Part 8; Skolem's paradox and the continuum hypothesis return with set theory in Part 6; the question of which notions are logical returns in Part 9; Quine's criterion opens the ontology of Part 20, and Russell's descriptions return in Part 27.
Key results
The part's results in one place, for revision.
Try it
Lab 3 · The order of quantifiers, counted
Evaluate 'for all x there is y with L(x, y)' and 'there is y such that for all x, L(x, y)' on every relation over 1, 2 and 3 people and on random relations over more, compare the counts with their closed forms, and let the tableau prover close one direction and return a countermodel for the other.
python -m videos.philosophy.labs 3
needs numpy, scipy, matplotlib · download lab03.py ·
source on GitHubrelations on 3 people 512
everyone loves someone 343 (closed form 7^3 = 343)
someone is loved by everyone 169 (closed form 512 - 7^3 = 169)
6 people, random relation: P(everyone loves someone) 0.914 (exact 0.910)
6 people, random relation: P(someone loved by all) 0.093 (exact 0.090)
tableau: exists-forall to forall-exists closed in 6 steps
tableau: forall-exists to exists-forall not closed; countermodel on 2 people: L = [(0, 1), (1, 0)]
De Morgan's horse heads closed: 29 steps, 9 branches (the film: 29 and 9)
Swapping the quantifiers changes the count on every domain: one sentence entails the other and never the reverse, and the tableau turns the failed proof into a two-person countermodel.
The code (111 lines; it asserts its own result)
"""Lab 3: count the structures where 'everyone loves someone' and 'someone is loved by everyone' hold, and let a tableau find the countermodel."""
import numpy as np
from videos.coursekit import labs
from explainer.philosophy.reasoner import fol
TITLE = "The order of quantifiers, counted"
GOAL = ("Evaluate 'for all x there is y with L(x, y)' and 'there is y such that for all x, L(x, y)' on every relation "
"over 1, 2 and 3 people and on random relations over more, compare the counts with their closed forms, and "
"let the tableau prover close one direction and return a countermodel for the other.")
TASKS = [
"Add the sentence 'forall x L(x, x)' as a premise. Does 'forall x exists y L(x, y)' now entail 'exists y forall x "
"L(x, y)'? Ask fol.countermodel.",
"Count the relations on 3 people that are symmetric and satisfy 'forall x exists y L(x, y)'. Find the closed "
"form before you run it.",
"Give fol.prove De Morgan's argument with the premise changed to 'exists x (H(x) & A(x))'. Read the countermodel "
"it returns.",
]
AE = "forall x exists y L(x, y)" # everyone loves someone
EA = "exists y forall x L(x, y)" # someone is loved by everyone
HORSES = (["forall x (H(x) -> A(x))"],
"forall x ((exists y (Hd(x, y) & H(y))) -> exists y (Hd(x, y) & A(y)))")
def at_least(n):
xs = [f"x{i}" for i in range(1, n + 1)]
diff = " & ".join(f"~{a} = {b}" for i, a in enumerate(xs) for b in xs[i + 1:]) or "x1 = x1"
return "".join(f"exists {x} " for x in xs) + f"({diff})"
def run(seed=0):
rng = np.random.default_rng(seed)
ae, ea = fol.parse(AE), fol.parse(EA)
sig = fol.signature([ae])
lab = labs.Lab()
# Exhaustive: every relation on n people. Closed forms: (2^n - 1)^n and 2^(n^2) - (2^n - 1)^n.
exact = {}
for n in (1, 2, 3):
a = e = total = 0
for M in fol.all_structures(sig, n):
x, y = fol.holds(ae, M), fol.holds(ea, M)
assert x or not y, "exists-forall entails forall-exists on every structure"
a, e, total = a + x, e + y, total + 1
exact[n] = (a, e, total)
assert total == 2 ** (n * n) and a == (2 ** n - 1) ** n and e == total - (2 ** n - 1) ** n
a3, e3, t3 = exact[3]
lab.row("relations on 3 people", f"{t3}")
lab.row("everyone loves someone", f"{a3} (closed form 7^3 = {7 ** 3})")
lab.row("someone is loved by everyone", f"{e3} (closed form 512 - 7^3 = {512 - 7 ** 3})")
# Monte Carlo on larger domains: a uniformly random relation on n people.
reps, mc = 3000, {}
for n in (4, 5, 6):
a = e = 0
for _ in range(reps):
bits = rng.random((n, n)) < 0.5
M = fol.Structure(range(n), {"L": {(i, j) for i in range(n) for j in range(n) if bits[i, j]}})
x, y = fol.holds(ae, M), fol.holds(ea, M)
assert x or not y
a, e = a + x, e + y
pa, pe = (1 - 2.0 ** -n) ** n, 1 - (1 - 2.0 ** -n) ** n
mc[n] = (a / reps, e / reps, pa, pe)
assert abs(a / reps - pa) < 0.035 and abs(e / reps - pe) < 0.035, "the sample agrees with the closed form"
lab.row("6 people, random relation: P(everyone loves someone)", f"{mc[6][0]:.3f} (exact {mc[6][2]:.3f})")
lab.row("6 people, random relation: P(someone loved by all)", f"{mc[6][1]:.3f} (exact {mc[6][3]:.3f})")
# The tableau: one direction closes, the other grows without closing; the model finder gives the countermodel.
forward, back = fol.prove([ea], ae), fol.prove([ae], ea)
cm = fol.countermodel([ae], ea)
horses = fol.prove([fol.parse(HORSES[0][0])], fol.parse(HORSES[1]))
lab.row("tableau: exists-forall to forall-exists", f"closed in {len(forward.steps)} steps")
lab.row("tableau: forall-exists to exists-forall", f"not closed; countermodel on {len(cm.domain)} people: L = {sorted(cm.preds['L'])}")
lab.row("De Morgan's horse heads", f"closed: {len(horses.steps)} steps, {horses.branches} branches (the film: 29 and 9)")
assert forward.closed and not back.closed
assert len(cm.domain) == 2 and fol.holds(ae, cm) and not fol.holds(ea, cm), "a two-person countermodel"
assert horses.closed and len(horses.steps) == 29 and horses.branches == 9
# The ladder behind compactness: 'at least n things' holds at size k exactly when k >= n.
ladder = np.array([[fol.holds(fol.parse(at_least(n)), fol.Structure(range(k), {})) for k in range(1, 7)]
for n in range(1, 6)])
assert all(ladder[n - 1, k - 1] == (k >= n) for n in range(1, 6) for k in range(1, 7))
lab.note = ("Swapping the quantifiers changes the count on every domain: one sentence entails the other and "
"never the reverse, and the tableau turns the failed proof into a two-person countermodel.")
fig, ax = labs.figure(2, size=(11, 4.2))
ns = np.arange(1, 9)
ax[0].plot(ns, (1 - 2.0 ** -ns) ** ns, color=labs.BLUE, label=r"$\forall x\,\exists y\,L$: $(1-2^{-n})^n$")
ax[0].plot(ns, 1 - (1 - 2.0 ** -ns) ** ns, color=labs.GOLD, label=r"$\exists y\,\forall x\,L$: $1-(1-2^{-n})^n$")
ax[0].plot([1, 2, 3], [exact[n][0] / exact[n][2] for n in (1, 2, 3)], "o", color=labs.BLUE, label="every relation counted")
ax[0].plot([1, 2, 3], [exact[n][1] / exact[n][2] for n in (1, 2, 3)], "o", color=labs.GOLD)
ax[0].plot([4, 5, 6], [mc[n][0] for n in (4, 5, 6)], "s", mfc="none", color=labs.BLUE, label=f"{reps} random relations")
ax[0].plot([4, 5, 6], [mc[n][1] for n in (4, 5, 6)], "s", mfc="none", color=labs.GOLD)
ax[0].set(title="Share of relations on n people where each sentence holds", xlabel="people n",
ylabel="share of relations", ylim=(-0.03, 1.03))
ax[0].legend(loc="center right")
from matplotlib.colors import ListedColormap
ax[1].imshow(ladder, cmap=ListedColormap([labs.PANEL, labs.GREEN]), origin="lower", extent=(0.5, 6.5, 0.5, 5.5),
aspect="auto")
for n in range(1, 6):
for k in range(1, 7):
ax[1].text(k, n, "true" if ladder[n - 1, k - 1] else "false", ha="center", va="center", fontsize=9,
color=labs.BG if ladder[n - 1, k - 1] else labs.MUTED)
ax[1].grid(False)
ax[1].set(title="'There are at least n things' on a domain of k things", xlabel="domain size k",
ylabel="n", xticks=range(1, 7), yticks=range(1, 6))
lab.fig = fig
return lab
Now change it
- Add the sentence 'forall x L(x, x)' as a premise. Does 'forall x exists y L(x, y)' now entail 'exists y forall x L(x, y)'? Ask fol.countermodel.
- Count the relations on 3 people that are symmetric and satisfy 'forall x exists y L(x, y)'. Find the closed form before you run it.
- Give fol.prove De Morgan's argument with the premise changed to 'exists x (H(x) & A(x))'. Read the countermodel it returns.
Problems, with solutions
Try each problem before opening its solution.
-
"Nobody loves everybody", twice; then "only philosophers admire Kant".
Solution
¬∃x ∀y L(x, y), and equivalently ∀x ∃y ¬L(x, y): for each person there is someone they do not love. "Only philosophers admire Kant" says every admirer of Kant is a philosopher: ∀x (A(x, kant) → P(x)). (A common error is ∀x (P(x) → A(x, kant)), which is "all philosophers admire Kant".)
-
A smallest countermodel to ∀x (P(x) ∨ Q(x)) ⊨ ∀x P(x) ∨ ∀x Q(x).
Solution
Two objects: a is P and not Q, b is Q and not P. Everything is P or Q, but not everything is P (b) and not everything is Q (a). One object cannot work: if it is P, everything is P. The Reasoner's model finder returns exactly this two-object structure.
-
∃x Q(x) from ∀x (P(x) → Q(x)) and ∃x P(x).
Solution
1 ∀x (P(x) → Q(x)) (premise); 2 ∃x P(x) (premise); 3 | P(a) (assumption, a new); 4 | P(a) → Q(a) (∀E 1); 5 | Q(a) (→E 4, 3); 6 | ∃x Q(x) (∃I 5); 7 ∃x Q(x) (∃E 2, 3–6). The new name is introduced at line 3; ∃E is legal because a occurs in neither premise nor in the conclusion ∃x Q(x). The Reasoner's
fol.check_fitchaccepts this proof. -
If φ has finite models of every size, it has an infinite one.
Solution
Consider {φ} ∪ {λ₂, λ₃, …}, where λₙ says there are at least n things. A finite part mentions only finitely many λₙ, say up to λ_N; a finite model of φ of size N satisfies it. By compactness the whole set has a model; it satisfies every λₙ, so it is infinite, and it satisfies φ.
-
Skolemize ∀x ∃y ∀z ∃w R(x, y, z, w). Skolemize \(\forall x\, \exists y\, \forall z\, \exists w R(x, y, z, w)\). On which variables does each Skolem function depend?
Solution
∀x ∀z R(x, f(x), z, g(x, z)). The witness for y may depend only on the universal variables to its left (x); the witness for w on x and z. The result is satisfiable exactly when the original is (not equivalent: the Skolem functions add new symbols).
-
(Essay) Plato's beard has four exits. (Essay) Plato's beard has four exits. Defend one, and say what it costs.
Solution
A strong answer chooses one and prices it. Russell–Quine: the cost is that proper names are not directly referential, which Kripke's Naming and Necessity (Part 27) attacks. Meinong: the cost is a realm of non-existent objects, and Russell's challenge: is the existent golden mountain existent? Free logic: the cost is a more complicated logic, and a decision about the truth of atomic sentences with empty names. Fictional realism: the cost is abstract artefacts, and a paraphrase for "Pegasus does not exist" that makes it true after all ("there is no flying horse").
Notes and sources
Sources
Books: Enderton, A Mathematical Introduction to Logic, ch. 2; Boolos, Burgess and Jeffrey, Computability and Logic (5th ed., 2007); Smullyan, First-Order Logic (1968); Ebbinghaus, Flum and Thomas, Mathematical Logic; Shapiro, Foundations without Foundationalism (1991); Sider, Logic for Philosophy, chs. 4–5; van Heijenoort (ed.), From Frege to Gödel (1967).
Papers and texts: Frege, Begriffsschrift (1879); Russell, letter to Frege (16 June 1902) and "On Denoting" (Mind 1905); Löwenheim, "Über Möglichkeiten im Relativkalkül" (1915); Skolem (1920, 1922, 1934); Hilbert and Ackermann, Grundzüge der theoretischen Logik (1928); Gödel, "Die Vollständigkeit der Axiome des logischen Funktionenkalküls" (1930); Herbrand (1930); Tarski, "The Concept of Truth in Formalized Languages" (1933/1935) and "What Are Logical Notions?" (1966, publ. 1986); Gentzen, "Untersuchungen über das logische Schließen" (1935); Church, "A Note on the Entscheidungsproblem" (1936); Turing, "On Computable Numbers" (1936); Mal'tsev (1936); Quine, "On What There Is" (1948), "Two Dogmas of Empiricism" (1951) and Philosophy of Logic (1970); Henkin, "The Completeness of the First-Order Functional Calculus" (1949) and "Completeness in the Theory of Types" (1950); Carnap, "Empiricism, Semantics, and Ontology" (1950); Strawson, "On Referring" (1950); Trakhtenbrot (1950); Beth (1955); Hintikka (1955); Robinson, "A Machine-Oriented Logic Based on the Resolution Principle" (1965); A. Robinson, Non-standard Analysis (1966); Lindström, "On Extensions of Elementary Logic" (Theoria 1969); Keisler (1970); de Bruijn (1972); Mortimer (1975); van Inwagen, "Creatures of Fiction" (1977); Statman (1979); Orevkov (1979); Putnam, "Models and Reality" (1980); Parsons, Nonexistent Objects (1980); Boolos, "To Be Is to Be a Value of a Variable (or to Be Some Values of Some Variables)" (1984); McCune, "Solution of the Robbins Problem" (JAR 1997); Andréka, van Benthem and Németi (1998); Priest, Towards Non-Being (2005); Gonthier (2005); Hales et al., Flyspeck (2017); DeepMind, AlphaProof (2024).
About this partfrom its README
Part 3 of Philosophy, Built (series plan, syllabus): first-order logic, from Frege's notation to Lindström's theorem, and the first metaphysics it makes precise (Russell's descriptions, Skolem's paradox, Quine's criterion). Its brick in the Wall is Church and Turing's theorem of 1936: validity in full first-order logic is undecidable, only semi-decidable. Its Price Lists are Skolem's paradox and Plato's beard.
Every evaluation, count, proof, tableau, unifier and model on screen is computed by the Reasoner's first-order module
(explainer/philosophy/reasoner/fol.py: parser, Tarski satisfaction with a trace, a finite model finder, a ground
tableau that returns a countermodel from an open branch, a natural-deduction checker with the eigenvariable
conditions, unification and a given-clause resolution prover), tested in tests/philosophy/test_fol.py, and cached
by compute.py. The halting table in Chapter 10 is labelled illustrative.
Chapter notes
| # | Scene | What it establishes | Computed on screen |
|---|---|---|---|
| 0 | Hook |
De Morgan's horse heads in the new notation; continuity's three quantifiers; Russell's king; the plan; the Wall's third brick. | the horse-heads tableau: closed, 29 steps, 9 branches |
| 1 | Frege |
the Begriffsschrift (1879) and its two-dimensional notation; function and argument replace subject and predicate; relations as many-place functions; reception (Peano, Principia, Gentzen's ∀); Russell's letter (1902). | — |
| 2 | Syntax |
terms and formulas; "first-order"; scope, binding, free variables, sentences; scope ambiguity; substitution, capture, renaming; why ∀E needs "free for"; de Bruijn indices (1972). | the capture example; ∀x∃y x≠y true at sizes 2–4, ∃y y≠y false everywhere |
| 3 | Tarski |
Convention T (1933); object language and metalanguage; structures; the satisfaction clauses; ∀∃ and ∃∀ evaluated object by object; validity over all structures. | four people evaluated quantifier by quantifier; all 512 relations on 3 people: 343 = 7³ and 169 = 512 − 7³, entailment checked on each |
| 4 | Express |
counting with identity; Russell's theory of descriptions (1905) and its scope ambiguity; Strawson (1950); the 256 moods inside first-order logic; "everybody loves a lover". | the counting formulas on every structure of size ≤ 4; the King of France in four worlds; 15 and 24 valid moods (agreeing with Part 1), countermodel sizes 1/2/3 = 159/81/1; the lover argument's tableau (718 steps) |
| 5 | Proof |
Gentzen's quantifier rules and their conditions (1935); hasty generalization refused; a proof of ∃∀ ⊢ ∀∃ and the failed converse; the drinker principle and empty domains; sequents, cut elimination, and why it makes search possible. | the Reasoner's Fitch checker accepting one proof and rejecting two; the 2-object and 2-person countermodels; the drinker's 6-step tableau |
| 6 | Tableau |
Beth and Hintikka (1955), Smullyan (1968); α, β, γ, δ; Barbara closed; an open branch read as a countermodel; the swap that grows forever. | the Barbara tree (9 steps, 3 branches); the open tree and its model a: S, P; b: P, M; the swap tableau giving up at 12 steps; the 2-person countermodel |
| 7 | Complete |
Hilbert and Ackermann's question (1928); Gödel's completeness (1929); the consistent-set form; Henkin's proof (1949) step by step; three consequences; completeness vs incompleteness. | Henkin's construction in miniature: witness, four atoms decided, the term model checked |
| 8 | Compact |
compactness and its one-line proof; λₙ; "finite" is inexpressible; nonstandard arithmetic (Skolem 1934) and the order type ω + ℤ·ℚ; Robinson's infinitesimals (1961). | λ₁ … λ₅ on sizes 1–6 |
| 9 | Skolem |
Löwenheim (1915), Skolem (1920); upward and downward; the Skolem hull; Cantor's diagonal; Price List: Skolem's paradox (exit: relativity, Skolem 1922); Putnam's model-theoretic argument (1980). | the MUS {C, U, T, A} and its four MCSes |
| 10 | Undecidable |
the Entscheidungsproblem; Church and Turing (1936); the halting diagonal; machines as sentences; semi-decidability; a sentence with only infinite models; the Wall's third brick; monadic logic and other decidable fragments; description logics, SNOMED CT, SMT; Trakhtenbrot (1950). | no model of the infinity axiom at sizes 1–4 (65,536 relations at size 4); smallest models of 300 random monadic sentences, never above 2² = 4 |
| 11 | ATP |
Robinson's resolution (1965); Skolem functions; unification and the occurs check; Herbrand's theorem (1930); Robbins's problem and EQP (1996); Vampire, E, TPTP; Lean, Isabelle, Coq; hammers; AlphaProof (2024). | the most general unifier of Knows(john, x) and Knows(y, mother(y)); the occurs-check failure; a 3-step resolution refutation of the lover argument |
| 12 | Second |
second-order induction and Dedekind's categoricity (1888); what second-order logic can say; what it loses; Quine's "set theory in sheep's clothing"; CH; Henkin semantics (1950); the Geach–Kaplan sentence and Boolos's plurals (1984). | — |
| 13 | Lindstrom |
abstract logics; the map of extensions (Q₀, Q₁ and Keisler 1970, L_ω₁ω, second order); Lindström's theorem (1969); Quine, Shapiro (1991), Boolos and Tarski's permutation test (1966). | — |
| 14 | Quine |
"On What There Is" (1948); Plato's beard; Price List: four exits (Russell–Quine, Meinong, free logic, fictional realism); the criterion of ontological commitment; indispensability; Carnap's internal and external questions (1950). | the MUS {N, A, B, E} and its four MCSes |
| 15 | Outro |
recap; the Reasoner's second module; the Wall; problems; payoffs; references. | — |
Companion material in this repository
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Frege's Begriffsschrift (1879), drawn in Frege's own two-dimensional notation and then translated.
- Syntax: terms, formulas, free and bound variables, substitution and capture.
- Tarski's semantics (1933): structures, assignments, satisfaction. A finite structure is evaluated live.
- Expressive power: "there are at least n", relations, definite descriptions (Russell 1905, previewing Part 27).
- Proof: the sequent calculus; cut elimination (sketch); the subformula property.
- The completeness theorem (Gödel 1929), by Henkin's construction step by step: witnesses and the term model.
- Compactness, and its surprises: non-standard models of arithmetic (an infinite element beyond every n).
- Löwenheim–Skolem: countable models; Skolem's paradox (a countable model of "there are uncountable sets").
- Undecidability: Church and Turing 1936 (full proof in Part 7); semi-decidability; decidable fragments (monadic, Bernays–Schönfinkel).
- Tableau proving: building a countermodel when a proof fails. Built.
- Automated theorem proving: the Robbins conjecture proved by EQP (1996); Vampire and E; the TPTP library.
- Second-order logic: categoricity of arithmetic, at the cost of completeness; Henkin vs full semantics; Boolos's plural interpretation.
- Lindström's theorem (1969): FOL is the strongest logic with compactness and Löwenheim–Skolem (statement and meaning).
- Logic and ontology, previewing Part 20: Quine's "to be is to be the value of a bound variable".
- Recap and Problems.
Built: reasoner.fol (finite model checker, tableau prover with countermodel extraction, a small model finder).
Wall: the undecidability of validity; Lindström's characterization (the cost of power is losing compactness).
Visuals: Henkin's term model assembling itself; the non-standard model as ℕ followed by copies of ℤ; a tableau
branching and closing.
References: Enderton ch. 2; Boolos–Burgess–Jeffrey chs. 9–14, 18–19; Ebbinghaus, Flum and Thomas; Shapiro,
Foundations without Foundationalism.
中文讲义
本讲的中文部分(与英文版对应)。
习题与解答
-
把"没有人爱所有人"写成两种等价形式,再写"只有哲学家欣赏康德"。
解答
¬∃x ∀y L(x, y),等价地 ∀x ∃y ¬L(x, y):对每个人,都有某个 他不爱的人。"只有哲学家欣赏康德"是说每个欣赏康德的人都是哲学家:∀x (A(x, kant) → P(x))。(常见的错误是写成 ∀x (P(x) → A(x, kant)),那是"所有哲学家都欣赏康德"。)
-
∀x (P(x) ∨ Q(x)) ⊨ ∀x P(x) ∨ ∀x Q(x) 的最小反模型。 为 \(\forall x\,(P(x) \lor Q(x)) \models \forall x\, P(x) \lor \forall x\, Q(x)\) 找一个最小反模型。
解答
两个对象:a 是 P 而不是 Q,b 是 Q 而不是 P。每个东西都是 P 或 Q,但并非 每个东西都是 P(b 不是),也并非每个东西都是 Q(a 不是)。一个对象不行:如果它是 P,那么每个东西都是 P。推理机的模型搜索器给出的正是这个 两对象结构。
-
从 ∀x (P(x) → Q(x)) 和 ∃x P(x) 推出 ∃x Q(x)。 从\(\forall x\,(P(x) \to Q(x))\)和\(\exists x\, P(x)\)给出\(\exists x\, Q(x)\)的菲奇式证明。哪一行需要新名字?
解答
1 ∀x (P(x) → Q(x))(前提);2 ∃x P(x)(前提);3 | P(a)(假设,a 是新名字); 4 | P(a) → Q(a)(∀E 1);5 | Q(a)(→E 4, 3);6 | ∃x Q(x)(∃I 5);7 ∃x Q(x)(∃E 2, 3–6)。新名字在第3行引入;∃E 合法,因为 a 既不出现在前提中,也不出现在结论 ∃x Q(x) 中。推理机的
fol.check_fitch接受这个证明。 -
如果 φ 有每一种有限大小的模型,那么它有一个无穷模型。
解答
考虑 {φ} ∪ {λ₂, λ₃, …},其中 λₙ 说至少有 n 个东西。任何有限部分只提到有限 多个 λₙ,比如到 λ_N 为止;φ 的一个大小为 N 的有限模型满足它。由紧致性,整个集合有一个模型;它满足每个 λₙ,所以是无穷的,并且它满足 φ。
-
把 ∀x ∃y ∀z ∃w R(x, y, z, w) 斯科伦化。 把\(\forall x\, \exists y\, \forall z\, \exists w R(x, y, z, w)\)斯科伦化。每个斯科伦函数依赖于哪些变元?
解答
∀x ∀z R(x, f(x), z, g(x, z))。y 的见证只能依赖于它左边的全称变元(x);w 的见证依赖于 x 和 z。结果与原句同可满足(但不等价:斯科伦函数引入了新符号)。
-
(论述题)柏拉图的胡子有四条出路。
解答
好的回答选择一条并给它标价。罗素–蒯因:代价是专名不是直接指称的,克里普克的《命名与必然性》 (第27部分)攻击的正是这一点。迈农:代价是一个不实存对象的领域,以及罗素的诘难:实存的金山实存吗?自由逻辑:代价是更复杂的逻辑,以及 必须决定含空名的原子句的真值。虚构实在论:代价是抽象的人造物,以及需要为"珀伽索斯不存在"找一个改写,使它终究为真("没有会飞的马")。
Build the film
python -m videos.philosophy.philosophy3.compute # the part's numbers, into .cache/philosophy3
python tools/build.py philosophy3 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py philosophy3 Hook # one chapter, silent, with a contact sheet
Scenes: videos/philosophy/philosophy3. Setup: see the course page. Source of these notes: the README and the scenes' narration.
Build it
python -m videos.philosophy.philosophy3.compute # every computed item (about 10 s; cached in .cache/philosophy3)
python tools/build.py philosophy3 -q l # 480p preview
python tools/build.py philosophy3 # 1080p30 -> renders/philosophy3.mp4
python tools/qa_scene.py philosophy3 Tableau # one chapter, silent, with a contact sheet