Suppose you look after the platform at a company of five people, and you want, more than anything, never to be surprised by your own system. On Tuesday the finance director asks you to confirm something everyone takes for granted: that everybody earns less than their boss. The personnel table, Figure 6.1, is short enough to print.
| Employee | Boss | Engineer? | Manager? | Salary |
|---|---|---|---|---|
| Thorne | Thorne | no | yes | 200 |
| Finch | Thorne | no | yes | 120 |
| Pratt | Thorne | no | no | 95 |
| Bell | Finch | yes | no | 90 |
| Cole | Finch | yes | no | 85 |
You don’t check the claim row by row. Like anyone who has written SQL, you ask the database for the rows that break it:
SELECT e.name, b.name AS boss
FROM staff e JOIN staff b ON e.boss = b.name
WHERE NOT (b.salary > e.salary);
One row comes back: Thorne | Thorne. The chief executive is her own boss, and she doesn’t earn more than herself. You add AND e.name <> to the query, it returns nothing, and you reply that the claim holds.
'Thorne'
The finance director answers with one line: “Can that ever stop being true?” This is a different question. The table changes continually as people are hired, promoted, or given rises. He does not want to know whether the claim is true now, but whether it is true of every table the personnel system can produce given the HR policy.
The story contains two ideas, and we should keep them apart from the start. One is that of a sentence being true here, of this table on this Tuesday. The other is that of a sentence being true everywhere the constraints allow, of every table that obeys them. The first is a matter of looking, and the query engine settles it in a fraction of a second. The second is a claim about infinitely many tables, most of which nobody will see, and no amount of looking settles it.
This chapter is about the two ideas and the connection between them. It asks three questions:
What does it mean for a sentence to be true of a system?
What does it mean for a sentence to follow from the requirements on a system, so that it is true of every system that meets them?
Is there a finite way to show that it does?
The first two questions are answered by definitions, and the third by a theorem, though the first rules of proof we try turn out to fall short. Section 6.1 makes a system into a mathematical object, a structure. Section 6.2 gives a language for talking about structures, and Section 6.3 defines when a sentence of that language is true in a structure. Section 6.4 defines what it is for a sentence to follow from others: to be true in every structure in which they are true. Section 6.5 tries the proofs we already have, Gentzen’s natural deduction system : they never lead from true premisses to a false conclusion, but they miss some sentences that follow, all for want of a single law. Adding that law, the law of the excluded middle, gives the system (Section 6.6), and Section 6.7 proves it complete: a sentence follows from others exactly when it has a derivation from them in . Section 6.8 counts what the extra law costs.
6.1 Structures
Before the word true can mean anything, we must say what a sentence is true of. Engineers use the word system for almost anything with parts, and we begin from what the word covers rather than from a definition. Figure 6.2 lists five systems.
| System | Things | Relations | Functions |
|---|---|---|---|
| The company | five people | is an engineer; is a manager; earns more than | the boss of |
| Counting numbers | is less than | successor, , | |
| Server network | four machines | is linked to | none |
| A program | its states | is an error state | the next state |
| Truth values | true and false | none | and, or, not |
The five have nothing in common as subject matter, yet each comes in the same three pieces:
a collection of things;
some relations among the things, each true of some tuples of things and false of others;
some functions, each taking things and returning a thing.
Some systems also have a few things with names of their own: a company has the chief executive, the numbers have the starting number , and a program has the initial state.
Definition 6.1 (signature). A signature is the vocabulary that sentences about one kind of system may use: names for particular things, symbols for functions and symbols for relations, each with its number of places.
Formally, a signature is a quadruple in which
, and are pairwise disjoint sets, whose elements are called constant symbols, function symbols and relation symbols respectively;
is a function, the arity, with for every .
A relation symbol of arity is a propositional letter. The signature is countable if the set is countable.
The arity says how many inputs each function or relation symbol takes. Given only the symbol , nobody could tell whether it names a function of one variable, of two, or of a million.
Definition 6.2 (structure). A structure for a signature says which things there are and what each symbol of the signature means.
Formally, let be a signature. A -structure is a pair in which
is a non-empty set, the domain of ;
is a function with domain , the interpretation, such that
for every ;
is a function from to for every with ;
for every with .
Here is the set of -tuples of elements of ; in particular , whose one element is the empty tuple. We write , and for , and .
A relation with places is a table with columns and one row for each tuple of which it holds, so a structure is a database: one table for each relation symbol, one lookup table for each function symbol, and a few named rows.1
Example 6.3 (the company). Harriet Ashworth looks after the platform at the company of the opening, and the personnel table of Figure 6.1 is hers. Its vocabulary is the company signature
with and . The formula is read “ earns more than ”. The symbol is a two-place relation symbol like the others, written between its arguments as usual.
Tuesday’s table is the -structure given by
where is the salary column of Figure 6.1.
The structure interprets as identity, the relation of each person to herself. Nothing in the definition of a structure demands that, since may be interpreted as any set of pairs, but every structure for the company signature that we describe interprets it as identity.
The salaries are all different, so exactly half of the twenty ordered pairs of different people are in : ten pairs, from (Thorne, Finch) down to (Bell, Cole). The function is not part of the structure. The signature has no symbol for a salary, so the structure keeps only what the symbols can ask about: who earns more than whom.
Figure 6.3 draws the structure, with an arrow from each person to their boss; M marks a manager and E an engineer. Thorne’s loop is the row that Harriet’s first query returned.
A structure with a finite domain can be listed, table by table, as a personnel table can. A structure with an infinite domain can be described but not printed, and how to describe one exactly is a delicate matter.2 The counting numbers of Figure 6.2 are of that kind.
Example 6.4 (the counting numbers). The counting numbers are a structure for the signature of arithmetic
with and .
The structure is , traditionally called the standard model of arithmetic, where and
is the number zero,
,
and are addition and multiplication,
.
Example 6.5 (the other three systems). The other three systems of Figure 6.2 are structures in the same way.
The server network has a domain of four machines and one two-place relation.
The program has a domain of states, a constant for the initial state, a one-place relation for the error states and a one-place function for the next state.
The truth values form a domain of two elements with three functions and no relations.
Remark 6.6 (non-empty domains). Almost every textbook requires the domain to be non-empty, and so do we. The requirement looks fussy, but it decides the truth of sentences such as “if everything is a manager, then something is a manager”. In an empty structure everything is a manager, since there is nothing that is not, and yet nothing is a manager, so the sentence would be false. The requirement rules this out.
Remark 6.7 (total functions). The functions of a structure are total: a function symbol is interpreted as a function that gives an element of the domain for every input from the domain. That is what makes every term name something: the boss of anybody’s boss is always somebody. A real system need not be so obliging, and where a value may be missing, a relation such as reports to can stand in for the function the boss of.
Example 6.8 (the company, cont’d: a near miss). Suppose the table left Thorne’s boss blank, since the chief executive has none. That is a sensible way to run a company, but the result is not a structure: would have a hole at Thorne, and a lookup table with a hole in it is not a function. Somebody had to choose a value for Thorne, and choosing Thorne herself is the reason Harriet’s first query returned a row.
6.2 Syntax
A structure can be asked questions, and this section builds the language to ask them in. We start from a signature and a countably infinite set of variables, , , , , and so on, disjoint from the symbols of . Constants and variables name elements of the domain, and function symbols build new names from old ones.
Definition 6.9 (terms). The -terms are given by the grammar
where is a variable, a constant symbol of , and a function symbol of with . We write for the set of -terms.
Example 6.10 (the company, cont’d: terms). In the company signature, , , and are terms. In the first three all name Thorne, and names somebody only once we know who is. The string is not a term, since , and neither is , which says something rather than naming something. In arithmetic, and are terms.
Having named things, we want to say something about them. A relation applied to terms is the smallest such statement, and it is called an atomic formula: says that the boss of earns more than , and says something false outright. Atomic formulas are combined into complex ones by the logical symbols. We use Greek letters , and for formulas, and Latin letters and for propositional letters.
Definition 6.11 (formulas). The -formulas are given by the grammar
where is a relation symbol of with , the are -terms, and is a variable. We write for the set of -formulas.
The formulas and are atomic. For a propositional letter the atomic formula is written . Three more symbols are abbreviations:
is ;
is ;
when contains , the formula is .
Familiar two-place symbols are written between their arguments, as usual: is the atomic formula , and is . Brackets are kept down by the usual conventions:
The outermost pair is dropped.
and take precedence over , which groups to the right.
and the quantifiers and take precedence over everything else.
A symbol that takes precedence applies first, to as little of the formula as it can, just as applies before in .
Example 6.12 (reading the conventions). With propositional letters , and :
is , not ;
is ;
is .
A quantifier, too, covers as little as it can: in the company signature, is , in which the quantifier covers only . A quantifier meant to cover more is followed by brackets, as in , “every engineer reports to a manager”.
A formula with variables does not yet say anything definite. is true or false according to who is, whereas makes one claim about the whole domain: everyone earns less than their boss. The next definition separates the variables whose values must be supplied from those that a quantifier has already taken charge of.
Definition 6.13 (free variables). The free variables of a term or formula are those whose values must be supplied before it names or says anything.
Formally, the set of variables of a term is defined by recursion on the shape of :
The set of free variables of a formula is defined by recursion on the shape of , with any of , and , and either quantifier:
An occurrence of in is bound if it lies inside a part of of the form or , and free otherwise; the quantifier binds the occurrences of in .
Definition 6.14 (closed term; sentence). A term is closed if , and a formula is a sentence if .
Example 6.15 (free and bound). In the company signature, and are closed terms, and is not. Of the two formulas
the first is not a sentence, since its one free variable is , and the second is, since the last line of the definition of removes .
In the formula
the first occurrence of is free and the other two are bound, so the formula is not a sentence.
Using the language is mostly translation, in both directions, and one choice causes most mistakes: which connective joins a quantifier to the condition that restricts it. “Every …” restricts a universal quantifier, and the restriction goes in with : for every , if is a , then …. “Some …” restricts an existential quantifier, and the restriction goes in with : some is a and …. The rule of thumb, universal with and existential with , is reliable but not infallible.
Example 6.16 (the company, cont’d: four sentences in English). Figure 6.4 gives four sentences in the company signature, each with its English.
| Formula | English |
|---|---|
| everyone earns less than their boss | |
| everyone except the chief executive earns less than their boss | |
| every engineer reports to a manager | |
| some manager has a boss other than themselves |
The third and fourth sentences follow the rule of thumb. Written with , the third becomes , which says that everyone is an engineer, false of any firm that employs somebody else. Written with , the fourth becomes , which anyone who is not a manager makes true.
Proofs pass from a claim about anybody to the same claim about somebody in particular, as (E) does, and the other way round, as (I) does. The syntactic tool is substitution: put a term in place of , so that becomes , which says it of the chief executive. Substitution is an operation on strings, and truth is not defined through it (Remark 6.24 says why). It comes with a danger. The term put in may have variables of its own, and a quantifier in the formula can capture them, so that the result says something quite different. The definition of substitution is therefore followed by a second, of the condition that rules capture out.
Definition 6.17 (substitution). Substitution puts a term in place of the free occurrences of a variable.
Formally, let be a term and a variable. For a term , the term is defined by recursion on the shape of :
For a formula , the formula is defined by recursion on the shape of , with any of , and , and either quantifier:
Definition 6.18 (substitutable). A term is substitutable for a variable when putting it in place of the variable lets no quantifier capture a variable of the term.
Formally, the term is substitutable for in if no free occurrence of in lies inside a part of of the form or with .
Example 6.19 (the company, cont’d: substitution and capture). If is , then is : the claim made of is now made of the chief executive’s boss.
Substitutability rules out the one way in which substitution can go wrong. Let be , “someone earns more than ”, and let be . The recursion gives , which says that someone earns more than their own boss, a different claim altogether: the of the term has been captured by the quantifier. The condition forbids it, since the free occurrence of lies inside and .
We write only when is substitutable for in . A closed term always is, having no variables to capture.
The sentences of Figure 6.4 look as if they speak about a particular firm, and we have read them so. But nothing in this section says how a string of symbols speaks about anything, and so nothing here decides whether is true. Nothing could, since the string mentions no structure: every structure for its signature reads it. The reading we have been doing by intuition needs a definition, and the next section gives it.
6.3 Satisfaction
A structure says what the symbols of a formula mean. It does not say what the variables stand for, and a formula with free variables is true or false only once something does.
Definition 6.20 (assignment). An assignment says what each variable stands for.
Formally, let be a structure with domain . An assignment into is a function . For and , the assignment , “ with for ”, is defined by
Together, a structure and an assignment settle what every term names and whether every formula is true.
Definition 6.21 (value of a term). The value of a term is the element it names, once a structure and an assignment are fixed.
Formally, let be a structure with domain , and an assignment into . The value of a term in under is defined by recursion on the shape of :
We write when the structure is clear.
Example 6.22 (the company, cont’d: the boss’s boss). In , under an assignment with , the term has the value
The closed term also has the value Thorne, and under every assignment.
We already know what the logical words mean in English, and the definition writes that meaning down, one kind of formula at a time: a conjunction is true when both conjuncts are, a disjunction when at least one disjunct is, and “for every ” when what follows holds whichever element stands for. The structure enters only at the atomic formulas: is true when the things the terms name stand in the relation that names.
Definition 6.23 (satisfaction). Satisfaction says when a formula is true in a structure under an assignment.
Formally, let be a structure with domain , and an assignment into . The relation , read “ is true in under ” or “ satisfies ”, is defined by recursion on the shape of by the clauses of Figure 6.5, one for each kind of formula. There means that does not hold, and “or” is inclusive.3
The clause for says that it is true nowhere. Since is , the clause for yields one for negation: if and only if .
The clause for is a deliberate choice. It ignores any connection of content between the two halves, so that “if then ” is true, because its antecedent is false. Other readings of “if”, which ask for such a connection, have been studied, and none would make the truth of depend only on the truth of and of . This one does, and that is what lets the definition decide an implication by deciding its two halves.
The quantifier clauses are where the assignment earns its keep. To decide whether is true, we must look at with standing for each element of the domain in turn, while every other variable keeps the value it had. The assignment is exactly that: with pointed at and nothing else changed. Whatever gave before does not matter, since the quantifier has taken charge of .4 The job falls to the assignment because a structure fixes once and for all what each constant symbol names, while a variable can stand for one element now and for another a moment later.
Remark 6.24 (unnamed elements). One might try to define truth by substitution instead: is true when is true for every closed term , and when it is true for some. That would be wrong, because a domain can contain elements that no closed term names. Take the real numbers as a structure for a signature with a constant symbol , a one-place function symbol and a two-place relation symbol , read as zero, adding one and less than. Every closed term, , , and so on, names a natural number, and no natural number lies strictly between and , yet is true. An assignment reaches every element of the domain, named or not.
Example 6.25 (the company, cont’d: evaluating a universal sentence). Consider the sentence
Since interprets as identity, the atomic clause makes an equation true in it exactly when the two terms name the same person.
By the clause for the universal quantifier, it is true in if, for each of the five people , the formula is true under . Figure 6.6 has one row for each person.
| ? | ? | the implication | ||
|---|---|---|---|---|
| Thorne | no | Thorne | no () | true (antecedent false) |
| Finch | yes | Thorne | yes () | true |
| Pratt | yes | Thorne | yes () | true |
| Bell | yes | Finch | yes () | true |
| Cole | yes | Finch | yes () | true |
Every row is true, so the sentence is true. Without the antecedent the Thorne row becomes false, so is false in , with Thorne as the counterexample. These are Harriet’s two queries again, now as two applications of a definition.
The Thorne row is the one people query: why is the implication true there, when its consequent is false? Read the sentence as a rule of the company: if you are not the chief executive, you earn less than your boss. A rule of that form is broken only by someone it applies to, and it does not apply to Thorne, so Thorne cannot break it. The clause for says exactly this: an implication fails only when its antecedent is true and its consequent false.
Example 6.26 (the company, cont’d: evaluating a -sentence). The sentence
says that every manager manages someone other than themselves.
For the three people who are not managers, the implication is true at once.
For Thorne, the clause for the existential quantifier asks for one whose boss is Thorne and who is not Thorne; Finch will do.
For Finch, Bell will do.
So the sentence is true in .
The evidence has a characteristic shape: for the universal quantifier we examined every row, and for each existential quantifier we produced one witness.
On a finite structure the definition is also an algorithm: to decide whether a sentence is true, unfold it clause by clause. Each quantifier clause runs through the domain, so a sentence with nested quantifiers, on a domain of elements, needs about cases. On an infinite domain, such as the counting numbers, the quantifier clauses ask about infinitely many elements. The definition still makes sense, since it says what truth is, but it no longer tells us how to find it out.
The same sentence can be true in one structure and false in another: truth belongs to the pair of a sentence and a structure, not to the sentence alone.
Example 6.27 (one sentence, several structures). Take the signature with one two-place relation symbol , and the sentence , “everything is -related to something”.
In the company, with read as earns more than, the sentence is false, since Cole earns more than nobody.
In the counting numbers, with read as , it is true, with as the witness for .
In a network of three servers linked in a ring it is true.
In three servers linked one way in a line, to and to , it is false at .
The one string receives two verdicts in four structures.
The same clauses cover the simplest formulas of all, those built from propositional letters, and there they reduce to something familiar.
Proposition 6.28 (propositional logic as a special case). Let be a formula built from propositional letters, and the connectives, a structure and an assignment into . Whether depends only on which letters makes true.
Proof. A letter is a relation symbol with no places, so is a subset of . That set has one element, the empty tuple, so the subset is either empty or everything, and the atomic clause makes false or true accordingly, under every assignment. The clauses for and the connectives compute the truth of from that of its parts. □
So for formulas built from letters a structure amounts to a choice of true or false for each letter, a valuation: a row of a truth table. With two letters there are four rows, and the clauses for the connectives compute the familiar tables. For , writing T and F for true and false:
Propositional logic is the part of first-order logic in which every relation symbol has no places.
The definition asks for an assignment even when the formula is a sentence, yet a sentence has no free variables, and its truth ought not to depend on what they stand for. If it did, “true in this structure” would mean nothing until somebody chose an assignment, and a question such as whether everybody earns less than their boss would have no answer. The next lemma removes the worry.
Lemma 6.29 (relevance). Let and be assignments into with for every . Then if and only if .
In words: a formula cares only about the variables it leaves free.
Proof sketch.
Atomic formulas. The value of a term depends only on what the assignment does to its variables.
Connectives. The clauses for the connectives pass the claim straight down.
. The set is included in , and and agree on that set; so, by the induction hypothesis, is true under the one exactly when it is true under the other, for every .
. The existential case is the same.
Exercise 6.14 asks for the details. □
In particular, the truth of a sentence in does not depend on the assignment. We write , read “ is true in the structure ”, when for one assignment , and hence for all.
Substitution was introduced to pass from a claim about anybody to the same claim about somebody in particular. The passage is safe only if says about the thing names exactly what says about , and the next lemma shows that it does, provided nothing is captured.
Lemma 6.30 (substitution). If is substitutable for in , then if and only if .
In words: putting the term in for has the same effect as letting stand for whatever names. Without the proviso the lemma fails: when a quantifier captures a variable of , the formula no longer says of the thing names what says of (Example 6.19 shows a case).
The proof, by induction on , is long and unilluminating, and we omit it, as most textbooks do; but the omission is of length, not of difficulty. The case of terms, on which the rest is built, is Exercise 6.15, which also asks where substitutability is used.
One feature of the definition looks too obvious to mention, yet its consequences are subtle and contentious. The clause for negation makes true in under exactly when is not, so exactly one of and is true, and by the clause for disjunction is true in every structure under every assignment, whatever says. This property of the definition, that every formula has exactly one of two truth values in a structure under an assignment, is called bivalence.
6.4 Entailment
Satisfaction answers a question about one structure and one assignment: is this formula true here? Often we want something else. We have no particular system in mind, only requirements that every acceptable system must meet, and we want to know what holds in every system that meets them: whether everybody earns less than their boss in every table a personnel system could ever accept, say.
A set of sentences that says what any acceptable system must satisfy, written down before any particular system is in view, is called a theory.
Definition 6.31 (theory; model). A theory is a set of sentences, and its models are the structures in which all its sentences are true.
Formally, a -theory is a set of -sentences. A -structure is a model of a -theory , or satisfies , written , if for every .
Entailment is defined for sets of formulas, whose members may have free variables and are then true or false only under an assignment. For such a set we write when for every , and say that satisfies . When is a theory the assignment makes no difference, by the relevance lemma, and says just that is a model of .
Remark 6.32 (structures and models). A structure is a mathematical object, and a model is always a model of something: the same structure may be a model of one theory and not of another. A structure with an assignment gets no name of its own; we write and read as “ is true in under ”.
English also uses model in the opposite direction. A physicist who calls a set of equations a model of nature means that the equations describe the world. Here the world is the model, and the sentences describing it are the theory.
Definition 6.33 (entailment). A set of formulas entails a formula if the formula is true wherever all the members of the set are, and a formula entailed by the empty set is valid.
Formally, let be a set of -formulas and a -formula. Then entails , written , if for every -structure and every assignment into with .
The formula is valid, written , if , that is, if for every -structure and every assignment into .5
When is a theory and a sentence, says that is true in every model of . Validity is entailment by the empty theory, of which every structure is a model, and it is rarely what we want. A claim such as “nobody but the person at the top is their own boss” is not valid, and nobody expects it to be: it holds, if it holds, because of the theory a system satisfies. The three notions differ in what they examine, as Figure 6.7 shows.
| Notion | Means | Examined |
|---|---|---|
| is true in under | one | |
| for every with | those satisfying | |
| for every | all |
Remark 6.34 (one symbol, three jobs). The symbol now does three jobs, and what stands on its left says which.
With a structure and an assignment on the left, says that is true in under , and that every member of is.
With a structure alone, says that the sentence is true in it, and that is a model of the theory .
With a set of formulas on the left (a list such as abbreviates the set), or nothing, and speak of every structure and every assignment at once.
So is a fact about one structure, and is a fact about all of them.
Example 6.35 (the company, cont’d: valid, and not valid). The sentence is valid: in every structure, if every element is in , then so is .
The sentence
is not valid, since falsifies it, but it is true in some structures: in the counting numbers, with read as , as , as , and and as anything at all, everyone earns less than their boss. It is true in no finite company whose comes from salaries, since the best-paid person cannot earn less than her boss.
A sentence true in need not be valid, however natural it sounds. The sentence is true in and false in every company without engineers.
One relation symbol needs a theory of its own. A structure may interpret as any set of pairs, but a system that compares names relies on two facts about identity: everything is equal to itself, and equals may be put for equals. Written as sentences, these facts are the equality axioms.
Definition 6.36 (equality axioms). The equality axioms of a signature say, in its own symbols, that behaves as identity.
Formally, let be a signature containing the two-place relation symbol . The equality axioms of are the -sentences
- (Eq1)
;
- (Eq2)
, for every -formula and all variables and such that is substitutable for in , where are the free variables of .
We write for the set of them.
The list does not mention symmetry or transitivity, and need not: because (Eq2) allows every formula , both follow from (Eq1) and (Eq2) (Exercise 6.8).
A structure that interprets as identity is normal. Every normal structure satisfies . The axiom (Eq1) holds because everything is identical to itself, and each instance of (Eq2) holds by the substitution lemma, since under an assignment that gives and the same value, and have the same truth value.
Example 6.37 (the company, cont’d: the theory of the personnel system). Harriet’s personnel system enforces, among others, two rules that can be written in the company signature:
Nobody earns more than themselves, and everyone but the chief executive earns less than their boss.
The system also relies, without saying so, on the equality axioms of the company signature, which its query engine uses whenever it compares two names. One instance of (Eq2) says that whoever equals someone who earns more than also earns more than :
obtained from the formula with and for and .
Let be the set consisting of , and : the theory of the personnel system, in the company signature. A normal structure satisfies exactly when both rules hold in it, that is, exactly when it is a table that the personnel system would accept as a possible state of the company. An entailment says that holds in every state the system can be in, which is what the finance director asked.
Remark 6.38 (equality as a logical symbol). Many presentations make a logical symbol instead of a relation symbol, with two rules of its own: (I) concludes from nothing, and (E) concludes from and . The two treatments derive the same formulas from the same hypotheses. Each equality axiom is derivable with the rules, using (I) and (I), and each use of a rule can be replaced by an instance of (Eq1) or (Eq2) followed by (E) and (E). Keeping as a relation symbol leaves the logic, and every proof about it, unchanged.
Example 6.39 (the company, cont’d: an entailment). Sharpened a little, the finance director’s question is whether the theory guarantees that only the chief executive is her own boss:
It does.
Let be a model of , and let be an element of its domain with , and suppose, for a contradiction, that . Then
Hence , and since and were arbitrary, the entailment holds.
Example 6.40 (the company, cont’d: a non-entailment). Does the theory guarantee that no engineer is a manager, that is, does hold? To show that an entailment fails, one structure suffices: a model of in which the sentence is false.
Take the normal structure with domain , in which
names Ada;
sends Ada to Ada;
and are both ;
is empty.
Then:
holds because is empty;
holds because the only person is the chief executive, so its antecedent is never true;
the equality axioms hold because the structure is normal;
Ada is an engineer who is a manager.
The entailment therefore fails. The one-person company is a model of in which the sentence is false, and so it is the counter-model that shows the failure.
The two kinds of answer are not on an equal footing. A non-entailment comes with a certificate, a structure, which anyone can check by evaluating sentences in it. An entailment comes with an argument, “let be a model of the theory and an element”, which is convincing but cannot be checked by running anything: it speaks of every model of the theory, of every size, including the infinite ones, and no loop runs over all of those (Examples 6.39 and 6.40 show one of each).
6.5 Soundness and Incompleteness of
How can we certify that ? Listing the structures that satisfy and checking each one is out of the question: there are infinitely many, and most of them are infinite. What we want instead is a proof, a finite object showing that the commitments made by yield , each step of which a program can check. Part 1 supplied one, Gentzen’s . We write when some derivation in has conclusion and all its open hypotheses in .
Two notions of consequence are now available, and . The first quantifies over all structures and assignments, the second asks for one finite object, and they can be related in two ways:
Soundness: if , then .
Completeness: if , then .
Soundness says that derivations are safe: none leads from true hypotheses to a false conclusion. Completeness says that derivations are enough: whatever follows has one.
Example 6.41 (the company, cont’d: a derivation). The following derivation shows that nobody but the chief executive is her own boss:
In words: let be anyone, and suppose that is not the chief executive and that is her own boss.
By , the boss of earns more than .
Since the boss of is , the equality axiom gives that earns more than .
By that is absurd.
Hence is not her own boss.
In the tree, a leaf labelled , or is that hypothesis, and is short for an implication into . To save width we write for the term , and since the tree is still too wide for the page, we give it in four pieces. The piece instantiates three times and uses the hypothesis :
The piece uses and the hypothesis :
The piece combines the two and meets :
Its open hypotheses are , , , and . The last piece discharges the final two and generalises:
The (I) step is legal because, once both suppositions are discharged, the only open hypotheses are the sentences , and .
The sentence the tree proves is not quite the finance director’s, . The two are true in the same structures, but they are different strings, and the tree proves only the first.
A derivation is the certificate we asked for: a finite object, each step of which a program can check against the rules.
Theorem 6.42 (soundness of ). For every set of formulas and every formula , if then .
Proof. We prove a stronger statement about every derivation , by induction on its construction: in every structure under every assignment , if all the open hypotheses of are true, then so is its conclusion. The theorem is the case of a derivation whose open hypotheses lie in .
There is one case for each rule, and each case asks the same question: if the premisses of the rule are true wherever their open hypotheses are, is the conclusion true wherever its open hypotheses are? Fix a structure and an assignment , and suppose that the open hypotheses of are all true in under .
A hypothesis. The derivation is a single leaf , whose open hypothesis is itself, true by supposition.
(I). The derivation ends with , inferred from a derivation of whose open hypotheses are those of and possibly . If is false under , then is true by its clause. If is true, then every open hypothesis above the step is true, so is true by the induction hypothesis, and so is .
(E). The open hypotheses of the derivation of are among those of , so is true, and hence or is true. If is, every open hypothesis of the derivation of from is true, and so is . If is, the same argument applies to the other derivation.
(I). The derivation ends with , inferred from a derivation of , where is free in no open hypothesis and not free in . We must show that is true under for every . Let be an element of the domain and . The open hypotheses do not mention , so
That assignment differs from at most at , and is not free in unless it is itself, so by relevance is true under .
The side condition was used to keep the open hypotheses true when was moved to . Had they said something about , moving might have made them false, and the induction hypothesis would have said nothing.
(E). The derivation of has its open hypotheses among those of , so is true, and there is an element with true under . Let . The other open hypotheses above do not mention , and is not free in , so
The first step uses that is not free in , unless it is .
The remaining rules, (E), (I), (E), (I), (E), (E) and (I), discharge nothing and have no side condition on a variable, and each is checked by reading its clause in the definition of satisfaction, with the substitution lemma for (E) and (I). Exercise 6.13 treats two of them; the others are similar. □
Remark 6.43 (truth along a derivation). Soundness does not promise that every line of a derivation is true. A derivation reasons from suppositions, and a supposition may be false. The promise is that a line can be false only if one of its open hypotheses is. Listing the lines with their open hypotheses and their truth values in a structure under an assignment makes the promise visible, and it exposes a broken rule: the bad step is the first line that is false while all its open hypotheses are true.
Example 6.44 (reasoning from a supposition). From and the rule (E) derives :
Take a structure that makes both hypotheses true, so that is false and true. The branch on the left passes through two false lines, the supposition and the line , and each has a false open hypothesis, the supposition itself. Nothing has gone wrong. That branch reasons about a case this structure rules out, and (E) takes from it only the conclusion , which the other branch also reaches.
Is also complete? It is not. To show that a sentence has no derivation in we use two properties of the rules.
Fact 6.45 (disjunction and existence properties).
If , then or .
If , then for some term .
In words: a proof in , from no hypotheses, of “ or ” says which of the two holds, and a proof of “there is an such that ” names a term for .
The reason fits in three sentences. Every derivation can be rewritten, step by step, into one with no detours, that is, no introduction rule followed at once by the elimination rule for the same symbol. A derivation with no detours and no open hypotheses ends with an introduction rule. For that rule is (I), and the tree above it derives or derives ; for it is (I), and the tree above it derives for a particular term .6
Theorem 6.46 (incompleteness of ). For a propositional letter , the sentence is valid, but . Hence there are sentences with and , and the converse of soundness fails for .
Proof. The sentence is valid: in every structure under every assignment is true or false, and in the second case is true. Now suppose that . By the disjunction property, derives or derives , and by soundness the disjunct it derives is valid. Neither is:
in a structure that makes true, is false;
in one that makes false, is false.
□
The proof used soundness to pass from a derivation to validity, and two structures to take validity away. It used nothing about except that a structure can make it true and another false, so the same proof works for every sentence of which that holds: does not derive .
The sentence is the law of the excluded middle: every structure obeys it, and lacks it. The rules come close, since they derive , but no rule leads from to . The gap is no isolated freak, and the next example meets it again.
Remark 6.47 (two senses of incompleteness). The word incompleteness in the title of this section describes a proof system: a system is complete if it derives everything that is entailed, and incomplete if some entailment has no derivation. Chapter 8 uses it of theories instead: a theory is incomplete when some truth about its subject matter cannot be derived from it.
Example 6.48 (the company, cont’d: one negation too many). The finance director’s sentence is entailed by (Example 6.39). Can derive it?
The argument of Example 6.39 went:
either is the chief executive or not;
if so, done;
if not, absurdity.
The second half is the derivation of Example 6.41. The rules do not provide the first half, the either … or not. They do provide the following:
suppose ;
then, as in Example 6.41, absurdity;
hence , which is .
That is one negation too many. In every structure is true exactly when , but no rule of makes the last step, and no cleverer derivation finds a way round.7
6.6 Law of the Excluded Middle
The gap in is a principle that every structure obeys: of a claim and its denial, one is true, and there is no third option in the middle. This is the law of the excluded middle (LEM), and it is more than two thousand years old.8 In a structure it holds because the clause for negation makes exactly one of and true (bivalence); in a proof system it becomes a rule with no premisses, for every formula :
The law is not the only principle that lacks. Three more fall into the gap, each a schema with an instance for every choice of formulas:
The first, double negation, says that what is not false is true;
the second, Peirce’s law,9 says much the same without negation;
the third says that if not everything lacks the property , then something has it.
Every instance of each is valid, as a check against the clauses shows, but does not derive every instance: already , and , for propositional letters , and a relation symbol , have no derivation (Exercise 6.10).
With the law added, all three become derivable. Here is double negation:
We write (DN) for this derivation used as a step. The system with the law added is classical logic.
Definition 6.49 (). The system is with the law of the excluded middle added as a rule with no premisses.
Formally, the derivations of are built by the rules of together with the rule (LEM).
Every derivation of is a derivation of , so implies . The letters are J for intuitionistisch and K for klassisch.10 One rule with no premisses looks like a small addition. The next example shows what it buys.
Example 6.50 (the company, cont’d: a derivation in ). The finance director’s sentence is derivable in : . The derivation is the argument of Example 6.39 written as a tree, and most of it is already built: the piece of Example 6.41 derives from and , with , and . The new step splits on :
The left case of the (E) needs no work. The right case is the old derivation, followed by a step out of the contradiction, a step that the split makes worth taking. The (I) step is legal for the same reason as before: only , and remain open.
Theorem 6.51 (soundness of ). For every set of formulas and every formula , if then .
Proof. The soundness proof for goes through with one more case: a leaf , with no open hypotheses, must be true in every structure under every assignment. By bivalence it is: the clause for negation makes one of and true. □
So far, so good: is sound, and it reaches sentences that missed. But is one more rule enough? Soundness is half of the connection between and . The other half asks whether derives everything that follows, or whether further laws are missing.
6.7 Completeness of
Soundness puts derivability inside entailment: whatever derives from is true in every model of . For the converse failed, and the law of the excluded middle was the missing step. For the converse holds.
Theorem 6.52 (completeness11). Let be a countable signature, a set of -sentences and a -sentence. If , then .
In words: whatever is true in every model of a theory can be derived from it in .
To show that implies , we prove the contrapositive: if , then some model of makes false. We are handed a failure to derive and must build a structure from it. Two definitions name what the construction aims at.
Definition 6.53 (consistency; maximal consistency). A consistent set is one from which the rules cannot derive absurdity, and a maximal consistent set is a consistent set that takes a side on every sentence.
Formally, a set of -sentences is consistent if , and inconsistent otherwise. It is maximal consistent if
it is consistent, and
for every -sentence , either or .
Keep the two words apart. Consistent is about derivations: no derivation leads from the set to . Having a model is about structures: some structure makes the whole set true.
Soundness gives one direction at once, since a set with a model cannot derive , which is true in no structure. The proof below gives the other, and in this vocabulary that is the whole of the completeness theorem: every consistent set of sentences has a model. (Applied to , this gives the theorem as stated, by Step 1 below.) The proof has five steps.
Show that is consistent.
Add new constants, and sentences that make each of them a witness for an existential sentence.
Extend the result to a maximal consistent set .
Build a structure from the closed terms of the language, so that its elements are pieces of syntax.
Prove that a sentence is true in this structure exactly when it belongs to . Since and are in , the structure is the one we want.
Steps 2 and 4 are needed only for the quantifiers, so we first carry out the propositional case in full and then extend it.
Step 1
Lemma 6.54 (refuting the negation). If , then is consistent.
Proof. If derived , then would derive by (I), and by (DN). □
Excluded middle enters the propositional proof here and nowhere else, through (DN), and here the proof breaks down for . With empty and the sentence , the lemma fails for : the system does not derive , yet is inconsistent, by the tree that derived .
Steps 3 to 5, propositional case
Lemma 6.55 (Lindenbaum). Over a countable signature, every consistent set of sentences is contained in a maximal consistent set.
In words: a set of sentences that does not contradict itself can be enlarged until it takes a side on every question, and still not contradict itself.
Proof. List all the sentences of the signature as ; they can be listed, because they are finite strings over a countable alphabet. Decide each sentence in turn: let and
Let .
Every sentence or its negation belongs to .
Each is consistent: if both and derived , then by (I) the set would derive both and , and hence .
Finally, is consistent, because a derivation of from uses finitely many hypotheses, all of which lie in some .
□
The proof is not an algorithm. At each step it asks whether a set of sentences is consistent, and nothing in it says how that question is to be answered; it needs only that the question has an answer. The proof shows that exists without constructing it. Nor is unique: another order of the list can give another maximal consistent set. The lemma promises a maximal consistent set, not a particular one, and the completeness proof needs only one.
The next lemma shows, one connective at a time, that a maximal consistent set behaves like the set of truths of a single structure.
Lemma 6.56 (maximal consistent sets). Let be maximal consistent. For all sentences and :
if , then ; in particular, ;
if and only if and ;
if and only if or ;
if and only if or .
Proof.
(i) If derives but , then , and (E) derives from . And , since is consistent.
(iii) If and neither nor is, then and are, and (E) derives from the three. The converse follows from (I) and (i).
(iv) If and are in , then derives by (E), so by (i). Conversely:
if , then derives by (I), discharging nothing;
if , then , from which, supposing , (E) gives and (E) gives , so again derives .
In either case (i) puts in .
Part (ii) is Exercise 6.16. □
For a signature of propositional letters a structure amounts to a valuation, and the obvious one serves: make a letter true exactly when it belongs to .
Lemma 6.57 (truth lemma, propositional). Let be maximal consistent, and let make a letter true exactly when . For every formula built from letters, and the connectives, is true under if and only if .
Proof. By induction on .
A letter. The claim is the definition of .
. Neither side holds, by part (i) of the previous lemma.
.
and . The cases of and are the same, with parts (ii) and (iv) of the lemma.
□
This completes the propositional case. If , then
in particular every member of and . So the structure given by satisfies and makes false, and .
Example 6.58 (Lindenbaum’s construction on three letters). Let and , and ask whether entails . Start the construction from , which is consistent, and suppose that the list of sentences begins .
Adding leaves the set consistent, so goes in.
Adding does not, since and give and is present, so goes in.
Adding meets , so goes in again.
The valuation read off makes true and and false, and it does make and true and false. The valuation was assembled, one letter at a time, from what the hypotheses could not rule out, and it shows that the entailment fails.
The first step asked whether is consistent, and we answered yes because this very valuation makes all of it true: the construction itself only asks.
Step 2: Henkin witnesses
Two things go wrong when the language has quantifiers, and the two new steps repair them. The first is that nothing yet says what the elements of the structure should be; the propositional case needed none. The answer is the boldest idea in the proof: the elements are the closed terms themselves. A constant names the element , the term names the element , and so on, so that the structure is made of its own names.
The second problem is that a maximal consistent set may contain without any instance : the closed terms may not name enough elements.
Example 6.59 (the company, cont’d: an engineer with no name). In every closed term names Thorne, since is Thorne and Thorne is her own boss. The set of sentences true in , which is maximal consistent, therefore contains and also for every closed term . A structure built from the closed terms would contain no engineer, and the truth lemma would fail. This is the company’s version of Remark 6.24.
We must ensure that there are enough names and that every existential sentence in has one of them as a witness.
Definition 6.60 (witness property). A set of sentences has the witness property if every existential sentence in it comes with a named instance.
Formally, a set of -sentences has the witness property if, for every sentence , there is a constant symbol of with .
Lemma 6.61 (generalisation on a new constant). If , where the constant occurs neither in nor in , then .
Proof sketch. In a derivation of , replace everywhere by a variable that occurs nowhere in the derivation. No rule mentions , so the result is still a derivation, now of from hypotheses in , which do not mention . One step of (I) completes it. □
Lemma 6.62 (Henkin witnesses). Let be countable and a consistent set of -sentences.
Let be with new constant symbols added.
List the existential -sentences as .
For each let be the sentence , where is the first of the new constants that occurs neither in nor in any of .
Then is consistent.
Proof. First, remains consistent when derivations may use the new constants: replacing each new constant in a derivation of from by a variable that occurs nowhere in it yields a derivation of from over , since no rule mentions a constant. Since a derivation of uses finitely many hypotheses, it now suffices to show that if is consistent, then so is .
Suppose not. Then derives , the denial of an implication, and from the denial of an implication the rules of alone derive and (Exercise 6.12). The constant occurs neither in nor in . So derives
Hence is inconsistent, contrary to assumption. No use of excluded middle was needed. □
In words: every existential sentence may be given a named witness without risk of contradiction, provided that each name is new.
Remark 6.63 (why the witnesses must be new). The proviso is not fussiness, and two small sets show what it prevents. Let and be one-place relation symbols and a constant symbol. The set is consistent: every structure with an element of that does not name satisfies it. Had the witness for been the old constant , the sentence added would be , and with it the set derives and . A name already in use carries information, and the witness may not have it.
Nor may two existential sentences share a new name. The set
is consistent, since every structure with an element of and a different element of , and nothing in both, satisfies it; give both existential sentences the witness , and the set derives , and so a contradiction. Exercise 6.17 asks for the details.
The condition is the one on the eigenvariable of (E), that it be a name about which nothing has been assumed, in another guise.
Now apply Lindenbaum’s lemma, over , to . The result is a maximal consistent set of -sentences with the witness property. Indeed, if , then is some , the sentence is in , and part (iv) of the lemma on maximal consistent sets puts in .
Steps 3 to 5, first-order case
Definition 6.64 (term structure). The term structure of a set of sentences is made of the closed terms, related as the set says they are.
Formally, let be a maximal consistent set of -sentences with the witness property. Its term structure is the -structure in which
is the set of closed -terms, and
for each constant symbol , each function symbol of arity , and each relation symbol of arity of ,
The domain is not empty, since the new constants are closed terms. By induction on terms, every closed term names itself: under every assignment . Every element of the domain therefore has a name, and by the substitution lemma holds exactly when for every closed term , and exactly when for some closed term .
Lemma 6.65 (truth lemma). For every -sentence , if and only if .
In words: in the structure made of names, a sentence is true exactly when says it is.
Proof. By induction on the number of connectives and quantifiers in . The induction is not on subformulas: is not a subformula of , but it has one quantifier fewer.
Atomic sentences. The claim is the definition of .
Connectives. Each follows from the induction hypothesis and the matching part of the lemma on maximal consistent sets: is true exactly when or is, so exactly when or , so, by part (iii), exactly when ; the cases of and use parts (ii) and (iv) in the same way.
. The existential case is Exercise 6.16.
. If , then every instance
so is true.
Conversely, suppose that . Then
□
Excluded middle has now been used a second time, in the passage from to , a relative of the quantifier principle that could not derive.
Proof of the completeness theorem. Suppose that .
Then is consistent (Step 1).
Add the witnesses (Step 2) and extend to a maximal consistent set with the witness property (Step 3).
Its term structure (Step 4) makes every member of true (Step 5), in particular every member of , and .
The new constants occur in neither nor , so they can be forgotten: the structure , the restriction of to the symbols of , is a -structure in which the same -sentences are true. It satisfies and makes false, so . □
The proof has a slightly impudent quality. Asked to show that a sentence true in every structure has a proof, we turned the sentences themselves into a structure made of words. Nothing in the definition of a structure forbids this, since a domain may be any non-empty set, and a set of strings is a set like any other.
Remark 6.66 (compactness and the Löwenheim–Skolem theorem). The proof yields two further results. If every finite subset of has a model, so does (compactness), since a derivation uses only finitely many hypotheses. And the structure the proof builds is made of terms, of which there are only countably many, so a set of sentences with a model has one whose domain can be listed as (the Löwenheim–Skolem theorem). Both say that first-order sentences discriminate less than one might hope.
Example 6.67 (the company, cont’d: the finance director’s two answers). Take to be the theory of the personnel system. By soundness and completeness, “true in every model of ” and “derivable from in ” are one relation, so the finance director’s question has two answers, and they are the same answer. The tables the system can produce interpret as identity, and the next remark shows that looking only at such structures loses nothing.
Remark 6.68 (normal structures). Let be a theory that contains the equality axioms of its signature. The term structure the proof builds need not be normal, since may contain for two different constants and . Because contains the equality axioms, the defect can be repaired. Write when . The axioms (Eq1) and (Eq2) make an equivalence relation (Exercise 6.8) that is compatible with the symbols: if for each , then
;
exactly when .
The -classes of closed terms therefore form a normal structure in which exactly the same sentences are true. Hence if a sentence is true in every normal model of , then . The equality axioms say everything about identity that a derivation can use, so looking only at normal structures loses nothing.12
6.8 Classical and Intuitionistic Logic
We now have two logics for one language. The system is the logic of Part 1, whose proofs are programs. The system is complete for the structures of this chapter. They differ by a single rule, and the difference decides what a proof contains.
The law of the excluded middle closes the gap, and that is its gain: entailment, which quantifies over every structure, becomes derivability, which asks for a finite certificate. With the law in hand an argument by cases on any claim is available, whether or not anyone can tell which case holds. Adding a rule can only let more through, and what it lets through costs the two properties of Fact 6.45.
Remark 6.69 (the drinker principle). Take a signature with one one-place relation symbol , think of the domain as the customers in a pub (there is at least one, since domains are not empty), and read as “ is drinking”. The sentence
says that there is someone in the pub such that, if they are drinking, everyone is.13
The principle sounds like a claim about a remarkable person, and so it is often suspected of being false. It is valid, by a two-line argument. Either everyone is drinking or someone is not. If everyone is, pick anyone: the consequent is true, so the implication is. If someone is not, pick that person: the antecedent is false, so the implication is true. There is no remarkable person, only a choice made differently in the two cases. The first case is where the non-empty domain is used; in an empty pub there would be nobody to pick, and the sentence would be false.
The system does not derive this sentence, and this time the existence property is the reason. If it did, it would derive for some term . The signature has no constants and no function symbols, so is a variable, say . But is false in a pub of two people under an assignment that sends to the one who is drinking, so by soundness it has no derivation. Asked for someone, the rules of insist on being told who. The argument above never says who: it says “this one if everyone is drinking, that one if not”, without knowing which case holds.
In a pub of five that is no defect, since one can go and look. Replace “drinking” by a property of numbers that nobody knows how to check, and the pub by all the counting numbers, and the same argument proves that a certain number exists without indicating how to find it, even in principle. That is why some people refuse to accept it.
Example 6.70 (a derivation of the drinker principle in ). The drinker principle, which we write , is derivable in : . The derivation splits on whether someone is not drinking. If someone is not, call them ; then is the witness, because the antecedent fails for . This is the derivation :
If nobody is not drinking, then everyone is, and anyone at all, say , is the witness. This is the derivation , in which the (I) step discharges nothing, since was reached without supposing :
One step of (E) on an instance of (LEM) joins the two cases:
In the witness is , the person who is not drinking, and the (E) step is legal because is free neither in , nor in , nor in any other open hypothesis above . In the witness is , anyone at all. The (I) step is legal because is not free in the only open hypothesis, . The (I) step uses a variable as the witness, and that is where the non-empty domain is paid for.
Which case supplies the conclusion depends on which side of the (LEM) is true, and the derivation does not say.
Proposition 6.71 (loss of the disjunction and existence properties). The system has neither the disjunction property nor the existence property.
Proof.
Disjunction property. The system derives in one step, and it derives neither disjunct, since neither is valid and is sound.
Existence property. Take a signature whose only symbol is the one-place relation symbol , so that every term is a variable. The system derives : split by (LEM) on . If someone is not drinking, that person is a witness, since the antecedent fails for them. If not, everyone is drinking, by (DN), and every variable is a witness (Example 6.70 gives the tree). Consider the structure with two elements, and , in which holds of only, and an assignment that sends every variable to . For every term the formula is true and is false, so is false, and by soundness derives no such formula.
□
In a proof of an existential sentence contains a witness, and the rules were designed so that it would: every derivation of from no hypotheses can be straightened into one that ends by exhibiting a term . A proof in can conclude by showing that both answers to some question yield an , without saying which answer is the true one. It certifies that something exists but no longer shows which thing.
Over a finite structure the price is nothing: whether or holds there is settled by running through the domain, so an argument by cases on can always be completed by looking. The price is felt only over domains that nobody can run through, such as the counting numbers. Whether it is worth paying depends on what makes a sentence true, a question that the mathematics of this chapter can sharpen but not settle.
The mathematicians who refuse the law, the intuitionists, take the loss of witnesses to be the point. The law was abstracted, they argue, from reasoning about finite collections, where going through the list settles every question, and it was carried over unexamined to infinite collections, which nobody can go through.14
Goldbach’s conjecture says that every even number greater than is the sum of two primes.15 Written with symbols for zero, successor, addition and multiplication, it is a sentence about the counting numbers, and by the definitions of this chapter it is true or false in the structure they form. To assert “Goldbach’s conjecture or its negation” is to claim, the intuitionists say, that the question is settled, or at least can be, when nobody has any idea how to settle it. For them mathematics is a construction carried out in the mind, and “true” can only mean “constructed”.16
Their logic gives the connectives meaning by proof conditions, what counts as a proof of a sentence, rather than by truth conditions.
A proof of is a proof of each conjunct;
a proof of is a method that turns every proof of into a proof of ;
a proof of is a proof of one disjunct together with which one;
a proof of is a particular with a proof of for it.
On this reading the disjunction and existence properties of are not accidents of the rules, waiting to be patched; they are what the connectives mean, and the rules of write them down.17
Intuitionistic logic also has a semantics of its own: structures that grow in stages, which model a mathematician whose knowledge grows over time, and for which is sound and complete.18 Each logic therefore has a semantics that it fits exactly, and the question becomes which semantics describes what mathematicians are doing.
The two logics are equally safe from contradiction: every theorem of classical arithmetic can be translated into a theorem of intuitionistic arithmetic, with inserted in the right places, so that if intuitionistic arithmetic is consistent, so is classical arithmetic.19 What separates the logics is meaning: what a sentence asserts, and what counts as a proof of it.
The strongest modern case for the intuitionist answer is an argument about language rather than about mathematics.20 The meaning of a sentence is fixed by how it is used, and a speaker’s grasp of that meaning must show itself in what the speaker can do: above all, in recognising a proof of the sentence when one is presented. But some truth conditions could obtain without anyone being able to recognise that they do, and no speaker could display a grasp of those. For mathematics, then, meaning is given by proof conditions, and the right logic is intuitionistic. Realists reply that we understand more than we can verify, and the debate is alive; Button and Walsh (2018) is a guide to its current state. Mathematics itself has also moved on: a great deal of analysis can be developed constructively without the philosophy, and classical mathematics reads that work as mathematics that happens to supply witnesses.21
The proof conditions came back, half a century on, as the reason the proofs of can be read as programs. A proof of a disjunction is a value with a tag on it, so a proof of the law of the excluded middle would be a program that, given any claim at all, returns the right tag, and there is no such program. For this reason the proof assistants used to verify software today, such as Lean and Rocq, are built on intuitionistic type theories, and they let a user add the law as an axiom or, in Lean, through the axiom of choice.22 Figure 6.8 sets the two logics side by side.
| (intuitionistic) | (classical) | |
|---|---|---|
| Rules | natural deduction as in Part 1 | those rules plus the law of the excluded middle |
| Meaning of a connective | proof conditions | truth conditions |
| Semantics it fits exactly | structures that grow in stages | the structures of this chapter |
| Complete for the structures of this chapter | no | yes |
| Disjunction and existence properties | yes | no |
| Proofs as programs | yes | only with jumps |
The rest of this part of the course is classical, and that is a decision rather than a default. Its question is what holds in every structure, a question about truth, and the theorem that answers it, soundness and completeness together, is a theorem about . It fails for , which is sound for the structures of this chapter but not complete for them. From here on we therefore work in a different logic from the one in which proofs are programs, and we have paid for completeness with the witnesses.
History
The logic of this chapter was built over half a century of argument about what mathematics may assume. Its language is, in modern dress, the one Gottlob Frege introduced in his Begriffsschrift of 1879.23 It was the first formal language with quantifiers, and it came with the first system of proof precise enough that checking a proof needs no understanding of what it is about, only a comparison of shapes. Every proof checker since descends from it.
Frege built it for a purpose. The nineteenth century had rebuilt the calculus on the arithmetic of the real numbers, and the real numbers on sets of rational numbers. Frege set out to finish the job by showing that arithmetic itself is logic: that the truths about numbers follow from laws of thought alone, so that mathematics rests on the firmest ground there is. This programme is logicism, and Frege carried it out in the two volumes of his Grundgesetze der Arithmetik (Frege, 1893).
In June 1902, with the second volume at the printer, a letter arrived from Bertrand Russell. One of Frege’s basic laws, Russell pointed out, allows a set of all sets that are not members of themselves; that set is a member of itself exactly when it is not, so the laws contradict one another.24
Russell’s paradox was one of several, and together they raised the question of what makes mathematics safe. Russell’s own answer was the theory of types, the ancestor of the type systems of programming languages. Two others bear on this chapter: David Hilbert’s, which kept classical mathematics whole and set out to prove it safe, and L. E. J. Brouwer’s, which rejected part of it, beginning with the law of the excluded middle. Section 6.8 describes the logic that Brouwer’s answer produced. Hilbert’s is told here.
Hilbert’s answer was to keep classical mathematics and secure it. Its proofs, he proposed, should be treated as finite strings of symbols, and their consistency proved by reasoning about those strings with methods so elementary that even Brouwer could not object. This is Hilbert’s programme, whose three questions are the rows of the scoreboard at the end of each chapter.
His ambition was large: “Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können” (no one shall drive us out of the paradise that Cantor created for us).25 A year later he put the same thought more bluntly: “Taking the principle of excluded middle from the mathematician would be the same, say, as proscribing the telescope to the astronomer or to the boxer the use of his fists.”26
He meant that classical mathematics was too valuable to give up, and most mathematicians since have agreed with him in practice, whatever their view of the philosophy. Hilbert’s reply is not an argument that Brouwer was wrong. It is an argument that his being right would cost a great deal.
Kurt Gödel answered one of Hilbert’s questions in his doctoral thesis of 1929, written when he was twenty-three: the completeness theorem of this chapter, proved for a Hilbert-style system rather than for . Two years later he showed that the consistency proof Hilbert wanted cannot be given, and the last chapter of this part of the course explains why.
The definition of satisfaction fits Frege’s view of truth. A sentence is about some things, and the things are there, determinate, whether or not anyone is looking. The sentence is true or false according to how they are, and it has its truth value before anyone finds out which value it is, and whether or not anyone ever does.27
Bivalence is no discovery about this picture. It was built into the definition of satisfaction when the clause for negation was written, and it says, in a single line, that every sentence has in every structure exactly one of two truth values.
Tarski gave this picture a precise form. His definition of truth, published in 1933, is the one of Section 6.3, and his definition of consequence, presented in 1935 at the Paris congress of the Unity of Science movement, is the one of Section 6.4. The second answered Carnap, who had tried in Logische Syntax der Sprache (Carnap, 1934) to define consequence by the shapes of sentences alone, without mentioning truth. Tarski used Gödel’s incompleteness theorem (Chapter 8) to show that no definition by finitely many rules of inference can do the job, and objected that Carnap’s own definition depends on special features of his language. Carnap, who had met Tarski in Vienna and Warsaw in 1930, became the most energetic convert to semantics and built his Introduction to Semantics (Carnap, 1942) on Tarski’s work. Others in the Vienna Circle, Otto Neurath above all, suspected that talk of truth was metaphysics returning by the back door. With these definitions Gödel’s theorem can be read as showing that, on this picture, the classical system is exactly right. On this view the law of the excluded middle is not a rule that we chose but a law of truth, and a proof system without it fails to see some truths. Gentzen’s of 1934 gave the proofs the form used here, and the proof of completeness in this chapter is Henkin’s of 1949. He found it by accident, as a graduate student at Princeton, while trying to prove something else, and he tells the story in Henkin (1996); it is now the proof in every textbook. Figure 6.9 collects the dates.
| Who | When | What |
|---|---|---|
| Frege | 1879 | quantifiers; proofs checked by their shape |
| Frege; Russell | 1893–1902 | logicism; the paradox in its laws |
| Hilbert | 1920s | a programme to prove mathematics safe |
| Gödel | 1929 | completeness |
| Gödel | 1931 | incompleteness |
| Tarski | 1933; 1936 | definitions of truth and of consequence |
| Gentzen | 1934 | and |
| Henkin | 1949 | the proof of completeness used here |
Summary
A system is modelled as a structure: a non-empty set of things, with a meaning for each symbol of a signature. A sentence is true or false in a structure by a definition with one clause per symbol. Its two quantifier clauses loop over the domain, so on a finite structure the definition is an algorithm.
A theory entails a sentence when the sentence is true in every model of the theory; for a theory that describes a system, this means “true of every system that meets it”. The derivations of are finite certificates, and they are sound: they never lead from truths to a falsehood. They do not reach every sentence that is entailed, and the whole of the gap is one law, excluded middle.
Adding excluded middle gives , which is sound and complete, so a theory entails a sentence exactly when the sentence has a derivation from it. The price is that a proof of an existential sentence no longer says what exists.
Exercises
The exercises run from practice to proof.
Exercises 6.1 to 6.6 use the definitions on particular sentences and structures;
Exercises 6.7 to 6.12 ask for derivations and for the arguments behind the claims about and ;
Exercises 6.13 to 6.17 fill in the proofs that the text left to the reader.
Exercise 6.1. Let have a constant symbol , a one-place function symbol , one-place relation symbols and , and two-place relation symbols and . Let be the -structure with domain in which
names ;
sends to and every other to ;
is and is ;
is greater than, and is identity.
Read as “ is even”, as “ is odd”, as “ is greater than ” and as “the predecessor of ”. Translate the following into , and say whether each is true in :
every even number is greater than every odd number;
only is the predecessor of its own predecessor.
Translate the following into English, and say whether each is true in :
;
.
Exercise 6.2. Let have a constant symbol , a one-place function symbol , one-place relation symbols and , and a two-place relation symbol . Let be the -structure with domain in which names , is less than, and , and are given by the table
Evaluate each of the following in by a table with one row for each value of the outermost variable:
;
;
.
Exercise 6.3. Let have a constant symbol , a one-place function symbol and the two-place relation symbol . Let and be the -structures in which is identity, names , and
has domain , and sends , and to and sends and to ;
has domain , and sends and to and sends and to .
Find a -sentence that is true in and false in , and check both verdicts against the definition of satisfaction.
Exercise 6.4. Let have a constant symbol , a one-place function symbol , a one-place relation symbol and a two-place relation symbol , and let be the formula
Apply the recursion in the definition of substitution to put , and in turn for in , and say which of the three terms are substitutable for in .
Exercise 6.5. Let have a constant symbol , a one-place function symbol , one-place relation symbols and , and the two-place relation symbol . For each of the following, find a counter-model as small as you can make it, check it against the definition of satisfaction, and say why no smaller structure will do.
;
;
, in structures that interpret as identity.
Exercise 6.6. Let have a constant symbol , a one-place function symbol , and two-place relation symbols and , and let be the theory consisting of the two sentences
For each sentence, decide whether entails it. If it does, give a derivation in ; if not, give a counter-model in which is identity.
;
;
;
.
Exercise 6.7. Give a derivation of Peirce’s law, , in , for all formulas and .
Exercise 6.8. Let be a signature containing the two-place relation symbol , and its equality axioms (Definition 6.36). Show that
and
Exercise 6.9. Let be a one-place relation symbol. Someone offers a derivation witnessing , as follows: from , and the derivation of from the supposition (a single leaf), conclude by (E); then conclude by (I). Take the structure with domain in which is , and an assignment sending to . List the formulas of the derivation with their open hypotheses and truth values, as in Remark 6.43, find the first line that is false while all its open hypotheses are true, and say which side condition it breaks.
Exercise 6.10.
Show that if derived every instance of Peirce’s law, , it would derive .
Show the same for every instance of .
Show that for every formula .
Exercise 6.11. In a signature with two constants and and a one-place relation symbol , show that derives but derives for no term . Why does it not help that there are now closed terms to choose from?
Exercise 6.12. Show that and , and that . Does derive the last?
Exercise 6.13. Write out the cases (E) and (I) of the soundness proof for . Which lemma does the second case need?
Exercise 6.14. Prove the relevance lemma: first for terms (if and agree on , then ), and then for formulas, by induction.
Exercise 6.15.
Prove, by induction on the term , that if is a term then
Deduce from (a) the atomic case of the substitution lemma.
Where would the induction for formulas use the hypothesis that is substitutable for ?
Exercise 6.16.
Prove part (ii) of the lemma on maximal consistent sets.
Prove the existential case of the truth lemma, and say where the witness property is used.
Exercise 6.17. Let and be one-place relation symbols and a constant symbol, and let be .
Show that is consistent.
Show that , together with and , derives in .
Which condition of the lemma on Henkin witnesses does the second added sentence break?
References
- Errett Bishop. Foundations of Constructive Analysis. McGraw-Hill, New York, 1967.
- L. E. J. Brouwer. Over de Grondslagen der Wiskunde. PhD thesis, Universiteit van Amsterdam, 1907.
- L. E. J. Brouwer. De onbetrouwbaarheid der logische principes. Tijdschrift voor Wijsbegeerte, 2:152–158, 1908. English translation, “The unreliability of the logical principles”, in Brouwer, Collected Works, vol. 1, North-Holland, 1975.
- Rudolf Carnap. Logische Syntax der Sprache. Springer, Wien, 1934.
- Rudolf Carnap. Introduction to Semantics. Harvard University Press, Cambridge, MA, 1942.
- E. F. Codd. A relational model of data for large shared data banks. Communications of the ACM, 13(6):377–387, 1970.
- Michael Dummett. The philosophical basis of intuitionistic logic. In H. E. Rose and J. C. Shepherdson, editors, Logic Colloquium ’73, pages 5–40. North-Holland, Amsterdam, 1975.
- Michael Dummett. Elements of Intuitionism. Oxford University Press, Oxford, second edition, 2000.
- Anita Burdman Feferman and Solomon Feferman. Alfred Tarski: Life and Logic. Cambridge University Press, Cambridge, 2004.
- Gottlob Frege. Begriffsschrift, eine der arithmetischen nachgebildete Formelsprache des reinen Denkens. Louis Nebert, Halle, 1879. English translation by S. Bauer-Mengelberg in J. van Heijenoort (ed.), From Frege to Gödel, Harvard University Press, 1967, pp. 1–82.
- Gottlob Frege. Grundgesetze der Arithmetik. Hermann Pohle, Jena, 1893. Volume I 1893, volume II 1903.
- Gottlob Frege. Der Gedanke. Eine logische Untersuchung. Beiträge zur Philosophie des deutschen Idealismus, 1:58–77, 1918. English translation, “The thought: a logical inquiry”, Mind 65 (1956), 289–311.
- Gerhard Gentzen. Untersuchungen über das logische Schließen I, II. Mathematische Zeitschrift, 39:176–210, 405–431, 1934. Appeared 1934–35; English translation in The Collected Papers of Gerhard Gentzen, ed. M. E. Szabo, North-Holland, 1969.
- Kurt Gödel. Die Vollständigkeit der Axiome des logischen Funktionenkalküls. Monatshefte für Mathematik und Physik, 37:349–360, 1930. Doctoral dissertation, Vienna, 1929.
- Kurt Gödel. Zur intuitionistischen Arithmetik und Zahlentheorie. Ergebnisse eines mathematischen Kolloquiums, 4:34–38, 1933.
- Timothy G. Griffin. A formulae-as-types notion of control. In Proceedings of the 17th ACM Symposium on Principles of Programming Languages (POPL), pages 47–58, 1990.
- Leon Henkin. The completeness of the first-order functional calculus. Journal of Symbolic Logic, 14(3):159–166, 1949.
- Leon Henkin. The discovery of my completeness proofs. Bulletin of Symbolic Logic, 2(2):127–158, 1996.
- Arend Heyting. Die formalen Regeln der intuitionistischen Logik. Sitzungsberichte der Preussischen Akademie der Wissenschaften, Physikalisch-mathematische Klasse, pages 42–56, 1930.
- David Hilbert. Über das Unendliche. Mathematische Annalen, 95:161–190, 1926. English translation in van Heijenoort (1967), pp. 367–392.
- David Hilbert. Die Grundlagen der Mathematik. Abhandlungen aus dem Mathematischen Seminar der Hamburgischen Universität, 6:65–85, 1928. Lecture of 1927. English translation, “The foundations of mathematics”, in van Heijenoort (ed.), From Frege to Gödel, 1967, 464–479.
- A. Kolmogoroff. Zur Deutung der intuitionistischen Logik. Mathematische Zeitschrift, 35:58–65, 1932.
- A. N. Kolmogorov. O principe tertium non datur. Matematičeskij Sbornik, 32:646–667, 1925. English translation in van Heijenoort (1967), pp. 414–437.
- Saul A. Kripke. A completeness theorem in modal logic. Journal of Symbolic Logic, 24(1):1–14, 1959.
- Saul A. Kripke. Semantical analysis of intuitionistic logic I. In J. N. Crossley and M. A. E. Dummett, editors, Formal Systems and Recursive Functions, pages 92–130. North-Holland, Amsterdam, 1965.
- Paolo Mancosu, editor. From Brouwer to Hilbert: The Debate on the Foundations of Mathematics in the 1920s. Oxford University Press, New York, 1998.
- Open Logic Project. The Open Logic Text. https://openlogicproject.org, 2026. Release 9620cc7, 12 July 2026. Licensed CC BY 4.0.
- Charles S. Peirce. On the algebra of logic: A contribution to the philosophy of notation. American Journal of Mathematics, 7(2):180–202, 1885.
- Dag Prawitz. Natural Deduction: A Proof-Theoretical Study. Almqvist & Wiksell, Stockholm, 1965.
- Raymond M. Smullyan. What Is the Name of This Book? Prentice-Hall, Englewood Cliffs, NJ, 1978.
- Alfred Tarski. Der Wahrheitsbegriff in den formalisierten Sprachen. Studia Philosophica, 1:261–405, 1935. First published in Polish, 1933. English translation in Tarski, Logic, Semantics, Metamathematics, Oxford, 1956.
- Alfred Tarski. Über den Begriff der logischen Folgerung. In Actes du Congrès International de Philosophie Scientifique, Paris 1935, volume VII, pages 1–11. Hermann, Paris, 1936.
- Dirk van Dalen. The war of the frogs and the mice, or the crisis of the Mathematische Annalen. The Mathematical Intelligencer, 12(4):17–31, 1990.
- Jean van Heijenoort, editor. From Frege to Gödel: A Source Book in Mathematical Logic, 1879–1931. Harvard University Press, Cambridge, MA, 1967.
- Hermann Weyl. Über die neue Grundlagenkrise der Mathematik. Mathematische Zeitschrift, 10:39–79, 1921.
Notes
The resemblance is no accident. Codd’s relational model of data (Codd, 1970), on which SQL rests, treats a database as a finite structure, and its query languages are first-order logic in other notation. ↩
This is Tarski’s definition of truth, from Tarski (1935), first published in Polish in 1933. Its point, for Tarski, was that truth for a formal language can be defined without circularity: the definition of “true” for uses “true” only for . It was written for mathematicians and philosophers, and forty years later it was the evaluator inside every database query engine. Tarski was born Alfred Teitelbaum and took the name Tarski in 1923. In August 1939 he left for a congress at Harvard, on the last ship to sail from Poland for the United States before the German invasion; from 1942 he taught at Berkeley (Feferman and Feferman, 2004). ↩
Just as a local variable in a program hides an outer one of the same name. ↩
This is Tarski’s definition of consequence (Tarski, 1936); the History tells how it answered Carnap’s. ↩
Prawitz (1965) is the classic source. ↩
Showing that no derivation exists needs a different kind of structure, which Section 6.8 describes. ↩
Aristotle argues for it in Book of the Metaphysics. In chapter 9 of On Interpretation he also raises the first recorded doubt about bivalence: is “there will be a sea battle tomorrow” already true or false today? ↩
From Peirce (1885). Peirce, working at the same time as Frege and independently of him, also introduced quantifiers. ↩
Gentzen named the two systems so in the paper that introduced them, Gentzen (1934). The usual explanation of the J is that German typography of the time treated the capitals I and J as one letter. Gentzen’s NK adds excluded middle as an axiom; a rule with no premisses, as here, comes to the same thing. ↩
Gödel (1930) proved it for a Hilbert-style system. The proof given here is Henkin (1949)’s, and the History tells how both were found. ↩
Open Logic Project (2026, §23.7) gives the details for any set of sentences that contains the equality axioms. ↩
The name is from Smullyan (1978), who called it the drinking principle. Smullyan, a logician and a prolific inventor of logic puzzles, also performed as a professional magician. ↩
Brouwer (1907) and Brouwer (1908), both in Dutch; the second is titled The unreliability of the logical principles. In the years that followed, Brouwer proved the theorems that made his name in topology, among them his fixed-point theorem, by exactly the kind of argument his philosophy rejected: the proof shows that a fixed point exists without showing how to find one. ↩
Goldbach proposed a form of it in a letter to Euler in 1742, and Euler restated it in this form. It has been checked by computer for every even number up to , which settles nothing. ↩
The dispute was bitter. In 1921 Hermann Weyl, Hilbert’s former student, announced his conversion with the sentence “Brouwer, that is the revolution” (und Brouwer – das ist die Revolution) (Weyl, 1921); English translations of this paper, and of the other contributions to the debate, are collected in Mancosu (1998). Weyl later drifted back towards Hilbert. In 1928 Hilbert had Brouwer removed from the editorial board of the Mathematische Annalen, the leading journal of the day. Einstein, also on the board, refused to take sides and called the affair a Frosch-Mäusekrieg, a war of the frogs and the mice, after the ancient parody of Homer (van Dalen, 1990). ↩
The rules were first written down by Kolmogorov (1925), for a fragment, and by Heyting (1930), in full; the explanation of the connectives is named after Brouwer, Heyting and Kolmogorov. Kolmogorov’s version (Kolmogoroff, 1932) reads formulas as problems: is the problem of solving given a solution of . Gentzen’s of 1934 is this logic in the form used here. ↩
Kripke (1965). A structure with two stages, in which grows from one stage to the next, makes the sentence of Example 6.48 fail, and that is how one shows that cannot derive it. Kripke had published a completeness theorem for modal logic, by similar means, at the age of eighteen (Kripke, 1959). ↩
Gödel (1933). Gentzen found the same translation independently, and withdrew his paper when Gödel’s appeared. ↩
Dummett (1975); the book-length version is Dummett (2000). ↩
The separation is less clean than it looks. Griffin (1990) found that classical proofs are programs too, provided the programs may jump: the type of the control operator
call/ccof Scheme is Peirce’s law. What such a program returns as a witness may later be taken back. ↩Frege (1879). Frege’s notation was two-dimensional, a branching diagram on the page, and almost nobody adopted it. The notation that survived descends instead from Peirce’s, by way of Schröder and Peano. ↩
Frege added an afterword to the second volume, which begins: “Einem wissenschaftlichen Schriftsteller kann kaum etwas Unerwünschteres begegnen, als dass ihm nach Vollendung einer Arbeit eine der Grundlagen seines Baues erschüttert wird”: hardly anything less welcome can happen to a scientific writer than to have one of the foundations of his building shaken after the work is finished. Sixty years later Russell wrote that he knew of nothing to compare with Frege’s dedication to truth: with his life’s work collapsing, Frege “responded with intellectual pleasure clearly submerging any feelings of personal disappointment”. Both letters are in van Heijenoort (1967, pp. 124–128). ↩
Hilbert (1928), quoted from the English translation in van Heijenoort (1967, p. 476). ↩
Frege put it most directly in “The Thought”, Frege (1918), where a thought is true or false independently of whether anyone grasps it. ↩