Open Logic Complete
Open Logic Complete
Complete Build
1
Contents
2
CONTENTS
This file loads all content included in the Open Logic Project. Editorial
notes like this, if displayed, indicate that the file was compiled without
any thought to how this material will be presented. If you can read this,
it is probably not advisable to teach or study from this PDF.
The Open Logic Project provides many mechanisms by which a text
can be generate which is more appropriate for teaching or self-study. For
instance, by default, the text will make all logical operators primitives and
carry out all cases for all operators in proofs. But it is much better to leave
some of these cases as exercises. The Open Logic Project is also a work
in progress. In an effort to stimulate collaboration and improvemenent,
material is included even if it is ony in draft form, is missing exercises,
etc. A PDF produced for a course will exclude these sections.
To find PDFs more suitable for teaching and studying, have a look at
the sample courses available on the OLP website. To make your own,
you might start from the sample driver file or look at the sources of the
derived textbooks for more fancy and advanced examples.
4
CONTENTS
Sets
1.1 Basics
Sets are the most fundamental building blocks of mathematical objects. In fact,
almost every mathematical object can be seen as a set of some kind. In logic,
as in other parts of mathematics, sets and set-theoretical talk is ubiquitous.
So it will be important to discuss what sets are, and introduce the notations
necessary to talk about sets and operations on sets in a standard way.
Example 1.2. Whenever you have a bunch of objects, you can collect them
together in a set. The set of Richard’s siblings, for instance, is a set that con-
tains one person, and we could write it as S = {Ruth}. In general, when
we have some objects a1 , . . . , an , then the set consisting of exactly those ob-
jects is written { a1 , . . . , an }. Frequently we’ll specify a set by some property
that its elements share—as we just did, for instance, by specifying S as the
set of Richard’s siblings. We’ll use the following shorthand notation for that:
{ x : . . . x . . .}, where the . . . x . . . stands for the property that x has to have in
order to be counted among the elements of the set. In our example, we could
have specified S also as
S = { x : x is a sibling of Richard}.
When we say that sets are independent of the way they are specified, we
mean that the elements of a set are all that matters. For instance, it so happens
6
1.2. SOME IMPORTANT SETS
that
{Nicole, Jacob},
{ x : is a niece or nephew of Richard}, and
{ x : is a child of Ruth}
are three ways of specifying one and the same set.
Saying that sets are considered independently of the order of their ele-
ments and their multiplicity is a fancy way of saying that
{Nicole, Jacob} and
{Jacob, Nicole}
are two ways of specifying the same set; and that
{Nicole, Jacob} and
{Jacob, Nicole, Nicole}
are also two ways of specifying the same set. In other words, all that matters
is which elements a set has. The elements of a set are not ordered and each el-
ement occurs only once. When we specify or describe a set, elements may occur
multiple times and in different orders, but any descriptions that only differ in
the order of elements or in how many times elements are listed describes the
same set.
Definition 1.3 (Extensionality). If X and Y are sets, then X and Y are identical,
X = Y, iff every element of X is also an element of Y, and vice versa.
Extensionality gives us a way for showing that sets are identical: to show
that X = Y, show that whenever x ∈ X then also x ∈ Y, and whenever y ∈ Y
then also y ∈ X.
Example 1.5 (Strings). Another interesting example is the set A∗ of finite strings
over an alphabet A: any finite sequence of elements of A is a string over A.
We include the empty string Λ among the strings over A, for every alphabet A.
For instance,
1.3 Subsets
Sets are made up of their elements, and every element of a set is a part of that
set. But there is also a sense that some of the elements of a set taken together
are a “part of” that set. For instance, the number 2 is part of the set of integers,
but the set of even numbers is also a part of the set of integers. It’s important
to keep those two senses of being part of a set separate.
Definition 1.7 (Subset). If every element of a set X is also an element of Y,
then we say that X is a subset of Y, and write X ⊆ Y.
Example 1.8. First of all, every set is a subset of itself, and ∅ is a subset of
every set. The set of even numbers is a subset of the set of natural numbers.
Also, { a, b} ⊆ { a, b, c}.
But { a, b, e} is not a subset of { a, b, c}.
Note that a set may contain other sets, not just as subsets but as elements!
In particular, a set may happen to both be an element and a subset of another,
e.g., {0} ∈ {0, {0}} and also {0} ⊆ {0, {0}}.
Extensionality gives a criterion of identity for sets: X = Y iff every element
of X is also an element of Y and vice versa. The definition of “subset” defines
X ⊆ Y precisely as the first half of this criterion: every element of X is also
an element of Y. Of course the definition also applies if we switch X and Y:
Y ⊆ X iff every element of Y is also an element of X. And that, in turn, is
exactly the “vice versa” part of extensionality. In other words, extensionality
amounts to: X = Y iff X ⊆ Y and Y ⊆ X.
Definition 1.9 (Power Set). The set consisting of all subsets of a set X is called
the power set of X, written ℘( X ).
℘( X ) = {Y : Y ⊆ X }
Figure 1.1: The union X ∪ Y of two sets is set of elements of X together with
those of Y.
Example 1.10. What are all the possible subsets of { a, b, c}? They are: ∅,
{ a}, {b}, {c}, { a, b}, { a, c}, {b, c}, { a, b, c}. The set of all these subsets is
℘({ a, b, c}):
℘({ a, b, c}) = {∅, { a}, {b}, {c}, { a, b}, {b, c}, { a, c}, { a, b, c}}
X ∪ Y = {x : x ∈ X ∨ x ∈ Y}
Example 1.12. Since the multiplicity of elements doesn’t matter, the union of
two sets which have an element in common contains that element only once,
e.g., { a, b, c} ∪ { a, 0, 1} = { a, b, c, 0, 1}.
The union of a set and one of its subsets is just the bigger set: { a, b, c} ∪
{ a} = { a, b, c}.
The union of a set with the empty set is identical to the set: { a, b, c} ∪ ∅ =
{ a, b, c}.
The operation that forms the set of all elements that X and Y have in com-
mon is called their intersection.
Figure 1.2: The intersection X ∩ Y of two sets is the set of elements they have
in common.
X ∩ Y = {x : x ∈ X ∧ x ∈ Y}
Two sets are called disjoint if their intersection is empty. This means they have
no elements in common.
We can also form the union or intersection of more than two sets. An
elegant way of dealing with this in general is the following: suppose you
collect all the sets you want to form the union (or intersection) of into a single
set. Then we can define the union of all our original sets as the set of all objects
which belong to at least one element of the set, and the intersection as the set
of all objects which belong to every element of the set.
S
Definition 1.15. If Z is a set of sets, then Z is the set of elements of elements
of Z:
[
Z = { x : x belongs to an element of Z }, i.e.,
[
Z = { x : there is a Y ∈ Z so that x ∈ Y }
Figure 1.3: The difference X \ Y of two sets is the set of those elements of X
which are not also elements of Y.
T
Definition 1.16. If Z is a set of sets, then Z is the set of objects which all
elements of Z have in common:
\
Z = { x : x belongs to every element of Z }, i.e.,
\
Z = { x : for all Y ∈ Z, x ∈ Y }
and Z = { a}.
T
X \ Y = { x : x ∈ X and x ∈
/ Y }.
triples as special ordered pairs, where the first element is itself an ordered
pair: h x, y, zi is short for hh x, yi, zi. The same is true for quadruples: h x, y, z, ui
is short for hhh x, yi, zi, ui, and so on. In general, we talk of ordered n-tuples
h x1 , . . . , x n i.
Definition 1.19 (Cartesian product). Given sets X and Y, their Cartesian prod-
uct X × Y is {h x, yi : x ∈ X and y ∈ Y }.
Example 1.20. If X = {0, 1}, and Y = {1, a, b}, then their product is
X × Y = {h0, 1i, h0, ai, h0, bi, h1, 1i, h1, ai, h1, bi}.
X1 = X
X k +1 = X k × X
Yx1 = {h x1 , y1 i h x1 , y2 i ... h x1 , ym i}
Yx2 = {h x2 , y1 i h x2 , y2 i ... h x2 , ym i}
.. ..
. .
Yxn = {h xn , y1 i h xn , y2 i . . . h xn , ym i}
Since the xi are all different, and the y j are all different, no two of the pairs in
this grid are the same, and there are n · m of them.
X ∗ = {∅} ∪ X ∪ X 2 ∪ X 3 ∪ . . .
S = { x : x is a sibling of Richard}.
In the very general context of mathematics one must be careful, however: not
every property lends itself to comprehension. Some properties do not define
sets. If they did, we would run into outright contradictions. One example of
such a case is Russell’s Paradox.
Sets may be elements of other sets—for instance, the power set of a set X
is made up of sets. And so it makes sense, of course, to ask or investigate
whether a set is an element of another set. Can a set be a member of itself?
Nothing about the idea of a set seems to rule this out. For instance, surely all
sets form a collection of objects, so we should be able to collect them into a
single set—the set of all sets. And it, being a set, would be an element of the
set of all sets.
Russell’s Paradox arises when we consider the property of not having itself
as an element. The set of all sets does not have this property, but all sets
we have encountered so far have it. N is not an element of N, since it is a
set, not a natural number. ℘( X ) is generally not an element of ℘( X ); e.g.,
℘(R) ∈ / ℘(R) since it is a set of sets of real numbers, not a set of real numbers.
What if we suppose that there is a set of all sets that do not have themselves
as an element? Does
R = {x : x ∈ / x}
exist?
If R exists, it makes sense to ask if R ∈ R or not—it must be either ∈ R
or ∈/ R. Suppose the former is true, i.e., R ∈ R. R was defined as the set of
all sets that are not elements of themselves, and so if R ∈ R, then R does not
have this defining property of R. But only sets that have this property are in R,
hence, R cannot be an element of R, i.e., R ∈
/ R. But R can’t both be and not be
an element of R, so we have a contradiction.
Since the assumption that R ∈ R leads to a contradiction, we have R ∈ / R.
But this also leads to a contradiction! For if R ∈
/ R, it does have the defining
property of R, and so would be an element of R just like all the other non-self-
containing sets. And again, it can’t both not be and be an element of R.
Problems
Problem 1.1. Show that there is only one empty set, i.e., show that if X and Y
are sets without members, then X = Y.
Relations
Then there is a close connection between the number n being less than a num-
ber m and the corresponding pair hn, mi being a member of R, namely, n < m
if and only if hn, mi ∈ R. In a sense we can consider the set R to be the <-
relation on the set N. In the same way we can construct a subset of N2 for
any relation between numbers. Conversely, given any set of pairs of numbers
S ⊆ N2 , there is a corresponding relation between numbers, namely, the re-
lationship n bears to m if and only if hn, mi ∈ S. This justifies the following
definition:
15
CHAPTER 2. RELATIONS
is the identity relation on N. (Since the identity relation is popular, let’s define
IdX = {h x, x i : x ∈ X } for any set X.) The subset of all pairs lying above the
diagonal, i.e.,
L = {h0, 1i, h0, 2i, . . . , h1, 2i, h1, 3i, . . . , h2, 3i, h2, 4i, . . .},
is the less than relation, i.e., Lnm iff n < m. The subset of pairs below the
diagonal, i.e.,
G = {h1, 0i, h2, 0i, h2, 1i, h3, 0i, h3, 1i, h3, 2i, . . . },
is the greater than relation, i.e., Gnm iff n > m. The union of L with I, K = L ∪ I,
is the less than or equal to relation: Knm iff n ≤ m. Similarly, H = G ∪ I is the
greater than or equal to relation. L, G, K, and H are special kinds of relations
called orders. L and G have the property that no number bears L or G to itself
(i.e., for all n, neither Lnn nor Gnn). Relations with this property are called
irreflexive, and, if they also happen to be orders, they are called strict orders.
Although orders and identity are important and natural relations, it should
be emphasized that according to our definition any subset of X 2 is a relation
on X, regardless of how unnatural or contrived it seems. In particular, ∅ is a
relation on any set (the empty relation, which no pair of elements bears), and
X 2 itself is a relation on X as well (one which every pair bears), called the
universal relation. But also something like E = {hn, mi : n > 5 or m × n ≥ 34}
counts as a relation.
Definition 2.9 (Linear order). A partial order that is also connected is called a
linear order.
2.3 Orders
Very often we are interested in comparisons between objects, where one object
may be less or equal or greater than another in a certain respect. Size is the
most obvious example of such a comparative relation, or order. But not all
such relations are alike in all their properties. For instance, some comparative
relations require any two objects to be comparable, others don’t. (If they do,
we call them linear or total.) Some include identity (like ≤) and some exclude
it (like <). Let’s get some order into all this.
Definition 2.11 (Preorder). A relation which is both reflexive and transitive is
called a preorder.
Definition 2.12 (Partial order). A preorder which is also anti-symmetric is
called a partial order.
Definition 2.13 (Linear order). A partial order which is also connected is
called a total order or linear order.
Example 2.14. Every linear order is also a partial order, and every partial or-
der is also a preorder, but the converses don’t hold. The universal relation
on X is a preorder, since it is reflexive and transitive. But, if X has more than
one element, the universal relation is not anti-symmetric, and so not a partial
order. For a somewhat less silly example, consider the no longer than relation
4 on B∗ : x 4 y iff len( x ) ≤ len(y). This is a preorder (reflexive and transitive),
and even connected, but not a partial order, since it is not anti-symmetric. For
instance, 01 4 10 and 10 4 01, but 01 6= 10.
The relation of divisibility without remainder gives us an example of a partial
order which isn’t a linear order: for integers n, m, we say n (evenly) divides
m, in symbols: n | m, if there is some k so that m = kn. On N, this is a partial
order, but not a linear order: for instance, 2 - 3 and also 3 - 2. Considered as a
relation on Z, divisibility is only a preorder since anti-symmetry fails: 1 | −1
and −1 | 1 but 1 6= −1. Another important partial order is the relation ⊆ on a
set of sets.
Notice that the examples L and G from ??, although we said there that
they were called “strict orders,” are not linear orders even though they are
connected (they are not reflexive). But there is a close connection, as we will
see momentarily.
Definition 2.15 (Irreflexivity). A relation R on X is called irreflexive if, for all
x ∈ X, ¬ Rxx.
Definition 2.16 (Asymmetry). A relation R on X is called asymmetric if for no
pair x, y ∈ X we have Rxy and Ryx.
Definition 2.17 (Strict order). A strict order is a relation which is irreflexive,
asymmetric, and transitive.
Definition 2.18 (Strict linear order). A strict order which is also connected is
called a strict linear order.
A strict order on X can be turned into a partial order by adding the di-
agonal IdX , i.e., adding all the pairs h x, x i. (This is called the reflexive closure
of R.) Conversely, starting from a partial order, one can get a strict order by
removing IdX .
2. Exercise.
Example 2.20. ≤ is the linear order corresponding to the strict linear order <.
⊆ is the partial order corresponding to the strict order (.
2.4 Graphs
A graph is a diagram in which points—called “nodes” or “vertices” (plural of
“vertex”)—are connected by edges. Graphs are a ubiquitous tool in discrete
mathematics and in computer science. They are incredibly useful for repre-
senting, and visualizing, relationships and structures, from concrete things
like networks of various kinds to abstract structures such as the possible out-
comes of decisions. There are many different kinds of graphs in the literature
which differ, e.g., according to whether the edges are directed or not, have la-
bels or not, whether there can be edges from a node to the same node, multiple
edges between the same nodes, etc. Directed graphs have a special connection
to relations.
Example 2.22. The graph hV, Ei with V = {1, 2, 3, 4} and E = {h1, 1i, h1, 2i,
h1, 3i, h2, 3i} looks like this:
1 2 4
This is a different graph than hV 0 , Ei with V 0 = {1, 2, 3}, which looks like this:
1 2
3. The restriction R Y of R to Y is R ∩ Y 2
Example 2.24. Let S ⊆ Z2 be the successor relation on Z, i.e., the set of pairs
h x, yi where x + 1 = y, for x, y ∈ Z. Sxy holds iff y is the successor of x.
1. The inverse S−1 of S is the predecessor relation, i.e., S−1 xy iff x − 1 = y.
Problems
Problem 2.1. List the elements of the relation ⊆ on the set ℘({ a, b, c}).
Problem 2.2. Give examples of relations that are (a) reflexive and symmetric
but not transitive, (b) reflexive and anti-symmetric, (c) anti-symmetric, transi-
tive, but not reflexive, and (d) reflexive, symmetric, and transitive. Do not use
relations on numbers or sets.
Problem 2.3. Complete the proof of ??, i.e., prove that if R is a partial order
on X, then R− = R \ IdX is a strict order.
Functions
3.1 Basics
A function is a mapping which pairs each object of a given set with a single
partner in another set. For instance, the operation of adding 1 defines a func-
tion: each number n is paired with a unique number n + 1. More generally,
functions may take pairs, triples, etc., of inputs and returns some kind of out-
put. Many functions are familiar to us from basic arithmetic. For instance,
addition and multiplication are functions. They take in two numbers and re-
turn a third. In this mathematical, abstract sense, a function is a black box:
what matters is only what output is paired with what input, not the method
for calculating the output.
22
3.1. BASICS
student in a class with their final grade is a function—no student can get two
different final grades in the same class. The relation that pairs each student in
a class with their parents is not a function—generally each student will have
at least two parents.
We can define functions by specifying in some precise way what the value
of the function is for every possible argment. Different ways of doing this are
by giving a formula, describing a method for computing the value, or listing
the values for each argument. However functions are defined, we must make
sure that for each argment we specify one, and only one, value.
Functions f and g defined above are the same because for any natural
number x, x + 2 − 1 = x + 1. f and g pair each natural number with the
same output. The definitions for f and g specify the same mapping by means
of different equations, and so count as the same function.
Example 3.5. We can also define functions by cases. For instance, we could
define h : N → N by (
x
if x is even
h( x ) = 2x+1
2 if x is odd.
Figure 3.2: A surjective function has every element of the codomain as a value.
Figure 3.3: An injective function never maps two different arguments to the
same value.
Since every natural number is either even or odd, the output of this function
will always be a natural number. Just remember that if you define a function
by cases, every possible input must fall into exactly one case. In some cases,
this will require a a proof that the cases are exhaustive and exclusive.
Figure 3.4: A bijective function uniquely pairs the elements of the codomain
with those of the domain.
The scare quotes around “defined by” suggest that this is not a definition. At
least, it is not in general. For in order for this definition to specify a function,
there has to be one and only one x such that f ( x ) = y—the output of g has to
be uniquely specified. Moreover, it has to be specified for every y ∈ Y. If there
are x1 and x2 ∈ X with x1 6= x2 but f ( x1 ) = f ( x2 ), then g(y) would not be
uniquely specified for y = f ( x1 ) = f ( x2 ). And if there is no x at all such that
f ( x ) = y, then g(y) is not specified at all. In other words, for g to be defined,
f has to be injective and surjective.
Proof. Exercise.
3.5 Isomorphism
An isomorphism is a bijection that preserves the structure of the sets it re-
lates, where structure is a matter of the relationships that obtain between
the elements of the sets. Consider the following two sets X = {1, 2, 3} and
Y = {4, 5, 6}. These sets are both structured by the relations successor, less
than, and greater than. An isomorphism between the two sets is a bijection
that preserves those structures. So a bijective function f : X → Y is an isomor-
phism if, i < j iff f (i ) < f ( j), i > j iff f (i ) > f ( j), and j is the successor of i iff
f ( j) is the successor of f (i ).
Example 3.14. Consider the following two sets X = {1, 2, 3} and Y = {4, 5, 6},
and the relations less than and greater than. The function f : X → Y where
f ( x ) = 7 − x is an isomorphism between h X, <i and hY, >i.
Proof. Suppose there is a y such that Rxy. If there were another y0 6= y such
that Rxy0 , the condition on R would be violated. Hence, if there is a y such
that Rxy, that y is unique, and so f is well-defined. Obviously, R f = R and f
is total if R is serial.
Problems
Problem 3.1. Show that if f is bijective, an inverse g of f exists, i.e., define
such a g, show that it is a function, and show that it is an inverse of f , i.e.,
f ( g(y)) = y and g( f ( x )) = x for all x ∈ X and y ∈ Y.
Problem 3.2. Show that if f : X → Y has an inverse g, then f is bijective.
Problem 3.3. Show that if g : Y → X and g0 : Y → X are inverses of f : X → Y,
then g = g0 , i.e., for all y ∈ Y, g(y) = g0 (y).
Problem 3.4. Show that if f : X → Y and g : Y → Z are both injective, then
g ◦ f : X → Z is injective.
Problem 3.5. Show that if f : X → Y and g : Y → Z are both surjective, then
g ◦ f : X → Z is surjective.
Problem 3.6. Given f : X → 7 Y, define the partial function g : Y →
7 X by: for
any y ∈ Y, if there is a unique x ∈ X such that f ( x ) = y, then g(y) = x;
otherwise g(y) ↑. Show that if f is injective, then g( f ( x )) = x for all x ∈
dom( f ), and f ( g(y)) = y for all y ∈ ran( f ).
Problem 3.7. Suppose f : X → Y and g : Y → Z. Show that the graph of
( g ◦ f ) is R f | R g .
4.1 Introduction
When Georg Cantor developed set theory in the 1870s, his interest was in part
to make palatable the idea of an infinite collection—an actual infinity, as the
medievals would say. Key to this rehabilitation of the notion of the infinite
was a way to assign sizes—“cardinalities”—to sets. The cardinality of a finite
set is just a natural number, e.g., ∅ has cardinality 0, and a set containing five
things has cardinality 5. But what about infinite sets? Do they all have the
same cardinality, ∞? It turns out, they do not.
The first important idea here is that of an enumeration. We can list every
finite set by listing all its elements. For some infinite sets, we can also list
all their elements if we allow the list itself to be infinite. Such sets are called
enumerable. Cantor’s surprising result was that some infinite sets are not
enumerable.
29
CHAPTER 4. THE SIZE OF SETS
The last argument shows that in order to get a good handle on enumera-
tions and enumerable sets and to prove things about them, we need a more
precise definition. The following provides it.
Definition 4.3 (Enumeration). An enumeration of a set X is any surjective func-
tion f : Z+ → X.
Let’s convince ourselves that the formal definition and the informal defini-
tion using a possibly gappy, possibly infinite list are equivalent. A surjective
function (partial or total) from Z+ to a set X enumerates X. Such a function
determines an enumeration as defined informally above: the list f (1), f (2),
f (3), . . . . Since f is surjective, every element of X is guaranteed to be the
value of f (n) for some n ∈ Z+ . Hence, every element of X appears at some
finite position in the list. Since the function may not be injective, the list may
be redundant, but that is acceptable (as noted above).
On the other hand, given a list that enumerates all elements of X, we can
define a surjective function f : Z+ → X by letting f (n) be the nth element of
the list that is not a gap, or the final element of the list if there is no nth element.
There is one case in which this does not produce a surjective function: if X
is empty, and hence the list is empty. So, every non-empty list determines
a surjective function f : Z+ → X.
Definition 4.4. A set X is enumerable iff it is empty or has an enumeration.
Example 4.5. A function enumerating the positive integers (Z+ ) is simply the
identity function given by f (n) = n. A function enumerating the natural
numbers N is the function g(n) = n − 1.
Example 4.6. The functions f : Z+ → Z+ and g : Z+ → Z+ given by
f (n) = 2n and
g(n) = 2n + 1
enumerate the even positive integers and the odd positive integers, respec-
tively. However, neither function is an enumeration of Z+ , since neither is
surjective.
( n −1)
Example 4.7. The function f (n) = (−1)n d 2 e (where d x e denotes the ceil-
ing function, which rounds x up to the nearest integer) enumerates the set of
integers Z. Notice how f generates the values of Z by “hopping” back and
forth between positive and negative integers:
−d 20 e d 12 e −d 22 e d 32 e −d 42 e d 52 e −d 62 e . . .
0 1 −1 2 −2 3 ...
That is fine for “easy” sets. What about the set of, say, pairs of positive
integers?
Z+ × Z+ = {hn, mi : n, m ∈ Z+ }
We can organize the pairs of positive integers in an array, such as the follow-
ing:
1 2 3 4 ...
1 h1, 1i h1, 2i h1, 3i h1, 4i . . .
2 h2, 1i h2, 2i h2, 3i h2, 4i . . .
3 h3, 1i h3, 2i h3, 3i h3, 4i . . .
4 h4, 1i h4, 2i h4, 3i h4, 4i . . .
.. .. .. .. .. ..
. . . . . .
Clearly, every ordered pair in Z+ × Z+ will appear exactly once in the
array. In particular, hn, mi will appear in the nth column and mth row. But
how do we organize the elements of such an array into a one-way list? The
pattern in the array below demonstrates one way to do this:
1 2 4 7 ...
3 5 8 ... ...
6 9 ... ... ...
10 ... ... ... ...
.. .. .. .. ..
. . . . .
This pattern is called Cantor’s zig-zag method. Other patterns are perfectly per-
missible, as long as they “zig-zag” through every cell of the array. By Can-
tor’s zig-zag method, the enumeration for Z+ × Z+ according to this scheme
would be:
h1, 1i, h1, 2i, h2, 1i, h1, 3i, h2, 2i, h3, 1i, h1, 4i, h2, 3i, h3, 2i, h4, 1i, . . .
What ought we do about enumerating, say, the set of ordered triples of
positive integers?
Z+ × Z+ × Z+ = {hn, m, ki : n, m, k ∈ Z+ }
We can think of Z+ × Z+ × Z+ as the Cartesian product of Z+ × Z+ and Z+ ,
that is,
(Z+ )3 = (Z+ × Z+ ) × Z+ = {hhn, mi, ki : hn, mi ∈ Z+ × Z+ , k ∈ Z+ }
and thus we can enumerate (Z+ )3 with an array by labelling one axis with
the enumeration of Z+ , and the other axis with the enumeration of (Z+ )2 :
1 2 3 4 ...
h1, 1i h1, 1, 1i h1, 1, 2i h1, 1, 3i h1, 1, 4i ...
h1, 2i h1, 2, 1i h1, 2, 2i h1, 2, 3i h1, 2, 4i ...
h2, 1i h2, 1, 1i h2, 1, 2i h2, 1, 3i h2, 1, 4i ...
h1, 3i h1, 3, 1i h1, 3, 2i h1, 3, 3i h1, 3, 4i ...
.. .. .. .. .. ..
. . . . . .
Thus, by using a method like Cantor’s zig-zag method, we may similarly ob-
tain an enumeration of (Z+ )3 .
Cantor’s zig-zag method makes the enumerability of (Z+ )2 (and analo-
gously, (Z+ )3 , etc.) visually evident. Following the zig-zag line in the array
and counting the places, we can tell that h2, 3i is at place 8, but specifying the
inverse g : (Z+ )2 → Z+ of the zig-zag enumeration such that
(n + m − 2)(n + m − 1)
g(n, m) = +n
2
Accordingly, the pair h2, 3i is in position ((2 + 3 − 2)(2 + 3 − 1)/2) + 2 =
(3 · 4/2) + 2 = (12/2) + 2 = 8; pair h3, 7i is in position ((3 + 7 − 2)(3 + 7 −
1)/2) + 3 = 39.
Functions like g above, i.e., inverses of enumerations of sets of pairs, are
called pairing functions.
The idea is that we can use such functions to encode, e.g., pairs of posi-
tive integers in Z+ , or, in other words, represent pairs of positive integers as
positive integers. Using the inverse of the pairing function, we can decode the
integer, i.e., find out which pair of positive integers is represented.
There are other enumerations of (Z+ )2 that make it easier to figure out
what their inverses are. Here is one. Instead of visualizing the enumeration
in an array, start with the list of positive integers associated with (initially)
empty spaces. Imagine filling these spaces successively with pairs hn, mi as
follow. Starting with the pairs that have 1 in the first place (i.e., pairs h1, mi),
put the first (i.e., h1, 1i) in the first empty place, then skip an empty space, put
the second (i.e., h1, 2i) in the next empty place, skip one again, and so forth.
The (incomplete) beginning of our enumeration now looks like this
f (1) f (2) f (3) f (4) f (5) f (6) f (7) f (8) f (9) f (10) ...
Repeat this with pairs h2, mi for the place that still remain empty, again skip-
ping every other empty place:
f (1) f (2) f (3) f (4) f (5) f (6) f (7) f (8) f (9) f (10) ...
Enter pairs h3, mi, h4, mi, etc., in the same way. Our completed enumeration
thus starts like this:
f (1) f (2) f (3) f (4) f (5) f (6) f (7) f (8) f (9) f (10) ...
h1, 1i h2, 1i h1, 2i h3, 1i h1, 3i h2, 2i h1, 4i h4, 1i h1, 5i h2, 3i ...
If we number the cells in the array above according to this enumeration, we
will not find a neat zig-zag line, but this arrangement:
1 2 3 4 5 6 ...
1 1 3 5 7 9 11 ...
2 2 6 10 14 18 ... ...
3 4 12 20 28 ... ... ...
4 8 24 40 ... ... ... ...
5 16 48 ... ... ... ... ...
6 32 ... ... ... ... ... ...
.. .. .. .. .. .. .. ..
. . . . . . . .
We can see that the pairs in the first row are in the odd numbered places
of our enumeration, i.e., pair h1, mi is in place 2m − 1; pairs in the second row,
h1, mi, are in places whose number is the double of an odd number, specifi-
cally, 2 · (2m − 1); pairs in the third row, h1, mi, are in places whose number is
four times an odd number, 4 · (2m − 1); and so on. The factors of (2m − 1) for
each row, 1, 2, 4, 8, . . . , are powers of 2: 20 , 21 , 22 , 23 , . . . In fact, the relevant ex-
ponent is one less than the first member of the pair in question. Thus, for pair
hn, mi the factor is n − 1. This gives us the general formula: 2n−1 · (2m − 1),
and hence:
Example 4.9. The function f : (Z+ )2 → Z+ given by
j(n, m) = 2n 3m
We may arrange this list, and the elements of each sequence si in it, in an
array:
1 2 3 4 ...
1 s 1 ( 1 ) s1 (2) s1 (3) s1 (4) . . .
2 s2 (1) s 2 ( 2 ) s2 (3) s2 (4) . . .
3 s3 (1) s3 (2) s 3 ( 3 ) s3 (4) . . .
4 s4 (1) s4 (2) s4 (3) s 4 ( 4 ) . . .
.. .. .. .. .. ..
. . . . . .
The labels down the side give the number of the sequence in the list s1 , s2 , . . . ;
the numbers across the top label the elements of the individual sequences. For
instance, s1 (1) is a name for whatever number, a 0 or a 1, is the first element
in the sequence s1 , and so on.
Now we construct an infinite sequence, s, of 0’s and 1’s which cannot pos-
sibly be on this list. The definition of s will depend on the list s1 , s2 , . . . .
Any infinite list of infinite sequences of 0’s and 1’s gives rise to an infinite
sequence s which is guaranteed to not appear on the list.
To define s, we specify what all its elements are, i.e., we specify s(n) for all
n ∈ Z+ . We do this by reading down the diagonal of the array above (hence
the name “diagonal method”) and then changing every 1 to a 0 and every 1 to
a 0. More abstractly, we define s(n) to be 0 or 1 according to whether the n-th
element of the diagonal, sn (n), is 1 or 0.
(
1 if sn (n) = 0
s(n) =
0 if sn (n) = 1.
If you like formulas better than definitions by cases, you could also define
s ( n ) = 1 − s n ( n ).
Clearly s is a non-gappy infinite sequence of 0’s and 1’s, since it is just the
mirror sequence to the sequence of 0’s and 1’s that appear on the diagonal of
our array. So s is an element of Bω . But it cannot be on the list s1 , s2 , . . . Why
not?
It can’t be the first sequence in the list, s1 , because it differs from s1 in the
first element. Whatever s1 (1) is, we defined s(1) to be the opposite. It can’t be
the second sequence in the list, because s differs from s2 in the second element:
if s2 (2) is 0, s(2) is 1, and vice versa. And so on.
More precisely: if s were on the list, there would be some k so that s = sk .
Two sequences are identical iff they agree at every place, i.e., for any n, s(n) =
sk (n). So in particular, taking n = k as a special case, s(k) = sk (k) would
have to hold. sk (k) is either 0 or 1. If it is 0 then s(k ) must be 1—that’s how
we defined s. But if sk (k ) = 1 then, again because of the way we defined s,
s(k) = 0. In either case s(k) 6= sk (k ).
We started by assuming that there is a list of elements of Bω , s1 , s2 , . . .
From this list we constructed a sequence s which we proved cannot be on the
list. But it definitely is a sequence of 0’s and 1’s if all the si are sequences of
0’s and 1’s, i.e., s ∈ Bω . This shows in particular that there can be no list of
all elements of Bω , since for any such list we could also construct a sequence s
guaranteed to not be on the list, so the assumption that there is a list of all
sequences in Bω leads to a contradiction.
Proof. We proceed in the same way, by showing that for every list of subsets
of Z+ there is a subset of Z+ which cannot be on the list. Suppose the follow-
ing is a given list of subsets of Z+ :
Z1 , Z2 , Z3 , . . .
Z = { n ∈ Z+ : n ∈
/ Zn }
Z is clearly a set of positive integers, since by assumption each Zn is, and thus
Z ∈ ℘(Z+ ). But Z cannot be on the list. To show this, we’ll establish that for
each k ∈ Z+ , Z 6= Zk .
So let k ∈ Z+ be arbitrary. We’ve defined Z so that for any n ∈ Z+ , n ∈ Z
iff n ∈
/ Zn . In particular, taking n = k, k ∈ Z iff k ∈/ Zk . But this shows that
Z 6= Zk , since k is an element of one but not the other, and so Z and Zk have
different elements. Since k was arbitrary, Z is not on the list Z1 , Z2 , . . .
The preceding proof did not mention a diagonal, but you can think of it
as involving a diagonal if you picture it this way: Imagine the sets Z1 , Z2 , . . . ,
written in an array, where each element j ∈ Zi is listed in the j-th column.
Say the first four sets on that list are {1, 2, 3, . . . }, {2, 4, 6, . . . }, {1, 2, 5}, and
{3, 4, 5, . . . }. Then the array would begin with
Z1 = {1, 2, 3, 4, 5, 6, ...}
Z2 ={ 2, 4, 6, ...}
Z3 = { 1, 2, 5 }
Z4 ={ 3, 4, 5, 6, ...}
.. ..
. .
Then Z is the set obtained by going down the diagonal, leaving out any num-
bers that appear along the diagonal and include those j where the array has a
gap in the j-th row/column. In the above case, we would leave out 1 and 2,
include 3, leave out 4, etc.
4.4 Reduction
We showed ℘(Z+ ) to be non-enumerable by a diagonalization argument. We
already had a proof that Bω , the set of all infinite sequences of 0s and 1s,
is non-enumerable. Here’s another way we can prove that ℘(Z+ ) is non-
enumerable: Show that if ℘(Z+ ) is enumerable then Bω is also enumerable. Since
we know Bω is not enumerable, ℘(Z+ ) can’t be either. This is called reducing
one problem to another—in this case, we reduce the problem of enumerating
Bω to the problem of enumerating ℘(Z+ ). A solution to the latter—an enu-
meration of ℘(Z+ )—would yield a solution to the former—an enumeration
of Bω .
How do we reduce the problem of enumerating a set Y to that of enu-
merating a set X? We provide a way of turning an enumeration of X into an
enumeration of Y. The easiest way to do that is to define a surjective function
f : X → Y. If x1 , x2 , . . . enumerates X, then f ( x1 ), f ( x2 ), . . . would enumer-
ate Y. In our case, we are looking for a surjective function f : ℘(Z+ ) → Bω .
Proof of ?? by reduction. Suppose that ℘(Z+ ) were enumerable, and thus that
there is an enumeration of it, Z1 , Z2 , Z3 , . . .
Define the function f : ℘(Z+ ) → Bω by letting f ( Z ) be the sequence sk
such that sk (n) = 1 iff n ∈ Z, and sk (n) = 0 otherwise. This clearly defines
a function, since whenever Z ⊆ Z+ , any n ∈ Z+ either is an element of Z or
isn’t. For instance, the set 2Z+ = {2, 4, 6, . . . } of positive even numbers gets
mapped to the sequence 010101 . . . , the empty set gets mapped to 0000 . . .
and the set Z+ itself to 1111 . . . .
It also is surjective: Every sequence of 0s and 1s corresponds to some set of
positive integers, namely the one which has as its members those integers cor-
responding to the places where the sequence has 1s. More precisely, suppose
s ∈ Bω . Define Z ⊆ Z+ by:
Z = { n ∈ Z+ : s ( n ) = 1 }
f ( Z1 ), f ( Z2 ), f ( Z3 ), . . .
It is easy to be confused about the direction the reduction goes in. For
instance, a surjective function g : Bω → X does not establish that X is non-
enumerable. (Consider g : Bω → B defined by g(s) = s(1), the function that
maps a sequence of 0’s and 1’s to its first element. It is surjective, because
some sequences start with 0 and some start with 1. But B is finite.) Note also
that the function f must be surjective, or otherwise the argument does not go
through: f ( x1 ), f ( x2 ), . . . would then not be guaranteed to include all the
elements of Y. For instance, h : Z+ → Bω defined by
h(n) = 000
| {z. . . 0}
n 0’s
( g ◦ f )(n) = g( f (n)) = g( x ) = y
the first to the second, and vice-versa. The Schröder-Bernstein theorem, apart
from being convenient, justifies the act of discussing the “sizes” of sets, for
it tells us that set cardinalities have the familiar anti-symmetric property that
numbers have.
Y = {x ∈ X : x ∈
/ g( x )}.
Problems
Problem 4.1. According to ??, a set X is enumerable iff X = ∅ or there is
a surjective f : Z+ → X. It is also possible to define “enumerable set” pre-
cisely by: a set is enumerable iff there is an injective function g : X → Z+ .
Show that the definitions are equivalent, i.e., show that there is an injective
function g : X → Z+ iff either X = ∅ or there is a surjective f : Z+ → X.
Problem 4.5. Give an enumeration of the set of all positive rational numbers.
(A positive rational number is one that can be written as a fraction n/m with
n, m ∈ Z+ ).
Problem 4.6. Show that Q is enumerable. (A rational number is one that can
be written as a fraction z/m with z ∈ Z, m ∈ Z+ ).
Problem 4.8. Recall from your introductory logic course that each possible
truth table expresses a truth function. In other words, the truth functions are
all functions from Bk → B for some k. Prove that the set of all truth functions
is enumerable.
Problem 4.9. Show that the set of all finite subsets of an arbitrary infinite
enumerable set is enumerable.
Problem 4.10. A set of positive integers is said to be cofinite iff it is the com-
plement of a finite set of positive integers. Let I be the set that contains all the
finite and cofinite sets of positive integers. Show that I is enumerable.
Problem 4.11. Show that the enumerable union of enumerable sets is enumer-
able. That is, whenever X1 , X2 , . . . are sets, and each Xi is enumerable, then
the union i∞=1 Xi of all of them is also enumerable.
S
Problem 4.17. Show that the set of all sets of pairs of positive integers is non-
enumerable by a reduction argument.
Problem 4.18. Show that Nω , the set of infinite sequences of natural numbers,
is non-enumerable by a reduction argument.
Problem 4.19. Let P be the set of functions from the set of positive integers
to the set {0}, and let Q be the set of partial functions from the set of positive
integers to the set {0}. Show that P is enumerable and Q is not. (Hint: reduce
the problem of enumerating Bω to enumerating Q).
Problem 4.20. Let S be the set of all surjective functions from the set of positive
integers to the set {0,1}, i.e., S consists of all surjective f : Z+ → B. Show that
S is non-enumerable.
Problem 4.21. Show that the set R of all real numbers is non-enumerable.
Propositional Logic
44
4.6. COMPARING SIZES OF SETS
5.1 Introduction
Propositional logic deals with formulas that are built from propositional vari-
ables using the propositional connectives ¬, ∧, ∨, →, and ↔. Intuitively,
a propositional variable p stands for a sentence or proposition that is be true
or false. Whenever the “truth value” of the propositional variable in a formula
are determined, so is the truth value of any formulas formed from them using
propositional connectives. We say that propositional logic is truth functional,
because its semantics is given by functions of truth values. In particular, in
propositional logic we leave out of consideration any further determination
of truth and falsity, e.g., whether something is necessarily true rather than
just contingently true, or whether something is known to be true, or whether
something is true now rather than was true or will be true. We only consider
two truth values true (T) and false (F), and so exclude from discussion the
possibility that a statement may be neither true nor false, or only half true. We
also concentrate only on connectives where the truth value of a formula built
from them is completely determined by the truth values of its parts (and not,
say, on its meaning). In particular, whether the truth value of conditionals in
English is truth functional in this sense is contentious. The material condi-
tional → is; other logics deal with conditionals that are not truth functional.
In order to develop the theory and metatheory of truth-functional propo-
sitional logic, we must first define the syntax and semantics of its expressions.
We will describe one way of constructing formulas from propositional vari-
ables using the connectives. Alternative definitions are possible. Other sys-
46
5.2. PROPOSITIONAL FORMULAS
tems will chose different symbols, will select different sets of connectives as
primitive, will use parentheses differently (or even not at all, as in the case of
so-called Polish notation). What all approaches have in common, though, is
that the formation rules define the set of formulas inductively. If done prop-
erly, every expression can result essentially in only one way according to the
formation rules. The inductive definition resulting in expressions that are
uniquely readable means we can give meanings to these expressions using the
same method—inductive definition.
Giving the meaning of expressions is the domain of semantics. The central
concept in semantics for propositonal logic is that of satisfaction in a valua-
tion. A valuation v assigns truth values T, F to the propositional variables.
Any valuation determines a truth value v( ϕ) for any formula ϕ. A formula is
satisfied in a valuation v iff v( ϕ) = T—we write this as v ϕ. This relation
can also be defined by induction on the structure of ϕ, using the truth func-
tions for the logical connectives to define, say, satisfaction of ϕ ∧ ψ in terms of
satisfaction (or not) of ϕ and ψ.
On the basis of the satisfaction relation v ϕ for sentences we can then
define the basic semantic notions of tautology, entailment, and satisfiability.
A formula is a tautology, ϕ, if every valuation satisfies it, i.e., v( ϕ) = T for
any v. It is entailed by a set of formulas, Γ ϕ, if every valuation that satisfies
all the formulas in Γ also satisfies ϕ. And a set of formulas is satisfiable if
some valuation satisfies all formulas in it at the same time. Because formulas
are inductively defined, and satisfaction is in turn defined by induction on
the structure of formulas, we can use induction to prove properties of our
semantics and to relate the semantic notions defined.
if we only used primitive symbols, get quite long. This is obviously an ad-
vantage. The bigger advantage, however, is that proofs become shorter. If a
symbol is primitive, it has to be treated separately in proofs. The more primi-
tive symbols, therefore, the longer our proofs.
You may be familiar with different terminology and symbols than the ones
we use above. Logic texts (and teachers) commonly use either ∼, ¬, and ! for
“negation”, ∧, ·, and & for “conjunction”. Commonly used symbols for the
“conditional” or “implication” are →, ⇒, and ⊃. Symbols for “biconditional,”
“bi-implication,” or “(material) equivalence” are ↔, ⇔, and ≡. The ⊥ sym-
bol is variously called “falsity,” “falsum,”, “absurdity,”, or “bottom.” The >
symbol is variously called “truth,” “verum,”, or “top.”
Definition 5.1 (Formula). The set Frm(L0 ) of formulas of propositional logic
is defined inductively as follows:
1. ⊥ is an atomic formula.
2. ϕ ↔ ψ abbreviates ( ϕ → ψ) ∧ (ψ → ϕ).
5.3 Preliminaries
Theorem 5.4. Principle of induction on formulas: If some property P holds of all
the atomic formulas and is such that
Proposition 5.5. Any formula in Frm(L0 ) is balanced, in that it has as many left
parentheses as right ones.
1. ⊥.
Proof. By induction on ϕ. For instance, suppose that ϕ has two distinct read-
ings as (ψ → χ) and (ψ0 → χ0 ). Then ψ and ψ0 must be the same (or else one
would be a proper initial segment of the other); so if the two readings of ϕ are
distinct it must be because χ and χ0 are distinct readings of the same sequence
of symbols, which is impossible by the inductive hypothesis.
v(⊥) = F;
v (pn ) = v (pn );
(
T if v( ϕ) = F;
v(¬ ϕ) =
F otherwise.
(
T if v( ϕ) = T and v(ψ) = T;
v( ϕ ∧ ψ ) =
F if v( ϕ) = F or v(ψ) = F.
(
T if v( ϕ) = T or v(ψ) = T;
v( ϕ ∨ ψ ) =
F if v( ϕ) = F and v(ψ) = F.
(
T if v( ϕ) = F or v(ψ) = T;
v( ϕ → ψ ) =
F if v( ϕ) = T and v(ψ) = F.
Theorem 5.11 (Local Determination). Suppose that v1 and v2 are valuations that
agree on the propositional letters occurring in ϕ, i.e., v1 (pn ) = v2 (pn ) whenever pn
occurs in ϕ. Then they also agree on any ϕ, i.e., v1 ( ϕ) = v2 ( ϕ).
Proof. By induction on ϕ.
1. ϕ ≡ ⊥: v 2 ϕ.
2. ϕ ≡ pi : M ϕ iff v(pi ) = T.
3. ϕ ≡ ¬ψ: v ϕ iff v 2 ψ.
Proof. By induction on ϕ.
2. If Γ ϕ and Γ ϕ → ψ then Γ ψ;
Proof. Exercise.
Proof. Exercise.
Proof. Exercise.
Problems
Problem 5.1. Prove ??
Derivation Systems
6.1 Introduction
Logics commonly have both a semantics and a derivation system. The seman-
tics concerns concepts such as truth, satisfiability, validity, and entailment.
The purpose of derivation systems is to provide a purely syntactic method
of establishing entailment and validity. They are purely syntactic in the sense
that a derivation in such a system is a finite syntactic object, usually a sequence
(or other finite arrangement) of sentences or formulas. Good derivation sys-
tems have the property that any given sequence or arrangement of sentences
or formulas can be verified mechanically to be “correct.”
The simplest (and historically first) derivation systems for first-order logic
were axiomatic. A sequence of formulas counts as a derivation in such a sys-
tem if each individual formula in it is either among a fixed set of “axioms”
or follows from formulas coming before it in the sequence by one of a fixed
number of “inference rules”—and it can be mechanically verified if a formula
is an axiom and whether it follows correctly from other formulas by one of
the inference rules. Axiomatic proof systems are easy to describe—and also
easy to handle meta-theoretically—but derivations in them are hard to read
and understand, and are also hard to produce.
Other derivation systems have been developed with the aim of making it
easier to construct derivations or easier to understand derivations once they
are complete. Examples are natural deduction, truth trees, also known as
tableaux proofs, and the sequent calculus. Some derivation systems are de-
53
CHAPTER 6. DERIVATION SYSTEMS
1. ` ϕ if and only if ϕ
2. Γ ` ϕ if and only if Γ ϕ
The “only if” direction of the above is called soundness. A derivation system is
sound if derivability guarantees entailment (or validity). Every decent deriva-
tion system has to be sound; unsound derivation systems are not useful at all.
After all, the entire purpose of a derivation is to provide a syntactic guarantee
of validity or entailment. We’ll prove soundness for the derivation systems
we present.
The converse “if” direction is also important: it is called completeness. A
complete derivation system is strong enough to show that ϕ is a theorem
whenever ϕ is valid, and that there Γ ` ϕ whenever Γ ϕ. Completeness
is harder to establish, and some logics have no complete derivation systems.
First-order logic does. Kurt Gödel was the first one to prove completeness for
a derivation system of first-order logic in his 1929 dissertation.
Another concept that is connected to derivation systems is that of consis-
tency. A set of sentences is called inconsistent if anything whatsoever can be
derived from it, and consistent otherwise. Inconsistency is the syntactic coun-
terpart to unsatisfiablity: like unsatisfiable sets, inconsistent sets of sentences
do not make good theories, they are defective in a fundamental way. Con-
sistent sets of sentences may not be true or useful, but at least they pass that
minimal threshold of logical usefulness. For different derivation systems the
specific definition of consistency of sets of sentences might differ, but like `,
we want consistency to coincide with its semantic counterpart, satisfiability.
We want it to always be the case that Γ is consistent if and only if it is satis-
fiable. Here, the “if” direction amounts to completeness (consistency guaran-
tees satisfiability), and the “only if” direction amounts to soundness (satisfi-
ability guarantees consistency). In fact, for classical first-order logic, the two
versions of soundness and completeness are equivalent.
ϕ ⇒ ϕ
ϕ∧ψ ⇒ ϕ
∧L
→R
⇒ ( ϕ ∧ ψ) → ϕ
[ ϕ ∧ ψ ]1
ϕ ∧Elim
1 →Intro
( ϕ ∧ ψ) → ϕ
6.4 Tableaux
T ϕ or F ϕ.
{F ϕ, Tψ1 , . . . , Tψn }
1. F ( ϕ ∧ ψ) → ϕ Assumption
2. Tϕ ∧ ψ →F 1
3. Fϕ →F 1
4. Tϕ →T 2
5. Tψ →T 2
⊗
1. ϕ is an axiom, or
ϕ → (ψ → ϕ) ψ → (ψ ∨ χ) (ψ ∧ χ) → ψ
are common axioms that govern →, ∨ and ∧. Some axiom systems aim at a
minimal number of axioms. Depending on the connectives that are taken as
primitives, it is even possible to find axiom systems that consist of a single
axiom.
A rule of inference is a conditional statement that gives a sufficient condi-
tion for a sentence in a derivation to be justified. Modus ponens is one very
common such rule: it says that if ϕ and ϕ → ψ are already justified, then ψ is
justified. This means that a line in a derivation containing the sentence ψ is
justified, provided that both ϕ and ϕ → ψ (for some sentence ϕ) appear in the
derivation before ψ.
The ` relation based on axiomatic derivations is defined as follows: Γ ` ϕ
iff there is a derivation with the sentence ϕ as its last formula (and Γ is taken
as the set of sentences in that derivation which are justified by (2) above). ϕ
is a theorem if ϕ has a derivation where Γ is empty, i.e., every sentence in the
derivation is justfied either by (1) or (3). For instance, here is a derivation that
shows that ` ϕ → (ψ → (ψ ∨ ϕ)):
1. ψ → (ψ ∨ ϕ)
2. (ψ → (ψ ∨ ϕ)) → ( ϕ → (ψ → (ψ ∨ ϕ)))
3. ϕ → (ψ → (ψ ∨ ϕ))
The sentence on line 1 is of the form of the axiom ϕ → ( ϕ ∨ ψ) (with the roles
of ϕ and ψ reversed). The sentence on line 2 is of the form of the axiom ϕ →
(ψ → ϕ). Thus, both lines are justified. Line 3 is justified by modus ponens: if
we abbreviate it as θ, then line 2 has the form χ → θ, where χ is ψ → (ψ ∨ ϕ),
i.e., line 1.
A set Γ is inconsistent if Γ ` ⊥. A complete axiom system will also prove
that ⊥ → ϕ for any ϕ, and so if Γ is inconsistent, then Γ ` ϕ for any ϕ.
Systems of axiomatic derivations for logic were first given by Gottlob Frege
in his 1879 Begriffsschrift, which for this reason is often considered the first
work of modern logic. They were perfected in Alfred North Whitehead and
Bertrand Russell’s Principia Mathematica and by David Hilbert and his stu-
dents in the 1920s. They are thus often called “Frege systems” or “Hilbert
systems.” They are very versatile in that it is often easy to find an axiomatic
system for a logic. Because derivations have a very simple structure and only
one or two inference rules, it is also relatively easy to prove things about them.
However, they are very hard to use in practice, i.e., it is difficult to find and
write proofs.
Γ⇒∆
where Γ and ∆ are finite (possibly empty) sequences of sentences of the lan-
guage L. Γ is called the antecedent, while ∆ is the succedent.
The intuitive idea behind a sequent is: if all of the sentences in the an-
tecedent hold, then at least one of the sentences in the succedent holds. That
is, if Γ = h ϕ1 , . . . , ϕm i and ∆ = hψ1 , . . . , ψn i, then Γ ⇒ ∆ holds iff
( ϕ1 ∧ · · · ∧ ϕm ) → (ψ1 ∨ · · · ∨ ψn )
holds. There are two special cases: where Γ is empty and when ∆ is empty.
When Γ is empty, i.e., m = 0, ⇒ ∆ holds iff ψ1 ∨ · · · ∨ ψn holds. When ∆ is
empty, i.e., n = 0, Γ ⇒ holds iff ¬( ϕ1 ∧ · · · ∧ ϕm ) does. We say a sequent is
valid iff the corresponding sentence is valid.
If Γ is a sequence of sentences, we write Γ, ϕ for the result of appending
ϕ to the right end of Γ (and ϕ, Γ for the result of appending ϕ to the left end
of Γ). If ∆ is a sequence of sentences also, then Γ, ∆ is the concatenation of the
two sequences.
60
7.2. PROPOSITIONAL RULES
1. ϕ ⇒ ϕ
2. ⊥ ⇒
Rules for ¬
Γ ⇒ ∆, ϕ ϕ, Γ ⇒ ∆
¬L ¬R
¬ ϕ, Γ ⇒ ∆ Γ ⇒ ∆, ¬ ϕ
Rules for ∧
ϕ, Γ ⇒ ∆
∧L
ϕ ∧ ψ, Γ ⇒ ∆ Γ ⇒ ∆, ϕ Γ ⇒ ∆, ψ
∧R
ψ, Γ ⇒ ∆ Γ ⇒ ∆, ϕ ∧ ψ
∧L
ϕ ∧ ψ, Γ ⇒ ∆
Rules for ∨
Γ ⇒ ∆, ϕ
∨R
ϕ, Γ ⇒ ∆ ψ, Γ ⇒ ∆ Γ ⇒ ∆, ϕ ∨ ψ
∨L
ϕ ∨ ψ, Γ ⇒ ∆ Γ ⇒ ∆, ψ
∨R
Γ ⇒ ∆, ϕ ∨ ψ
Rules for →
Γ ⇒ ∆, ϕ ψ, Π ⇒ Λ ϕ, Γ ⇒ ∆, ψ
→L →R
ϕ → ψ, Γ, Π ⇒ ∆, Λ Γ ⇒ ∆, ϕ → ψ
Weakening
Γ ⇒ ∆ Γ ⇒ ∆
WL WR
ϕ, Γ ⇒ ∆ Γ ⇒ ∆, ϕ
Contraction
ϕ, ϕ, Γ ⇒ ∆ Γ ⇒ ∆, ϕ, ϕ
CL CR
ϕ, Γ ⇒ ∆ Γ ⇒ ∆, ϕ
Exchange
Γ, ϕ, ψ, Π ⇒ ∆ Γ ⇒ ∆, ϕ, ψ, Λ
XL XR
Γ, ψ, ϕ, Π ⇒ ∆ Γ ⇒ ∆, ψ, ϕ, Λ
Γ ⇒ ∆, ϕ ϕ, Π ⇒ Λ
Cut
Γ, Π ⇒ ∆, Λ
7.4 Derivations
We’ve said what an initial sequent looks like, and we’ve given the rules of
inference. Derivations in the sequent calculus are inductively generated from
these: each derivation either is an initial sequent on its own, or consists of one
or two derivations followed by an inference.
We then say that S is the end-sequent of the derivation and that S is derivable in
LK (or LK-derivable).
Γ ⇒ ∆
WL
ϕ, Γ ⇒ ∆
The rule, however, is meant to be general: we can replace the ϕ in the rule
with any sentence, e.g., also with θ. If the premise matches our initial sequent
χ ⇒ χ, that means that both Γ and ∆ are just χ, and the conclusion would
then be θ, χ ⇒ χ. So, the following is a derivation:
χ ⇒ χ
WL
θ, χ ⇒ χ
We can now apply another rule, say XL, which allows us to switch two sen-
tences on the left. So, the following is also a correct derivation:
χ ⇒ χ
WL
θ, χ ⇒ χ
XL
χ, θ ⇒ χ
In this application of the rule, which was given as
Γ, ϕ, ψ, Π ⇒ ∆
XL
Γ, ψ, ϕ, Π ⇒ ∆,
both Γ and Π were empty, ∆ is χ, and the roles of ϕ and ψ are played by θ
and χ, respectively. In much the same way, we also see that
θ ⇒ θ
WL
χ, θ ⇒ θ
is a derivation. Now we can take these two derivations, and combine them
using ∧R. That rule was
Γ ⇒ ∆, ϕ Γ ⇒ ∆, ψ
∧R
Γ ⇒ ∆, ϕ ∧ ψ
In our case, the premises must match the last sequents of the derivations end-
ing in the premises. That means that Γ is χ, θ, ∆ is empty, ϕ is χ and ψ is θ. So
the conclusion, if the inference should be correct, is χ, θ ⇒ χ ∧ θ. Of course,
we can also reverse the premises, then ϕ would be θ and ψ would be χ. So
both of the following are correct derivations.
χ ⇒ χ χ ⇒ χ
WL WL
θ, χ ⇒ χ θ ⇒ θ θ ⇒ θ θ, χ ⇒ χ
XL WL WL XL
χ, θ ⇒ χ χ, θ ⇒ θ χ, θ ⇒ θ χ, θ ⇒ χ
∧R ∧R
χ, θ ⇒ χ ∧ θ χ, θ ⇒ θ ∧ χ
ϕ∧ψ ⇒ ϕ
Next, we need to figure out what kind of inference could have a lower sequent
of this form. This could be a structural rule, but it is a good idea to start by
looking for a logical rule. The only logical connective occurring in the lower
sequent is ∧, so we’re looking for an ∧ rule, and since the ∧ symbol occurs in
the antecedent, we’re looking at the ∧L rule.
ϕ∧ψ ⇒ ϕ
∧L
There are two options for what could have been the upper sequent of the ∧L
inference: we could have an upper sequent of ϕ ⇒ ϕ, or of ψ ⇒ ϕ. Clearly,
ϕ ⇒ ϕ is an initial sequent (which is a good thing), while ψ ⇒ ϕ is not
derivable in general. We fill in the upper sequent:
ϕ ⇒ ϕ
ϕ∧ψ ⇒ ϕ
∧L
¬ϕ ∨ ψ ⇒ ϕ → ψ
To find a logical rule that could give us this end-sequent, we look at the log-
ical connectives in the end-sequent: ¬, ∨, and →. We only care at the mo-
ment about ∨ and → because they are main operators of sentences in the end-
sequent, while ¬ is inside the scope of another connective, so we will take care
of it later. Our options for logical rules for the final inference are therefore the
∨L rule and the →R rule. We could pick either rule, really, but let’s pick the
→R rule (if for no reason other than it allows us to put off splitting into two
branches). According to the form of →R inferences which can yield the lower
sequent, this must look like:
ϕ, ¬ ϕ ∨ ψ ⇒ ψ
¬ ϕ ∨ ψ ⇒ ϕ → ψ →R
If we move ¬ ϕ ∨ ψ to the outside of the antecedent, we can apply the ∨L
rule. According to the schema, this must split into two upper sequents as
follows:
¬ ϕ, ϕ ⇒ ψ ψ, ϕ ⇒ ψ
¬ ϕ ∨ ψ, ϕ ⇒ ψ ∨L
XR
ϕ, ¬ ϕ ∨ ψ ⇒ ψ
¬ϕ ∨ ψ ⇒ ϕ → ψ →R
Remember that we are trying to wind our way up to initial sequents; we seem
to be pretty close! The right branch is just one weakening and one exchange
away from an initial sequent and then it is done:
ψ ⇒ ψ
WL
ϕ, ψ ⇒ ψ
XL
¬ ϕ, ϕ ⇒ ψ ψ, ϕ ⇒ ψ
¬ ϕ ∨ ψ, ϕ ⇒ ψ ∨L
XR
ϕ, ¬ ϕ ∨ ψ ⇒ ψ
¬ϕ ∨ ψ ⇒ ϕ → ψ →R
Now looking at the left branch, the only logical connective in any sentence
is the ¬ symbol in the antecedent sentences, so we’re looking at an instance of
the ¬L rule.
ψ ⇒ ψ
WL
ϕ ⇒ ψ, ϕ ϕ, ψ ⇒ ψ
¬ ϕ, ϕ ⇒ ψ ¬L ψ, ϕ ⇒ ψ
XL
¬ ϕ ∨ ψ, ϕ ⇒ ψ
∨L
XR
ϕ, ¬ ϕ ∨ ψ ⇒ ψ
¬ϕ ∨ ψ ⇒ ϕ→ψ
→R
Similarly to how we finished off the right branch, we are just one weakening
and one exchange away from finishing off this left branch as well.
ϕ ⇒ ϕ
ϕ ⇒ ϕ, ψ WR ψ ⇒ ψ
ϕ ⇒ ψ, ϕ XR ϕ, ψ ⇒ ψ
WL
¬ ϕ, ϕ ⇒ ψ ¬L ψ, ϕ ⇒ ψ
XL
¬ ϕ ∨ ψ, ϕ ⇒ ψ
∨L
XR
ϕ, ¬ ϕ ∨ ψ ⇒ ψ
¬ϕ ∨ ψ ⇒ ϕ→ψ
→R
¬ ϕ ∨ ¬ψ ⇒ ¬( ϕ ∧ ψ)
The available main connectives of sentences in the end-sequent are the ∨ sym-
bol and the ¬ symbol. It would work to apply either the ∨L or the ¬R rule
here, but we start with the ¬R rule because it avoids splitting up into two
branches for a moment:
ϕ ∧ ψ, ¬ ϕ ∨ ¬ψ ⇒
¬R
¬ ϕ ∨ ¬ψ ⇒ ¬( ϕ ∧ ψ)
Now we have a choice of whether to look at the ∧L or the ∨L rule. Let’s see
what happens when we apply the ∧L rule: we have a choice to start with
either the sequent ϕ, ¬ ϕ ∨ ψ ⇒ or the sequent ψ, ¬ ϕ ∨ ψ ⇒ . Since the
proof is symmetric with regards to ϕ and ψ, let’s go with the former:
ϕ, ¬ ϕ ∨ ¬ψ ⇒
ϕ ∧ ψ, ¬ ϕ ∨ ¬ψ ⇒
∧L
¬R
¬ ϕ ∨ ¬ψ ⇒ ¬( ϕ ∧ ψ)
?
ϕ ⇒ ϕ ϕ ⇒ ψ
¬ ϕ, ϕ ⇒ ¬L ¬ψ, ϕ ⇒ ¬L
¬ ϕ ∨ ¬ψ, ϕ ⇒ ∨ L
ϕ, ¬ ϕ ∨ ¬ψ ⇒ XL
ϕ ∧ ψ, ¬ ϕ ∨ ¬ψ ⇒ ∧L
¬R
¬ ϕ ∨ ¬ψ ⇒ ¬( ϕ ∧ ψ)
The top of the right branch cannot be reduced any further, and it cannot be
brought by way of structural inferences to an initial sequent, so this is not the
right path to take. So clearly, it was a mistake to apply the ∧L rule above.
Going back to what we had before and carrying out the ∨L rule instead, we
get
¬ ϕ, ϕ ∧ ψ ⇒ ¬ψ, ϕ ∧ ψ ⇒
¬ ϕ ∨ ¬ψ, ϕ ∧ ψ ⇒ ∨L
XL
ϕ ∧ ψ, ¬ ϕ ∨ ¬ψ ⇒
¬R
¬ ϕ ∨ ¬ψ ⇒ ¬( ϕ ∧ ψ)
ϕ ⇒ ϕ ψ ⇒ ψ
ϕ∧ψ ⇒ ϕ
∧L ϕ∧ψ ⇒ ψ
∧L
¬ ϕ, ϕ ∧ ψ ⇒ ¬ L
¬ψ, ϕ ∧ ψ ⇒ ¬L
¬ ϕ ∨ ¬ψ, ϕ ∧ ψ ⇒ ∨L
XL
ϕ ∧ ψ, ¬ ϕ ∨ ¬ψ ⇒
¬R
¬ ϕ ∨ ¬ψ ⇒ ¬( ϕ ∧ ψ)
(We could have carried out the ∧ rules lower than the ¬ rules in these steps
and still obtained a correct derivation).
Example 7.8. So far we haven’t used the contraction rule, but it is sometimes
required. Here’s an example where that happens. Suppose we want to prove
⇒ A ∨ ¬ ϕ. Applying ∨R backwards would give us one of these two deriva-
tions:
ϕ ⇒
⇒ ϕ
∨ R ⇒ ¬ ϕ ¬R
⇒ ϕ ∨ ¬ϕ
⇒ ϕ ∨ ¬ ϕ ∨R
Neither of these of course ends in an initial sequent. The trick is to realize that
the contraction rule allows us to combine two copies of a sentence into one—
and when we’re searching for a proof, i.e., going from bottom to top, we can
keep a copy of ϕ ∨ ¬ ϕ in the premise, e.g.,
⇒ ϕ ∨ ¬ ϕ, ϕ
⇒ ϕ ∨ ¬ ϕ, ϕ ∨ ¬ ϕ ∨R
⇒ ϕ ∨ ¬ϕ CR
Now we can apply ∨R a second time, and also get ¬ ϕ, which leads to a com-
plete derivation.
ϕ ⇒ ϕ
⇒ ϕ, ¬ ϕ ¬R
⇒ ϕ, ϕ ∨ ¬ ϕ ∨R
⇒ ϕ ∨ ¬ ϕ, ϕ XR
⇒ ϕ ∨ ¬ ϕ, ϕ ∨ ¬ ϕ ∨R
⇒ ϕ ∨ ¬ϕ CR
This section collects the definitions of the provability relation and con-
sistency for natural deduction.
Because of the contraction, weakening, and exchange rules, the order and
number of sentences in Γ00 does not matter: if a sequent Γ00 ⇒ ϕ is deriv-
able, then so is Γ000 ⇒ ϕ for any Γ000 that contains the same sentences as Γ00 .
For instance, if Γ0 = {ψ, χ} then both Γ00 = hψ, ψ, χi and Γ000 = hχ, χ, ψi are
sequences containing just the sentences in Γ0 . If a sequent containing one is
derivable, so is the other, e.g.:
ψ, ψ, χ ⇒ ϕ
CL
ψ, χ ⇒ ϕ
XL
χ, ψ ⇒ ϕ
WL
χ, χ, ψ ⇒ ϕ
π0 π1
Γ0 ⇒ ϕ ϕ, ∆ 0 ⇒ ψ
Cut
Γ0 , ∆ 0 ⇒ ψ
Since Γ0 ∪ ∆ 0 ⊆ Γ ∪ ∆, this shows Γ ∪ ∆ ` ψ.
Proof. Exercise.
π0 π1
Γ0 ⇒ ϕ ϕ, Γ1 ⇒
Cut
Γ0 , Γ1 ⇒
Since Γ0 ⊆ Γ and Γ1 ⊆ Γ, Γ0 ∪ Γ1 ⊆ Γ, hence Γ is inconsistent.
π1
ϕ ⇒ ϕ
⇒ ϕ, ¬ ϕ ¬R ¬ ϕ, Γ ⇒
Cut
Γ ⇒ ϕ
π ϕ ⇒ ϕ
¬ ϕ, ϕ ⇒ ¬L
Γ0 ⇒ ϕ ϕ, ¬ ϕ ⇒ XL
Cut
Γ, ¬ ϕ ⇒
Since ¬ ϕ ∈ Γ and Γ0 ⊆ Γ, this shows that Γ is inconsistent.
π0
π1
ϕ, Γ0 ⇒
¬R
Γ0 ⇒ ¬ ϕ ¬ ϕ, Γ1 ⇒
Cut
Γ0 , Γ1 ⇒
Since Γ0 ⊆ Γ and Γ1 ⊆ Γ, Γ0 ∪ Γ1 ⊆ Γ. Hence Γ is inconsistent.
2. ϕ, ψ ` ϕ ∧ ψ.
ϕ ⇒ ϕ ψ ⇒ ψ
ϕ∧ψ ⇒ ϕ
∧L ∧L
ϕ∧ψ ⇒ ψ
ϕ ⇒ ϕ ψ ⇒ ψ
ϕ, ψ ⇒ ϕ ∧ ψ
∧R
2. Both ϕ ` ϕ ∨ ψ and ψ ` ϕ ∨ ψ.
ϕ ⇒ ϕ ψ ⇒ ψ
¬ ϕ, ϕ ⇒ ¬L ¬ψ, ψ ⇒ ¬L
ϕ, ¬ ϕ, ¬ψ ⇒ ψ, ¬ ϕ, ¬ψ ⇒
ϕ ∨ ψ, ¬ ϕ, ¬ψ ⇒
∨L
ϕ ⇒ ϕ ψ ⇒ ψ
ϕ ⇒ ϕ∨ψ
∨R ∨R
ψ ⇒ ϕ∨ψ
Proposition 7.23. 1. ϕ, ϕ → ψ ` ψ.
2. Both ¬ ϕ ` ϕ → ψ and ψ ` ϕ → ψ.
ϕ ⇒ ϕ ψ ⇒ ψ
ϕ → ψ, ϕ ⇒ ψ
→L
ϕ ⇒ ϕ
¬ ϕ, ϕ ⇒ ¬L ψ ⇒ ψ
ϕ, ¬ ϕ ⇒ XL WL
ϕ, ψ ⇒ ψ
ϕ, ¬ ϕ ⇒ ψ WR ψ ⇒ ϕ→ψ
→R
¬ϕ ⇒ ϕ → ψ →R
7.9 Soundness
A derivation system, such as the sequent calculus, is sound if it cannot de-
rive things that do not actually hold. Soundness is thus a kind of guaranteed
safety property for derivation systems. Depending on which proof theoretic
property is in question, we would like to know for instance, that
Γ ⇒ ∆ Γ ⇒ ∆
WL WR
ϕ, Γ ⇒ ∆ Γ ⇒ ∆, ϕ
2. The last inference is ¬L: Then the premise of the last inference is Γ ⇒
∆, ϕ and the conclusion is ¬ ϕ, Γ ⇒ ∆, i.e., the derivation ends in
Γ ⇒ ∆, ϕ
¬L
¬ ϕ, Γ ⇒ ∆
and Θ = ¬ ϕ, Γ while Ξ = ∆.
The induction hypothesis tells us that Γ ⇒ ∆, ϕ is valid, i.e., for every v,
either (a) for some χ ∈ Γ, v 2 χ, or (b) for some χ ∈ ∆, v χ, or (c) v ϕ.
4. The last inference is ∧L: There are two variants: ϕ ∧ ψ may be inferred
on the left from ϕ or from ψ on the left side of the premise. In the first
case, the π ends in
ϕ, Γ ⇒ ∆
∧L
ϕ ∧ ψ, Γ ⇒ ∆
5. The last inference is ∨R: There are two variants: ϕ ∨ ψ may be inferred
on the right from ϕ or from ψ on the right side of the premise. In the first
case, π ends in
Γ ⇒ ∆, ϕ
∨R
Γ ⇒ ∆, ϕ ∨ ψ
ϕ, Γ ⇒ ∆, ϕ
→R
Γ ⇒ ∆, ϕ → ψ
Again, the induction hypothesis says that the premise is valid; we want
to show that the conclusion is valid as well. Let v be arbitrary. Since
ϕ, Γ ⇒ ∆, ψ is valid, at least one of the following cases obtains: (a) v 2 ϕ,
(b) v ψ, (c) v 2 χ for some χ ∈ Γ, or (c) v χ for some χ ∈ ∆. In cases
(a) and (b), v ϕ → ψ and so there is a χ ∈ ∆, ϕ → ψ such that v χ. In
case (c), for some χ ∈ Γ, v 2 χ. In case (d), for some χ ∈ ∆, v χ. In
each case, v satisfies Γ ⇒ ∆, ϕ → ψ. Since v was arbitrary, Γ ⇒ ∆, ϕ → ψ
is valid.
Γ ⇒ ∆, ϕ ϕ, Π ⇒ Λ
Cut
Γ, Π ⇒ ∆, Λ
Γ ⇒ ∆, ϕ Γ ⇒ ∆, ψ
∧R
Γ ⇒ ∆, ϕ ∧ ψ
Γ ⇒ ∆, ϕ ψ, Π ⇒ Λ
→L
ϕ → ψ, Γ, Π ⇒ ∆, Λ
Problems
Problem 7.1. Give derivations of the following sequents:
1. ⇒ ¬( ϕ → ψ) → ( ϕ ∧ ¬ψ)
2. ( ϕ ∧ ψ) → χ ⇒ ( ϕ → χ) ∨ (ψ → χ)
Natural Deduction
77
CHAPTER 8. NATURAL DEDUCTION
It is customary to consider rules for all logical operators, even for those (if
any) that we consider as defined.
Rules for ∧
ϕ∧ψ
ϕ ∧Elim
ϕ ψ
∧Intro
ϕ∧ψ ϕ∧ψ
ψ
∧Elim
Rules for ∨
ϕ [ ϕ]n [ψ]n
∨Intro
ϕ∨ψ
ψ
∨Intro ϕ∨ψ χ χ
ϕ∨ψ n ∨Elim
χ
Rules for →
[ ϕ]n
ϕ→ψ ϕ
ψ
→Elim
ψ
n →Intro
ϕ→ψ
Rules for ¬
[ ϕ]n
¬ϕ ϕ
¬Elim
⊥
⊥
¬ ϕ ¬Intro
n
Rules for ⊥
[¬ ϕ]n
⊥ ⊥
ϕ I
n
⊥ ⊥
ϕ C
Note that ¬Intro and ⊥C are very similar: The difference is that ¬Intro derives
a negated sentence ¬ ϕ but ⊥C a positive sentence ϕ.
8.3 Derivations
We’ve said what an assumption is, and we’ve given the rules of inference.
Derivations in natural deduction are inductively generated from these: each
derivation either is an assumption on its own, or consists of one, two, or three
derivations followed by a correct inference.
We then say that ϕ is the conclusion of the derivation and that ϕ is derivable
from Γ.
Example 8.3. Every assumption on its own is a derivation. So, e.g., χ by itself
is a derivation, and so is θ by itself. We can obtain a new derivation from these
by applying, say, the ∧Intro rule,
ϕ ψ
∧Intro
ϕ∧ψ
These rules are meant to be general: we can replace the ϕ and ψ in it with any
sentences, e.g., by χ and θ. Then the conclusion would be χ ∧ θ, and so
χ θ
∧Intro
χ∧θ
θ χ
∧Intro
θ∧χ
[ χ ]1 θ χ [ θ ]1
∧Intro ∧Intro
χ∧θ χ∧θ
1 →Intro 1 →Intro
χ → (χ ∧ θ ) θ → (χ ∧ θ )
( ϕ ∧ ψ) → ϕ
Next, we need to figure out what kind of inference could result in a sen-
tence of this form. The main operator of the conclusion is →, so we’ll try to
arrive at the conclusion using the →Intro rule. It is best to write down the as-
sumptions involved and label the inference rules as you progress, so it is easy
to see whether all assumptions have been discharged at the end of the proof.
[ ϕ ∧ ψ ]1
ϕ
1 →Intro
( ϕ ∧ ψ) → ϕ
[ ϕ ∧ ψ ]1
ϕ ∧Elim
1 →Intro
( ϕ ∧ ψ) → ϕ
(¬ ϕ ∨ ψ) → ( ϕ → ψ)
To find a logical rule that could give us this conclusion, we look at the logical
connectives in the conclusion: ¬, ∨, and →. We only care at the moment about
the first occurence of → because it is the main operator of the sentence in the
end-sequent, while ¬, ∨ and the second occurence of → are inside the scope
of another connective, so we will take care of those later. We therefore start
with the →Intro rule. A correct application must look as follows:
[¬ ϕ ∨ ψ]1
ϕ→ψ
1 →Intro
(¬ ϕ ∨ ψ) → ( ϕ → ψ)
This leaves us with two possibilities to continue. Either we can keep work-
ing from the bottom up and look for another application of the →Intro rule, or
we can work from the top down and apply a ∨Elim rule. Let us apply the lat-
ter. We will use the assumption ¬ ϕ ∨ ψ as the leftmost premise of ∨Elim. For
a valid application of ∨Elim, the other two premises must be identical to the
conclusion ϕ → ψ, but each may be derived in turn from another assumption,
namely the two disjuncts of ¬ ϕ ∨ ψ. So our derivation will look like this:
[¬ ϕ]2 [ ψ ]2
[¬ ϕ]2 , [ ϕ]3 [ ψ ]2 , [ ϕ ]4
ψ ψ
3 →Intro 4 →Intro
[¬ ϕ ∨ ψ]1 ϕ→ψ ϕ→ψ
2
ϕ→ψ
∨Elim
1 →Intro
(¬ ϕ ∨ ψ) → ( ϕ → ψ)
For the two missing parts of the derivation, we need derivations of ψ from
¬ ϕ and ϕ in the middle, and from ϕ and ψ on the left. Let’s take the former
first. ¬ ϕ and ϕ are the two premises of ¬Elim:
[¬ ϕ]2 [ ϕ ]3
¬Elim
⊥
ψ
By using ⊥ I , we can obtain ψ as a conclusion and complete the branch.
[ ψ ]2 , [ ϕ ]4
[¬ ϕ]2 [ ϕ ]3
⊥Intro
⊥ ⊥
I
ψ ψ
3 →Intro 4 →Intro
[¬ ϕ ∨ ψ]1 ϕ→ψ ϕ→ψ
2
ϕ→ψ
∨Elim
1 →Intro
(¬ ϕ ∨ ψ) → ( ϕ → ψ)
Let’s now look at the rightmost branch. Here it’s important to realize that
the definition of derivation allows assumptions to be discharged but does not re-
quire them to be. In other words, if we can derive ψ from one of the assump-
tions ϕ and ψ without using the other, that’s ok. And to derive ψ from ψ is
trivial: ψ by itself is such a derivation, and no inferences are needed. So we
can simply delete the assumtion ϕ.
[¬ ϕ]2 [ ϕ ]3
¬Elim
⊥ ⊥
I
ψ [ ψ ]2
3 →Intro →Intro
[¬ ϕ ∨ ψ]1 ϕ→ψ ϕ→ψ
2
ϕ→ψ
∨Elim
1 →Intro
(¬ ϕ ∨ ψ) → ( ϕ → ψ)
Note that in the finished derivation, the rightmost →Intro inference does not
actually discharge any assumptions.
Example 8.6. So far we have not needed the ⊥C rule. It is special in that it al-
lows us to discharge an assumption that isn’t a sub-formula of the conclusion
of the rule. It is closely related to the ⊥ I rule. In fact, the ⊥ I rule is a special
case of the ⊥C rule—there is a logic called “intuitionistic logic” in which only
⊥ I is allowed. The ⊥C rule is a last resort when nothing else works. For in-
stance, suppose we want to derive ϕ ∨ ¬ ϕ. Our usual strategy would be to
attempt to derive ϕ ∨ ¬ ϕ using ∨Intro. But this would require us to derive
either ϕ or ¬ ϕ from no assumptions, and this can’t be done. ⊥C to the rescue!
[¬( ϕ ∨ ¬ ϕ)]1
1
⊥ ⊥C
ϕ ∨ ¬ϕ
¬ϕ ϕ
¬Elim
1
⊥ ⊥C
ϕ ∨ ¬ϕ
Our strategy for finding a derivation of ¬ ϕ calls for an application of ¬Intro:
⊥
2
¬ ϕ ¬Intro ϕ
¬Elim
1
⊥ ⊥C
ϕ ∨ ¬ϕ
[ ϕ ]2 [¬( ϕ ∨ ¬ ϕ)]1
[¬( ϕ ∨ ¬ ϕ)]1 ϕ ∨ ¬ ϕ ∨Intro
¬Elim
⊥
2
¬ϕ ¬ Intro ϕ
¬Elim
1
⊥ ⊥C
ϕ ∨ ¬ϕ
On the right side we use the same strategy, except we get ϕ by ⊥C :
[ ϕ ]2 [¬ ϕ]3
[¬( ϕ ∨ ¬ ϕ)]1 ϕ ∨ ¬ϕ ∨ Intro [¬( ϕ ∨ ¬ ϕ)] 1 ϕ ∨ ¬ ϕ ∨Intro
¬Elim ¬Elim
⊥ ⊥ ⊥
2
¬ϕ ¬ Intro 3
ϕ C
¬Elim
1
⊥ ⊥C
ϕ ∨ ¬ϕ
This section collects the definitions the provability relation and consis-
tency for natural deduction.
∆, [ ϕ]1
δ1 Γ
δ0
ψ
1 →Intro
ϕ→ψ ϕ
ψ
→Elim
Proof. Exercise.
Γ, [ ϕ]1
Γ
δ2
δ1
⊥
¬ ϕ ¬Intro
1
ϕ
¬Elim
⊥
In the new derivation, the assumption ϕ is discharged, so it is a derivation
from Γ.
Γ
δ0
¬ϕ ϕ
¬Elim
⊥
Now assume Γ ∪ {¬ ϕ} is inconsistent, and let δ1 be the corresponding
derivation of ⊥ from undischarged assumptions in Γ ∪ {¬ ϕ}. We obtain
a derivation of ϕ from Γ alone by using ⊥C :
Γ, [¬ ϕ]1
δ1
⊥ ⊥
ϕ C
δ
¬ϕ ϕ
¬Elim
⊥
Since ¬ ϕ ∈ Γ, all undischarged assumptions are in Γ, this shows that Γ `
⊥.
Γ, [¬ ϕ]2 Γ, [ ϕ]1
δ2 δ1
⊥ ⊥
2
¬¬ ϕ ¬Intro 1
¬ ϕ ¬Intro
¬Elim
⊥
Since the assumptions ϕ and ¬ ϕ are discharged, this is a derivation of ⊥
from Γ alone. Hence Γ is inconsistent.
2. ϕ, ψ ` ϕ ∧ ψ.
ϕ∧ψ ϕ∧ψ
ϕ ∧Elim ψ
∧Elim
2. We can derive:
ϕ ψ
∧Intro
ϕ∧ψ
2. Both ϕ ` ϕ ∨ ψ and ψ ` ϕ ∨ ψ.
¬ϕ [ ϕ ]1 ¬ψ [ ψ ]1
¬Elim ¬Elim
ϕ∨ψ ⊥ ⊥
1 ∨Elim
⊥
This is a derivation of ⊥ from undischarged assumptions ϕ ∨ ψ, ¬ ϕ, and
¬ψ.
2. We can derive both
ϕ ψ
∨Intro ∨Intro
ϕ∨ψ ϕ∨ψ
Proposition 8.21. 1. ϕ, ϕ → ψ ` ψ.
2. Both ¬ ϕ ` ϕ → ψ and ψ ` ϕ → ψ.
ϕ→ψ ψ
ψ
→Elim
¬ϕ [ ϕ ]1
¬Elim ψ
⊥ ⊥
I →Intro
ψ ϕ→ψ
1 →Intro
ϕ→ψ
Note that →Intro may, but does not have to, discharge the assumption ϕ.
8.8 Soundness
A derivation system, such as natural deduction, is sound if it cannot derive
things that do not actually follow. Soundness is thus a kind of guaranteed
safety property for derivation systems. Depending on which proof theoretic
property is in question, we would like to know for instance, that
1. Suppose that the last inference is ¬Intro: The derivation has the form
Γ, [ ϕ]n
δ1
⊥
¬ ϕ ¬Intro
n
2. The last inference is ∧Elim: There are two variants: ϕ or ψ may be in-
ferred from the premise ϕ ∧ ψ. Consider the first case. The derivation δ
looks like this:
Γ
δ1
ϕ∧ψ
ϕ ∧Elim
3. The last inference is ∨Intro: There are two variants: ϕ ∨ ψ may be in-
ferred from the premise ϕ or the premise ψ. Consider the first case. The
derivation has the form
Γ
δ1
ϕ
∨Intro
ϕ∨ψ
Γ, [ ϕ]n
δ1
ψ
n →Intro
ϕ→ψ
Γ
δ1
⊥ ⊥
ϕ I
Now let’s consider the possible inferences with several premises: ∨Elim,
∧Intro, and →Elim.
1. The last inference is ∧Intro. ϕ ∧ ψ is inferred from the premises ϕ and ψ
and δ has the form
Γ1 Γ2
δ1 δ2
ϕ ψ
∧Intro
ϕ∧ψ
Γ1 Γ2
δ1 δ2
ϕ→ψ ϕ
ψ
→Elim
Problems
Problem 8.1. Give derivations of the following:
1. ¬( ϕ → ψ) → ( ϕ ∧ ¬ψ)
Tableaux
Definition 9.1. A signed formula is a pair consisting of a truth value and a sen-
tence, i.e., either:
T ϕ or F ϕ.
92
9.2. PROPOSITIONAL RULES
out. In particular, that means that a closed tableau rules out all possibilities
of simultaneously making every assumption of the form T ϕ true and every
assumption of the form F ϕ false.
A closed tableau for ϕ is a closed tableau with root F ϕ. If such a closed
tableau exists, all possibilities for ϕ being false have been ruled out; i.e., ϕ
must be true in every structure.
Rules for ¬
T¬ ϕ F ¬ϕ
¬T ¬F
Fϕ Tϕ
Rules for ∧
Tϕ ∧ ψ
∧T Fϕ ∧ ψ
Tϕ ∧F
F ϕ | Fψ
Tψ
Rules for ∨
Fϕ ∨ ψ
Tϕ ∨ ψ ∨F
∨T Fϕ
T ϕ | Tψ
Fψ
Rules for →
Fϕ → ψ
Tϕ → ψ →F
→T Tϕ
F ϕ | Tψ
Fψ
Cut
Tϕ | Fϕ
The Cut rule is not applied “to” a previous signed formula; rather, it allows
every branch in a tableau to be split in two, one branch containing T ϕ, the
other F ϕ. It is not necessary—any set of signed formulas with a closed tableau
has one not using Cut—but it allows us to combine tableaux in a convenient
way.
9.3 Tableaux
We’ve said what an assumption is, and we’ve given the rules of inference.
Tableaux are inductively generated from these: each tableau either is a single
branch consisting of one or more assumptions, or it results from a tableau by
applying one of the rules of inference on a branch.
1. The n topmost signed formulas of the tree are Si ϕi , one below the other.
2. Every signed formula in the tree that is not one of the assumptions re-
sults from a correct application of an inference rule to a signed formula
in the branch above it.
A branch of a tableau is closed iff it contains both T ϕ and F ϕ, and open other-
wise. A tableau in which every branch is closed is a closed tableau (for its set
of assumptions). If a tableau is not closed, i.e., if it contains at least one open
branch, it is open.
Example 9.3. Every set of assumptions on its own is a tableau, but it will gen-
erally not be closed. (Obviously, it is closed only if the assumptions already
contain a pair of signed formulas T ϕ and F ϕ.)
From a tableau (open or closed) we can obtain a new, larger one by ap-
plying one of the rules of inference to a signed formula ϕ in it. The rule will
append one or more signed formulas to the end of any branch containing the
occurrence of ϕ to which we apply the rule.
For instance, consider the assumption T ϕ ∧ ¬ ϕ. Here is the (open) tableau
consisting of just that assumption:
1. T ϕ ∧ ¬ϕ Assumption
1. T ϕ ∧ ¬ϕ Assumption
2. Tϕ ∧T 1
3. T¬ ϕ ∧T 1
When we write down tableaux, we record the rules we’ve applied on the right
(e.g., ∧T1 means that the signed formula on that line is the result of applying
the ∧T rule to the signed formula on line 1). This new tableau now contains
additional signed formulas, but to only one (T ¬ ϕ) can we apply a rule (in this
case, the ¬T rule). This results in the closed tableau
1. T ϕ ∧ ¬ϕ Assumption
2. Tϕ ∧T 1
3. T¬ ϕ ∧T 1
4. Fϕ ¬T 3
⊗
1. F ( ϕ ∧ ψ) → ϕ Assumption
There is only one assumption, so only one signed formula to which we can
apply a rule. (For every signed formula, there is always at most one rule that
can be applied: it’s the rule for the corresponding sign and main operator of
the sentence.) In this case, this means, we must apply →F.
1. F ( ϕ ∧ ψ) → ϕ X Assumption
2. Tϕ ∧ ψ →F 1
3. Fϕ →F 1
1. F ( ϕ ∧ ψ) → ϕ X Assumption
2. Tϕ ∧ ψ X →F 1
3. Fϕ →F 1
4. Tϕ ∧T 2
5. Tψ ∧T 2
⊗
Since the branch now contains both T ϕ (on line 4) and F ϕ (on line 3), the
branch is closed. Since it is the only branch, the tableau is closed. We have
found a closed tableau for ( ϕ ∧ ψ) → ϕ.
1. F (¬ ϕ ∨ ψ) → ( ϕ → ψ) Assumption
The one signed formula in this tableau has main operator → and sign F, so
we apply the →F rule to it to obtain:
1. F (¬ ϕ ∨ ψ) → ( ϕ → ψ) X Assumption
2. T¬ ϕ ∨ ψ →F 1
3. F ( ϕ → ψ) →F 1
1. F (¬ ϕ ∨ ψ) → ( ϕ → ψ) X Assumption
2. T¬ ϕ ∨ ψ X →F 1
3. F ( ϕ → ψ) →F 1
4. T¬ ϕ Tψ ∨T 2
We have not applied the →F rule to line 3 yet: let’s do that now. To save
time, we apply it to both branches. Recall that we write a checkmark next
to a signed formula only if we have applied the corresponding rule in every
open branch. So it’s a good idea to apply a rule at the end of every branch that
contains the signed formula the rule applies to. That way we won’t have to
return to that signed formula lower down in the various branches.
1. F (¬ ϕ ∨ ψ) → ( ϕ → ψ) X Assumption
2. T¬ ϕ ∨ ψ X →F 1
3. F ( ϕ → ψ) X →F 1
4. T¬ ϕ Tψ ∨T 2
5. Tϕ Tϕ →F 3
6. Fψ Fψ →F 3
⊗
The right branch is now closed. On the left branch, we can still apply the ¬T
rule to line 4. This results in F ϕ and closes the left branch:
1. F (¬ ϕ ∨ ψ) → ( ϕ → ψ) X Assumption
2. T¬ ϕ ∨ ψ X →F 1
3. F ( ϕ → ψ) X →F 1
4. T¬ ϕ Tψ ∨T 2
5. Tϕ Tϕ →F 3
6. Fψ Fψ →F 3
7. Fϕ ⊗ ¬T 4
⊗
Example 9.6. We can give tableaux for any number of signed formulas as
assumptions. Often it is also necessary to apply more than one rule that allows
branching; and in general a tableau can have any number of branches. For
instance, consider a tableau for {T ϕ ∨ (ψ ∧ χ), F ( ϕ ∨ ψ) ∧ ( ϕ ∨ χ)}. We start
by applying the ∨T to the first assumption:
1. T ϕ ∨ (ψ ∧ χ) X Assumption
2. F ( ϕ ∨ ψ) ∧ ( ϕ ∨ χ) Assumption
3. Tϕ Tψ ∧ χ ∨T 1
Now we can apply the ∧F rule to line 2. We do this on both branches simul-
taneously, and can therefore check off line 2:
1. T ϕ ∨ (ψ ∧ χ) X Assumption
2. F ( ϕ ∨ ψ) ∧ ( ϕ ∨ χ) X Assumption
3. Tϕ Tψ ∧ χ ∨T 1
4. Fϕ ∨ ψ Fϕ ∨ χ Fϕ ∨ ψ Fϕ ∨ χ ∧F 2
1. T ϕ ∨ (ψ ∧ χ) X Assumption
2. F ( ϕ ∨ ψ) ∧ ( ϕ ∨ χ) X Assumption
3. Tϕ Tψ ∧ χ ∨T 1
4. Fϕ ∨ ψ X Fϕ ∨ χ Fϕ ∨ ψ X Fϕ ∨ χ ∧F 2
5. Fϕ Fϕ ∨F 4
6. Fψ Fψ ∨F 4
⊗
1. T ϕ ∨ (ψ ∧ χ) X Assumption
2. F ( ϕ ∨ ψ) ∧ ( ϕ ∨ χ) X Assumption
3. Tϕ Tψ ∧ χ ∨T 1
4. Fϕ ∨ ψ X Fϕ ∨ χ X Fϕ ∨ ψ X Fϕ ∨ χ X ∧F 2
5. Fϕ Fϕ ∨F 4
6. Fψ Fψ ∨F 4
7. ⊗ Fϕ Fϕ ∨F 4
8. Fχ Fχ ∨F 4
⊗
Note that we moved the result of applying ∨F a second time below for clarity.
In this instance it would not have been needed, since the justifications would
have been the same.
Two branches remain open, and Tψ ∧ χ on line 3 remains unchecked. We
apply ∧T to it to obtain a closed tableau:
1. T ϕ ∨ (ψ ∧ χ) X Assumption
2. F ( ϕ ∨ ψ) ∧ ( ϕ ∨ χ) X Assumption
3. Tϕ Tψ ∧ χ X ∨T 1
4. Fϕ ∨ ψ X Fϕ ∨ χ X Fϕ ∨ ψ X Fϕ ∨ χ X ∧F 2
5. Fϕ Fϕ Fϕ Fϕ ∨F 4
6. Fψ Fχ Fψ Fχ ∨F 4
7. ⊗ ⊗ Tψ Tψ ∧T 3
8. Tχ Tχ ∧T 3
⊗ ⊗
For comparison, here’s a closed tableau for the same set of assumptions in
which the rules are applied in a different order:
1. T ϕ ∨ (ψ ∧ χ) X Assumption
2. F ( ϕ ∨ ψ) ∧ ( ϕ ∨ χ) X Assumption
3. Fϕ ∨ ψ X Fϕ ∨ χ X ∧F 2
4. Fϕ Fϕ ∨F 3
5. Fψ Fχ ∨F 3
6. Tϕ Tψ ∧ χ X Tϕ Tψ ∧ χ X ∨T 1
7. ⊗ Tψ ⊗ Tψ ∧T 3
8. Tχ Tχ ∧T 3
⊗ ⊗
This section collects the definitions of the provability relation and con-
sistency for tableaux.
{F ϕ, Tψ1 , . . . , Tψn , }
{Tψ1 , . . . , Tψn , }.
1. Fϕ Assumption
2. Tϕ Assumption
⊗
is closed.
{F ϕ,Tθ1 , . . . , Tθm }
Apply the Cut rule on ϕ. This generates two branches, one has T ϕ in it, the
other F ϕ. Thus, on the one branch, all of
{F ψ, T ϕ, Tχ1 , . . . , Tχn }
are available. Since there is a closed tableau for these assumptions, we can
attach it to that branch; every branch through T ϕ1 closes. On the other branch,
all of
{F ϕ, Tθ1 , . . . , Tθm }
are available, so we can also complete the other side to obtain a closed tableau.
This shows Γ ∪ ∆ ` ψ.
Proof. Exercise.
{F ϕ,Tψ1 , . . . , Tψn }
{T ¬ ϕ,Tχ1 , . . . , Tχm }
have closed tableaux. Using the Cut rule on ϕ we can combine these into a
single closed tableau that shows Γ0 ∪ Γ1 is inconsistent. Since Γ0 ⊆ Γ and
Γ1 ⊆ Γ, Γ0 ∪ Γ1 ⊆ Γ, hence Γ is inconsistent.
{F ϕ, Tψ1 , . . . , Tψn }
Using the ¬T rule, this can be turned into a closed tableau for
{T ¬ ϕ, Tψ1 , . . . , Tψn }.
On the other hand, if there is a closed tableau for the latter, we can turn it
into a closed tableau of the former by removing every formula that results
from ¬T applied to the first assumption T ¬ ϕ as well as that assumption,
and adding the assumption F ϕ. For if a branch was closed before because
it contained the conclusion of ¬T applied to T ¬ ϕ, i.e., F ϕ, the corresponding
branch in the new tableau is also closed. If a branch in the old tableau was
closed because it contained the assumption T ¬ ϕ as well as F ¬ ϕ we can turn
it into a closed branch by applying ¬F to F ¬ ϕ to obtain T ϕ. This closes the
branch since we added F ϕ as an assumption.
{F ϕ, Tψ1 , . . . , Tψn }
{T ϕ,Tψ1 , . . . , Tψn }
{T ¬ ϕ,Tχ1 , . . . , Tχm }
both have closed tableaux, we can construct a tableau that shows that Γ is
inconsistent by using as assumptions Tψ1 , . . . , Tψn together with Tχ1 , . . . ,
Tχm , followed by an application of the Cut rule, yielding two branches, one
starting with T ϕ, the other with F ϕ. Add on the part below the assumptions
of the first tableau on the left side. Here, every rule application is still correct,
and every branch closes. On the right side, add the part below the assump-
tions of the seond tableau, with the results of any applications of ¬T to T ¬ ϕ
removed.
For if a branch was closed before because it contained the conclusion of
¬T applied to T ¬ ϕ, i.e., F ϕ, as well as F ϕ, the corresponding branch in the
new tableau is also closed. If a branch in the old tableau was closed because
it contained the assumption T ¬ ϕ as well as F ¬ ϕ we can turn it into a closed
branch by applying ¬F to F ¬ ϕ to obtain T ϕ.
1. Fϕ Assumption
2. Tϕ ∧ ψ Assumption
3. Tϕ ∧T 2
4. Tψ ∧T 2
⊗
1. Fψ Assumption
2. Tϕ ∧ ψ Assumption
3. Tϕ ∧T 2
4. Tψ ∧T 2
⊗
1. Fϕ ∧ ψ Assumption
2. Tϕ Assumption
3. Tψ Assumption
4. Fϕ Fψ ∧F 1
⊗ ⊗
2. Both ϕ ` ϕ ∨ ψ and ψ ` ϕ ∨ ψ.
1. Tϕ ∨ ψ Assumption
2. T¬ ϕ Assumption
3. T ¬ψ Assumption
4. Fϕ ¬T 2
5. Fψ ¬T 3
6. Tϕ Tψ ∨T 1
⊗ ⊗
1. Fϕ ∨ ψ Assumption
2. Tϕ Assumption
3. Fϕ ∨F 1
4. Fψ ∨F 1
⊗
1. Fϕ ∨ ψ Assumption
2. Tψ Assumption
3. Fϕ ∨F 1
4. Fψ ∨F 1
⊗
Proposition 9.21. 1. ϕ, ϕ → ψ ` ψ.
2. Both ¬ ϕ ` ϕ → ψ and ψ ` ϕ → ψ.
1. Fψ Assumption
2. Tϕ → ψ Assumption
3. Tϕ Assumption
4. Fϕ Tψ →T 2
⊗ ⊗
1. Fϕ → ψ Assumption
2. T¬ ϕ Assumption
3. Tϕ →F 1
4. Fψ →F 1
5. Fϕ ¬T 2
⊗
1. Fϕ → ψ Assumption
2. T ¬ψ Assumption
3. Tϕ →F 1
4. Fψ →F 1
5. Fψ ¬T 2
⊗
9.8 Soundness
A derivation system, such as tableaux, is sound if it cannot derive things that
do not actually hold. Soundness is thus a kind of guaranteed safety property
for derivation systems. Depending on which proof theoretic property is in
question, we would like to know for instance, that
Because all these proof-theoretic properties are defined via closed tableaux
of some kind or other, proving (1)–(3) above requires proving something about
the semantic properties of closed tableaux. We will first define what it means
for a signed formula to be satisfied in a structure, and then show that if a
tableau is closed, no structure satisfies all its assumptions. (1)–(3) then follow
as corollaries from this result.
Proof. Let’s call a branch of a tableau satisfiable iff the set of signed formulas
on it is satisfiable, and let’s call a tableau satisfiable if it contains at least one
satisfiable branch.
We show the following: Extending a satisfiable tableau by one of the rules
of inference always results in a satisfiable tableau. This will prove the theo-
rem: any closed tableau results by applying rules of inference to the tableau
consisting only of assumptions from Γ. So if Γ were satisfiable, any tableau
for it would be satisfiable. A closed tableau, however, is clearly not satisfiable:
every branch contains both T ϕ and F ϕ, and no structure can both satisfy and
not satisfy ϕ.
Suppose we have a satisfiable tableau, i.e., a tableau with at least one sat-
isfiable branch. Applying a rule of inference either adds signed formulas to a
branch, or splits a branch in two. If the tableau has a satisfiable branch which
is not extended by the rule application in question, it remains a satisfiable
branch in the extended tableau, so the extended tableau is satisfiable. So we
only have to consider the case where a rule is applied to a satisfiable branch.
Let Γ be the set of signed formulas on that branch, and let S ϕ ∈ Γ be the
signed formula to which the rule is applied. If the rule does not result in a
split branch, we have to show that the extended branch, i.e., Γ together with
the conclusions of the rule, is still satisfiable. If the rule results in split branch,
we have to show that at least one of the two resulting branches is satisfiable.
First, we consider the possible inferences with only one premise.
4. The branch is expanded by Cut: This results in two branches, one con-
taining Tψ, the other containing F ψ. Since v Γ and either v ψ or
v 2 ψ, v satisfies either the left or the right branch.
Problems
Problem 9.1. Give closed tableaux of the following:
1. F ¬( ϕ → ψ) → ( ϕ ∧ ¬ψ)
2. F ( ϕ → χ) ∨ (ψ → χ), T ( ϕ ∧ ψ) → χ
Axiomatic Derivations
No effort has been made yet to ensure that the material in this chap-
ter respects various tags indicating which connectives and quantifiers are
primitive or defined: all are assumed to be primitive. If the FOL tag is
true, we produce a version with quantifiers, otherwise without.
109
CHAPTER 10. AXIOMATIC DERIVATIONS
It gets more interesting if the rule of inference appeals to formulas that appear
before the step considered. The following rule is called modus ponens:
If this is the only rule of inference, then our definition of derivation above
amounts to this: ϕ1 , . . . , ϕn is a derivation iff for each i ≤ n one of the follow-
ing holds:
1. ϕi ∈ Γ; or
2. ϕi is an axiom; or
The last clause says that ϕi follows from ϕ j (ψ) and ϕk (ψ → ϕi ) by modus
ponens. If we can go from 1 to n, and each time we find a formula ϕi that is
either in Γ, an axiom, or which a rule of inference tells us that it is a correct
inference step, then the entire sequence counts as a correct derivation.
Definition 10.5 (Axioms). The set of Ax0 of axioms for the propositional con-
nectives comprises all formulas of the following forms:
( ϕ ∧ ψ) → ϕ (10.1)
( ϕ ∧ ψ) → ψ (10.2)
ϕ → (ψ → ( ϕ ∧ ψ)) (10.3)
ϕ → ( ϕ ∨ ψ) (10.4)
ϕ → (ψ ∨ ϕ) (10.5)
( ϕ → χ) → ((ψ → χ) → (( ϕ ∨ ψ) → χ)) (10.6)
ϕ → (ψ → ϕ) (10.7)
( ϕ → (ψ → χ)) → (( ϕ → ψ) → ( ϕ → χ)) (10.8)
( ϕ → ψ) → (( ϕ → ¬ψ) → ¬ ϕ) (10.9)
¬ ϕ → ( ϕ → ψ) (10.10)
> (10.11)
⊥→ϕ (10.12)
( ϕ → ⊥) → ¬ ϕ (10.13)
¬¬ ϕ → ϕ (10.14)
Why? Two applications of MP yield the last part, which is what we want.
And we easily see that ¬θ → (θ → α) is an instance of ??, and α → (θ → α) is
an instance of ??. So our derivation is:
1. ¬θ → (θ → α) ??
2. (¬θ → (θ → α)) →
((α → (θ → α)) → ((¬θ ∨ α) → (θ → α))) ??
3. ((α → (θ → α)) → ((¬θ ∨ α) → (θ → α)) 1, 2, MP
4. α → (θ → α) ??
5. (¬θ ∨ α) → (θ → α) 3, 4, MP
θ → (θ → θ )
In order to apply MP, we would also need to justify the corresponding second
premise, namely ϕ. But in our case, that would be θ, and we won’t be able to
derive θ by itself. So we need a different strategy.
The other axiom involving just → is ??, i.e.,
( ϕ → (ψ → χ)) → (( ϕ → ψ) → ( ϕ → χ))
1. θ → ((θ → θ ) → θ ) ??
2. (θ → ((θ → θ ) → θ )) →
((θ → (θ → θ )) → (θ → θ )) ??
3. (θ → (θ → θ )) → (θ → θ ) 1, 2, MP
4. θ → (θ → θ ) ??
5. θ→θ 3, 4, MP
1. ϕ→ψ H YP
2. ψ→χ H YP
3. (ψ → χ) → ( ϕ → (ψ → χ)) ??
4. ϕ → (ψ → χ) 2, 3, MP
5. ( ϕ → (ψ → χ)) →
(( ϕ → ψ) → ( ϕ → χ)) ??
6. (( ϕ → ψ) → ( ϕ → χ)) 4, 5, MP
7. ϕ→χ 1, 6, MP
The lines labelled “H YP” (for “hypothesis”) indicate that the formula on that
line is an element of Γ.
ϕ1 , . . . , ϕk = ϕ, ψ1 , . . . , ψl = ψ.
Proof. Exercise.
The most important result we’ll use in this context is the deduction theo-
rem:
Γ ` ϕ → ( χ → ψ );
Γ ` ϕ → χ.
But also
Γ ` ( ϕ → (χ → ψ)) → (( ϕ → χ) → ( ϕ → ψ)),
by ??, and two applications of ?? give Γ ` ϕ → ψ, as required.
Notice how ?? and ?? were chosen precisely so that the Deduction Theorem
would hold.
The following are some useful facts about derivability, which we leave as
exercises.
5. If Γ ` ¬¬ ϕ then Γ ` ϕ;
Proof. Exercise.
2. ϕ, ψ ` ϕ ∧ ψ.
2. Both ϕ ` ϕ ∨ ψ and ψ ` ϕ ∨ ψ.
Proposition 10.28. 1. ϕ, ϕ → ψ ` ψ.
2. Both ¬ ϕ ` ϕ → ψ and ψ ` ϕ → ψ.
1. ϕ H YP
2. ϕ→ψ H YP
3. ψ 1, 2, MP
10.8 Soundness
A derivation system, such as axiomatic deduction, is sound if it cannot de-
rive things that do not actually hold. Soundness is thus a kind of guaranteed
safety property for derivation systems. Depending on which proof theoretic
property is in question, we would like to know for instance, that
Proof. Do truth tables for each axiom to verify that they are tautologies.
Problems
Problem 10.1. Show that the following hold by exhibiting derivations from
the axioms:
1. ( ϕ ∧ ψ) → (ψ ∧ ϕ)
2. (( ϕ ∧ ψ) → χ) → ( ϕ → (ψ → χ))
3. ¬( ϕ ∨ ψ) → ¬ ϕ
11.1 Introduction
The completeness theorem is one of the most fundamental results about logic.
It comes in two formulations, the equivalence of which we’ll prove. In its first
formulation it says something fundamental about the relationship between
semantic consequence and our proof system: if a sentence ϕ follows from
some sentences Γ, then there is also a derivation that establishes Γ ` ϕ. Thus,
the proof system is as strong as it can possibly be without proving things that
don’t actually follow.
In its second formulation, it can be stated as a model existence result: ev-
ery consistent set of sentences is satisfiable. Consistency is a proof-theoretic
notion: it says that our proof system is unable to produce certain derivations.
But who’s to say that just because there are no derivations of a certain sort
from Γ, it’s guaranteed that there is valuation v with v Γ? Before the com-
pleteness theorem was first proved—in fact before we had the proof systems
we now do—the great German mathematician David Hilbert held the view
that consistency of mathematical theories guarantees the existence of the ob-
jects they are about. He put it as follows in a letter to Gottlob Frege:
119
CHAPTER 11. THE COMPLETENESS THEOREM
with a structure v for which we could prove, by induction, that all sentences
in Γ ∗ are true in it, and hence also all sentence in Γ since Γ ⊆ Γ ∗ . It turns
out that guaranteeing (a) and (b) is enough. A set of sentences for which (b)
holds is called complete. So our task will be to extend the consistent set Γ to a
consistent and complete set Γ ∗ .
So here’s what we’ll do. First we investigate the properties of complete
consistent sets, in particular we prove that a complete consistent set contains
ϕ ∧ ψ iff it contains both ϕ and ψ, ϕ ∨ ψ iff it contains at least one of them, etc.
(??). We’ll then take the consistent set Γ and show that it can be extended to a
consistent and complete set Γ ∗ (??). This set Γ ∗ is what we’ll use to define our
valuation v( Γ ∗ ). The valuation is determined by the propositional variables
in Γ ∗ (??). We’ll use the properties of complete consistent sets to show that
indeed v( Γ ∗ ) ϕ iff ϕ ∈ Γ ∗ (??), and thus in particular, v( Γ ∗ ) Γ.
1. If Γ ` ϕ, then ϕ ∈ Γ.
3. ϕ ∨ ψ ∈ Γ iff either ϕ ∈ Γ or ψ ∈ Γ.
4. ϕ → ψ ∈ Γ iff either ϕ ∈
/ Γ or ψ ∈ Γ.
Proof. Let us suppose for all of the following that Γ is complete and consistent.
1. If Γ ` ϕ, then ϕ ∈ Γ.
Suppose that Γ ` ϕ. Suppose to the contrary that ϕ ∈ / Γ. Since Γ is
complete, ¬ ϕ ∈ Γ. By ??????????????, Γ is inconsistent. This contradicts
the assumption that Γ is consistent. Hence, it cannot be the case that
ϕ∈/ Γ, so ϕ ∈ Γ.
2. Exercise.
4. Exercise.
Let Γ ∗ = n≥0 Γn .
S
complete.
4. ϕ ≡ ψ ∧ χ: exercise.
6. ϕ ≡ ψ → χ: exercise.
Corollary 11.7 (Completeness Theorem, Second Version). For all Γ and ϕ sen-
tences: if Γ ϕ then Γ ` ϕ.
Proof. Note that the Γ’s in ?? and ?? are universally quantified. To make sure
we do not confuse ourselves, let us restate ?? using a different variable: for
any set of sentences ∆, if ∆ is consistent, it is satisfiable. By contraposition, if ∆
is not satisfiable, then ∆ is inconsistent. We will use this to prove the corollary.
Suppose that Γ ϕ. Then Γ ∪ {¬ ϕ} is unsatisfiable by ??. Taking Γ ∪ {¬ ϕ}
as our ∆, the previous version of ?? gives us that Γ ∪ {¬ ϕ} is inconsistent. By
??????????????, Γ ` ϕ.
Theorem 11.9 (Compactness Theorem). The following hold for any sentences Γ
and ϕ:
2. ( ϕ ∨ ψ) ∈ Γ iff either ϕ ∈ Γ or ψ ∈ Γ.
3. ( ϕ → ψ) ∈ Γ iff either ϕ ∈
/ Γ or ψ ∈ Γ.
Lemma 11.11. Every finitely satisfiable set Γ can be extended to a complete and
finitely satisfiable set Γ ∗ .
Proof. If Γ is satisfiable, then there is a valuation v such that pSatvϕ for all
ϕ ∈ Γ. Of course, this v also satisfies every finite subset of Γ, so Γ is finitely
satisfiable.
Now suppose that Γ is finitely satisfiable. By ??, Γ can be extended to
a complete and finitely satisfiable set Γ ∗ . Construct the valuation v( Γ ∗ ) as in
??. The proof of the Truth Lemma (??) goes through if we replace references to
??.
Problems
Problem 11.1. Complete the proof of ??.
Problem 11.3. Use ?? to prove ??, thus showing that the two formulations of
the completeness theorem are equivalent.
Problem 11.4. In order for a derivation system to be complete, its rules must
be strong enough to prove every unsatisfiable set inconsistent. Which of the
rules of derivation were necessary to prove completeness? Are any of these
rules not used anywhere in the proof? In order to answer these questions,
make a list or diagram that shows which of the rules of derivation were used
in which results that lead up to the proof of ??. Be sure to note any tacit uses
of rules in these proofs.
Problem 11.7. Prove ??. (Hint: the crucial step is to show that if Γn is finitely
satisfiable, then either Γn ∪ { ϕn } or Γn ∪ {¬ ϕn } is finitely satisfiable.)
Problem 11.8. Write out the complete proof of the Truth Lemma (??) in the
version required for the proof of ??.
First-order Logic
127
CHAPTER 11. THE COMPLETENESS THEOREM
12.1 Introduction
In order to develop the theory and metatheory of first-order logic, we must
first define the syntax and semantics of its expressions. The expressions of
first-order logic are terms and formulas. Terms are formed from variables,
constant symbols, and function symbols. Formulas, in turn, are formed from
predicate symbols together with terms (these form the smallest, “atomic” for-
mulas), and then from atomic formulas we can form more complex ones us-
ing logical connectives and quantifiers. There are many different ways to set
down the formation rules; we give just one possible one. Other systems will
chose different symbols, will select different sets of connectives as primitive,
will use parentheses differently (or even not at all, as in the case of so-called
Polish notation). What all approaches have in common, though, is that the
formation rules define the set of terms and formulas inductively. If done prop-
erly, every expression can result essentially in only one way according to the
formation rules. The inductive definition resulting in expressions that are
uniquely readable means we can give meanings to these expressions using the
same method—inductive definition.
Giving the meaning of expressions is the domain of semantics. The central
concept in semantics is that of satisfaction in a structure. A structure gives
meaning to the building blocks of the language: a domain is a non-empty
set of objects. The quantifiers are interpreted as ranging over this domain,
constant symbols are assigned elements in the domain, function symbols are
assigned functions from the domain to itself, and predicate symbols are as-
signed relations on the domain. The domain together with assignments to the
basic vocabulary constitutes a structure. Variables may appear in formulas,
and in order to give a semantics, we also have to assign elements of the do-
main to them—this is a variable assignment. The satisfaction relation, finally,
brings these together. A formula may be satisfied in a structure M relative to a
variable assignment s, written as M, s ϕ. This relation is also defined by in-
129
CHAPTER 12. SYNTAX AND SEMANTICS
duction on the structure of ϕ, using the truth tables for the logical connectives
to define, say, satisfaction of ϕ ∧ ψ in terms of satisfaction (or not) of ϕ and
ψ. It then turns out that the variable assignment is irrelevant if the formula ϕ
is a sentence, i.e., has no free variables, and so we can talk of sentences being
simply satisfied (or not) in structures.
On the basis of the satisfaction relation M ϕ for sentences we can then
define the basic semantic notions of validity, entailment, and satisfiability. A
sentence is valid, ϕ, if every structure satisfies it. It is entailed by a set of
sentences, Γ ϕ, if every structure that satisfies all the sentences in Γ also
satisfies ϕ. And a set of sentences is satisfiable if some structure satisfies all
sentences in it at the same time. Because formulas are inductively defined,
and satisfaction is in turn defined by induction on the structure of formulas,
we can use induction to prove properties of our semantics and to relate the
semantic notions defined.
1. Logical symbols
Most of our definitions and results will be formulated for the full standard
language of first-order logic. However, depending on the application, we may
also restrict the language to only a few predicate symbols, constant symbols,
and function symbols.
Example 12.2. The language of set theory L Z contains only the single two-
place predicate symbol ∈.
Example 12.3. The language of orders L≤ contains only the two-place predi-
cate symbol ≤.
Again, these are conventions: officially, these are just aliases, e.g., <, ∈,
and ≤ are aliases for A20 , for c0 , 0 for f01 , + for f02 , × for f12 .
In addition to the primitive connectives and quantifiers introduced above,
we also use the following defined symbols: ↔ (biconditional), truth >
A defined symbol is not officially part of the language, but is introduced
as an informal abbreviation: it allows us to abbreviate formulas which would,
if we only used primitive symbols, get quite long. This is obviously an ad-
vantage. The bigger advantage, however, is that proofs become shorter. If a
symbol is primitive, it has to be treated separately in proofs. The more primi-
tive symbols, therefore, the longer our proofs.
You may be familiar with different terminology and symbols than the ones
we use above. Logic texts (and teachers) commonly use either ∼, ¬, and ! for
“negation”, ∧, ·, and & for “conjunction”. Commonly used symbols for the
“conditional” or “implication” are →, ⇒, and ⊃. Symbols for “biconditional,”
“bi-implication,” or “(material) equivalence” are ↔, ⇔, and ≡. The ⊥ sym-
bol is variously called “falsity,” “falsum,”, “absurdity,”, or “bottom.” The >
symbol is variously called “truth,” “verum,”, or “top.”
It is conventional to use lower case letters (e.g., a, b, c) from the begin-
ning of the Latin alphabet for constant symbols (sometimes called names),
and lower case letters from the end (e.g., x, y, z) for variables. Quantifiers
combine with variables, e.g., x; notational variations include ∀ x, (∀ x ), ( x ),
Πx, x for the universal quantifier and ∃ x, (∃ x ), ( Ex ), Σx, x for the existen-
V W
tial quantifier.
We might treat all the propositional operators and both quantifiers as prim-
itive symbols of the language. We might instead choose a smaller stock of
primitive symbols and treat the other logical operators as defined. “Truth
functionally complete” sets of Boolean operators include {¬, ∨}, {¬, ∧}, and
{¬, →}—these can be combined with either quantifier for an expressively
complete first-order language.
You may be familiar with two other logical operators: the Sheffer stroke |
(named after Henry Sheffer), and Peirce’s arrow ↓, also known as Quine’s
dagger. When given their usual readings of “nand” and “nor” (respectively),
these operators are truth functionally complete by themselves.
The constant symbols appear in our specification of the language and the
terms as a separate category of symbols, but they could instead have been in-
cluded as zero-place function symbols. We could then do without the second
clause in the definition of terms. We just have to understand f (t1 , . . . , tn ) as
just f by itself if n = 0.
1. ⊥ is an atomic formula.
The definitions of the set of terms and that of formulas are inductive defini-
tions. Essentially, we construct the set of formulas in infinitely many stages. In
the initial stage, we pronounce all atomic formulas to be formulas; this corre-
sponds to the first few cases of the definition, i.e., the cases for ⊥, R(t1 , . . . , tn )
and =(t1 , t2 ). “Atomic formula” thus means any formula of this form.
The other cases of the definition give rules for constructing new formulas
out of formulas already constructed. At the second stage, we can use them to
construct formulas out of atomic formulas. At the third stage, we construct
new formulas from the atomic formulas and those obtained in the second
stage, and so on. A formula is anything that is eventually constructed at such
a stage, and nothing else.
By convention, we write = between its arguments and leave out the paren-
theses: t1 = t2 is an abbreviation for =(t1 , t2 ). Moreover, ¬=(t1 , t2 ) is abbre-
viated as t1 6= t2 . When writing a formula (ψ ∗ χ) constructed from ψ, χ
using a two-place connective ∗, we will often leave out the outermost pair of
parentheses and write simply ψ ∗ χ.
Some logic texts require that the variable x must occur in ϕ in order for
∃ x ϕ and ∀ x ϕ to count as formulas. Nothing bad happens if you don’t require
this, and it makes things easier.
2. ϕ ↔ ψ abbreviates ( ϕ → ψ) ∧ (ψ → ϕ).
1. We take θ to be ϕ and θ → θ to be ψ.
2. We take ϕ to be θ → θ and ψ is θ.
Lemma 12.8. The number of left and right parentheses in a formula ϕ are equal.
7. ϕ ≡ ∃ x ψ: Similarly.
Proof. Exercise.
Proposition 12.11. If ϕ is an atomic formula, then it satisfes one, and only one of
the following conditions.
1. ϕ ≡ ⊥.
Proof. Exercise.
Proposition 12.12 (Unique Readability). Every formula satisfies one, and only one
of the following conditions.
1. ϕ is atomic.
6. ϕ is of the form ∀ x ψ.
7. ϕ is of the form ∃ x ψ.
Moreover, in each case ψ, or ψ and χ, are uniquely determined. This means that, e.g.,
there are no different pairs ψ, χ and ψ0 , χ0 so that ϕ is both of the form (ψ → χ) and
( ψ 0 → χ 0 ).
Proof. The formation rules require that if a formula is not atomic, it must start
with an opening parenthesis (, ¬, or with a quantifier. On the other hand,
every formula that start with one of the following symbols must be atomic:
a predicate symbol, a function symbol, a constant symbol, ⊥.
So we really only have to show that if ϕ is of the form (ψ ∗ χ) and also of
the form (ψ0 ∗0 χ0 ), then ψ ≡ ψ0 , χ ≡ χ0 , and ∗ = ∗0 .
So suppose both ϕ ≡ (ψ ∗ χ) and ϕ ≡ (ψ0 ∗0 χ0 ). Then either ψ ≡ ψ0 or not.
If it is, clearly ∗ = ∗0 and χ ≡ χ0 , since they then are substrings of ϕ that begin
in the same place and are of the same length. The other case is ψ 6≡ ψ0 . Since
ψ and ψ0 are both substrings of ϕ that begin at the same place, one must be a
proper prefix of the other. But this is impossible by ??.
12.6 Subformulas
It is often useful to talk about the formulas that “make up” a given formula.
We call these its subformulas. Any formula counts as a subformula of itself; a
subformula of ϕ other than ϕ itself is a proper subformula.
Definition 12.14 (Immediate Subformula). If ϕ is a formula, the immediate sub-
formulas of ϕ are defined inductively as follows:
1. Atomic formulas have no immediate subformulas.
2. ϕ ≡ ¬ψ: The only immediate subformula of ϕ is ψ.
3. ϕ ≡ (ψ ∗ χ): The immediate subformulas of ϕ are ψ and χ (∗ is any one
of the two-place connectives).
ψ is the scope of the first ∀v0 , χ is the scope of ∃v1 , and θ is the scope of the
second ∀v0 . The first ∀v0 binds the occurrences of v0 in ψ, ∃v1 the occurrence of
v1 in χ, and the second ∀v0 binds the occurrence of v0 in θ. The first occurrence
of v1 and the fourth occurrence of v0 are free in ϕ. The last occurrence of v0 is
free in θ, but bound in χ and ϕ.
12.8 Substitution
Definition 12.22 (Substitution in a term). We define s[t/x ], the result of sub-
stituting t for every occurrence of x in s, recursively:
1. s ≡ c: s[t/x ] is just s.
3. s ≡ x: s[t/x ] is t.
Example 12.24.
1. ϕ ≡ ⊥: ϕ[t/x ] is ⊥.
Note that substitution may be vacuous: If x does not occur in ϕ at all, then
ϕ[t/x ] is just ϕ.
The restriction that t must be free for x in ϕ is necessary to exclude cases
like the following. If ϕ ≡ ∃y x < y and t ≡ y, then ϕ[t/x ] would be ∃y y <
y. In this case the free variable y is “captured” by the quantifier ∃y upon
substitution, and that is undesirable. For instance, we would like it to be the
case that whenever ∀ x ψ holds, so does ψ[t/x ]. But consider ∀ x ∃y x < y (here
ψ is ∃y x < y). It is sentence that is true about, e.g., the natural numbers:
for every number x there is a number y greater than it. If we allowed y as a
possible substitution for x, we would end up with ψ[y/x ] ≡ ∃y y < y, which
is false. We prevent this by requiring that none of the free variables in t would
end up being bound by a quantifier in ϕ.
We often use the following convention to avoid cumbersume notation: If
ϕ is a formula with a free variable x, we write ϕ( x ) to indicate this. When it is
clear which ϕ and x we have in mind, and t is a term (assumed to be free for
x in ϕ( x )), then we write ϕ(t) as short for ϕ( x )[t/x ].
1. |N| = N
2. N = 0
Example 12.28. A structure M for the language L Z of set theory requires just
a set and a single-two place relation. So technically, e.g., the set of people plus
the relation “x is older than y” could be used as a structure for L Z , as well as
N together with n ≥ m for n, m ∈ N.
A particularly interesting structure for L Z in which the elements of the
domain are actually sets, and the interpretation of ∈ actually is the relation “x
is an element of y” is the structure HF of hereditarily finite sets:
1. t ≡ c: ValM M
s (t) = c .
2. t ≡ x: ValM
s ( t ) = s ( x ).
3. t ≡ f (t1 , . . . , tn ):
ValM M M M
s ( t ) = f (Vals ( t1 ), . . . , Vals ( tn )).
1. ϕ ≡ ⊥: M, s 2 ϕ.
3. ϕ ≡ t1 = t2 : M, s ϕ iff ValM M
s ( t1 ) = Vals ( t2 ).
4. ϕ ≡ ¬ψ: M, s ϕ iff M, s 2 ψ.
The variable assignments are important in the last two clauses. We cannot
define satisfaction of ∀ x ψ( x ) by “for all a ∈ |M|, M ψ( a).” We cannot define
satisfaction of ∃ x ψ( x ) by “for at least one a ∈ |M|, M ψ( a).” The reason
is that a is not symbol of the language, and so ψ( a) is not a formula (that is,
ψ[ a/x ] is undefined). We also cannot assume that we have constant symbols
or terms available that name every element of M, since there is nothing in the
definition of structures that requires it. Even in the standard language the set
of constant symbols is denumerable, so if |M| is not enumerable there aren’t
even enough constant symbols to name every object.
1. |M| = {1, 2, 3, 4}
2. aM = 1
3. bM = 2
4. f M ( x, y) = x + y if x + y ≤ 3 and = 3 otherwise.
ValM M M M
s ( f ( a, b )) = f (Vals ( a ), Vals ( b )).
ValM M
s ( f ( a, b )) = f (1, 2) = 1 + 2 = 3.
ValM M M M M
s ( f ( f ( a, b ), a )) = f (Vals ( f ( a, b )), Vals ( a )) = f (3, 1) = 3,
ValM M M M M
s ( f ( f ( a, b ), x )) = f (Vals ( f ( a, b )), Vals ( x )) = f (3, 1) = 3,
M, s R(b, x ) ∨ R( x, b) iff
M, s R(b, x ) or M, s R( x, b)
M, s ∃ x ( R(b, x ) ∨ R( x, b)),
M, s 2 ∃ x ( R(b, x ) ∧ R( x, b))
M, s ∀ x ( R( x, a) → R( a, x )),
M, s 2 ∀ x ( R( a, x ) → R( x, a))
∀ x ( R( a, x ) → ∃y R( x, y)).
M, s 2 ∃ x ( R( a, x ) ∧ ∀y R( x, y)).
Proof. By induction on the complexity of t. For the base case, t can be a con-
stant symbol or one one of the variables x1 , . . . , xn . If t = c, then ValMs1 ( t ) =
M M
c = Vals2 (t). If t = xi , s1 ( xi ) = s2 ( xi ) by the hypothesis of the proposition,
and so ValM M
s1 ( t ) = s1 ( xi ) = s2 ( xi ) = Vals2 ( t ).
For the inductive step, assume that t = f (t1 , . . . , tk ) and that the claim
holds for t1 , . . . , tk . Then
ValM M
s1 ( t ) = Vals1 ( f ( t1 , . . . , tk )) =
= f M (ValM M
s1 ( t1 ), . . . , Vals1 ( tk ))
ValM M
s1 ( t ) = Vals2 ( f ( t1 , . . . , tk )) =
= f M (ValM M
s1 ( t1 ), . . . , Vals1 ( tk )) =
= f M (ValM M
s2 ( t1 ), . . . , Vals2 ( tk )) =
= ValM M
s2 ( f ( t1 , . . . , tk )) = Vals2 ( t ).
Proof. We use induction on the complexity of ϕ. For the base case, where ϕ is
atomic, ϕ can be: ⊥, R(t1 , . . . , tk ) for a k-place predicate R and terms t1 , . . . , tk ,
or t1 = t2 for terms t1 and t2 .
1. ϕ ≡ ⊥: both M, s1 2 ϕ and M, s2 2 ϕ.
hValM M M
s1 ( t1 ), . . . , Vals1 ( tk )i ∈ R .
For i = 1, . . . , k, ValM M M M
s1 ( ti ) = Vals2 ( ti ) by ??. So we also have hVals2 ( ti ), . . . , Vals2 ( tk )i ∈
RM .
ValM M
s2 ( t1 ) = Vals1 ( t1 ) (by ??)
= ValM
s1 ( t 2 ) (since M, s1 t1 = t2 )
= ValM
s2 ( t 2 ) (by ??),
so M, s2 t1 = t2 .
2. ϕ ≡ ψ ∧ χ: exercise.
3. ϕ ≡ ψ ∨ χ: if M, s1 ϕ, then M, s1 ψ or M, s1 χ. By induction
hypothesis, M, s2 ψ or M, s2 χ, so M, s2 ϕ.
4. ϕ ≡ ψ → χ: exercise.
6. ϕ ≡ ∀ x ψ: exercise.
Proof. Exercise.
Proof. Exercise.
12.13 Extensionality
Extensionality, sometimes called relevance, can be expressed informally as fol-
lows: the only factors that bears upon the satisfaction of formula ϕ in a struc-
ture M relative to a variable assignment s, are the size of the domain and the
assignments made by M and s to the elements of the language that actually
appear in ϕ.
One immediate consequence of extensionality is that where two struc-
tures M and M0 agree on all the elements of the language appearing in a sen-
tence ϕ and have the same domain, M and M0 must also agree on whether or
not ϕ itself is true.
Then prove the proposition by induction on ϕ, making use of the claim just
proved for the induction basis (where ϕ is atomic).
Proof. By induction on t.
0
ValM
s ( t [ t /x ]) =
0 0
= ValM
s ( f ( t1 [ t /x ], . . . , tn [ t /x ]))
by definition of t[t0 /x ]
0 0
= f M (ValM M
s ( t1 [ t /x ]), . . . , Vals ( tn [ t /x ]))
by definition of ValM
s ( f ( . . . ))
= f M (ValM M
s0 ( t1 ), . . . , Vals0 ( tn ))
by induction hypothesis
= ValM M
s0 ( t ) by definition of Vals0 ( f ( . . . ))
Proof. Exercise.
Proof. For the forward direction, let ϕ be valid, and let Γ be a set of sentences.
Let M be a structure so that M Γ. Since ϕ is valid, M ϕ, hence Γ ϕ.
For the contrapositive of the reverse direction, let ϕ be invalid, so there is
a structure M with M 2 ϕ. When Γ = {>}, since > is valid, M Γ. Hence,
there is a structure M so that M Γ but M 2 ϕ, hence Γ does not entail ϕ.
Proof. For the forward direction, suppose Γ ϕ and suppose to the contrary
that there is a structure M so that M Γ ∪ {¬ ϕ}. Since M Γ and Γ ϕ,
M ϕ. Also, since M Γ ∪ {¬ ϕ}, M ¬ ϕ, so we have both M ϕ and
M 2 ϕ, a contradiction. Hence, there can be no such structure M, so Γ ∪ { ϕ}
is unsatisfiable.
For the reverse direction, suppose Γ ∪ {¬ ϕ} is unsatisfiable. So for every
structure M, either M 2 Γ or M ϕ. Hence, for every structure M with
M Γ, M ϕ, so Γ ϕ.
Proposition 12.54. Let M be a structure, and ϕ( x ) a formula with one free vari-
able x, and t a closed term. Then:
1. ϕ(t) ∃ x ϕ( x )
2. ∀ x ϕ( x ) ϕ(t)
2. Exercise.
Problems
Problem 12.1. Prove ??.
Problem 12.2. Prove ?? (Hint: Formulate and prove a version of ?? for terms.)
Problem 12.5. Let L = {c, f , A} with one constant symbol, one one-place
function symbol and one two-place predicate symbol, and let the structure M
be given by
1. |M| = {1, 2, 3}
2. cM = 3
1. ϕ ≡ ⊥: not M ||= ϕ.
3. ϕ ≡ d1 = d2 : M ||= ϕ iff dM M
1 = d2 .
8. ϕ ≡ ∀ x ψ: M ||= ϕ iff for all a ∈ |M|, M[ a/c] ||= ψ[c/x ], if c does not
occur in ψ.
Problem 12.10. Suppose that f is a function symbol not in ϕ( x, y). Show that
there is a structure M such that M ∀ x ∃y ϕ( x, y) iff there is an M0 such that
M0 ∀ x ϕ( x, f ( x )).
(This problem is a special case of what’s known as Skolem’s Theorem;
∀ x ϕ( x, f ( x )) is called a Skolem normal form of ∀ x ∃y ϕ( x, y).)
Problem 12.11. Carry out the proof of ?? in detail.
13.1 Introduction
The development of the axiomatic method is a significant achievement in the
history of science, and is of special importance in the history of mathemat-
ics. An axiomatic development of a field involves the clarification of many
questions: What is the field about? What are the most fundamental concepts?
How are they related? Can all the concepts of the field be defined in terms of
these fundamental concepts? What laws do, and must, these concepts obey?
The axiomatic method and logic were made for each other. Formal logic
provides the tools for formulating axiomatic theories, for proving theorems
from the axioms of the theory in a precisely specified way, for studying the
properties of all systems satisfying the axioms in a systematic way.
155
CHAPTER 13. THEORIES AND THEIR MODELS
2. We may fail in this respect because there are M such that M Γ, but M
is not one of the structures we intend. This may lead us to add axioms
which are not true in M.
3. If we are successful at least in the respect that Γ is true in all the intended
structures, then a sentence ϕ is true in all intended structures whenever
Γ ϕ. Thus we can use logical tools (such as proof methods) to show
that sentences are true in all intended structures simply by showing that
they are entailed by the axioms.
∀ x ( x · ) = x
∀ x ∀y ∀z ( x · (y · z)) = (( x · y) · z)
∀ x ∃y ( x · y) =
Example 13.6. The theory of Peano arithmetic is axiomatized by the following
sentences in the language of arithmetic L A .
¬∃ x x 0 =
∀ x ∀y ( x 0 = y0 → x = y)
∀ x ∀y ( x < y ↔ ∃z ( x + z0 = y))
∀ x ( x + ) = x
∀ x ∀y ( x + y0 ) = ( x + y)0
∀ x ( x × ) =
∀ x ∀y ( x × y0 ) = (( x × y) + x )
( ϕ() ∧ ∀ x ( ϕ( x ) → ϕ( x 0 ))) → ∀ x ϕ( x )
Since there are infinitely many sentences of the latter form, this axiom sys-
tem is infinite. The latter form is called the induction schema. (Actually, the
induction schema is a bit more complicated than we let on here.)
The third axiom is an explicit definition of <.
Example 13.7. The theory of pure sets plays an important role in the founda-
tions (and in the philosophy) of mathematics. A set is pure if all its elements
are also pure sets. The empty set counts therefore as pure, but a set that has
something as an element that is not a set would not be pure. So the pure sets
are those that are formed just from the empty set and no “urelements,” i.e.,
objects that are not themselves sets.
The following might be considered as an axiom system for a theory of pure
sets:
∃ x ¬∃y y ∈ x
∀ x ∀y (∀z(z ∈ x ↔ z ∈ y) → x = y)
∀ x ∀y ∃z ∀u (u ∈ z ↔ (u = x ∨ u = y))
∀ x ∃y ∀z (z ∈ y ↔ ∃u (z ∈ u ∧ u ∈ x ))
∃ x ∀y (y ∈ x ↔ ϕ(y))
The first axiom says that there is a set with no elements (i.e., ∅ exists); the
second says that sets are extensional; the third that for any sets X and Y, the
set { X, Y } exists; the fourth that for any sets X and Y, the set X ∪ Y exists.
The sentences mentioned last are collectively called the naive comprehension
scheme. It essentially says that for every ϕ( x ), the set { x : ϕ( x )} exists—so
at first glance a true, useful, and perhaps even necessary axiom. It is called
“naive” because, as it turns out, it makes this theory unsatisfiable: if you take
ϕ(y) to be ¬y ∈ y, you get the sentence
∃ x ∀y (y ∈ x ↔ ¬y ∈ y)
and this sentence is not satisfied in any structure.
Example 13.8. In the area of mereology, the relation of parthood is a funda-
mental relation. Just like theories of sets, there are theories of parthood that
axiomatize various conceptions (sometimes conflicting) of this relation.
The language of mereology contains a single two-place predicate sym-
bol P , and P ( x, y) “means” that x is a part of y. When we have this inter-
pretation in mind, a structure for this language is called a parthood structure.
Of course, not every structure for a single two-place predicate will really de-
serve this name. To have a chance of capturing “parthood,” P M must satisfy
some conditions, which we can lay down as axioms for a theory of parthood.
For instance, parthood is a partial order on objects: every object is a part (al-
beit an improper part) of itself; no two different objects can be parts of each
other; a part of a part of an object is itself part of that object. Note that in this
sense “is a part of” resembles “is a subset of,” but does not resemble “is an
element of” which is neither reflexive nor transitive.
∀ x P ( x, x ),
∀ x ∀y ((P ( x, y) ∧ P (y, x )) → x = y),
∀ x ∀y ∀z ((P ( x, y) ∧ P (y, z)) → P ( x, z)),
Moreover, any two objects have a mereological sum (an object that has these
two objects as parts, and is minimal in this respect).
Note that we have to involve variable assignments here: we can’t just say “Rab
iff M A20 ( a, b)” because a and b are not symbols of our language: they are
elements of |M|.
Since we don’t just have atomic formulas, but can combine them using
the logical connectives and the quantifiers, more complex formulas can define
other relations which aren’t directly built into M. We’re interested in how to
do that, and specifically, which relations we can define in a structure.
This idea is not just interesting in specific structures, but generally when-
ever we use a language to describe an intended model or models, i.e., when
we consider theories. These theories often only contain a few predicate sym-
bols as basic symbols, but in the domain they are used to describe often many
other relations play an important role. If these other relations can be system-
atically expressed by the relations that interpret the basic predicate symbols
of the language, we say we can define them in the language.
∀z (z ∈ x → z ∈ y)
∀ x ∀y ((∀z (z ∈ x → z ∈ y) ∧ ∀z (z ∈ y → z ∈ x )) → x = y).
∃ x (¬∃y y ∈ x ∧ ∀z x ⊆ z)
∀u ((u ∈ x ∨ u ∈ y) ↔ u ∈ z)
∀u (u ⊆ x ↔ u ∈ y)
since the elements of X ∪ Y are exactly the sets that are either elements of X or
elements of Y, and the elements of ℘( X ) are exactly the subsets of X. However,
this doesn’t allow us to use x ∪ y or ℘( x ) as if they were terms: we can only
use the entire formulas that define the relations X ∪ Y = Z and ℘( X ) = Y.
In fact, we do not know that these relations are ever satisfied, i.e., we do not
know that unions and power sets always exist. For instance, the sentence
∀ x ∃y ℘( x ) = y is another axiom of ZFC (the power set axiom).
Now what about talk of ordered pairs or functions? Here we have to ex-
plain how we can think of ordered pairs and functions as special kinds of sets.
One way to define the ordered pair h x, yi is as the set {{ x }, { x, y}}. But like
before, we cannot introduce a function symbol that names this set; we can
only define the relation h x, yi = z, i.e., {{ x }, { x, y}} = z:
∀u (u ∈ z ↔ (∀v (v ∈ u ↔ v = x ) ∨ ∀v (v ∈ u ↔ (v = x ∨ v = y))))
This says that the elements u of z are exactly those sets which either have x
as its only element or have x and y as its only elements (in other words, those
sets that are either identical to { x } or identical to { x, y}). Once we have this,
we can say further things, e.g., that X × Y = Z:
∀z (z ∈ Z ↔ ∃ x ∃y ( x ∈ X ∧ y ∈ Y ∧ h x, yi = z))
A function f : X → Y can be thought of as the relation f ( x ) = y, i.e., as
the set of pairs {h x, yi : f ( x ) = y}. We can then say that a set f is a function
from X to Y if (a) it is a relation ⊆ X × Y, (b) it is total, i.e., for all x ∈ X
there is some y ∈ Y such that h x, yi ∈ f and (c) it is functional, i.e., whenever
h x, yi, h x, y0 i ∈ f , y = y0 (because values of functions must be unique). So “ f
is a function from X to Y” can be written as:
∀u (u ∈ f → ∃ x ∃y ( x ∈ X ∧ y ∈ Y ∧ h x, yi = u)) ∧
∀ x ( x ∈ X → (∃y (y ∈ Y ∧ maps( f , x, y)) ∧
(∀y ∀y0 ((maps( f , x, y) ∧ maps( f , x, y0 )) → y = y0 )))
where maps( f , x, y) abbreviates ∃v (v ∈ f ∧ h x, yi = v) (this formula ex-
presses “ f ( x ) = y”).
It is now also not hard to express that f : X → Y is injective, for instance:
f : X → Y ∧ ∀ x ∀ x 0 (( x ∈ X ∧ x 0 ∈ X ∧
∃y (maps( f , x, y) ∧ maps( f , x 0 , y))) → x = x 0 )
∀ X ∀Y (℘( X ) = Y → ¬∃ f inj( f , Y, X ))
One might think that set theory requires another axiom that guarantees
the existence of a set for every defining property. If ϕ( x ) is a formula of set
theory with the variable x free, we can consider the sentence
∃y ∀ x ( x ∈ y ↔ ϕ( x )).
This sentence states that there is a set y whose elements are all and only those
x that satisfy ϕ( x ). This schema is called the “comprehension principle.” It
looks very useful; unfortunately it is inconsistent. Take ϕ( x ) ≡ ¬ x ∈ x, then
the comprehension principle states
∃y ∀ x ( x ∈ y ↔ x ∈
/ x ),
i.e., it states the existence of a set of all sets that are not elements of them-
selves. No such set can exist—this is Russell’s Paradox. ZFC, in fact, contains
a restricted—and consistent—version of this principle, the separation princi-
ple:
∀z ∃y ∀ x ( x ∈ y ↔ ( x ∈ z ∧ ϕ( x )).
ϕ ≥ n ≡ ∃ x1 ∃ x2 . . . ∃ x n ( x1 6 = x2 ∧ x1 6 = x3 ∧ x1 6 = x4 ∧ · · · ∧ x1 6 = x n ∧
x2 6 = x3 ∧ x2 6 = x4 ∧ · · · ∧ x2 6 = x n ∧
..
.
x n −1 6 = x n )
ϕ = n ≡ ∃ x1 ∃ x2 . . . ∃ x n ( x1 6 = x2 ∧ x1 6 = x3 ∧ x1 6 = x4 ∧ · · · ∧ x1 6 = x n ∧
x2 6 = x3 ∧ x2 6 = x4 ∧ · · · ∧ x2 6 = x n ∧
..
.
x n −1 6 = x n ∧
∀y (y = x1 ∨ . . . y = xn ) . . . ))
{ ϕ ≥1 , ϕ ≥2 , ϕ ≥3 , . . . }
Problems
Problem 13.1. Find formulas in L A which define the following relations:
1. n is between i and j;
Problem 13.2. Suppose the formula ϕ(v1 , v2 ) expresses the relation R ⊆ |M|2
in a structure M. Find formulas that express the following relations:
1. {0} is definable in N;
2. {1} is definable in N;
3. {2} is definable in N;
∃y ∀ x ( x ∈ y ↔ x ∈
/ x ) ` ⊥.
Derivation Systems
14.1 Introduction
Logics commonly have both a semantics and a derivation system. The seman-
tics concerns concepts such as truth, satisfiability, validity, and entailment.
The purpose of derivation systems is to provide a purely syntactic method
of establishing entailment and validity. They are purely syntactic in the sense
that a derivation in such a system is a finite syntactic object, usually a sequence
(or other finite arrangement) of sentences or formulas. Good derivation sys-
tems have the property that any given sequence or arrangement of sentences
or formulas can be verified mechanically to be “correct.”
The simplest (and historically first) derivation systems for first-order logic
were axiomatic. A sequence of formulas counts as a derivation in such a sys-
tem if each individual formula in it is either among a fixed set of “axioms”
or follows from formulas coming before it in the sequence by one of a fixed
number of “inference rules”—and it can be mechanically verified if a formula
is an axiom and whether it follows correctly from other formulas by one of
the inference rules. Axiomatic proof systems are easy to describe—and also
easy to handle meta-theoretically—but derivations in them are hard to read
and understand, and are also hard to produce.
Other derivation systems have been developed with the aim of making it
easier to construct derivations or easier to understand derivations once they
are complete. Examples are natural deduction, truth trees, also known as
tableaux proofs, and the sequent calculus. Some derivation systems are de-
166
14.1. INTRODUCTION
1. ` ϕ if and only if ϕ
2. Γ ` ϕ if and only if Γ ϕ
The “only if” direction of the above is called soundness. A derivation system is
sound if derivability guarantees entailment (or validity). Every decent deriva-
tion system has to be sound; unsound derivation systems are not useful at all.
After all, the entire purpose of a derivation is to provide a syntactic guarantee
of validity or entailment. We’ll prove soundness for the derivation systems
we present.
The converse “if” direction is also important: it is called completeness. A
complete derivation system is strong enough to show that ϕ is a theorem
whenever ϕ is valid, and that there Γ ` ϕ whenever Γ ϕ. Completeness
is harder to establish, and some logics have no complete derivation systems.
First-order logic does. Kurt Gödel was the first one to prove completeness for
a derivation system of first-order logic in his 1929 dissertation.
Another concept that is connected to derivation systems is that of consis-
tency. A set of sentences is called inconsistent if anything whatsoever can be
derived from it, and consistent otherwise. Inconsistency is the syntactic coun-
terpart to unsatisfiablity: like unsatisfiable sets, inconsistent sets of sentences
do not make good theories, they are defective in a fundamental way. Con-
sistent sets of sentences may not be true or useful, but at least they pass that
minimal threshold of logical usefulness. For different derivation systems the
specific definition of consistency of sets of sentences might differ, but like `,
we want consistency to coincide with its semantic counterpart, satisfiability.
We want it to always be the case that Γ is consistent if and only if it is satis-
fiable. Here, the “if” direction amounts to completeness (consistency guaran-
tees satisfiability), and the “only if” direction amounts to soundness (satisfi-
ability guarantees consistency). In fact, for classical first-order logic, the two
versions of soundness and completeness are equivalent.
ϕ ⇒ ϕ
ϕ∧ψ ⇒ ϕ
∧L
→R
⇒ ( ϕ ∧ ψ) → ϕ
[ ϕ ∧ ψ ]1
ϕ ∧Elim
1 →Intro
( ϕ ∧ ψ) → ϕ
14.4 Tableaux
T ϕ or F ϕ.
{F ϕ, Tψ1 , . . . , Tψn }
1. F ( ϕ ∧ ψ) → ϕ Assumption
2. Tϕ ∧ ψ →F 1
3. Fϕ →F 1
4. Tϕ →T 2
5. Tψ →T 2
⊗
1. ϕ is an axiom, or
ϕ → (ψ → ϕ) ψ → (ψ ∨ χ) (ψ ∧ χ) → ψ
are common axioms that govern →, ∨ and ∧. Some axiom systems aim at a
minimal number of axioms. Depending on the connectives that are taken as
primitives, it is even possible to find axiom systems that consist of a single
axiom.
A rule of inference is a conditional statement that gives a sufficient condi-
tion for a sentence in a derivation to be justified. Modus ponens is one very
common such rule: it says that if ϕ and ϕ → ψ are already justified, then ψ is
justified. This means that a line in a derivation containing the sentence ψ is
justified, provided that both ϕ and ϕ → ψ (for some sentence ϕ) appear in the
derivation before ψ.
The ` relation based on axiomatic derivations is defined as follows: Γ ` ϕ
iff there is a derivation with the sentence ϕ as its last formula (and Γ is taken
as the set of sentences in that derivation which are justified by (2) above). ϕ
is a theorem if ϕ has a derivation where Γ is empty, i.e., every sentence in the
derivation is justfied either by (1) or (3). For instance, here is a derivation that
shows that ` ϕ → (ψ → (ψ ∨ ϕ)):
1. ψ → (ψ ∨ ϕ)
2. (ψ → (ψ ∨ ϕ)) → ( ϕ → (ψ → (ψ ∨ ϕ)))
3. ϕ → (ψ → (ψ ∨ ϕ))
The sentence on line 1 is of the form of the axiom ϕ → ( ϕ ∨ ψ) (with the roles
of ϕ and ψ reversed). The sentence on line 2 is of the form of the axiom ϕ →
(ψ → ϕ). Thus, both lines are justified. Line 3 is justified by modus ponens: if
we abbreviate it as θ, then line 2 has the form χ → θ, where χ is ψ → (ψ ∨ ϕ),
i.e., line 1.
A set Γ is inconsistent if Γ ` ⊥. A complete axiom system will also prove
that ⊥ → ϕ for any ϕ, and so if Γ is inconsistent, then Γ ` ϕ for any ϕ.
Systems of axiomatic derivations for logic were first given by Gottlob Frege
in his 1879 Begriffsschrift, which for this reason is often considered the first
work of modern logic. They were perfected in Alfred North Whitehead and
Bertrand Russell’s Principia Mathematica and by David Hilbert and his stu-
dents in the 1920s. They are thus often called “Frege systems” or “Hilbert
systems.” They are very versatile in that it is often easy to find an axiomatic
system for a logic. Because derivations have a very simple structure and only
one or two inference rules, it is also relatively easy to prove things about them.
However, they are very hard to use in practice, i.e., it is difficult to find and
write proofs.
Γ⇒∆
where Γ and ∆ are finite (possibly empty) sequences of sentences of the lan-
guage L. Γ is called the antecedent, while ∆ is the succedent.
The intuitive idea behind a sequent is: if all of the sentences in the an-
tecedent hold, then at least one of the sentences in the succedent holds. That
is, if Γ = h ϕ1 , . . . , ϕm i and ∆ = hψ1 , . . . , ψn i, then Γ ⇒ ∆ holds iff
( ϕ1 ∧ · · · ∧ ϕm ) → (ψ1 ∨ · · · ∨ ψn )
holds. There are two special cases: where Γ is empty and when ∆ is empty.
When Γ is empty, i.e., m = 0, ⇒ ∆ holds iff ψ1 ∨ · · · ∨ ψn holds. When ∆ is
empty, i.e., n = 0, Γ ⇒ holds iff ¬( ϕ1 ∧ · · · ∧ ϕm ) does. We say a sequent is
valid iff the corresponding sentence is valid.
If Γ is a sequence of sentences, we write Γ, ϕ for the result of appending
ϕ to the right end of Γ (and ϕ, Γ for the result of appending ϕ to the left end
of Γ). If ∆ is a sequence of sentences also, then Γ, ∆ is the concatenation of the
two sequences.
173
CHAPTER 15. THE SEQUENT CALCULUS
1. ϕ ⇒ ϕ
2. ⊥ ⇒
Rules for ¬
Γ ⇒ ∆, ϕ ϕ, Γ ⇒ ∆
¬L ¬R
¬ ϕ, Γ ⇒ ∆ Γ ⇒ ∆, ¬ ϕ
Rules for ∧
ϕ, Γ ⇒ ∆
∧L
ϕ ∧ ψ, Γ ⇒ ∆ Γ ⇒ ∆, ϕ Γ ⇒ ∆, ψ
∧R
ψ, Γ ⇒ ∆ Γ ⇒ ∆, ϕ ∧ ψ
∧L
ϕ ∧ ψ, Γ ⇒ ∆
Rules for ∨
Γ ⇒ ∆, ϕ
∨R
ϕ, Γ ⇒ ∆ ψ, Γ ⇒ ∆ Γ ⇒ ∆, ϕ ∨ ψ
∨L
ϕ ∨ ψ, Γ ⇒ ∆ Γ ⇒ ∆, ψ
∨R
Γ ⇒ ∆, ϕ ∨ ψ
Rules for →
Γ ⇒ ∆, ϕ ψ, Π ⇒ Λ ϕ, Γ ⇒ ∆, ψ
→L →R
ϕ → ψ, Γ, Π ⇒ ∆, Λ Γ ⇒ ∆, ϕ → ψ
Rules for ∀
ϕ ( t ), Γ ⇒ ∆ Γ ⇒ ∆, ϕ( a)
∀L ∀R
∀ x ϕ ( x ), Γ ⇒ ∆ Γ ⇒ ∆, ∀ x ϕ( x )
Rules for ∃
ϕ ( a ), Γ ⇒ ∆ Γ ⇒ ∆, ϕ(t)
∃L ∃R
∃ x ϕ ( x ), Γ ⇒ ∆ Γ ⇒ ∆, ∃ x ϕ( x )
Again, t is a closed term, and a is a constant symbol which does not occur in
the lower sequent of the ∃L rule. We call a the eigenvariable of the ∃L inference.
The condition that an eigenvariable not occur in the lower sequent of the
∀R or ∃L inference is called the eigenvariable condition.
We use the term “eigenvariable” even though a in the above rules is a con-
stant symbol. This has historical reasons.
In ∃R and ∀L there are no restrictions on the term t. On the other hand,
in the ∃L and ∀R rules, the eigenvariable condition requires that the constant
symbol a does not occur anywhere outside of ϕ( a) in the upper sequent. It is
necessary to ensure that the system is sound, i.e., only derives sequents that
are valid. Without this condition, the following would be allowed:
ϕ( a) ⇒ ϕ( a) ϕ( a) ⇒ ϕ( a)
*∃L *∀R
∃ x ϕ( x ) ⇒ ϕ( a) ϕ( a) ⇒ ∀ x ϕ( x )
∀R ∃L
∃ x ϕ( x ) ⇒ ∀ x ϕ( x ) ∃ x ϕ( x ) ⇒ ∀ x ϕ( x )
However, ∃ x ϕ( x ) ⇒ ∀ x ϕ( x ) is not valid.
Weakening
Γ ⇒ ∆ Γ ⇒ ∆
WL WR
ϕ, Γ ⇒ ∆ Γ ⇒ ∆, ϕ
Contraction
ϕ, ϕ, Γ ⇒ ∆ Γ ⇒ ∆, ϕ, ϕ
CL CR
ϕ, Γ ⇒ ∆ Γ ⇒ ∆, ϕ
Exchange
Γ, ϕ, ψ, Π ⇒ ∆ Γ ⇒ ∆, ϕ, ψ, Λ
XL XR
Γ, ψ, ϕ, Π ⇒ ∆ Γ ⇒ ∆, ψ, ϕ, Λ
Γ ⇒ ∆, ϕ ϕ, Π ⇒ Λ
Cut
Γ, Π ⇒ ∆, Λ
15.5 Derivations
We’ve said what an initial sequent looks like, and we’ve given the rules of
inference. Derivations in the sequent calculus are inductively generated from
these: each derivation either is an initial sequent on its own, or consists of one
or two derivations followed by an inference.
We then say that S is the end-sequent of the derivation and that S is derivable in
LK (or LK-derivable).
Γ ⇒ ∆
WL
ϕ, Γ ⇒ ∆
The rule, however, is meant to be general: we can replace the ϕ in the rule
with any sentence, e.g., also with θ. If the premise matches our initial sequent
χ ⇒ χ, that means that both Γ and ∆ are just χ, and the conclusion would
then be θ, χ ⇒ χ. So, the following is a derivation:
χ ⇒ χ
WL
θ, χ ⇒ χ
We can now apply another rule, say XL, which allows us to switch two sen-
tences on the left. So, the following is also a correct derivation:
χ ⇒ χ
WL
θ, χ ⇒ χ
XL
χ, θ ⇒ χ
In this application of the rule, which was given as
Γ, ϕ, ψ, Π ⇒ ∆
XL
Γ, ψ, ϕ, Π ⇒ ∆,
both Γ and Π were empty, ∆ is χ, and the roles of ϕ and ψ are played by θ
and χ, respectively. In much the same way, we also see that
θ ⇒ θ
WL
χ, θ ⇒ θ
is a derivation. Now we can take these two derivations, and combine them
using ∧R. That rule was
Γ ⇒ ∆, ϕ Γ ⇒ ∆, ψ
∧R
Γ ⇒ ∆, ϕ ∧ ψ
In our case, the premises must match the last sequents of the derivations end-
ing in the premises. That means that Γ is χ, θ, ∆ is empty, ϕ is χ and ψ is θ. So
the conclusion, if the inference should be correct, is χ, θ ⇒ χ ∧ θ. Of course,
we can also reverse the premises, then ϕ would be θ and ψ would be χ. So
both of the following are correct derivations.
χ ⇒ χ χ ⇒ χ
WL WL
θ, χ ⇒ χ θ ⇒ θ θ ⇒ θ θ, χ ⇒ χ
XL WL WL XL
χ, θ ⇒ χ χ, θ ⇒ θ χ, θ ⇒ θ χ, θ ⇒ χ
∧R ∧R
χ, θ ⇒ χ ∧ θ χ, θ ⇒ θ ∧ χ
ϕ∧ψ ⇒ ϕ
Next, we need to figure out what kind of inference could have a lower sequent
of this form. This could be a structural rule, but it is a good idea to start by
looking for a logical rule. The only logical connective occurring in the lower
sequent is ∧, so we’re looking for an ∧ rule, and since the ∧ symbol occurs in
the antecedent, we’re looking at the ∧L rule.
ϕ∧ψ ⇒ ϕ
∧L
There are two options for what could have been the upper sequent of the ∧L
inference: we could have an upper sequent of ϕ ⇒ ϕ, or of ψ ⇒ ϕ. Clearly,
ϕ ⇒ ϕ is an initial sequent (which is a good thing), while ψ ⇒ ϕ is not
derivable in general. We fill in the upper sequent:
ϕ ⇒ ϕ
ϕ∧ψ ⇒ ϕ
∧L
¬ϕ ∨ ψ ⇒ ϕ → ψ
To find a logical rule that could give us this end-sequent, we look at the log-
ical connectives in the end-sequent: ¬, ∨, and →. We only care at the mo-
ment about ∨ and → because they are main operators of sentences in the end-
sequent, while ¬ is inside the scope of another connective, so we will take care
of it later. Our options for logical rules for the final inference are therefore the
∨L rule and the →R rule. We could pick either rule, really, but let’s pick the
→R rule (if for no reason other than it allows us to put off splitting into two
branches). According to the form of →R inferences which can yield the lower
sequent, this must look like:
ϕ, ¬ ϕ ∨ ψ ⇒ ψ
¬ ϕ ∨ ψ ⇒ ϕ → ψ →R
If we move ¬ ϕ ∨ ψ to the outside of the antecedent, we can apply the ∨L
rule. According to the schema, this must split into two upper sequents as
follows:
¬ ϕ, ϕ ⇒ ψ ψ, ϕ ⇒ ψ
¬ ϕ ∨ ψ, ϕ ⇒ ψ ∨L
ϕ, ¬ ϕ ∨ ψ ⇒ ψ XR
¬ϕ ∨ ψ ⇒ ϕ → ψ →R
Remember that we are trying to wind our way up to initial sequents; we seem
to be pretty close! The right branch is just one weakening and one exchange
away from an initial sequent and then it is done:
ψ ⇒ ψ
WL
ϕ, ψ ⇒ ψ
XL
¬ ϕ, ϕ ⇒ ψ ψ, ϕ ⇒ ψ
¬ ϕ ∨ ψ, ϕ ⇒ ψ ∨L
XR
ϕ, ¬ ϕ ∨ ψ ⇒ ψ
¬ϕ ∨ ψ ⇒ ϕ → ψ →R
Now looking at the left branch, the only logical connective in any sentence
is the ¬ symbol in the antecedent sentences, so we’re looking at an instance of
the ¬L rule.
ψ ⇒ ψ
WL
ϕ ⇒ ψ, ϕ ϕ, ψ ⇒ ψ
¬ ϕ, ϕ ⇒ ψ ¬L ψ, ϕ ⇒ ψ
XL
¬ ϕ ∨ ψ, ϕ ⇒ ψ
∨L
XR
ϕ, ¬ ϕ ∨ ψ ⇒ ψ
¬ϕ ∨ ψ ⇒ ϕ→ψ
→R
Similarly to how we finished off the right branch, we are just one weakening
and one exchange away from finishing off this left branch as well.
ϕ ⇒ ϕ
ϕ ⇒ ϕ, ψ WR ψ ⇒ ψ
ϕ ⇒ ψ, ϕ XR ϕ, ψ ⇒ ψ
WL
¬ ϕ, ϕ ⇒ ψ ¬L ψ, ϕ ⇒ ψ
XL
¬ ϕ ∨ ψ, ϕ ⇒ ψ
∨L
XR
ϕ, ¬ ϕ ∨ ψ ⇒ ψ
¬ϕ ∨ ψ ⇒ ϕ→ψ
→R
¬ ϕ ∨ ¬ψ ⇒ ¬( ϕ ∧ ψ)
The available main connectives of sentences in the end-sequent are the ∨ sym-
bol and the ¬ symbol. It would work to apply either the ∨L or the ¬R rule
here, but we start with the ¬R rule because it avoids splitting up into two
branches for a moment:
ϕ ∧ ψ, ¬ ϕ ∨ ¬ψ ⇒
¬R
¬ ϕ ∨ ¬ψ ⇒ ¬( ϕ ∧ ψ)
Now we have a choice of whether to look at the ∧L or the ∨L rule. Let’s see
what happens when we apply the ∧L rule: we have a choice to start with
either the sequent ϕ, ¬ ϕ ∨ ψ ⇒ or the sequent ψ, ¬ ϕ ∨ ψ ⇒ . Since the
proof is symmetric with regards to ϕ and ψ, let’s go with the former:
ϕ, ¬ ϕ ∨ ¬ψ ⇒
ϕ ∧ ψ, ¬ ϕ ∨ ¬ψ ⇒
∧L
¬R
¬ ϕ ∨ ¬ψ ⇒ ¬( ϕ ∧ ψ)
Continuing to fill in the derivation, we see that we run into a problem:
?
ϕ ⇒ ϕ ϕ ⇒ ψ
¬ ϕ, ϕ ⇒ ¬L ¬ψ, ϕ ⇒ ¬L
¬ ϕ ∨ ¬ψ, ϕ ⇒ ∨ L
ϕ, ¬ ϕ ∨ ¬ψ ⇒ XL
ϕ ∧ ψ, ¬ ϕ ∨ ¬ψ ⇒ ∧L
¬R
¬ ϕ ∨ ¬ψ ⇒ ¬( ϕ ∧ ψ)
The top of the right branch cannot be reduced any further, and it cannot be
brought by way of structural inferences to an initial sequent, so this is not the
right path to take. So clearly, it was a mistake to apply the ∧L rule above.
Going back to what we had before and carrying out the ∨L rule instead, we
get
¬ ϕ, ϕ ∧ ψ ⇒ ¬ψ, ϕ ∧ ψ ⇒
¬ ϕ ∨ ¬ψ, ϕ ∧ ψ ⇒ ∨L
XL
ϕ ∧ ψ, ¬ ϕ ∨ ¬ψ ⇒
¬R
¬ ϕ ∨ ¬ψ ⇒ ¬( ϕ ∧ ψ)
Completing each branch as we’ve done before, we get
ϕ ⇒ ϕ ψ ⇒ ψ
ϕ∧ψ ⇒ ϕ
∧L ϕ∧ψ ⇒ ψ
∧L
¬ ϕ, ϕ ∧ ψ ⇒ ¬ L
¬ψ, ϕ ∧ ψ ⇒ ¬L
¬ ϕ ∨ ¬ψ, ϕ ∧ ψ ⇒ ∨ L
XL
ϕ ∧ ψ, ¬ ϕ ∨ ¬ψ ⇒
¬R
¬ ϕ ∨ ¬ψ ⇒ ¬( ϕ ∧ ψ)
(We could have carried out the ∧ rules lower than the ¬ rules in these steps
and still obtained a correct derivation).
Example 15.8. So far we haven’t used the contraction rule, but it is sometimes
required. Here’s an example where that happens. Suppose we want to prove
⇒ A ∨ ¬ ϕ. Applying ∨R backwards would give us one of these two deriva-
tions:
ϕ ⇒
⇒ ϕ
⇒ ¬ ϕ ¬R
⇒ ϕ ∨ ¬ ϕ ∨R
⇒ ϕ ∨ ¬ ϕ ∨R
Neither of these of course ends in an initial sequent. The trick is to realize that
the contraction rule allows us to combine two copies of a sentence into one—
and when we’re searching for a proof, i.e., going from bottom to top, we can
keep a copy of ϕ ∨ ¬ ϕ in the premise, e.g.,
⇒ ϕ ∨ ¬ ϕ, ϕ
⇒ ϕ ∨ ¬ ϕ, ϕ ∨ ¬ ϕ ∨R
⇒ ϕ ∨ ¬ϕ CR
Now we can apply ∨R a second time, and also get ¬ ϕ, which leads to a com-
plete derivation.
ϕ ⇒ ϕ
⇒ ϕ, ¬ ϕ ¬R
⇒ ϕ, ϕ ∨ ¬ ϕ ∨R
⇒ ϕ ∨ ¬ ϕ, ϕ XR
⇒ ϕ ∨ ¬ ϕ, ϕ ∨ ¬ ϕ ∨R
⇒ ϕ ∨ ¬ϕ CR
∃ x ¬ ϕ( x ) ⇒ ¬∀ x ϕ( x )
We could either carry out the ∃L rule or the ¬R rule. Since the ∃L rule is
subject to the eigenvariable condition, it’s a good idea to take care of it sooner
rather than later, so we’ll do that one first.
¬ ϕ( a) ⇒ ¬∀ x ϕ( x )
∃L
∃ x ¬ ϕ( x ) ⇒ ¬∀ x ϕ( x )
Applying the ¬L and ¬R rules backwards, we get
∀ x ϕ( x ) ⇒ ϕ( a)
¬L
¬ ϕ ( a ), ∀ x ϕ ( x ) ⇒
XL
∀ x ϕ ( x ), ¬ ϕ ( a ) ⇒
¬R
¬ ϕ( a) ⇒ ¬∀ xϕ( x )
∃L
∃ x ¬ ϕ( x ) ⇒ ¬∀ xϕ( x )
At this point, our only option is to carry out the ∀L rule. Since this rule is not
subject to the eigenvariable restriction, we’re in the clear. Remember, we want
to try and obtain an initial sequent (of the form ϕ( a) ⇒ ϕ( a)), so we should
choose a as our argument for ϕ when we apply the rule.
ϕ( a) ⇒ ϕ( a)
∀L
∀ x ϕ( x ) ⇒ ϕ( a)
¬L
¬ ϕ ( a ), ∀ x ϕ ( x ) ⇒
XL
∀ x ϕ ( x ), ¬ ϕ ( a ) ⇒
¬R
¬ ϕ( a) ⇒ ¬∀ x ϕ( x )
∃L
∃ x ¬ ϕ( x ) ⇒ ¬∀ x ϕ( x )
This section collects the definitions of the provability relation and con-
sistency for natural deduction.
Because of the contraction, weakening, and exchange rules, the order and
number of sentences in Γ00 does not matter: if a sequent Γ00 ⇒ ϕ is deriv-
able, then so is Γ000 ⇒ ϕ for any Γ000 that contains the same sentences as Γ00 .
For instance, if Γ0 = {ψ, χ} then both Γ00 = hψ, ψ, χi and Γ000 = hχ, χ, ψi are
sequences containing just the sentences in Γ0 . If a sequent containing one is
derivable, so is the other, e.g.:
ψ, ψ, χ ⇒ ϕ
CL
ψ, χ ⇒ ϕ
XL
χ, ψ ⇒ ϕ
WL
χ, χ, ψ ⇒ ϕ
From now on we’ll say that if Γ0 is a finite set of sentences then Γ0 ⇒ ϕ is
any sequent where the antecedent is a sequence of sentences in Γ0 and tacitly
include contractions, exchanges, and weakenings if necessary.
π0 π1
Γ0 ⇒ ϕ ϕ, ∆ 0 ⇒ ψ
Cut
Γ0 , ∆ 0 ⇒ ψ
Since Γ0 ∪ ∆ 0 ⊆ Γ ∪ ∆, this shows Γ ∪ ∆ ` ψ.
Proof. Exercise.
π0 π1
Γ0 ⇒ ϕ ϕ, Γ1 ⇒
Cut
Γ0 , Γ1 ⇒
Since Γ0 ⊆ Γ and Γ1 ⊆ Γ, Γ0 ∪ Γ1 ⊆ Γ, hence Γ is inconsistent.
π1
ϕ ⇒ ϕ
⇒ ϕ, ¬ ϕ ¬R ¬ ϕ, Γ ⇒
Cut
Γ ⇒ ϕ
π ϕ ⇒ ϕ
¬ ϕ, ϕ ⇒ ¬L
Γ0 ⇒ ϕ ϕ, ¬ ϕ ⇒ XL
Cut
Γ, ¬ ϕ ⇒
Since ¬ ϕ ∈ Γ and Γ0 ⊆ Γ, this shows that Γ is inconsistent.
π0
π1
ϕ, Γ0 ⇒
¬R
Γ0 ⇒ ¬ ϕ ¬ ϕ, Γ1 ⇒
Cut
Γ0 , Γ1 ⇒
Since Γ0 ⊆ Γ and Γ1 ⊆ Γ, Γ0 ∪ Γ1 ⊆ Γ. Hence Γ is inconsistent.
2. ϕ, ψ ` ϕ ∧ ψ.
ϕ ⇒ ϕ ψ ⇒ ψ
ϕ∧ψ ⇒ ϕ
∧L ∧L
ϕ∧ψ ⇒ ψ
ϕ ⇒ ϕ ψ ⇒ ψ
ϕ, ψ ⇒ ϕ ∧ ψ
∧R
2. Both ϕ ` ϕ ∨ ψ and ψ ` ϕ ∨ ψ.
ϕ ⇒ ϕ ψ ⇒ ψ
¬ ϕ, ϕ ⇒ ¬L ¬ψ, ψ ⇒ ¬L
ϕ, ¬ ϕ, ¬ψ ⇒ ψ, ¬ ϕ, ¬ψ ⇒
ϕ ∨ ψ, ¬ ϕ, ¬ψ ⇒
∨L
ϕ ⇒ ϕ ψ ⇒ ψ
ϕ ⇒ ϕ∨ψ
∨R ∨R
ψ ⇒ ϕ∨ψ
Proposition 15.24. 1. ϕ, ϕ → ψ ` ψ.
2. Both ¬ ϕ ` ϕ → ψ and ψ ` ϕ → ψ.
ϕ ⇒ ϕ ψ ⇒ ψ
ϕ → ψ, ϕ ⇒ ψ
→L
ϕ ⇒ ϕ
¬ ϕ, ϕ ⇒ ¬L ψ ⇒ ψ
ϕ, ¬ ϕ ⇒ XL WL
ϕ, ψ ⇒ ψ
ϕ, ¬ ϕ ⇒ ψ WR ψ ⇒ ϕ→ψ
→R
¬ϕ ⇒ ϕ → ψ →R
2. ∀ x ϕ( x ) ` ϕ(t).
ϕ(t) ⇒ ϕ(t)
∃R
ϕ(t) ⇒ ∃ x ϕ( x )
ϕ(t) ⇒ ϕ(t)
∀L
∀ x ϕ( x ) ⇒ ϕ(t)
15.12 Soundness
A derivation system, such as the sequent calculus, is sound if it cannot de-
rive things that do not actually hold. Soundness is thus a kind of guaranteed
safety property for derivation systems. Depending on which proof theoretic
property is in question, we would like to know for instance, that
Γ ⇒ ∆ Γ ⇒ ∆
WL WR
ϕ, Γ ⇒ ∆ Γ ⇒ ∆, ϕ
2. The last inference is ¬L: Then the premise of the last inference is Γ ⇒
∆, ϕ and the conclusion is ¬ ϕ, Γ ⇒ ∆, i.e., the derivation ends in
Γ ⇒ ∆, ϕ
¬L
¬ ϕ, Γ ⇒ ∆
and Θ = ¬ ϕ, Γ while Ξ = ∆.
The induction hypothesis tells us that Γ ⇒ ∆, ϕ is valid, i.e., for every
M, either (a) for some χ ∈ Γ, M 2 χ, or (b) for some χ ∈ ∆, M χ, or (c)
M ϕ. We want to show that Θ ⇒ Ξ is also valid. Let M be a structure.
If (a) holds, then there is χ ∈ Γ so that M 2 ϕ, but ϕ ∈ Θ as well. If
(b) holds, there is χ ∈ ∆ such that M χ, but χ ∈ Ξ as well. Finally, if
M ϕ, then M 2 ¬ ϕ. Since ¬ ϕ ∈ Θ, there is χ ∈ Θ such that M 2 χ.
Consequently, Θ ⇒ Ξ is valid.
4. The last inference is ∧L: There are two variants: ϕ ∧ ψ may be inferred
on the left from ϕ or from ψ on the left side of the premise. In the first
case, the π ends in
ϕ, Γ ⇒ ∆
∧L
ϕ ∧ ψ, Γ ⇒ ∆
5. The last inference is ∨R: There are two variants: ϕ ∨ ψ may be inferred
on the right from ϕ or from ψ on the right side of the premise. In the first
case, π ends in
Γ ⇒ ∆, ϕ
∨R
Γ ⇒ ∆, ϕ ∨ ψ
ϕ, Γ ⇒ ∆, ϕ
→R
Γ ⇒ ∆, ϕ → ψ
Again, the induction hypothesis says that the premise is valid; we want
to show that the conclusion is valid as well. Let M be arbitrary. Since
ϕ, Γ ⇒ ∆, ψ is valid, at least one of the following cases obtains: (a) M 2
ϕ, (b) M ψ, (c) M 2 χ for some χ ∈ Γ, or (c) M χ for some χ ∈ ∆.
In cases (a) and (b), M ϕ → ψ and so there is a χ ∈ ∆, ϕ → ψ such that
M χ. In case (c), for some χ ∈ Γ, M 2 χ. In case (d), for some χ ∈ ∆,
M χ. In each case, M satisfies Γ ⇒ ∆, ϕ → ψ. Since M was arbitrary,
Γ ⇒ ∆, ϕ → ψ is valid.
7. The last inference is ∀L: Then there is a formula ϕ( x ) and a closed term t
such that π ends in
ϕ ( t ), Γ ⇒ ∆
∀L
∀ x ϕ ( x ), Γ ⇒ ∆
Γ ⇒ ∆, ϕ( a)
∀R
Γ ⇒ ∆, ∀ x ϕ( x )
Γ ⇒ ∆, ϕ ϕ, Π ⇒ Λ
Cut
Γ, Π ⇒ ∆, Λ
Γ ⇒ ∆, ϕ Γ ⇒ ∆, ψ
∧R
Γ ⇒ ∆, ϕ ∧ ψ
Γ ⇒ ∆, ϕ ψ, Π ⇒ Λ
→L
ϕ → ψ, Γ, Π ⇒ ∆, Λ
t1 = t2 , Γ ⇒ ∆, ϕ(t1 ) t1 = t2 , Γ ⇒ ∆, ϕ(t2 )
= =
t1 = t2 , Γ ⇒ ∆, ϕ(t2 ) t1 = t2 , Γ ⇒ ∆, ϕ(t1 )
ϕ(s) ⇒ ϕ(s)
WL
s = t, ϕ(s) ⇒ ϕ(s)
=
s = t, ϕ(s) ⇒ ϕ(t)
t1 = t2 ⇒ t1 = t2
⇒ t1 = t1
WL t2 = t3 , t1 = t2 ⇒ t1 = t2 WL
t1 = t2 ⇒ t1 = t1 =
= t2 = t3 , t1 = t2 ⇒ t1 = t3
t1 = t2 ⇒ t2 = t1 XL
t1 = t2 , t2 = t3 ⇒ t1 = t3
In the proof on the left, the formula x = t1 is our ϕ( x ). On the right, we take
ϕ( x ) to be t1 = x.
Proof. Initial sequents of the form ⇒ t = t are valid, since for every struc-
ture M, M t = t. (Note that we assume the term t to be closed, i.e., it
contains no variables, so variable assignments are irrelevant).
Suppose the last inference in a derivation is =. Then the premise is t1 =
t2 , Γ ⇒ ∆, ϕ(t1 ) and the conclusion is t1 = t2 , Γ ⇒ ∆, ϕ(t2 ). Consider a struc-
ture M. We need to show that the conclusion is valid, i.e., if M t1 = t2 and
M Γ, then either M χ for some χ ∈ ∆ or M ϕ(t2 ).
By induction hypothesis, the premise is valid. This means that if M
t1 = t2 and M Γ either (a) for some χ ∈ ∆, M χ or (b) M ϕ(t1 ). In
case (a) we are done. Consider case (b). Let s be a variable assignment with
s( x ) = ValM (t1 ). By ??, M, s ϕ(t1 ). Since s ∼ x s, by ??, M, s ϕ( x ). since
M t1 = t2 , we have ValM (t1 ) = ValM (t2 ), and hence s( x ) = ValM (t2 ). By
applying ?? again, we also have M, s ϕ(t2 ). By ??, M ϕ(t2 ).
Problems
Problem 15.1. Give derivations of the following sequents:
1. ⇒ ¬( ϕ → ψ) → ( ϕ ∧ ¬ψ)
2. ( ϕ ∧ ψ) → χ ⇒ ( ϕ → χ) ∨ (ψ → χ)
1. ∀ x ( ϕ( x ) → ψ) ⇒ (∃y ϕ(y) → ψ)
2. ∃ x ( ϕ( x ) → ∀y ϕ(y))
1. ⇒ ∀ x ∀y (( x = y ∧ ϕ( x )) → ϕ(y))
Natural Deduction
195
CHAPTER 16. NATURAL DEDUCTION
It is customary to consider rules for all logical operators, even for those (if
any) that we consider as defined.
Rules for ∧
ϕ∧ψ
ϕ ∧Elim
ϕ ψ
∧Intro
ϕ∧ψ ϕ∧ψ
ψ
∧Elim
Rules for ∨
ϕ [ ϕ]n [ψ]n
∨Intro
ϕ∨ψ
ψ
∨Intro ϕ∨ψ χ χ
ϕ∨ψ n ∨Elim
χ
Rules for →
[ ϕ]n
ϕ→ψ ϕ
ψ
→Elim
ψ
n →Intro
ϕ→ψ
Rules for ¬
[ ϕ]n
¬ϕ ϕ
¬Elim
⊥
⊥
¬ ϕ ¬Intro
n
Rules for ⊥
[¬ ϕ]n
⊥ ⊥
ϕ I
n
⊥ ⊥
ϕ C
Note that ¬Intro and ⊥C are very similar: The difference is that ¬Intro derives
a negated sentence ¬ ϕ but ⊥C a positive sentence ϕ.
Rules for ∀
ϕ( a) ∀ x ϕ( x )
∀Intro ∀Elim
∀ x ϕ( x ) ϕ(t)
In the rules for ∀, t is a ground term (a term that does not contain any vari-
ables), and a is a constant symbol which does not occur in the conclusion ∀ x ϕ( x ),
or in any assumption which is undischarged in the derivation ending with the
premise ϕ( a). We call a the eigenvariable of the ∀Intro inference.
Rules for ∃
[ϕ( a)]n
ϕ(t)
∃Intro
∃ x ϕ( x )
∃ x ϕ( x ) χ
n
χ ∃Elim
Again, t is a ground term, and a is a constant which does not occur in the
premise ∃ x ϕ( x ), in the conclusion χ, or any assumption which is undischarged
in the derivations ending with the two premises (other than the assumptions
ϕ( a)). We call a the eigenvariable of the ∃Elim inference.
The condition that an eigenvariable neither occur in the premises nor in
any assumption that is undischarged in the derivations leading to the premises
for the ∀Intro or ∃Elim inference is called the eigenvariable condition.
[ ϕ( a)]1
*∀Intro
∃ x ϕ( x ) ∀ x ϕ( x )
∃Elim
∀ x ϕ( x )
However, ∃ x ϕ( x ) 2 ∀ x ϕ( x ).
16.4 Derivations
We’ve said what an assumption is, and we’ve given the rules of inference.
Derivations in natural deduction are inductively generated from these: each
derivation either is an assumption on its own, or consists of one, two, or three
derivations followed by a correct inference.
We then say that ϕ is the conclusion of the derivation and that ϕ is derivable
from Γ.
Example 16.3. Every assumption on its own is a derivation. So, e.g., χ by itself
is a derivation, and so is θ by itself. We can obtain a new derivation from these
by applying, say, the ∧Intro rule,
ϕ ψ
∧Intro
ϕ∧ψ
These rules are meant to be general: we can replace the ϕ and ψ in it with any
sentences, e.g., by χ and θ. Then the conclusion would be χ ∧ θ, and so
χ θ
∧Intro
χ∧θ
is a correct derivation. Of course, we can also switch the assumptions, so that
θ plays the role of ϕ and χ that of ψ. Thus,
θ χ
∧Intro
θ∧χ
is also a correct derivation.
We can now apply another rule, say, →Intro, which allows us to conclude
a conditional and allows us to discharge any assumption that is identical to
the conclusion of that conditional. So both of the following would be correct
derivations:
[ χ ]1 θ χ [ θ ]1
∧Intro ∧Intro
χ∧θ χ∧θ
1 →Intro 1 →Intro
χ → (χ ∧ θ ) θ → (χ ∧ θ )
( ϕ ∧ ψ) → ϕ
Next, we need to figure out what kind of inference could result in a sen-
tence of this form. The main operator of the conclusion is →, so we’ll try to
arrive at the conclusion using the →Intro rule. It is best to write down the as-
sumptions involved and label the inference rules as you progress, so it is easy
to see whether all assumptions have been discharged at the end of the proof.
[ ϕ ∧ ψ ]1
ϕ
1 →Intro
( ϕ ∧ ψ) → ϕ
We now need to fill in the steps from the assumption ϕ ∧ ψ to ϕ. Since we
only have one connective to deal with, ∧, we must use the ∧ elim rule. This
gives us the following proof:
[ ϕ ∧ ψ ]1
ϕ ∧Elim
1 →Intro
( ϕ ∧ ψ) → ϕ
We now have a correct derivation of ( ϕ ∧ ψ) → ϕ.
(¬ ϕ ∨ ψ) → ( ϕ → ψ)
To find a logical rule that could give us this conclusion, we look at the logical
connectives in the conclusion: ¬, ∨, and →. We only care at the moment about
the first occurence of → because it is the main operator of the sentence in the
end-sequent, while ¬, ∨ and the second occurence of → are inside the scope
of another connective, so we will take care of those later. We therefore start
with the →Intro rule. A correct application must look as follows:
[¬ ϕ ∨ ψ]1
ϕ→ψ
1 →Intro
(¬ ϕ ∨ ψ) → ( ϕ → ψ)
This leaves us with two possibilities to continue. Either we can keep work-
ing from the bottom up and look for another application of the →Intro rule, or
we can work from the top down and apply a ∨Elim rule. Let us apply the lat-
ter. We will use the assumption ¬ ϕ ∨ ψ as the leftmost premise of ∨Elim. For
a valid application of ∨Elim, the other two premises must be identical to the
conclusion ϕ → ψ, but each may be derived in turn from another assumption,
namely the two disjuncts of ¬ ϕ ∨ ψ. So our derivation will look like this:
[¬ ϕ]2 [ ψ ]2
[¬ ϕ]2 , [ ϕ]3 [ ψ ]2 , [ ϕ ]4
ψ ψ
3 →Intro 4 →Intro
[¬ ϕ ∨ ψ]1 ϕ→ψ ϕ→ψ
2
ϕ→ψ
∨Elim
1 →Intro
(¬ ϕ ∨ ψ) → ( ϕ → ψ)
For the two missing parts of the derivation, we need derivations of ψ from
¬ ϕ and ϕ in the middle, and from ϕ and ψ on the left. Let’s take the former
first. ¬ ϕ and ϕ are the two premises of ¬Elim:
[¬ ϕ]2 [ ϕ ]3
¬Elim
⊥
ψ
By using ⊥ I , we can obtain ψ as a conclusion and complete the branch.
[ ψ ]2 , [ ϕ ]4
[¬ ϕ]2 [ ϕ ]3
⊥Intro
⊥ ⊥
I
ψ ψ
3 →Intro 4 →Intro
[¬ ϕ ∨ ψ]1 ϕ→ψ ϕ→ψ
2
ϕ→ψ
∨Elim
1 →Intro
(¬ ϕ ∨ ψ) → ( ϕ → ψ)
Let’s now look at the rightmost branch. Here it’s important to realize that
the definition of derivation allows assumptions to be discharged but does not re-
quire them to be. In other words, if we can derive ψ from one of the assump-
tions ϕ and ψ without using the other, that’s ok. And to derive ψ from ψ is
trivial: ψ by itself is such a derivation, and no inferences are needed. So we
can simply delete the assumtion ϕ.
[¬ ϕ]2 [ ϕ ]3
¬Elim
⊥ ⊥
I
ψ [ ψ ]2
3 →Intro →Intro
[¬ ϕ ∨ ψ]1 ϕ→ψ ϕ→ψ
2
ϕ→ψ
∨Elim
1 →Intro
(¬ ϕ ∨ ψ) → ( ϕ → ψ)
Note that in the finished derivation, the rightmost →Intro inference does not
actually discharge any assumptions.
Example 16.6. So far we have not needed the ⊥C rule. It is special in that it al-
lows us to discharge an assumption that isn’t a sub-formula of the conclusion
of the rule. It is closely related to the ⊥ I rule. In fact, the ⊥ I rule is a special
case of the ⊥C rule—there is a logic called “intuitionistic logic” in which only
⊥ I is allowed. The ⊥C rule is a last resort when nothing else works. For in-
stance, suppose we want to derive ϕ ∨ ¬ ϕ. Our usual strategy would be to
attempt to derive ϕ ∨ ¬ ϕ using ∨Intro. But this would require us to derive
either ϕ or ¬ ϕ from no assumptions, and this can’t be done. ⊥C to the rescue!
[¬( ϕ ∨ ¬ ϕ)]1
1
⊥ ⊥C
ϕ ∨ ¬ϕ
¬ϕ ϕ
¬Elim
1
⊥ ⊥C
ϕ ∨ ¬ϕ
Our strategy for finding a derivation of ¬ ϕ calls for an application of ¬Intro:
⊥
2
¬ ϕ ¬Intro ϕ
¬Elim
1
⊥ ⊥C
ϕ ∨ ¬ϕ
[ ϕ ]2 [¬( ϕ ∨ ¬ ϕ)]1
[¬( ϕ ∨ ¬ ϕ)]1 ϕ ∨ ¬ ϕ ∨Intro
¬Elim
⊥
2
¬ϕ ¬ Intro ϕ
¬Elim
1
⊥ ⊥C
ϕ ∨ ¬ϕ
On the right side we use the same strategy, except we get ϕ by ⊥C :
[ ϕ ]2 [¬ ϕ]3
[¬( ϕ ∨ ¬ ϕ)]1 ϕ ∨ ¬ϕ ∨ Intro [¬( ϕ ∨ ¬ ϕ)] 1 ϕ ∨ ¬ ϕ ∨Intro
¬Elim ¬Elim
⊥ ⊥ ⊥
2
¬ϕ ¬ Intro 3
ϕ C
¬Elim
1
⊥ ⊥C
ϕ ∨ ¬ϕ
∃ x ¬ ϕ( x ) → ¬∀ x ϕ( x )
We start by writing down what it would take to justify that last step using the
→Intro rule.
[∃ x ¬ ϕ( x )]1
¬∀ x ϕ( x )
→Intro
∃ x ¬ ϕ( x ) → ¬∀ x ϕ( x )
Since there is no obvious rule to apply to ¬∀ x ϕ( x ), we will proceed by setting
up the derivation so we can use the ∃Elim rule. Here we must pay attention
to the eigenvariable condition, and choose a constant that does not appear in
∃ x ϕ( x ) or any assumptions that it depends on. (Since no constant symbols
appear, however, any choice will do fine.)
[¬ ϕ( a)]2
[∃ x ¬ ϕ( x )]1 ¬∀ x ϕ( x )
2 ∃Elim
¬∀ x ϕ( x )
→Intro
∃ x ¬ ϕ( x ) → ¬∀ x ϕ( x )
In order to derive ¬∀ x ϕ( x ), we will attempt to use the ¬Intro rule: this
requires that we derive a contradiction, possibly using ∀ x ϕ( x ) as an addi-
tional assumption. Of coursem, this contradiction may involve the assump-
tion ¬ ϕ( a) which will be discharged by the →Intro inference. We can set it up
as follows:
[¬ ϕ( a)]2 , [∀ x ϕ( x )]3
⊥
3 ¬Intro
[∃ x ¬ ϕ( x )]1 ¬∀ x ϕ( x )
2 ∃Elim
¬∀ x ϕ( x )
→Intro
∃ x ¬ ϕ( x ) → ¬∀ x ϕ( x )
It looks like we are close to getting a contradiction. The easiest rule to apply is
the ∀Elim, which has no eigenvariable conditions. Since we can use any term
we want to replace the universally quantified x, it makes the most sense to
continue using a so we can reach a contradiction.
[∀ x ϕ( x )]3
∀Elim
[¬ ϕ( a)]2 ϕ( a)
¬Elim
⊥
1
3 ¬Intro
[∃ x ¬ ϕ( x )] ¬∀ x ϕ( x )
2 ∃Elim
¬∀ x ϕ( x )
→Intro
∃ x ¬ ϕ( x ) → ¬∀ x ϕ( x )
∃ x χ( x, b)
We have two premises to work with. To use the first, i.e., try to find a
derivation of ∃ x χ( x, b) from ∃ x ( ϕ( x ) ∧ ψ( x )) we would use the ∃Elim rule.
Since it has an eigenvariable condition, we will apply that rule first. We get
the following:
[ ϕ( a) ∧ ψ( a)]1
∃ x ( ϕ( x ) ∧ ψ( x )) ∃ x χ( x, b)
1 ∃Elim
∃ x χ( x, b)
The two assumptions we are working with share ψ. It may be useful at this
[ ϕ( a) ∧ ψ( a)]1
∧Elim
ψ( a)
∃ x ( ϕ( x ) ∧ ψ( x )) ∃ x χ( x, b)
1 ∃Elim
∃ x χ( x, b)
∃ x ( ϕ( x ) ∧ ψ( x )) ∃ x χ( x, b)
1 ∃Elim
∃ x χ( x, b)
We are so close! One application of ∃Intro and we have reached our goal.
Since we ensured at each step that the eigenvariable conditions were not vio-
lated, we can be confident that this is a correct derivation.
¬∀ x ϕ( x )
The last line of the derivation is a negation, so let’s try using ¬Intro. This will
[∀ x ϕ( x )]1
⊥
1 ¬Intro
¬∀ x ϕ( x )
So far so good. We can use ∀Elim but it’s not obvious if that will help us
get to our goal. Instead, let’s use one of our assumptions. ∀ x ϕ( x ) → ∃y ψ(y)
together with ∀ x ϕ( x ) will allow us to use the →Elim rule.
∀ x ϕ( x ) → ∃y ψ(y) [∀ x ϕ( x )]1
→Elim
∃y ψ(y)
⊥
1 ¬Intro
¬∀ x ϕ( x )
We now have one final assumption to work with, and it looks like this will
help us reach a contradiction by using ¬Elim.
∀ x ϕ( x ) → ∃y ψ(y) [∀ x ϕ( x )]1
→Elim
¬∃y ψ(y) ∃y ψ(y)
¬Elim
⊥
1 ¬Intro
¬∀ x ϕ( x )
This section collects the definitions the provability relation and consis-
tency for natural deduction.
∆, [ ϕ]1
δ1 Γ
δ0
ψ
1 →Intro
ϕ→ψ ϕ
ψ
→Elim
Proof. Exercise.
Γ, [ ϕ]1
Γ
δ2
δ1
⊥
¬ ϕ ¬Intro
1
ϕ
¬Elim
⊥
In the new derivation, the assumption ϕ is discharged, so it is a derivation
from Γ.
Γ
δ0
¬ϕ ϕ
¬Elim
⊥
Now assume Γ ∪ {¬ ϕ} is inconsistent, and let δ1 be the corresponding
derivation of ⊥ from undischarged assumptions in Γ ∪ {¬ ϕ}. We obtain
a derivation of ϕ from Γ alone by using ⊥C :
Γ, [¬ ϕ]1
δ1
⊥ ⊥
ϕ C
δ
¬ϕ ϕ
¬Elim
⊥
Since ¬ ϕ ∈ Γ, all undischarged assumptions are in Γ, this shows that Γ `
⊥.
Γ, [¬ ϕ]2 Γ, [ ϕ]1
δ2 δ1
⊥ ⊥
¬¬ ϕ ¬Intro 1 ¬ ϕ ¬Intro
2
¬Elim
⊥
Since the assumptions ϕ and ¬ ϕ are discharged, this is a derivation of ⊥
from Γ alone. Hence Γ is inconsistent.
2. ϕ, ψ ` ϕ ∧ ψ.
ϕ∧ψ ϕ∧ψ
ϕ ∧Elim ψ
∧Elim
2. We can derive:
ϕ ψ
∧Intro
ϕ∧ψ
2. Both ϕ ` ϕ ∨ ψ and ψ ` ϕ ∨ ψ.
¬ϕ [ ϕ ]1 ¬ψ [ ψ ]1
¬Elim ¬Elim
ϕ∨ψ ⊥ ⊥
1 ∨Elim
⊥
ϕ ψ
∨Intro ∨Intro
ϕ∨ψ ϕ∨ψ
Proposition 16.24. 1. ϕ, ϕ → ψ ` ψ.
2. Both ¬ ϕ ` ϕ → ψ and ψ ` ϕ → ψ.
ϕ→ψ ψ
ψ
→Elim
¬ϕ [ ϕ ]1
¬Elim
⊥ ⊥ ψ
I →Intro
ψ ϕ→ψ
1 →Intro
ϕ→ψ
Note that →Intro may, but does not have to, discharge the assumption ϕ.
2. ∀ x ϕ( x ) ` ϕ(t).
ϕ(t)
∃Intro
∃ x ϕ( x )
∀ x ϕ( x )
∀Elim
ϕ(t)
16.11 Soundness
A derivation system, such as natural deduction, is sound if it cannot derive
things that do not actually follow. Soundness is thus a kind of guaranteed
safety property for derivation systems. Depending on which proof theoretic
property is in question, we would like to know for instance, that
1. Suppose that the last inference is ¬Intro: The derivation has the form
Γ, [ ϕ]n
δ1
⊥
¬ ϕ ¬Intro
n
2. The last inference is ∧Elim: There are two variants: ϕ or ψ may be in-
ferred from the premise ϕ ∧ ψ. Consider the first case. The derivation δ
looks like this:
Γ
δ1
ϕ∧ψ
ϕ ∧Elim
3. The last inference is ∨Intro: There are two variants: ϕ ∨ ψ may be in-
ferred from the premise ϕ or the premise ψ. Consider the first case. The
derivation has the form
Γ
δ1
ϕ
∨Intro
ϕ∨ψ
Γ, [ ϕ]n
δ1
ψ
n →Intro
ϕ→ψ
Γ
δ1
⊥ ⊥
ϕ I
Γ
δ1
ϕ( a)
∀Intro
∀ x ϕ( x )
Now let’s consider the possible inferences with several premises: ∨Elim,
∧Intro, →Elim, and ∃Elim.
1. The last inference is ∧Intro. ϕ ∧ ψ is inferred from the premises ϕ and ψ
and δ has the form
Γ1 Γ2
δ1 δ2
ϕ ψ
∧Intro
ϕ∧ψ
Γ1 Γ2
δ1 δ2
ϕ→ψ ϕ
ψ
→Elim
t1 = t2 ϕ ( t1 )
=Elim
ϕ ( t2 )
=Intro
t=t
t1 = t2 ϕ ( t2 )
=Elim
ϕ ( t1 )
In the above rules, t, t1 , and t2 are closed terms. The =Intro rule allows us
to derive any identity statement of the form t = t outright, from no assump-
tions.
∃ x ∀y ( ϕ(y) → y = x )
We develop the derivation backwards:
∃ x ∀y ( ϕ(y) → y = x ) [ ϕ( a) ∧ ϕ(b)]1
a=b
1 →Intro
(( ϕ( a) ∧ ϕ(b)) → a = b)
∀Intro
∀y (( ϕ( a) ∧ ϕ(y)) → a = y)
∀Intro
∀ x ∀y (( ϕ( x ) ∧ ϕ(y)) → x = y)
We’ll now have to use the main assumption: since it is an existential formula,
we use ∃Elim to derive the intermediary conclusion a = b.
∃ x ∀y ( ϕ(y) → y = x ) a=b
2 ∃Elim
a = b
1 →Intro
(( ϕ( a) ∧ ϕ(b)) → a = b)
∀Intro
∀y (( ϕ( a) ∧ ϕ(y)) → a = y)
∀Intro
∀ x ∀y (( ϕ( x ) ∧ ϕ(y)) → x = y)
The sub-derivation on the top right is completed by using its assumptions
to show that a = c and b = c. This requies two separate derivations. The
derivation for a = c is as follows:
[∀y ( ϕ(y) → y = c)]2 [ ϕ( a) ∧ ϕ(b)]1
∀Elim ∧Elim
ϕ( a) → a = c ϕ( a)
a=c →Elim
From a = c and b = c we derive a = b by =Elim.
Proof. Any formula of the form t = t is valid, since for every structure M,
M t = t. (Note that we assume the term t to be ground, i.e., it contains no
variables, so variable assignments are irrelevant).
Suppose the last inference in a derivation is =Elim, i.e., the derivation has
the following form:
Γ1 Γ2
δ1 δ2
t1 = t2 ϕ ( t1 )
=Elim
ϕ ( t2 )
The premises t1 = t2 and ϕ(t1 ) are derived from undischarged assumptions Γ1
and Γ2 , respectively. We want to show that ϕ(t2 ) follows from Γ1 ∪ Γ2 . Con-
sider a structure M with M Γ1 ∪ Γ2 . By induction hypothesis, M ϕ(t1 )
and M t1 = t2 . Therefore, ValM (t1 ) = ValM (t2 ). Let s be any variable
assignment, and s0 be the x-variant given by s0 ( x ) = ValM (t1 ) = ValM (t2 ).
By ??, M, s ϕ(t1 ) iff M, s0 ϕ( x ) iff M, s ϕ(t2 ). Since M ϕ(t1 ), we have
M ϕ ( t2 ).
Problems
Problem 16.1. Give derivations of the following:
1. ¬( ϕ → ψ) → ( ϕ ∧ ¬ψ)
2. ∃ x ( ϕ( x ) → ∀y ϕ(y))
Problem 16.6. Prove that = is both symmetric and transitive, i.e., give deriva-
tions of ∀ x ∀y ( x = y → y = x ) and ∀ x ∀y ∀z(( x = y ∧ y = z) → x = z)
1. ∀ x ∀y (( x = y ∧ ϕ( x )) → ϕ(y))
Tableaux
Definition 17.1. A signed formula is a pair consisting of a truth value and a sen-
tence, i.e., either:
T ϕ or F ϕ.
219
CHAPTER 17. TABLEAUX
out. In particular, that means that a closed tableau rules out all possibilities
of simultaneously making every assumption of the form T ϕ true and every
assumption of the form F ϕ false.
A closed tableau for ϕ is a closed tableau with root F ϕ. If such a closed
tableau exists, all possibilities for ϕ being false have been ruled out; i.e., ϕ
must be true in every structure.
Rules for ¬
T¬ ϕ F ¬ϕ
¬T ¬F
Fϕ Tϕ
Rules for ∧
Tϕ ∧ ψ
∧T Fϕ ∧ ψ
Tϕ ∧F
F ϕ | Fψ
Tψ
Rules for ∨
Fϕ ∨ ψ
Tϕ ∨ ψ ∨F
∨T Fϕ
T ϕ | Tψ
Fψ
Rules for →
Fϕ → ψ
Tϕ → ψ →F
→T Tϕ
F ϕ | Tψ
Fψ
Cut
Tϕ | Fϕ
The Cut rule is not applied “to” a previous signed formula; rather, it allows
every branch in a tableau to be split in two, one branch containing T ϕ, the
other F ϕ. It is not necessary—any set of signed formulas with a closed tableau
has one not using Cut—but it allows us to combine tableaux in a convenient
way.
Rules for ∀
T ∀ x ϕ( x ) F ∀ x ϕ( x )
∀T ∀F
T ϕ(t) F ϕ( a)
Rules for ∃
T ∃ x ϕ( x ) F ∃ x ϕ( x )
∃T ∃F
T ϕ( a) F ϕ(t)
Again, t is a closed term, and a is a constant symbol which does not occur in
the branch above the ∃F rule. We call a the eigenvariable of the ∃F inference.
The condition that an eigenvariable not occur in the branch above the ∀F
or ∃T inference is called the eigenvariable condition.
We use the term “eigenvariable” even though a in the above rules is a con-
stant symbol. This has historical reasons.
In ∀T and ∃F there are no restrictions on the term t. On the other hand,
in the ∃T and ∀F rules, the eigenvariable condition requires that the constant
symbol a does not occur anywhere in the branches above the respective infer-
ence. It is necessary to ensure that the system is sound. Without this condition,
the following would be a closed tableau for ∃ x ϕ( x ) → ∀ x ϕ( x ):
1. F ∃ x ϕ( x ) → ∀ x ϕ( x ) Assumption
2. T ∃ x ϕ( x ) →F 1
3. F ∀ x ϕ( x ) →F 1
4. T ϕ( a) ∃T 2
5. F ϕ( a) ∀F 3
⊗
17.4 Tableaux
We’ve said what an assumption is, and we’ve given the rules of inference.
Tableaux are inductively generated from these: each tableau either is a single
branch consisting of one or more assumptions, or it results from a tableau by
applying one of the rules of inference on a branch.
1. The n topmost signed formulas of the tree are Si ϕi , one below the other.
2. Every signed formula in the tree that is not one of the assumptions re-
sults from a correct application of an inference rule to a signed formula
in the branch above it.
A branch of a tableau is closed iff it contains both T ϕ and F ϕ, and open other-
wise. A tableau in which every branch is closed is a closed tableau (for its set
of assumptions). If a tableau is not closed, i.e., if it contains at least one open
branch, it is open.
Example 17.3. Every set of assumptions on its own is a tableau, but it will gen-
erally not be closed. (Obviously, it is closed only if the assumptions already
contain a pair of signed formulas T ϕ and F ϕ.)
From a tableau (open or closed) we can obtain a new, larger one by ap-
plying one of the rules of inference to a signed formula ϕ in it. The rule will
append one or more signed formulas to the end of any branch containing the
occurrence of ϕ to which we apply the rule.
For instance, consider the assumption T ϕ ∧ ¬ ϕ. Here is the (open) tableau
consisting of just that assumption:
1. T ϕ ∧ ¬ϕ Assumption
1. T ϕ ∧ ¬ϕ Assumption
2. Tϕ ∧T 1
3. T¬ ϕ ∧T 1
When we write down tableaux, we record the rules we’ve applied on the right
(e.g., ∧T1 means that the signed formula on that line is the result of applying
the ∧T rule to the signed formula on line 1). This new tableau now contains
additional signed formulas, but to only one (T ¬ ϕ) can we apply a rule (in this
case, the ¬T rule). This results in the closed tableau
1. T ϕ ∧ ¬ϕ Assumption
2. Tϕ ∧T 1
3. T¬ ϕ ∧T 1
4. Fϕ ¬T 3
⊗
1. F ( ϕ ∧ ψ) → ϕ Assumption
There is only one assumption, so only one signed formula to which we can
apply a rule. (For every signed formula, there is always at most one rule that
can be applied: it’s the rule for the corresponding sign and main operator of
the sentence.) In this case, this means, we must apply →F.
1. F ( ϕ ∧ ψ) → ϕ X Assumption
2. Tϕ ∧ ψ →F 1
3. Fϕ →F 1
1. F ( ϕ ∧ ψ) → ϕ X Assumption
2. Tϕ ∧ ψ X →F 1
3. Fϕ →F 1
4. Tϕ ∧T 2
5. Tψ ∧T 2
⊗
Since the branch now contains both T ϕ (on line 4) and F ϕ (on line 3), the
branch is closed. Since it is the only branch, the tableau is closed. We have
found a closed tableau for ( ϕ ∧ ψ) → ϕ.
1. F (¬ ϕ ∨ ψ) → ( ϕ → ψ) Assumption
The one signed formula in this tableau has main operator → and sign F, so
we apply the →F rule to it to obtain:
1. F (¬ ϕ ∨ ψ) → ( ϕ → ψ) X Assumption
2. T¬ ϕ ∨ ψ →F 1
3. F ( ϕ → ψ) →F 1
1. F (¬ ϕ ∨ ψ) → ( ϕ → ψ) X Assumption
2. T¬ ϕ ∨ ψ X →F 1
3. F ( ϕ → ψ) →F 1
4. T¬ ϕ Tψ ∨T 2
We have not applied the →F rule to line 3 yet: let’s do that now. To save
time, we apply it to both branches. Recall that we write a checkmark next
to a signed formula only if we have applied the corresponding rule in every
open branch. So it’s a good idea to apply a rule at the end of every branch that
contains the signed formula the rule applies to. That way we won’t have to
return to that signed formula lower down in the various branches.
1. F (¬ ϕ ∨ ψ) → ( ϕ → ψ) X Assumption
2. T¬ ϕ ∨ ψ X →F 1
3. F ( ϕ → ψ) X →F 1
4. T¬ ϕ Tψ ∨T 2
5. Tϕ Tϕ →F 3
6. Fψ Fψ →F 3
⊗
The right branch is now closed. On the left branch, we can still apply the ¬T
rule to line 4. This results in F ϕ and closes the left branch:
1. F (¬ ϕ ∨ ψ) → ( ϕ → ψ) X Assumption
2. T¬ ϕ ∨ ψ X →F 1
3. F ( ϕ → ψ) X →F 1
4. T¬ ϕ Tψ ∨T 2
5. Tϕ Tϕ →F 3
6. Fψ Fψ →F 3
7. Fϕ ⊗ ¬T 4
⊗
Example 17.6. We can give tableaux for any number of signed formulas as
assumptions. Often it is also necessary to apply more than one rule that allows
branching; and in general a tableau can have any number of branches. For
instance, consider a tableau for {T ϕ ∨ (ψ ∧ χ), F ( ϕ ∨ ψ) ∧ ( ϕ ∨ χ)}. We start
by applying the ∨T to the first assumption:
1. T ϕ ∨ (ψ ∧ χ) X Assumption
2. F ( ϕ ∨ ψ) ∧ ( ϕ ∨ χ) Assumption
3. Tϕ Tψ ∧ χ ∨T 1
Now we can apply the ∧F rule to line 2. We do this on both branches simul-
taneously, and can therefore check off line 2:
1. T ϕ ∨ (ψ ∧ χ) X Assumption
2. F ( ϕ ∨ ψ) ∧ ( ϕ ∨ χ) X Assumption
3. Tϕ Tψ ∧ χ ∨T 1
4. Fϕ ∨ ψ Fϕ ∨ χ Fϕ ∨ ψ Fϕ ∨ χ ∧F 2
1. T ϕ ∨ (ψ ∧ χ) X Assumption
2. F ( ϕ ∨ ψ) ∧ ( ϕ ∨ χ) X Assumption
3. Tϕ Tψ ∧ χ ∨T 1
4. Fϕ ∨ ψ X Fϕ ∨ χ Fϕ ∨ ψ X Fϕ ∨ χ ∧F 2
5. Fϕ Fϕ ∨F 4
6. Fψ Fψ ∨F 4
⊗
1. T ϕ ∨ (ψ ∧ χ) X Assumption
2. F ( ϕ ∨ ψ) ∧ ( ϕ ∨ χ) X Assumption
3. Tϕ Tψ ∧ χ ∨T 1
4. Fϕ ∨ ψ X Fϕ ∨ χ X Fϕ ∨ ψ X Fϕ ∨ χ X ∧F 2
5. Fϕ Fϕ ∨F 4
6. Fψ Fψ ∨F 4
7. ⊗ Fϕ Fϕ ∨F 4
8. Fχ Fχ ∨F 4
⊗
Note that we moved the result of applying ∨F a second time below for clarity.
In this instance it would not have been needed, since the justifications would
have been the same.
Two branches remain open, and Tψ ∧ χ on line 3 remains unchecked. We
apply ∧T to it to obtain a closed tableau:
1. T ϕ ∨ (ψ ∧ χ) X Assumption
2. F ( ϕ ∨ ψ) ∧ ( ϕ ∨ χ) X Assumption
3. Tϕ Tψ ∧ χ X ∨T 1
4. Fϕ ∨ ψ X Fϕ ∨ χ X Fϕ ∨ ψ X Fϕ ∨ χ X ∧F 2
5. Fϕ Fϕ Fϕ Fϕ ∨F 4
6. Fψ Fχ Fψ Fχ ∨F 4
7. ⊗ ⊗ Tψ Tψ ∧T 3
8. Tχ Tχ ∧T 3
⊗ ⊗
For comparison, here’s a closed tableau for the same set of assumptions in
which the rules are applied in a different order:
1. T ϕ ∨ (ψ ∧ χ) X Assumption
2. F ( ϕ ∨ ψ) ∧ ( ϕ ∨ χ) X Assumption
3. Fϕ ∨ ψ X Fϕ ∨ χ X ∧F 2
4. Fϕ Fϕ ∨F 3
5. Fψ Fχ ∨F 3
6. Tϕ Tψ ∧ χ X Tϕ Tψ ∧ χ X ∨T 1
7. ⊗ Tψ ⊗ Tψ ∧T 3
8. Tχ Tχ ∧T 3
⊗ ⊗
1. F ∃ x ¬ ϕ( x ) → ¬∀ x ϕ( x ) Assumption
1. F ∃ x ¬ ϕ( x ) → ¬∀ x ϕ( x ) X Assumption
2. F ∃ x ¬ ϕ( x ) →F 1
3. F ¬∀ x ϕ( x ) →F 1
The next line to deal with is 2. We use ∃T. This requires a new constant
symbol; since no constant symbols yet occur, we can pick any one, say, a.
1. F ∃ x ¬ ϕ( x ) → ¬∀ x ϕ( x ) X Assumption
2. T ∃ x ¬ ϕ( x ) X →F 1
3. F ¬∀ x ϕ( x ) →F 1
4. T ¬ ϕ( a) ∃T 2
1. F ∃ x ¬ ϕ( x ) → ¬∀ x ϕ( x ) X Assumption
2. T ∃ x ¬ ϕ( x ) X →F 1
3. F ¬∀ x ϕ( x ) X →F 1
4. T ¬ ϕ( a) ∃T 2
5. T ∀ x ϕ( x ) ¬F 3
1. F ∃ x ¬ ϕ( x ) → ¬∀ x ϕ( x ) X Assumption
2. T ∃ x ¬ ϕ( x ) X →F 1
3. F ¬∀ x ϕ( x ) X →F 1
4. T ¬ ϕ( a) ∃T 2
5. T ∀ x ϕ( x ) ¬F 3
6. F ϕ( a) ¬T 4
7. T ϕ( a) ∀T 5
⊗
Example 17.8. Let’s see how we’d give a tableau for the set
1. F ∃ x χ( x, b) Assumption
2. T ∃ x ( ϕ( x ) ∧ ψ( x )) Assumption
3. T ∀ x (ψ( x ) → χ( x, b) Assumption
We should always apply a rule with the eigenvariable condition first; in this
case that would be ∃T to line 2. Since the assumptions contain the constant
symbol b, we have to use a different one; let’s pick a again.
1. F ∃ x χ( x, b) Assumption
2. T ∃ x ( ϕ( x ) ∧ ψ( x )) X Assumption
3. T ∀ x (ψ( x ) → χ( x, b) Assumption
4. T ϕ( a) ∧ ψ( a) ∃T 2
1. F ∃ x χ( x, b) Assumption
2. T ∃ x ( ϕ( x ) ∧ ψ( x )) X Assumption
3. T ∀ x (ψ( x ) → χ( x, b) Assumption
4. T ϕ( a) ∧ ψ( a) ∃T 2
5. F χ( a, b) ∃F 1
6. Tψ( a) → χ( a, b) ∀T 1
We don’t check the signed formulas in lines 1 and 3, since we may have to use
them again. Now apply ∧T to line 4:
1. F ∃ x χ( x, b) Assumption
2. T ∃ x ( ϕ( x ) ∧ ψ( x )) X Assumption
3. T ∀ x (ψ( x ) → χ( x, b) Assumption
4. T ϕ( a) ∧ ψ( a) X ∃T 2
5. F χ( a, b) ∃F 1
6. Tψ( a) → χ( a, b) ∀T 1
7. T ϕ( a) ∧T 4
8. Tψ( a) ∧T 4
1. F ∃ x χ( x, b) Assumption
2. T ∃ x ( ϕ( x ) ∧ ψ( x )) X Assumption
3. T ∀ x (ψ( x ) → χ( x, b) Assumption
4. T ϕ( a) ∧ ψ( a) X ∃T 2
5. F χ( a, b) ∃F 1
6. Tψ( a) → χ( a, b) X ∀T 1
7. T ϕ( a) ∧T 4
8. Tψ( a) ∧T 4
9. F ψ( a) Tχ( a, b) →T 6
⊗ ⊗
1. T ∀ x ϕ( x ) Assumption
2. T ∀ x ϕ( x ) → ∃y ψ(y) Assumption
3. T ¬∃y ψ(y) Assumption
1. T ∀ x ϕ( x ) Assumption
2. T ∀ x ϕ( x ) → ∃y ψ(y) Assumption
3. T ¬∃y ψ(y) X Assumption
4. F ∃y ψ(y) ¬T 3
The new line 4 requires ∃F, a quantifier rule without the eigenvariable condi-
tion. So we defer this in favor of using →T on line 2.
1. T ∀ x ϕ( x ) Assumption
2. T ∀ x ϕ( x ) → ∃y ψ(y) X Assumption
3. T ¬∃y ψ(y) X Assumption
4. F ∃y ψ(y) ¬T 3
5. F ∀ x ϕ( x ) T ∃y ψ(y) →T 2
Both new signed formulas require rules with eigenvariable conditions, so these
should be next:
1. T ∀ x ϕ( x ) Assumption
2. T ∀ x ϕ( x ) → ∃y ψ(y) X Assumption
3. T ¬∃y ψ(y) X Assumption
4. F ∃y ψ(y) X ¬T 3
5. F ∀ x ϕ( x ) T ∃y ψ(y) →T 2
6. F ϕ(b) T ϕ(c) ∀F 5
To close the branches, we have to use the signed formulas on lines 1 and 3.
The corresponding rules (∀T and ∃F) don’t have eigenvariable conditions, so
we are free to pick whichever terms are suitable. In this case, that’s b and c,
respectively.
1. T ∀ x ϕ( x ) Assumption
2. T ∀ x ϕ( x ) → ∃y ψ(y) X Assumption
3. T ¬∃y ψ(y) X Assumption
4. F ∃y ψ(y) X ¬T 3
5. F ∀ x ϕ( x ) T ∃y ψ(y) →T 2
6. F ϕ(b) Tψ(c) ∀F 5; ∃T 5
7. T ϕ(b) F ψ(c) ∀T 1; ∃F 4
This section collects the definitions of the provability relation and con-
sistency for tableaux.
1. Fϕ Assumption
2. Tϕ Assumption
⊗
is closed.
{F ϕ,Tθ1 , . . . , Tθm }
Apply the Cut rule on ϕ. This generates two branches, one has T ϕ in it, the
other F ϕ. Thus, on the one branch, all of
{F ψ, T ϕ, Tχ1 , . . . , Tχn }
are available. Since there is a closed tableau for these assumptions, we can
attach it to that branch; every branch through T ϕ1 closes. On the other branch,
all of
{F ϕ, Tθ1 , . . . , Tθm }
are available, so we can also complete the other side to obtain a closed tableau.
This shows Γ ∪ ∆ ` ψ.
Proof. Exercise.
{F ϕ,Tψ1 , . . . , Tψn }
{T ¬ ϕ,Tχ1 , . . . , Tχm }
have closed tableaux. Using the Cut rule on ϕ we can combine these into a
single closed tableau that shows Γ0 ∪ Γ1 is inconsistent. Since Γ0 ⊆ Γ and
Γ1 ⊆ Γ, Γ0 ∪ Γ1 ⊆ Γ, hence Γ is inconsistent.
{F ϕ, Tψ1 , . . . , Tψn }
Using the ¬T rule, this can be turned into a closed tableau for
{T ¬ ϕ, Tψ1 , . . . , Tψn }.
On the other hand, if there is a closed tableau for the latter, we can turn it
into a closed tableau of the former by removing every formula that results
from ¬T applied to the first assumption T ¬ ϕ as well as that assumption,
and adding the assumption F ϕ. For if a branch was closed before because
it contained the conclusion of ¬T applied to T ¬ ϕ, i.e., F ϕ, the corresponding
branch in the new tableau is also closed. If a branch in the old tableau was
closed because it contained the assumption T ¬ ϕ as well as F ¬ ϕ we can turn
it into a closed branch by applying ¬F to F ¬ ϕ to obtain T ϕ. This closes the
branch since we added F ϕ as an assumption.
1. Fϕ Assumption
2. Tϕ ∧ ψ Assumption
3. Tϕ ∧T 2
4. Tψ ∧T 2
⊗
1. Fψ Assumption
2. Tϕ ∧ ψ Assumption
3. Tϕ ∧T 2
4. Tψ ∧T 2
⊗
1. Fϕ ∧ ψ Assumption
2. Tϕ Assumption
3. Tψ Assumption
4. Fϕ Fψ ∧F 1
⊗ ⊗
2. Both ϕ ` ϕ ∨ ψ and ψ ` ϕ ∨ ψ.
1. Tϕ ∨ ψ Assumption
2. T¬ ϕ Assumption
3. T ¬ψ Assumption
4. Fϕ ¬T 2
5. Fψ ¬T 3
6. Tϕ Tψ ∨T 1
⊗ ⊗
1. Fϕ ∨ ψ Assumption
2. Tϕ Assumption
3. Fϕ ∨F 1
4. Fψ ∨F 1
⊗
1. Fϕ ∨ ψ Assumption
2. Tψ Assumption
3. Fϕ ∨F 1
4. Fψ ∨F 1
⊗
Proposition 17.24. 1. ϕ, ϕ → ψ ` ψ.
2. Both ¬ ϕ ` ϕ → ψ and ψ ` ϕ → ψ.
1. Fψ Assumption
2. Tϕ → ψ Assumption
3. Tϕ Assumption
4. Fϕ Tψ →T 2
⊗ ⊗
1. Fϕ → ψ Assumption
2. T¬ ϕ Assumption
3. Tϕ →F 1
4. Fψ →F 1
5. Fϕ ¬T 2
⊗
1. Fϕ → ψ Assumption
2. T ¬ψ Assumption
3. Tϕ →F 1
4. Fψ →F 1
5. Fψ ¬T 2
⊗
Proof. Suppose Γ ` ϕ(c), i.e., there are ψ1 , . . . , ψn ∈ Γ and a closed tableau for
{F ϕ(c),Tψ1 , . . . , Tψn }.
{F ∀ x ϕ( x ),Tψ1 , . . . , Tψn }.
Take the closed tableau and replace the first assumption with F ∀ x ϕ( x ), and
insert F ϕ(c) after the assumptions.
F ϕ(c) F ∀ x ϕ( x )
Tψ.. 1 Tψ.. 1
. .
Tψn Tψn
F ϕ(c)
The tableau is still closed, since all sentences available as assumptions before
are still available at the top of the tableau. The inserted line is the result of
a correct application of ∀F, since the constant symbol c does not occur in ψ1 ,
. . . , ψn of ∀ x ϕ( x ), i.e., it does not occur above the inserted line in the new
tableau.
1. F ∃ x ϕ( x ) Assumption
2. T ϕ(t) Assumption
3. F ϕ(t) ∃F 1
⊗
1. F ϕ(t) Assumption
2. T ∀ x ϕ( x ) Assumption
3. T ϕ(t) ∀T 2
⊗
17.11 Soundness
A derivation system, such as tableaux, is sound if it cannot derive things that
do not actually hold. Soundness is thus a kind of guaranteed safety property
for derivation systems. Depending on which proof theoretic property is in
question, we would like to know for instance, that
Proof. Let’s call a branch of a tableau satisfiable iff the set of signed formulas
on it is satisfiable, and let’s call a tableau satisfiable if it contains at least one
satisfiable branch.
We show the following: Extending a satisfiable tableau by one of the rules
of inference always results in a satisfiable tableau. This will prove the theo-
rem: any closed tableau results by applying rules of inference to the tableau
consisting only of assumptions from Γ. So if Γ were satisfiable, any tableau
for it would be satisfiable. A closed tableau, however, is clearly not satisfiable:
every branch contains both T ϕ and F ϕ, and no structure can both satisfy and
not satisfy ϕ.
Suppose we have a satisfiable tableau, i.e., a tableau with at least one sat-
isfiable branch. Applying a rule of inference either adds signed formulas to a
branch, or splits a branch in two. If the tableau has a satisfiable branch which
is not extended by the rule application in question, it remains a satisfiable
branch in the extended tableau, so the extended tableau is satisfiable. So we
only have to consider the case where a rule is applied to a satisfiable branch.
Let Γ be the set of signed formulas on that branch, and let S ϕ ∈ Γ be the
signed formula to which the rule is applied. If the rule does not result in a
split branch, we have to show that the extended branch, i.e., Γ together with
the conclusions of the rule, is still satisfiable. If the rule results in split branch,
we have to show that at least one of the two resulting branches is satisfiable.
First, we consider the possible inferences with only one premise.
1. The branch is expanded by applying ¬T to T ¬ψ ∈ Γ. Then the extended
branch contains the signed formulas Γ ∪ {F ψ}. Suppose M Γ. In
particular, M ¬ψ. Thus, M 2 ψ, i.e., M satisfies F ψ.
2. The branch is expanded by applying ¬F to F ¬ψ ∈ Γ: Exercise.
3. The branch is expanded by applying ∧T to Tψ ∧ χ ∈ Γ, which results in
two new signed formulas on the branch: Tψ and Tχ. Suppose M Γ,
in particular M ψ ∧ χ. Then M ψ and M χ. This means that M
satisfies both Tψ and Tχ.
4. The branch is expanded by applying ∨F to Tψ ∨ χ ∈ Γ: Exercise.
5. The branch is expanded by applying →F to Tψ → χ ∈ Γ: This results in
two new signed formulas on the branch: Tψ and F χ. Suppose M Γ,
in particular M 2 ψ → χ. Then M ψ and M 2 χ. This means that M
satisfies both Tψ and F χ.
6. The branch is expanded by applying ∀T to T ∀ x ψ( x ) ∈ Γ: This results
in a new signed formula T ϕ(t) on the branch. Suppose M Γ, in par-
ticular, M ∀ x ϕ( x ). By ??, M ϕ(t). Consequently, M satisfies T ϕ(t).
7. The branch is expanded by applying ∀F to F ∀ x ψ( x ) ∈ Γ: This results in
a new signed formula F ϕ( a) where a is a constant symbol not occurring
in Γ. Since Γ is satisfiable, there is a M such that M Γ, in particular
M 2 ∀ x ψ( x ). We have to show that Γ ∪ {F ϕ( a)} is satisfiable. To do
this, we define a suitable M0 as follows.
By ??, M 2 ∀ x ψ( x ) iff for some s, M, s 2 ψ( x ). Now let M0 be just like
0
M, except aM = s( x ). By ??, for any Tχ ∈ Γ, M0 χ, and for any
0
F χ ∈ Γ, M 2 χ, since a does not occur in Γ.
By ??, M0 , s 2 ϕ( x ). By ??, M0 , s 2 ϕ( a). Since ϕ( a) is a sentence, by ??,
M0 2 ϕ( a), i.e., M0 satisfies F ϕ( a).
8. The branch is expanded by applying ∃T to T ∃ x ψ( x ) ∈ Γ: Exercise.
9. The branch is expanded by applying ∃F to F ∃ x ψ( x ) ∈ Γ: Exercise.
4. The branch is expanded by Cut: This results in two branches, one con-
taining Tψ, the other containing F ψ. Since M Γ and either M ψ or
M 2 ψ, M satisfies either the left or the right branch.
Tt1 = t2 Tt1 = t2
= T ϕ ( t1 ) F ϕ ( t1 )
Tt = t
=T =T
T ϕ ( t1 ) F ϕ ( t1 )
Note that in contrast to all the other rules, =T and =F require that two
signed formulas already appear on the branch, namely both Tt1 = t2 and
S ϕ ( t1 ).
1. F ϕ(t) Assumption
2. Ts = t Assumption
3. T ϕ(s) Assumption
4. T ϕ(t) =T 2, 3
⊗
1. Ft = s Assumption
2. Ts = t Assumption
3. Ts = s =
4. Tt = s =T 2, 3
⊗
Here, line 2 is the first prerequisite formula Ts = t of =T, and line 3 the
second one, T ϕ(s)—think of ϕ( x ) as x = s, then ϕ(s) is s = s and ϕ(t) is
t = s.
They also prove that = is transitive:
1. F t1 = t3 Assumption
2. Tt1 = t2 Assumption
3. Tt2 = t3 Assumption
4. Tt1 = t3 =T 3, 2
⊗
Proof. We just have to show as before that if a tableau has a satisfiable branch,
the branch resulting from applying one of the rules for = to it is also satisfi-
able. Let Γ be the set of signed formulas on the branch, and let M be a struc-
ture satisfying Γ.
Suppose the branch is expanded using =, i.e., by adding the signed for-
mula Tt = t. Trivially, M t = t, so M also satisfies Γ ∪ {Tt = t}.
Problems
Problem 17.1. Give closed tableaux of the following:
1. F ¬( ϕ → ψ) → ( ϕ ∧ ¬ψ)
2. F ( ϕ → χ) ∨ (ψ → χ), T ( ϕ ∧ ψ) → χ
1. F ∃y ϕ(y) → ψ, T ∀ x ( ϕ( x ) → ψ)
2. F ∃ x ( ϕ( x ) → ∀y ϕ(y))
1. F ∀ x ∀y (( x = y ∧ ϕ( x )) → ϕ(y))
2. F ∃ x ( ϕ( x ) ∧ ∀y ( ϕ(y) → y = x )),
T ∃ x ϕ( x ) ∧ ∀y ∀z (( ϕ(y) ∧ ϕ(z)) → y = z)
Axiomatic Derivations
No effort has been made yet to ensure that the material in this chap-
ter respects various tags indicating which connectives and quantifiers are
primitive or defined: all are assumed to be primitive. If the FOL tag is
true, we produce a version with quantifiers, otherwise without.
243
CHAPTER 18. AXIOMATIC DERIVATIONS
It gets more interesting if the rule of inference appeals to formulas that appear
before the step considered. The following rule is called modus ponens:
If this is the only rule of inference, then our definition of derivation above
amounts to this: ϕ1 , . . . , ϕn is a derivation iff for each i ≤ n one of the follow-
ing holds:
1. ϕi ∈ Γ; or
2. ϕi is an axiom; or
The last clause says that ϕi follows from ϕ j (ψ) and ϕk (ψ → ϕi ) by modus
ponens. If we can go from 1 to n, and each time we find a formula ϕi that is
either in Γ, an axiom, or which a rule of inference tells us that it is a correct
inference step, then the entire sequence counts as a correct derivation.
( ϕ ∧ ψ) → ϕ (18.1)
( ϕ ∧ ψ) → ψ (18.2)
ϕ → (ψ → ( ϕ ∧ ψ)) (18.3)
ϕ → ( ϕ ∨ ψ) (18.4)
ϕ → (ψ ∨ ϕ) (18.5)
( ϕ → χ) → ((ψ → χ) → (( ϕ ∨ ψ) → χ)) (18.6)
ϕ → (ψ → ϕ) (18.7)
( ϕ → (ψ → χ)) → (( ϕ → ψ) → ( ϕ → χ)) (18.8)
( ϕ → ψ) → (( ϕ → ¬ψ) → ¬ ϕ) (18.9)
¬ ϕ → ( ϕ → ψ) (18.10)
> (18.11)
⊥→ϕ (18.12)
( ϕ → ⊥) → ¬ ϕ (18.13)
¬¬ ϕ → ϕ (18.14)
∀ x ψ → ψ ( t ), (18.15)
ψ(t) → ∃ x ψ. (18.16)
Why? Two applications of MP yield the last part, which is what we want.
And we easily see that ¬θ → (θ → α) is an instance of ??, and α → (θ → α) is
an instance of ??. So our derivation is:
1. ¬θ → (θ → α) ??
2. (¬θ → (θ → α)) →
((α → (θ → α)) → ((¬θ ∨ α) → (θ → α))) ??
3. ((α → (θ → α)) → ((¬θ ∨ α) → (θ → α)) 1, 2, MP
4. α → (θ → α) ??
5. (¬θ ∨ α) → (θ → α) 3, 4, MP
In order to apply MP, we would also need to justify the corresponding second
premise, namely ϕ. But in our case, that would be θ, and we won’t be able to
derive θ by itself. So we need a different strategy.
The other axiom involving just → is ??, i.e.,
( ϕ → (ψ → χ)) → (( ϕ → ψ) → ( ϕ → χ))
1. θ → ((θ → θ ) → θ ) ??
2. (θ → ((θ → θ ) → θ )) →
((θ → (θ → θ )) → (θ → θ )) ??
3. (θ → (θ → θ )) → (θ → θ ) 1, 2, MP
4. θ → (θ → θ ) ??
5. θ→θ 3, 4, MP
1. ϕ→ψ H YP
2. ψ→χ H YP
3. (ψ → χ) → ( ϕ → (ψ → χ)) ??
4. ϕ → (ψ → χ) 2, 3, MP
5. ( ϕ → (ψ → χ)) →
(( ϕ → ψ) → ( ϕ → χ)) ??
6. (( ϕ → ψ) → ( ϕ → χ)) 4, 5, MP
7. ϕ→χ 1, 6, MP
The lines labelled “H YP” (for “hypothesis”) indicate that the formula on that
line is an element of Γ.
(∀ x ϕ( x ) ∧ ∀y ψ(y)) → ∀ x ϕ( x )
∀ x ϕ( x ) → ϕ( a)
(∀ x ϕ( x ) ∧ ∀y ψ(y)) → ϕ( a)
(∀ x ϕ( x ) ∧ ∀y ψ(y)) → ψ( a)
(∀ x ϕ( x ) ∧ ∀y ψ(y)) → ( ϕ( a) ∧ ψ( a))
(∀ x ϕ( x ) ∧ ∀y ψ(y)) → ∀ x ( ϕ( x ) ∧ ψ( x )).
ϕ1 , . . . , ϕk = ϕ, ψ1 , . . . , ψl = ψ.
Proof. Exercise.
The most important result we’ll use in this context is the deduction theo-
rem:
Γ ` ϕ → ( χ → ψ );
Γ ` ϕ → χ.
But also
Γ ` ( ϕ → (χ → ψ)) → (( ϕ → χ) → ( ϕ → ψ)),
by ??, and two applications of ?? give Γ ` ϕ → ψ, as required.
Notice how ?? and ?? were chosen precisely so that the Deduction Theorem
would hold.
The following are some useful facts about derivability, which we leave as
exercises.
Γ ` ϕ → θ ( a)
By
` ( ϕ → (χ → θ ( a))) → (( ϕ ∧ χ) → θ ( a))
Γ ` ( ϕ ∧ χ ) → θ ( a ).
Since the eigenvariale condition still applies, we can add a step to this deriva-
tion justified by QR, and get:
Γ ` ( ϕ ∧ χ) → ∀ x θ ( x )
We also have
` (( ϕ ∧ χ) → ∀ x θ ( x )) → ( ϕ → (χ → ∀ x θ ( x ))
so by modus ponens,
Γ ` ϕ → (χ → ∀ x θ ( x ))
i.e., Γ ` ψ.
We leave the case where ψ is justified by the rule QR, but is of the form
∃ x θ ( x ) → χ, as an exercise.
Proof. Exercise.
2. ϕ, ψ ` ϕ ∧ ψ.
2. Both ϕ ` ϕ ∨ ψ and ψ ` ϕ ∨ ψ.
Proposition 18.32. 1. ϕ, ϕ → ψ ` ψ.
2. Both ¬ ϕ ` ϕ → ψ and ψ ` ϕ → ψ.
1. ϕ H YP
2. ϕ→ψ H YP
3. ψ 1, 2, MP
Proof. By the deduction theorem, Γ ` > → ϕ(c). Since c does not occur in Γ
or >, we get Γ ` > → ϕ(c). By the deduction theorem again, Γ ` ∀ x ϕ( x ).
2. ∀ x ϕ( x ) ` ϕ(t).
18.12 Soundness
A derivation system, such as axiomatic deduction, is sound if it cannot de-
rive things that do not actually hold. Soundness is thus a kind of guaranteed
safety property for derivation systems. Depending on which proof theoretic
property is in question, we would like to know for instance, that
Proof. We have to verify that all the axioms are valid. For instance, here is the
case for ??: suppose t is free for x in ϕ, and assume M, s ∀ x ϕ. Then by
definition of satisfaction, for each s0 ∼ x s, also M, s0 ϕ, and in particular
this holds when s0 ( x ) = ValM s ( t ). By ??, M, s ϕ [ t/x ]. This shows that
M, s (∀ x ϕ → ϕ[t/x ]).
t = t, (18.17)
t1 = t2 → (ψ(t1 ) → ψ(t2 )), (18.18)
Proof. Exercise.
Problems
Problem 18.1. Show that the following hold by exhibiting derivations from
the axioms:
1. ( ϕ ∧ ψ) → (ψ ∧ ϕ)
2. (( ϕ ∧ ψ) → χ) → ( ϕ → (ψ → χ))
3. ¬( ϕ ∨ ψ) → ¬ ϕ
19.1 Introduction
The completeness theorem is one of the most fundamental results about logic.
It comes in two formulations, the equivalence of which we’ll prove. In its first
formulation it says something fundamental about the relationship between
semantic consequence and our proof system: if a sentence ϕ follows from
some sentences Γ, then there is also a derivation that establishes Γ ` ϕ. Thus,
the proof system is as strong as it can possibly be without proving things that
don’t actually follow.
In its second formulation, it can be stated as a model existence result: ev-
ery consistent set of sentences is satisfiable. Consistency is a proof-theoretic
notion: it says that our proof system is unable to produce certain derivations.
But who’s to say that just because there are no derivations of a certain sort
from Γ, it’s guaranteed that there is a structure M? Before the completeness
theorem was first proved—in fact before we had the proof systems we now
do—the great German mathematician David Hilbert held the view that con-
sistency of mathematical theories guarantees the existence of the objects they
are about. He put it as follows in a letter to Gottlob Frege:
257
CHAPTER 19. THE COMPLETENESS THEOREM
The proof of the completeness theorem is a bit complex, and upon first reading
it, it is easy to get lost. So let us outline the proof. The first step is a shift of
perspective, that allows us to see a route to a proof. When completeness is
thought of as “whenever Γ ϕ then Γ ` ϕ,” it may be hard to even come up
with an idea: for to show that Γ ` ϕ we have to find a derivation, and it does
not look like the hypothesis that Γ ϕ helps us for this in any way. For some
proof systems it is possible to directly construct a derivation, but we will take
a slightly different tack. The shift in perspective required is this: completeness
can also be formulated as: “if Γ is consistent, it has a model.” Perhaps we can
use the information in Γ together with the hypothesis that it is consistent to
construct a model. After all, we know what kind of model we are looking for:
one that is as Γ describes it!
If Γ contains only atomic sentences, it is easy to construct a model for it.
Suppose the atomic sentences are all of the form P( a1 , . . . , an ) where the ai
are constant symbols. All we have to do is come up with a domain |M| and
an assignment for P so that M P( a1 , . . . , an ). But that’s not very hard: put
|M| = N, ciM = i, and for every P( a1 , . . . , an ) ∈ Γ, put the tuple hk1 , . . . , k n i
into PM , where k i is the index of the constant symbol ai (i.e., ai ≡ cki ).
Now suppose Γ contains some formula ¬ψ, with ψ atomic. We might
worry that the construction of M interferes with the possibility of making ¬ψ
true. But here’s where the consistency of Γ comes in: if ¬ψ ∈ Γ, then ψ ∈ / Γ, or
else Γ would be inconsistent. And if ψ ∈ / Γ, then according to our construction
of M, M 2 ψ, so M ¬ψ. So far so good.
What if Γ contains complex, non-atomic formulas? Say it contains ϕ ∧ ψ.
To make that true, we should proceed as if both ϕ and ψ were in Γ. And if
ϕ ∨ ψ ∈ Γ, then we will have to make at least one of them true, i.e., proceed
as if one of them was in Γ.
This suggests the following idea: we add additional formulas to Γ so as to
(a) keep the resulting set consistent and (b) make sure that for every possible
atomic sentence ϕ, either ϕ is in the resulting set, or ¬ ϕ is, and (c) such that,
whenever ϕ ∧ ψ is in the set, so are both ϕ and ψ, if ϕ ∨ ψ is in the set, at least
one of ϕ or ψ is also, etc. We keep doing this (potentially forever). Call the set
of all formulas so added Γ ∗ . Then our construction above would provide us
with a structure M for which we could prove, by induction, that all sentences
in Γ ∗ are true in it, and hence also all sentence in Γ since Γ ⊆ Γ ∗ . It turns
out that guaranteeing (a) and (b) is enough. A set of sentences for which (b)
holds is called complete. So our task will be to extend the consistent set Γ to a
consistent and complete set Γ ∗ .
There is one wrinkle in this plan: if ∃ x ϕ( x ) ∈ Γ we would hope to be able
to pick some constant symbol c and add ϕ(c) in this process. But how do we
know we can always do that? Perhaps we only have a few constant symbols
in our language, and for each one of them we have ¬ ϕ(c) ∈ Γ. We can’t also
add ϕ(c), since this would make the set inconsistent, and we wouldn’t know
whether M has to make ϕ(c) or ¬ ϕ(c) true. Moreover, it might happen that Γ
contains only sentences in a language that has no constant symbols at all (e.g.,
the language of set theory).
The solution to this problem is to simply add infinitely many constants at
the beginning, plus sentences that connect them with the quantifiers in the
right way. (Of course, we have to verify that this cannot introduce an incon-
sistency.)
Our original construction works well if we only have constant symbols in
the atomic sentences. But the language might also contain function symbols.
In that case, it might be tricky to find the right functions on N to assign to
these function symbols to make everything work. So here’s another trick: in-
stead of using i to interpret ci , just take the set of constant symbols itself as
the domain. Then M can assign every constant symbol to itself: ciM = ci . But
why not go all the way: let |M| be all terms of the language! If we do this,
there is an obvious assignment of functions (that take terms as arguments and
have terms as values) to function symbols: we assign to the function sym-
bol fin the function which, given n terms t1 , . . . , tn as input, produces the term
fin (t1 , . . . , tn ) as value.
The last piece of the puzzle is what to do with =. The predicate symbol =
has a fixed interpretation: M t = t0 iff ValM (t) = ValM (t0 ). Now if we set
things up so that the value of a term t is t itself, then this structure will make
no sentence of the form t = t0 true unless t and t0 are one and the same term.
And of course this is a problem, since basically every interesting theory in a
language with function symbols will have as theorems sentences t = t0 where
t and t0 are not the same term (e.g., in theories of arithmetic: ( + ) = ). To
solve this problem, we change the domain of M: instead of using terms as the
objects in |M|, we use sets of terms, and each set is so that it contains all those
terms which the sentences in Γ require to be equal. So, e.g., if Γ is a theory of
arithmetic, one of these sets will contain: , ( + ), ( × ), etc. This will be
the set we assign to , and it will turn out that this set is also the value of all
the terms in it, e.g., also of ( + ). Therefore, the sentence ( + ) = will be
true in this revised structure.
So here’s what we’ll do. First we investigate the properties of complete
consistent sets, in particular we prove that a complete consistent set contains
ϕ ∧ ψ iff it contains both ϕ and ψ, ϕ ∨ ψ iff it contains at least one of them, etc.
(??). Then we define and investigate “saturated” sets of sentences. A saturated
set is one which contains conditionals that link each quantified sentence to
instances of it (??). We show that any consistent set Γ can always be extended
to a saturated set Γ 0 (??). If a set is consistent, saturated, and complete it also
has the property that it contains ∃ x ϕ( x ) iff it contains ϕ(t) for some closed
term t and ∀ x ϕ( x ) iff it contains ϕ(t) for all closed terms t (??). We’ll then take
the saturated consistent set Γ 0 and show that it can be extended to a saturated,
consistent, and complete set Γ ∗ (??). This set Γ ∗ is what we’ll use to define
our term model M( Γ ∗ ). The term model has the set of closed terms as its
domain, and the interpretation of its predicate symbols is given by the atomic
sentences in Γ ∗ (??). We’ll use the properties of saturated, complete consistent
sets to show that indeed M( Γ ∗ ) ϕ iff ϕ ∈ Γ ∗ (??), and thus in particular,
M( Γ ∗ ) Γ. Finally, we’ll consider how to define a term model if Γ contains =
as well (??) and show that it satisfies Γ ∗ (??).
In what follows, we will often tacitly use the properties of reflexivity, mono-
tonicity, and transitivity of ` (see ??????????????).
1. If Γ ` ϕ, then ϕ ∈ Γ.
3. ϕ ∨ ψ ∈ Γ iff either ϕ ∈ Γ or ψ ∈ Γ.
4. ϕ → ψ ∈ Γ iff either ϕ ∈
/ Γ or ψ ∈ Γ.
Proof. Let us suppose for all of the following that Γ is complete and consistent.
1. If Γ ` ϕ, then ϕ ∈ Γ.
Suppose that Γ ` ϕ. Suppose to the contrary that ϕ ∈ / Γ. Since Γ is
complete, ¬ ϕ ∈ Γ. By ??????????????, Γ is inconsistent. This contradicts
the assumption that Γ is consistent. Hence, it cannot be the case that
ϕ∈/ Γ, so ϕ ∈ Γ.
2. Exercise.
4. Exercise.
The following definition will be used in the proof of the next theorem.
Lemma 19.6. Every consistent set Γ can be extended to a saturated consistent set Γ 0 .
Γ0 = Γ
Γn+1 = Γn ∪ {θn }
We’ll now show that complete, consistent sets which are saturated have the
property that it contains a universally quantified sentence iff it contains all its
instances and it contains an existentially quantified sentence iff it contains at
least one instance. We’ll use this to show that the structure we’ll generate from
a complete, consistent, saturated set makes all its quantified sentences true.
2. Exercise.
Let Γ ∗ = n≥0 Γn .
S
complete.
is the value of a closed term (M may not be covered). This is the reason the sat-
isfaction relation is defined via variable assignments. However, for our term
model M( Γ ∗ ) this wouldn’t be necessary—because it is covered. This is the
content of the next result.
Proposition 19.10. Let M( Γ ∗ ) be the term model of ??.
1. M( Γ ∗ ) ∃ x ϕ( x ) iff M ϕ(t) for at least one term t.
2. M( Γ ∗ ) ∀ x ϕ( x ) iff M ϕ(t) for all terms t.
Proof. 1. By ??, M( Γ ∗ ) ∃ x ϕ( x ) iff for at least one variable assignment s,
M( Γ ∗ ), s ϕ( x ). As |M( Γ ∗ )| consists of the closed terms of L, this is
the case iff there is at least one closed term t such that s( x ) = t and
M( Γ ∗ ), s ϕ( x ). By ??, M( Γ ∗ ), s ϕ( x ) iff M( Γ ∗ ), s ϕ(t), where
s( x ) = t. By ??, M( Γ ∗ ), s ϕ(t) iff M( Γ ∗ ) ϕ(t), since ϕ(t) is a sen-
tence.
2. Exercise.
4. ϕ ≡ ψ ∧ χ: exercise.
5. ϕ ≡ ψ ∨ χ: M( Γ ∗ ) ϕ iff at M( Γ ∗ ) ψ or M( Γ ∗ ) χ (by definition of
satisfaction) iff ψ ∈ Γ ∗ or χ ∈ Γ ∗ (by induction hypothesis). This is the
case iff (ψ ∨ χ) ∈ Γ ∗ (by ????).
6. ϕ ≡ ψ → χ: exercise.
7. ϕ ≡ ∀ x ψ( x ): exercise.
8. ϕ ≡ ∃ x ψ( x ): M( Γ ∗ ) ϕ iff M( Γ ∗ ) ψ(t) for at least one term t (??). By
induction hypothesis, this is the case iff ψ(t) ∈ Γ ∗ for at least one term t.
By ??, this in turn is the case iff ∃ x ϕ( x ) ∈ Γ ∗ .
19.7 Identity
The construction of the term model given in the preceding section is enough
to establish completeness for first-order logic for sets Γ that do not contain =.
The term model satisfies every ϕ ∈ Γ ∗ which does not contain = (and hence
all ϕ ∈ Γ). It does not work, however, if = is present. The reason is that Γ ∗
then may contain a sentence t = t0 , but in the term model the value of any
term is that term itself. Hence, if t and t0 are different terms, their values in
the term model—i.e., t and t0 , respectively—are different, and so t = t0 is false.
We can fix this, however, using a construction known as “factoring.”
t ≈ t0 iff t = t0 ∈ Γ ∗
1. ≈ is reflexive.
2. ≈ is symmetric.
3. ≈ is transitive.
2. If Γ ∗ ` t = t0 then Γ ∗ ` t0 = t.
4. If Γ ∗ ` t = t0 , then
Definition 19.15. Let M = M( Γ ∗ ) be the term model for Γ ∗ . Then M/≈ is the
following structure:
1. |M/≈ | = Trm(L)/≈ .
2. cM/≈ = [c]≈
Note that we have defined f M/≈ and RM/≈ for elements of Trm(L)/≈ by
referring to them as [t]≈ , i.e., via representatives t ∈ [t]≈ . We have to make sure
that these definitions do not depend on the choice of these representatives, i.e.,
that for some other choices t0 which determine the same equivalence classes
([t]≈ = [t0 ]≈ ), the definitions yield the same result. For instance, if R is a one-
place predicate symbol, the last clause of the definition says that [t]≈ ∈ RM/≈
iff M R(t). If for some other term t0 with t ≈ t0 , M 2 R(t), then the definition
would require [t0 ]≈ ∈ / RM/≈ . If t ≈ t0 , then [t]≈ = [t0 ]≈ , but we can’t have
both [t]≈ ∈ RM/≈ and [t]≈ ∈ / RM/≈ . However, ?? guarantees that this cannot
happen.
Proposition 19.16. M/≈ is well defined, i.e., if t1 , . . . , tn , t10 , . . . , t0n are terms, and
ti ≈ ti0 then
and
Proof. By induction on ϕ, just as in the proof of ??. The only case that needs
additional attention is when ϕ ≡ t = t0 .
Corollary 19.19 (Completeness Theorem, Second Version). For all Γ and ϕ sen-
tences: if Γ ϕ then Γ ` ϕ.
Proof. Note that the Γ’s in ?? and ?? are universally quantified. To make sure
we do not confuse ourselves, let us restate ?? using a different variable: for
any set of sentences ∆, if ∆ is consistent, it is satisfiable. By contraposition, if ∆
is not satisfiable, then ∆ is inconsistent. We will use this to prove the corollary.
Suppose that Γ ϕ. Then Γ ∪ {¬ ϕ} is unsatisfiable by ??. Taking Γ ∪ {¬ ϕ}
as our ∆, the previous version of ?? gives us that Γ ∪ {¬ ϕ} is inconsistent. By
??????????????, Γ ` ϕ.
Theorem 19.21 (Compactness Theorem). The following hold for any sentences Γ
and ϕ:
∆ = {c 6= t : t ∈ Trm(L)}.
Example 19.24. We know that first-order logic with identity predicate can
express that the size of the domain must have some minimal size: The sen-
tence ϕ≥n (which says “there are at least n distinct objects”) is true only in
structures where |M| has at least n objects. So if we take
∆ = { ϕ ≥ n : n ≥ 1}
then any model of ∆ must be infinite. Thus, we can guarantee that a theory
only has infinite models by adding ∆ to it: the models of Γ ∪ ∆ are all and only
the infinite models of Γ.
So first-order logic can express infinitude. The compactness theorem shows
that it cannot express finitude, however. For suppose some set of sentences Λ
were satisfied in all and only finite structures. Then ∆ ∪ Λ is finitely satisfiable.
Why? Suppose ∆0 ∪ Λ0 ⊆ ∆ ∪ Λ is finite with ∆0 ⊆ ∆ and Λ0 ⊆ Λ. Let n be the
largest number such that ϕ≥n ∈ ∆0 . Λ, being satisfied in all finite structures,
has a model M with finitely many but ≥ n elements. But then M ∆0 ∪ Λ0 . By
compactness, ∆ ∪ Λ has an infinite model, contradicting the assumption that
Λ is satisfied only in finite structures.
2. ( ϕ ∨ ψ) ∈ Γ iff either ϕ ∈ Γ or ψ ∈ Γ.
3. ( ϕ → ψ) ∈ Γ iff either ϕ ∈
/ Γ or ψ ∈ Γ.
Lemma 19.26. Every finitely satisfiable set Γ can be extended to a saturated finitely
satisfiable set Γ 0 .
Lemma 19.28. Every finitely satisfiable set Γ can be extended to a complete and
finitely satisfiable set Γ ∗ .
Problems
Problem 19.1. Complete the proof of ??.
Problem 19.5. Use ?? to prove ??, thus showing that the two formulations of
the completeness theorem are equivalent.
Problem 19.6. In order for a derivation system to be complete, its rules must
be strong enough to prove every unsatisfiable set inconsistent. Which of the
rules of derivation were necessary to prove completeness? Are any of these
rules not used anywhere in the proof? In order to answer these questions,
make a list or diagram that shows which of the rules of derivation were used
in which results that lead up to the proof of ??. Be sure to note any tacit uses
of rules in these proofs.
Problem 19.10. Prove ??. (Hint: The crucial step is to show that if Γn is finitely
satisfiable, so is Γn ∪ {θn }, without any appeal to derivations or consistency.)
Problem 19.12. Prove ??. (Hint: the crucial step is to show that if Γn is finitely
satisfiable, then either Γn ∪ { ϕn } or Γn ∪ {¬ ϕn } is finitely satisfiable.)
Problem 19.13. Write out the complete proof of the Truth Lemma (??) in the
version required for the proof of ??.
This chapter, adapted from Jeremy Avigad’s logic notes, gives the
briefest of glimpses into which other logical systems there are. It is in-
tended as a chapter suggesting further topics for study in a course that
does not cover them. Each one of the topics mentioned here will—
hopefully—eventually receive its own part-level treatment in the Open
Logic Project.
20.1 Overview
First-order logic is not the only system of logic of interest: there are many ex-
tensions and variations of first-order logic. A logic typically consists of the
formal specification of a language, usually, but not always, a deductive sys-
tem, and usually, but not always, an intended semantics. But the technical use
of the term raises an obvious question: what do logics that are not first-order
logic have to do with the word “logic,” used in the intuitive or philosophical
sense? All of the systems described below are designed to model reasoning of
some form or another; can we say what makes them logical?
No easy answers are forthcoming. The word “logic” is used in different
ways and in different contexts, and the notion, like that of “truth,” has been
analyzed from numerous philosophical stances. For example, one might take
the goal of logical reasoning to be the determination of which statements are
necessarily true, true a priori, true independent of the interpretation of the
nonlogical terms, true by virtue of their form, or true by linguistic convention;
and each of these conceptions requires a good deal of clarification. Even if one
restricts one’s attention to the kind of logic used in mathematics, there is little
agreement as to its scope. For example, in the Principia Mathematica, Russell
and Whitehead tried to develop mathematics on the basis of logic, in the logi-
cist tradition begun by Frege. Their system of logic was a form of higher-type
274
20.2. MANY-SORTED LOGIC
logic similar to the one described below. In the end they were forced to intro-
duce axioms which, by most standards, do not seem purely logical (notably,
the axiom of infinity, and the axiom of reducibility), but one might nonetheless
hold that some forms of higher-order reasoning should be accepted as logical.
In contrast, Quine, whose ontology does not admit “propositions” as legiti-
mate objects of discourse, argues that second-order and higher-order logic are
really manifestations of set theory in sheep’s clothing; in other words, systems
involving quantification over predicates are not purely logical.
For now, it is best to leave such philosophical issues for a rainy day, and
simply think of the systems below as formal idealizations of various kinds of
reasoning, logical or otherwise.
asserts that if any French person is married to a German, either the French
person drinks wine or the German doesn’t eat wurst.
Many-sorted logic can be embedded in first-order logic in a natural way,
by lumping all the objects of the many-sorted domains together into one first-
order domain, using unary predicate symbols to keep track of the sorts, and
relativizing quantifiers. For example, the first-order language corresponding
to the example above would have unary predicate symbolss “Ger man” and
“F r ench,” in addition to the other relations described, with the sort require-
ments erased. A sorted quantifier ∀ x ϕ, where x is a variable of the German
sort, translates to
∀ x (Ger man ( x ) → ϕ).
We need to add axioms that insure that the sorts are separate—e.g., ∀ x ¬(Ger man ( x ) ∧
F r ench ( x ))—as well as axioms that guarantee that “drinks wine” only holds
of objects satisfying the predicate F r ench ( x ), etc. With these conventions and
axioms, it is not difficult to show that many-sorted sentences translate to first-
order sentences, and many-sorted derivations translate to first-order deriva-
tions. Also, many-sorted structures “translate” to corresponding first-order
structures and vice-versa, so we also have a completeness theorem for many-
sorted logic.
∀ x1 . . . ∀ xk ( R( x1 , . . . , xk ) ↔ S( x1 , . . . , xk )).
The rules for second-order logic simply extend the quantifier rules to the
new second order variables. Here, however, one has to be a little bit careful
to explain how these variables interact with the predicate symbols of L, and
with formulas of L more generally. At the bare minimum, relation variables
count as terms, so one has inferences of the form
ϕ( R) ` ∃ R ϕ( R)
But if L is the language of arithmetic with a constant relation symbol <, one
would also expect the following inference to be valid:
x < y ` ∃ R R( x, y)
ϕ ( x1 , . . . , x k ) ` ∃ R R ( x1 , . . . , x k )
where ϕ[λ~x. ψ(~x )/R] denotes the result of replacing every atomic formula of
the form Rt1 , . . . , tk in ϕ by ψ(t1 , . . . , tk ). This last rule is equivalent to having
a comprehension schema, i.e., an axiom of the form
∃ R ∀ x1 , . . . , xk ( ϕ( x1 , . . . , xk ) ↔ R( x1 , . . . , xk )),
one for each formula ϕ in the second-order language, in which R is not a free
variable. (Exercise: show that if R is allowed to occur in ϕ, this schema is
inconsistent!)
When logicians refer to the “axioms of second-order logic” they usually
mean the minimal extension of first-order logic by second-order quantifier
rules together with the comprehension schema. But it is often interesting to
study weaker subsystems of these axioms and rules. For example, note that
in its full generality the axiom schema of comprehension is impredicative: it
allows one to assert the existence of a relation R( x1 , . . . , xk ) that is “defined”
by a formula with second-order quantifiers; and these quantifiers range over
the set of all such relations—a set which includes R itself! Around the turn of
the twentieth century, a common reaction to Russell’s paradox was to lay the
blame on such definitions, and to avoid them in developing the foundations
of mathematics. If one prohibits the use of second-order quantifiers in the
formula ϕ, one has a predicative form of comprehension, which is somewhat
weaker.
From the semantic point of view, one can think of a second-order structure
as consisting of a first-order structure for the language, coupled with a set of
relations on the domain over which the second-order quantifiers range (more
precisely, for each k there is a set of relations of arity k). Of course, if compre-
hension is included in the proof system, then we have the added requirement
that there are enough relations in the “second-order part” to satisfy the com-
prehension axioms—otherwise the proof system is not sound! One easy way
to insure that there are enough relations around is to take the second-order
part to consist of all the relations on the first-order part. Such a structure is
called full, and, in a sense, is really the “intended structure” for the language.
If we restrict our attention to full structures we have what is known as the
full second-order semantics. In that case, specifying a structure boils down
to specifying the first-order part, since the contents of the second-order part
follow from that implicitly.
To summarize, there is some ambiguity when talking about second-order
logic. In terms of the proof system, one might have in mind either
When logicians do not specify the proof system or the semantics they have
in mind, they are usually refering to the second item on each list. The ad-
vantage to using this semantics is that, as we will see, it gives us categorical
descriptions of many natural mathematical structures; at the same time, the
proof system is quite strong, and sound for this semantics. The drawback is
that the proof system is not complete for the semantics; in fact, no effectively
given proof system is complete for the full second-order semantics. On the
other hand, we will see that the proof system is complete for the weakened
semantics; this implies that if a sentence is not provable, then there is some
structure, not necessarily the full one, in which it is false.
The language of second-order logic is quite rich. One can identify unary
relations with subsets of the domain, and so in particular you can quantify
over these sets; for example, one can express induction for the natural num-
bers with a single axiom
If one takes the language of arithmetic to have symbols , 0, +, × and <, one
can add the following axioms to describe their behavior:
1. ∀ x ¬ x 0 =
2. ∀ x ∀y (s( x ) = s(y) → x = y)
3. ∀ x ( x + ) = x
4. ∀ x ∀y ( x + y0 ) = ( x + y)0
5. ∀ x ( x × ) =
6. ∀ x ∀y ( x × y0 ) = (( x × y) + x )
7. ∀ x ∀y ( x < y ↔ ∃z y = ( x + z0 ))
It is not difficult to show that these axioms, together with the axiom of induc-
tion above, provide a categorical description of the structure N, the standard
model of arithmetic, provided we are using the full second-order semantics.
Given any structure M in which these axioms are true, define a function f
∃ f (∀ x ∀y ( f ( x ) = f (y) → x = y) ∧ ∃y ∀ x f ( x ) 6= y).
The negation of this sentence then defines the class of finite structures.
In addition, one can define the class of well-orderings, by adding the fol-
lowing to the definition of a linear ordering:
∀ P (∃ x P( x ) → ∃ x ( P( x ) ∧ ∀y (y < x → ¬ P(y)))).
This asserts that every non-empty set has a least element, modulo the iden-
tification of “set” with “one-place relation”. For another example, one can
express the notion of connectedness for graphs, by saying that there is no non-
trivial separation of the vertices into disconnected parts:
For yet another example, you might try as an exercise to define the class of
finite structures whose domain has even size. More strikingly, one can pro-
vide a categorical description of the real numbers as a complete ordered field
containing the rationals.
In short, second-order logic is much more expressive than first-order logic.
That’s the good news; now for the bad. We have already mentioned that there
is no effective proof system that is complete for the full second-order seman-
tics. For better or for worse, many of the properties of first-order logic are
absent, including compactness and the Löwenheim-Skolem theorems.
On the other hand, if one is willing to give up the full second-order seman-
tics in terms of the weaker one, then the minimal second-order proof system
is complete for this semantics. In other words, if we read ` as “proves in the
minimal system” and as “logically implies in the weaker semantics”, we
can show that whenever Γ ϕ then Γ ` ϕ. If one wants to include specific
comprehension axioms in the proof system, one has to restrict the semantics
to second-order structures that satisfy these axioms: for example, if ∆ con-
sists of a set of comprehension axioms (possibly all of them), we have that if
Γ ∪ ∆ ϕ, then Γ ∪ ∆ ` ϕ. In particular, if ϕ is not provable using the com-
prehension axioms we are considering, then there is a model of ¬ ϕ in which
these comprehension axioms nonetheless hold.
The easiest way to see that the completeness theorem holds for the weaker
semantics is to think of second-order logic as a many-sorted logic, as follows.
One sort is interpreted as the ordinary “first-order” domain, and then for each
k we have a domain of “relations of arity k.” We take the language to have
built-in relation symbols “tr ue k ( R, x1 , . . . , xk )” which is meant to assert that
R holds of x1 , . . . , xk , where R is a variable of the sort “k-ary relation” and x1 ,
. . . , xk are objects of the first-order sort.
With this identification, the weak second-order semantics is essentially the
usual semantics for many-sorted logic; and we have already observed that
many-sorted logic can be embedded in first-order logic. Modulo the trans-
lations back and forth, then, the weaker conception of second-order logic is
really a form of first-order logic in disguise, where the domain contains both
“objects” and “relations” governed by the appropriate axioms.
Think of types as syntactic “labels,” which classify the objects we want in our
domain; σ → τ describes those objects that are functions which take objects of
type σ to objects of type τ. For example, we might want to have a type Ω of
truth values, “true” and “false,” and a type N of natural numbers. In that case,
you can think of objects of type N → Ω as unary relations, or subsets of N;
objects of type N → N are functions from natural numers to natural numbers;
and objects of type (N → N) → N are “functionals,” that is, higher-type
functions that take functions to numbers.
1. N is a finite type.
2. is a term of type N
Rst (0) = s
Rst ( x + 1) = t( x, Rst ( x )),
hs, ti denotes the pair whose first component is s and whose second compo-
nent is t, and p1 (s) and p2 (s) denote the first and second elements (“projec-
tions”) of s. Finally, λx. s denotes the function f defined by
f (x) = s
Theorem 20.1. There are irrational numbers a and b such that ab is rational.
√ √2 √
Proof. Consider 2 . If this is rational, we are done: we can let a = b = 2.
Otherwise, it is irrational. Then we have
√ √ √
√ 2 √2 √ 2· 2 √ 2
( 2 ) = 2 = 2 = 2,
√
√ 2 √
which is certainly rational. So, in this case, let a be 2 , and let b be 2.
Does this constitute a valid proof? Most mathematicians feel that it does.
But again, there is something a little bit unsatisfying here: we have proved the
existence of a pair of real numbers with a certain property, without being able
to say which pair of numbers it is. It is possible to prove the √
same result, but in
such a way that the pair a, b is given in the proof: take a = 3 and b = log3 4.
Then
√ log 4
ab = 3 3 = 31/2·log3 4 = (3log3 4 )1/2 = 41/2 = 2,
since 3log3 x = x.
Intuitionistic logic is designed to model a kind of reasoning where moves
like the one in the first proof are disallowed. Proving the existence of an x
satisfying ϕ( x ) means that you have to give a specific x, and a proof that it
satisfies ϕ, like in the second proof. Proving that ϕ or ψ holds requires that
you can prove one or the other.
Formally speaking, intuitionistic first-order logic is what you get if you
omit restrict a proof system for first-order logic in a certain way. Similarly,
there are intuitionistic versions of second-order or higher-order logic. From
the mathematical point of view, these are just formal deductive systems, but,
as already noted, they are intended to model a kind of mathematical reason-
ing. One can take this to be the kind of reasoning that is justified on a cer-
tain philosophical view of mathematics (such as Brouwer’s intuitionism); one
can take it to be a kind of mathematical reasoning which is more “concrete”
and satisfying (along the lines of Bishop’s constructivism); and one can argue
about whether or not the formal description captures the informal motiva-
tion. But whatever philosophical positions we may hold, we can study intu-
itionistic logic as a formally presented logic; and for whatever reasons, many
mathematical logicians find it interesting to do so.
There is an informal constructive interpretation of the intuitionist connec-
tives, usually known as the Brouwer-Heyting-Kolmogorov interpretation. It
runs as follows: a proof of ϕ ∧ ψ consists of a proof of ϕ paired with a proof
of ψ; a proof of ϕ ∨ ψ consists of either a proof of ϕ, or a proof of ψ, where
we have explicit information as to which is the case; a proof of ϕ → ψ con-
sists of a procedure, which transforms a proof of ϕ to a proof of ψ; a proof of
∀ x ϕ( x ) consists of a procedure which returns a proof of ϕ( x ) for any value
of x; and a proof of ∃ x ϕ( x ) consists of a value of x, together with a proof that
this value satisfies ϕ. One can describe the interpretation in computational
terms known as the “Curry-Howard isomorphism” or the “formulas-as-types
paradigm”: think of a formula as specifying a certain kind of data type, and
proofs as computational objects of these data types that enable us to see that
the corresponding formula is true.
Intuitionistic logic is often thought of as being classical logic “minus” the
law of the excluded middle. This following theorem makes this more precise.
1. ( ϕ → ⊥) → ¬ ϕ.
2. ϕ ∨ ¬ ϕ
3. ¬¬ ϕ → ϕ
Obtaining instances of one schema from either of the others is a good ex-
ercise in intuitionistic logic.
The first deductive systems for intuitionistic propositional logic, put forth
as formalizations of Brouwer’s intuitionism, are due, independently, to Kol-
mogorov, Glivenko, and Heyting. The first formalization of intuitionistic first-
order logic (and parts of intuitionist mathematics) is due to Heyting. Though
a number of classically valid schemata are not intuitionistically valid, many
are.
The double-negation translation describes an important relationship between
classical and intuitionist logic. It is defined inductively follows (think of ϕ N
( ϕ ∨ ψ) N ≡ ¬¬( ϕ N ∨ ψ N )
( ϕ → ψ) N ≡ ( ϕ N → ψ N )
(∀ x ϕ) N ≡ ∀ x ϕ N
(∃ x ϕ) N ≡ ¬¬∃ x ϕ N
2. M, w 1 ⊥.
3. M, w ( ϕ ∧ ψ) iff M, w ϕ and M, w ψ.
4. M, w ( ϕ ∨ ψ) iff M, w ϕ or M, w ψ.
( ϕ → ψ) → (ϕ → ψ)
ϕ → ϕ
ϕ → ϕ
♦ϕ → ♦ϕ
Variations of these axioms may be suitable for different applications; for ex-
ample, S5 is usually taken to characterize the notion of logical necessity. And
the nice thing is that one can usually find a semantics for which the proof
system is sound and complete by restricting the accessibility relation in the
Kripke structures in natural ways. For example, S4 corresponds to the class
of Kripke structures in which the accessibility relation is reflexive and transi-
tive. S5 corresponds to the class of Kripke structures in which the accessibility
relation is universal, which is to say that every world is accessible from every
other; so ϕ holds if and only if ϕ holds in every world.
Model Theory
289
CHAPTER 20. BEYOND FIRST-ORDER LOGIC
1. |M| = |M0 |
0
2. For every constant symbol c ∈ L, cM = cM .
0
3. For every function symbol f ∈ L, f M = f M .
0
4. For every predicate symbol P ∈ L, PM = PM .
Proof. Exercise.
291
CHAPTER 21. BASICS OF MODEL THEORY
21.2 Substructures
The domain of a structure M may be a subset of another M0 . But we should
obviously only consider M a “part” of M0 if not only |M| ⊆ |M0 |, but M and
M0 “agree” in how they interpret the symbols of the language at least on the
shared part |M|.
Definition 21.4. Given structures M and M0 for the same language L, we say
that M is a substructure of M0 , and M0 an extension of M, written M ⊆ M0 , iff
1. |M| ⊆ |M0 |,
0
2. For each constant c ∈ L, cM = cM ;
0
3. For each n-place predicate symbol f ∈ L f M ( a1 , . . . , an ) = f M ( a1 , . . . , an )
for all a1 , . . . , an ∈ |M|.
21.3 Overspill
Theorem 21.5. If a set Γ of sentences has arbitrarily large finite models, then it has
an infinite model.
Proof. If there were such a ϕ, its negation ¬ ϕ would be true in all and only the
finite structures, and it would therefore have arbitrarily large finite models
but it would lack an infinite model, contradicting ??.
Definition 21.7. Given two structures M and M0 for the same language L, we
say that M is elementarily equivalent to M0 , written M ≡ M0 , if and only if for
every sentence ϕ of L, M ϕ iff M0 ϕ.
Definition 21.8. Given two structures M and M0 for the same language L,
we say that M is isomorphic to M0 , written M ' M0 , if and only if there is a
function h : |M| → |M0 | such that:
b. M, s ϕ iff M0 , h ◦ s ϕ.
0 0
1. If t ≡ c, then ValM
s (c) = c
M and ValM ( c ) = cM . Thus, h (ValM ( t )) =
h◦s s
0 0
h(cM ) = cM (by ?? of ??) = ValMh ◦ s ( t ).
0
2. If t ≡ x, then ValM M M
s ( x ) = s ( x ) and Valh◦s ( x ) = h ( s ( x )). Thus, h (Vals ( x )) =
0
h(s( x )) = ValM
h ◦ s ( x ).
3. If t ≡ f (t1 , . . . , tn ), then
ValM M M M
s ( t ) = f (Vals ( t1 ), . . . , Vals ( tn )) and
0 0 M0
ValM
h◦s (t ) = f M
(ValM
h◦s ( t1 ), . . . , Valh◦s ( tn )).
0
The induction hypothesis is that for each i, h(ValM M
s ( ti )) = Valh◦s ( ti ). So,
h(ValM M M M
s ( t )) = h ( f (Vals ( t1 ), . . . , Vals ( tn ))
0 0
= h( f M (ValM M
h◦s ( t1 ), . . . , Valh◦s ( tn )) (21.1)
M0 0 M0
= f (ValM h◦s ( t1 ), . . . , Valh◦s ( tn )) (21.2)
0
= ValM
h◦s (t )
We also use the term “theory” informally to refer to sets of sentences hav-
ing an intended interpretation, whether deductively closed or not.
Remark 2. Consider R = hR, <i, the structure whose domain is the set R of
the real numbers, in the language comprising only a 2-place predicate sym-
bol interpreted as the < relation over the reals. Clearly R is non-enumerable;
however, since Th(R) is obviously consistent, by the Löwenheim-Skolem the-
orem it has an enumerable model, say S, and by ??, R ≡ S. Moreover, since
R and S are not isomorphic, this shows that the converse of ?? fails in general.
1. p is injective;
Proof. Since M and N are enumerable, let |M| = { a0 , a1 , . . .} and |N| = {b0 , b1 , . . .}.
Starting with an arbitrary p0 ∈ I, we define an increasing sequence of partial
isomorphisms p0 ⊆ p1 ⊆ p2 ⊆ · · · as follows:
1. if n + 1 is odd, say n = 2r, then using the Forth property find a pn+1 ∈ I
such that pn ⊆ pn+1 and ar is in the domain of pn+1 ;
If we now put: [
p= pn ,
n ≥0
Theorem 21.17. Suppose M and N are structures for a purely relational language
(a language containing only predicate symbols, and no function symbols or con-
stants). Then if M ' p N, also M ≡ N.
Remark 3. If function symbols are present, the previous result is still true, but
one needs to consider the isomorphism induced by p between the substruc-
ture of M generated by a1 , . . . , an and the substructure of N generated by b1 ,
. . . , bn .
The previous result can be “broken down” into stages by establishing a
connection between the number of nested quantifiers in a formula and how
many times the relevant partial isomorphisms can be extended.
Definition 21.18. For any formula ϕ, the quantifier rank of ϕ, denoted by qr( ϕ) ∈
N, is recursively defined as the highest number of nested quantifiers in ϕ.
Two structures M and N are n-equivalent, written M ≡n N, if they agree on all
sentences of quantifier rank less than or equal to n.
Proof. By induction on n.
Definition 21.20. Given a structure M, let |M|<ω be the set of all finite se-
quences over |M|. We use a, b, c, . . . to range over finite sequences of elements.
If a ∈ |M|<ω and a ∈ |M|, then aa represents the concatenation of a with a.
1. I0 (a, b) if and only if a and b satisfy the same atomic formulas in M and
N; i.e., if s1 ( xi ) = ai and s2 ( xi ) = bi and ϕ is atomic with all variables
among x1 , . . . , xn , then M, s1 ϕ if and only if N, s2 ϕ.
2. In+1 (a, b) if and only if for every a ∈ A there is a b ∈ B such that
In (aa, bb), and vice-versa.
Definition 21.22. Write M ≈n N if In (Λ, Λ) holds of M and N (where Λ is the
empty sequence).
Theorem 21.23. Let L be a purely relational language. Then In (a, b) implies that
for every ϕ such that qr( ϕ) ≤ n, we have M, a ϕ if and only if N, b ϕ (where
again a satisfies ϕ if any s such that s( xi ) = ai satisfies ϕ). Moreover, if L is finite,
the converse also holds.
Proof. The proof that In (a, b) implies that a and b satisfy the same formulas
of quantifier rank no greater than n is by an easy induction on ϕ. For the
converse we proceed by induction on n, using ??, which ensures that for each
n there are at most finitely many non-equivalent formulas of that quantifier
rank.
For n = 0 the hypothesis that a and b satisfy the same quantifier-free for-
mulas gives that they satisfy the same atomic ones, so that I0 (a, b).
For the n + 1 case, suppose that a and b satisfy the same formulas of quan-
tifier rank no greater than n + 1; in order to show that In+1 (a, b) suffices to
show that for each a ∈ |M| there is a b ∈ |N| such that In (aa, bb), and by the
inductive hypothesis again suffices to show that for each a ∈ |M| there is a
b ∈ |N| such that aa and bb satisfy the same formulas of quantifier rank no
greater than n.
Given a ∈ |M|, let τna be set of formulas ψ( x, y) of rank no greater than
n satisfied by aa in M; τna is finite, so we can assume it is a single first-order
formula. It follows that a satisfies ∃ x τna ( x, y), which has quantifier rank no
greater than n + 1. By hypothesis b satisfies the same formula in N, so that
there is a b ∈ |N| such that bb satisfies τna ; in particular, bb satisfies the same
formulas of quantifier rank no greater than n as aa. Similarly one shows that
for every b ∈ |N| there is a ∈ |M| such that aa and bb satisfy the same formu-
las of quantifier rank no greater than n, which completes the proof.
1. ∀ x x < x;
3. ∀ x ∀y ( x < y ∨ x = y ∨ y < x );
4. ∀ x ∃y x < y;
5. ∀ x ∃y y < x;
Theorem 21.26. Any two enumerable dense linear orderings without endpoints are
isomorphic.
3. if ai <1 a <1 ai+1 for some i, then let b ∈ |M2 | be such that bi <2 b <2
bi + 1 .
Problems
Problem 21.1. Prove ??.
Problem 21.2. Carry out the proof of (b) of ?? in detail. Make sure to note
where each of the five properties characterizing isomorphisms of ?? is used.
Problem 21.5. Complete the proof of ?? by verifying that I satisfies the Back
property.
Models of Arithmetic
22.1 Introduction
The standard model of aritmetic is the structure N with |N| = N in which ,
0, +, ×, and < are interpreted as you would expect. That is, is 0, 0 is the
successor function, + is interpeted as addition and × as multiplication of the
numbers in N. Specifically,
N = 0
0N ( n ) = n + 1
+N (n, m) = n + m
×N (n, m) = nm
Of course, there are structures for L A that have domains other than N. For
instance, we can take M with domain |M| = { a}∗ (the finite sequences of the
single symbol a, i.e., ∅, a, aa, aaa, . . . ), and interpretations
M = ∅
0M ( s ) = s _ a
+M (n, m) = an+m
×M (n, m) = anm
These two structures are “essentially the same” in the sense that the only dif-
ference is the elements of the domains but not how the elements of the do-
mains are related among each other by the interpretation functions. We say
that the two structures are isomorphic.
It is an easy consequence of the compactness theorem that any theory true
in N also has models that are not isomorphic to N. Such structures are called
non-standard. The interesting thing about them is that while the elements of a
standard model (i.e., N, but also all structures isomorphic to it) are exhausted
300
22.2. STANDARD MODELS OF ARITHMETIC
Proposition 22.2. If a structure M standard, its domain is the set of values of the
standard numerals, i.e.,
Proof. Clearly, every ValM (n) ∈ |M|. We just have to show that every x ∈
|M| is equal to ValM (n) for some n. Since M is standard, it is isomorphic
to N. Suppose g : N → |M| is an isomorphism. Then g(n) = g(ValN (n)) =
ValM (n). But for every x ∈ |M|, there is an n ∈ N such that g(n) = x, since g
is surjective.
5. hn, mi ∈ <N iff n < m. If n < m, then Q ` n < m, and also M n < m.
Thus hValM (n), ValM (m)i ∈ <M , i.e., h g(n), g(m)i ∈ <M . If n 6< m,
then Q ` ¬n < m, and consequently M 2 n < m. Thus, as before,
/ <M . Together, we get: hn, mi ∈ <N iff h g(n), g(m)i ∈
h g(n), g(m)i ∈
<M .
Proposition 22.4. If M is standard, then g from the proof of ?? is the only isomor-
phism from N to M.
Proof. Expand L A by a new constant symbol c and consider the set of sen-
tences
Γ = TA ∪ {c 6= 0, c 6= 1, c 6= 2, . . . }
22.4 Models of Q
We know that there are non-standard structures that make the same sentences
true as N does, i.e., is a model of TA. Since N Q, any model of TA is also
a model of Q. Q is much weaker than TA, e.g., Q 0 ∀ x ∀y ( x + y) = (y + x ).
Weaker theories are easier to satisfy: they have more models. E.g., Q has
models which make ∀ x ∀y ( x + y) = (y + x ) false, but those cannot also be
models of TA, or PA for that matter. Models of Q are also relatively simple:
we can specify them explicitly.
Example 22.8. Consider the structure K with domain |K| = N ∪ { a} and in-
terpretations
K = 0
(
x+1 if x ∈ N
0K ( x ) =
a if x = a
(
x+y if x, y ∈ N
+K ( x, y) =
a otherwise
(
xy if x, y ∈ N
×K ( x, y) =
a otherwise
< = {h x, yi : x, y ∈ N and x < y} ∪ {h x, ai : x ∈ |K|}
K
x x∗ x⊕y m a x⊗y m a
n n+1 n n+m a n nm a
a a a a a a a a
(n ⊕ m∗ ) = (n + (m + 1)) = (n + m) + 1 = (n ⊕ m)∗
since ⊕ and ∗ agree with + and 0 on standard numbers. Now suppose x ∈ |K|.
Then
( x ⊕ a∗ ) = ( x ⊕ a) = a = a∗ = ( x ⊕ a)∗
( a ⊕ n∗ ) = ( a ⊕ (n + 1)) = a = a∗ = ( x ⊕ n)∗
( a ⊕ a∗ ) = ( a ⊕ a) = a = a∗ = ( x ⊕ a)∗
This is of course a bit more detailed than needed. For instance, since a ⊕ z = a
whatever z is, we can immediately conclude a ⊕ a∗ = a. The remaining axioms
can be verified the same way.
K is thus a model of Q. Its “addition” ⊕ is also commutative. But there are
other sentences true in N but false in K, and vice versa. For instance, a 4 a, so
K ∃ x x < x and K 2 ∀ x ¬ x < x. This shows that Q 0 ∀ x ¬ x < x.
Example 22.9. Consider the structure L with domain |L| = N ∪ { a, b} and
interpretations 0L = ∗, +L = ⊕ given by
x x∗ x⊕y m a b
n n+1 n n+m b a
a a a a b a
b b b b b a
Since ∗ is injective, 0 is not in its range, and every x ∈ |L| other than 0 is,
axioms Q1 –Q3 are true in L. For any x, x ⊕ 0 = x, so Q4 is true as well. For
Q5 , consider x ⊕ y∗ and ( x ⊕ y)∗ . They are equal if x and y are both standard,
since then ∗ and ⊕ agree with 0 and +. If x is non-standard, and y is standard,
we have x ⊕ y∗ = x = x ∗ = ( x ⊕ y)∗ . If x and y are both non-standard, we
have four cases:
a ⊕ a∗ = b = b∗ = ( a ⊕ a)∗
b ⊕ b∗ = a = a∗ = (b ⊕ b)∗
b ⊕ a∗ = b = b∗ = (b ⊕ y)∗
a ⊕ b∗ = a = a∗ = ( a ⊕ b)∗
n ⊕ a∗ = n ⊕ a = b = b∗ = (n ⊕ a)∗
n ⊕ b∗ = n ⊕ b = a = a∗ = (n ⊕ b)∗
So, L Q5 . However, a ⊕ 0 6= 0 ⊕ a, so L 2 ∀ x ∀y ( x + y) = (y + x ).
We’ve explicitly constructed models of Q in which the non-standard ele-
ments live “beyond” the standard elements. In fact, that much is required by
the axioms. A non-standard element x cannot be 40. Otherwise, for some z,
x ⊕ z∗ = 0 by Q8. But then 0 = x ⊕ z∗ = ( x ⊕ z)∗ by Q5 , contradicting Q2 .
Also, for every n, Q ` ∀ x ( x < n0 → ( x = 0 ∨ x = 1 ∨ · · · ∨ x = n)), so we
can’t have a 4 n for any n > 0.
using the language of arithmetic, and the standard numeral n actually picks
out n. The other nice feature is that the interpretations of the non-logical sym-
bols of L A are all computable. The successor, addition, and multiplication func-
tions which serve as 0N , +N , and ×N are computable functions of numbers.
(Computable by Turing machines, or definable by primitive recursion, say.)
And the less-than relation on N, i.e., <N , is decidable.
Non-standard models of arithmetical theories such as Q and PA must con-
tain non-standard elements. Thus their domains typically include elements in
addition to N. However, any countable structure can be built on any denu-
merable set, including N. So there are also non-standard models with do-
main N. In such models M, of course, at least some numbers cannot play
the roles they usually play, since some k must be different from ValM (n) for
all n ∈ N.
Example 22.11. Recall the structure K from ?? Its domain was |K| = N ∪ { a}
and interpretations
K = 0
(
x+1 if x ∈ N
0K ( x ) =
a if x = a
(
x+y if x, y ∈ N
+K ( x, y) =
a otherwise
(
xy if x, y ∈ N
×K ( x, y) =
a otherwise
<K = {h x, yi : x, y ∈ N and x < y} ∪ {h x, ai : n ∈ |K|}
0
0K (0) = 0. For addition and multiplication we likewise have
(
K0 x + y if x, y > 0
+ ( x, y) =
0 otherwise
(
0 xy if x, y > 0
×K ( x, y) =
0 otherwise
0
And we have h x, yi ∈ <K iff x < y and x > 0 and y > 0, or if y = 0.
All of these functions are computable functions of natural numbers and
0
<K is a decidable relation on N—but they are not the same functions as suc-
0
cessor, addition, and multiplication on N, and <K is not the same relation
as < on N.
This example shows that Q has computable non-standard models with do-
main N. However, the following result shows that this is not true for models
of PA (and thus also for models of TA).
Theorem 22.12 (Tennenbaum’s Theorem). N is the only computable model of PA.
Problems
Problem 22.1. Show that the converse of ?? is false, i.e., give an example of
a structure M with |M| = {ValM (n) : n ∈ N} that is not isomorphic to N.
Problem 22.2. Recall that Q contains the axioms
∀ x ∀y ( x 0 = y0 → x = y) (Q1 )
∀ x 6= x0 (Q2 )
∀ x ( x 6= → ∃y x = y0 ) (Q3 )
∀ x ( x × ) = (Q6 )
∀ x ∀y ( x × y0 ) = (( x × y) + x ) (Q7 )
∀ x ∀y ( x < y ↔ ∃z ( x + z0 = y)) (Q8 )
∀ x ( x × ) = (Q6 )
∀ x ∀y ( x × y0 ) = (( x × y) + x ) (Q7 )
∀ x ∀y ( x < y ↔ ∃z ( x + z0 = y)) (Q8 )
23.1 Introduction
The interpolation theorem is the following result: Suppose ϕ → ψ. Then
there is a sentence χ such that ϕ → χ and χ → ψ. Moreover, every constant
symbol, function symbol, and predicate symbol (other than =) in χ occurs
both in ϕ and ψ. The sentence χ is called an interpolant of ϕ and ψ.
The interpolation theorem is interesting in its own right, but its main im-
portance lies in the fact that it can be used to prove results about definability in
a theory, and the conditions under which combining two consistent theories
results in a consistent theory. The first result is known as the Beth definability
theorem; the second, Robinson’s joint consistency theorem.
Lemma 23.2. Suppose L0 is the language containing every constant symbol, func-
.
tion symbol and predicate symbol (other than =) that occurs in both Γ and ∆, and let
310
23.2. SEPARATION OF SENTENCES
Γ ∆
¬χ
L00 be obtained by the addition of infinitely many new constant symbols cn for n ≥ 0.
Then if Γ and ∆ are inseparable in L0 , they are also inseparable in L00 .
γ χ[c/x ], δ ¬χ[c/x ].
Γ ∀ x χ, ∆ ¬∀ x χ,
Lemma 23.3. Suppose that Γ ∪ {∃ x σ } and ∆ are inseparable, and c is a new con-
stant symbol not in Γ, ∆, or σ. Then Γ ∪ {∃ x σ, σ [c/x ]} and ∆ are also inseparable.
2. c does occur in χ so that χ has the form χ[c/x ]. Then we have that
Γ ∪ {∃ x σ, σ [c/x ]} χ[c/x ],
Finally, define:
Γ∗ = ∆∗ =
[ [
Γn , ∆n.
n ≥0 n ≥0
The basis for ?? is given by ??. For part ??, we need to distinguish three cases:
This completes the basis of the induction for ?? and ?? above. Now for the in-
ductive step. For ??, if ∆ n+1 = ∆ n ∪ {ψn } then Γn+1 and ∆ n+1 are inseparable
by construction (even when ψn is existential, by ??); if ∆ n+1 = ∆ n (because
Γn+1 and ∆ n ∪ {ψn } are separable), then we use the induction hypothesis on
??. For the inductive step for ??, if Γn+2 = Γn+1 ∪ { ϕn+1 } then Γn+2 and ∆ n+1
are inseparable by construction (even when ϕn+1 is existential, by ??); and if
Γn+2 = Γn+1 then we use the inductive case for ?? just proved. This concludes
the induction on ?? and ??.
It follows that Γ ∗ and ∆∗ are inseparable; if not, by compactness, there
is n ≥ 0 that separates Γn and ∆ n , against ??. In particular, Γ ∗ and ∆∗ are
consistent: for if the former or the latter is inconsistent, then they are separated
by ∃ x x 6= x or ∀ x x = x, respectively.
We now show that Γ ∗ is maximally consistent in L10 and likewise ∆∗ in
L20 . For the former, suppose that ϕn ∈ / Γ ∗ and ¬ ϕn ∈/ Γ ∗ , for some n ≥ 0. If
ϕn ∈ / Γ then Γn ∪ { ϕn } is separable from ∆ n , and so there is χ ∈ L00 such that
∗
both:
Γ ∗ ϕn → χ, ∆∗ ¬χ.
Γ ∗ ¬ ϕn → χ0 , ∆∗ ¬χ0 .
Finally, one shows by induction on formulas that M agrees with M10 on all
formulas of L10 and with M20 on all formulas of L20 . In particular, M Γ ∗ ∪ ∆∗ ,
whence M ϕ and M ¬ψ, and 6 ϕ → ψ. This concludes the proof of Craig’s
Interpolation Theorem.
Σ( P) ∀ x1 . . . ∀ xn ( P( x1 , . . . , xn ) ↔ χ( x1 , . . . , xn )).
But an explicit definition is only one way of defining—in the sense of deter-
mining completely—a relation. A theory may also be such that the interpreta-
tion of P is fixed by the interpretation of the rest of the language in any model.
The definability theorem states that whenever a theory fixes the interpreta-
tion of P in this way—whenever it implicitly defines P—then it also explicitly
defines it.
Σ( P) ∀ x1 . . . ∀ xn ( P( x1 , . . . , xn ) ↔ χ( x1 , . . . , xn )).
Σ( P) ∪ Σ( P0 ) ∀ x1 . . . ∀ xn ( P( x1 , . . . , xn ) ↔ P0 ( x1 , . . . , xn )),
Σ( P) ∀ x1 . . . ∀ xn [( P( x1 , . . . , xn ) ↔ χ( x1 , . . . , xn ))]
0
Σ( P ) ∀ x1 . . . ∀ xn [( P0 ( x1 , . . . , xn ) ↔ χ( x1 , . . . , xn ))]
and the conclusion follows. For the converse: assume that Σ( P) implicitly
defines P. First, we add constant symbols c1 , . . . , cn to L. Then
Σ ( P ) ∪ Σ ( P 0 ) P ( c1 , . . . , c n ) → P 0 ( c1 , . . . , c n ).
∆ 0 ∪ ∆ 1 P ( c1 , . . . , c n ) → P 0 ( c1 , . . . , c n ).
θ ( P ) ∧ P ( c1 , . . . , c n ) χ ( c1 , . . . , c n ); χ ( c1 , . . . , c n ) θ ( P 0 ) → P 0 ( c1 , . . . , c n ).
θ ( P ) χ ( c1 , . . . , c n ) → P ( c1 , . . . , c n ).
Σ( P) ∀ x1 . . . ∀ xn ( P( x1 , . . . , xn ) ↔ χ( x1 , . . . , xn )).
Lindström’s Theorem
24.1 Introduction
In this chapter we aim to prove Lindström’s characterization of first-order
logic as the maximal logic for which (given certain further constraints) the
Compactness and the Downward Löwenheim-Skolem theorems hold (?? and
??). First, we need a more general characterization of the general class of log-
ics to which the theorem applies. We will restrict ourselves to relational lan-
guages, i.e., languages which only contain predicate symbols and individual
constants, but no function symbols.
Notice that we are still employing the same notion of structure for a given
language as for first-order logic, but we do not presuppose that sentences are
build up from the basic symbols in L in the usual way, nor that the relation
|= L is recursively defined in the same way as for first-order logic. So for in-
stance the definition, being completely general, is intended to capture the case
where sentences in h L, |= L i contain infinitely long conjunctions or disjunction,
or quantifiers other than ∃ and ∀ (e.g., “there are infinitely many x such that
. . . ”), or perhaps infinitely long quantifier prefixes. To emphasize that “sen-
tences” in L(L) need not be ordinary sentences of first-order logic, in this
chapter we use variables α, β, . . . to range over them, and reserve ϕ, ψ, . . . for
ordinary first-order formulas.
317
CHAPTER 24. LINDSTRÖM’S THEOREM
Definition 24.2. Let Mod L (α) denote the class {M : M |= L α}. If the language
needs to be made explicit, we write ModL L ( α ). Two structures M and N for L
are elementarily equivalent in h L, |= L i, written M ≡ L N, if the same sentences
from L(L) are true in each.
Remark 5. First-order logic, i.e., the abstract logic h F, |=i, is normal. In fact,
the above properties are mostly straightforward for first-order logic. We just
remark that the expansion property comes down to extensionality, and that
the relativization of a sentence α to R( x, c1 , . . . , cn ) is obtained by replacing
each subformula ∀ x β by ∀ x ( R( x, c1 , . . . , cn ) → β). Moreover, if h L, |= L i is
normal, then h F, |=i ≤ h L, |= L i, as can be can shown by induction on first-
order formulas. Accordingly, with no loss in generality, we can assume that
every first-order sentence belongs to every normal logic.
Proof. Suppose M ' p N, but for some α also M |= L α while N 6|= L α. By the
Isomorphism Property we can assume that |M| and |N| are disjoint, and by
the Expansion Property we can assume that α ∈ L(L) for a finite language L.
Let I be a set of partial isomorphisms between M and N, and with no loss of
generality also assume that if p ∈ I and q ⊆ p then also q ∈ I .
|M|<ω is the set of finite sequences of elements of |M|. Let S be the ternary
relation over |M|<ω representing concatenation, i.e., if a, b, c ∈ |M|<ω then
S(a, b, c) holds if and only if c is the concatenation of a and b; and let T be the
ternary relation such that T (a, b, c) holds for b ∈ M and a, c ∈ |M|<ω if and
only if a = a1 , . . . an and c = a1 , . . . an , b. Pick new 3-place predicate symbols
P and Q and form the structure M∗ having the universe |M| ∪ |M|<ω , having
M as a substructure, and interpreting P and Q by the concatenation relations
S and T (so M∗ is in the language L ∪ { P, Q}).
Define |N|<ω , S0 , T 0 , P0 , Q0 and N∗ analogously. Since by hypothesis M ' p
N, there is a relation I between |M|<ω and |N|<ω such that I (a, b) holds if and
only if a and b are isomorphic and satisfy the back-and-forth condition of ??.
Now, let M be the structure whose domain is the union of the domains of M∗
and N∗ , having M∗ and N∗ as substructures, in the language with one extra
binary predicate symbol R interpreted by the relation I and predicate symbols
denoting the domains |M|∗ and |N| ∗.
I
M N
M∗ N∗
Proof. Let n be such that any two n-equivalent structures M and N agree on
the value assigned to α. Recall ??: there are only finitely many first-order
sentences in a finite language that have quantifier rank no greater than n, up to
logical equivalence. Now, for each fixed structure M let θM be the conjunction
of all first-order sentences α true in M with qr(α) ≤ n (this conjunction is
finite), so that N |= θM if and only if N ≡n M. Then put θ = {θM : M |= L
W
Proof. By ??, it suffices to show that for any α ∈ L(L), with L finite, there
is n ∈ N such that for any two structures M and N: if M ≡n N then M
and N agree on α. For then α is equivalent to a first-order sentence, from
which h L, |= L i ≤ h F, |=i follows. Since we are working in a finite, purely
relational language, by ?? we can replace the statement that M ≡n N by the
corresponding algebraic statement that In (∅, ∅).
Given α, suppose towards a contradiction that for each n there are struc-
tures Mn and Nn such that In (∅, ∅), but (say) Mn |= L α whereas Nn 6|= L α. By
the Isomorphism Property we can assume that all the Mn ’s interpret the con-
stants of the language by the same objects; furthermore, since there are only
finitely many atomic sentences in the language, we may also assume that they
satisfy the same atomic sentences (we can take a subsequence of the M’s oth-
erwise). Let M be the union of all the Mn ’s, i.e., the unique minimal structure
having each Mn as a substructure. As in the proof of ??, let M∗ be the exten-
sion of M with domain |M| ∪ |M|<ω , in the expanded language comprising
the concatenation predicates P and Q.
Similarly, define Nn , N and N∗ . Now let M be the structure whose domain
comprises the domains of M∗ and N∗ as well as the natural numbers N along
with their natural ordering ≤, in the language with extra predicates represent-
ing the domains |M|, |N|, |M|<ω and |N|<ω as well as predicates coding the
domains of Mn and Nn in the sense that:
The structure M also has a ternary relation J such that J (n, a, b) holds if and
only if In (a, b).
Now there is a sentence θ in the language L augmented by R, S, J, etc.,
saying that ≤ is a discrete linear ordering with first but no last element and
such that Mn |= α, Nn 6|= α, and for each n in the ordering, J (n, a, b) holds if
and only if In (a, b).
Computability
323
CHAPTER 24. LINDSTRÖM’S THEOREM
Recursive Functions
25.1 Introduction
In order to develop a mathematical theory of computability, one has to first
of all develop a model of computability. We now think of computability as the
kind of thing that computers do, and computers work with symbols. But at
the beginning of the development of theories of computability, the paradig-
matic example of computation was numerical computation. Mathematicians
were always interested in number-theoretic functions, i.e., functions f : Nn →
N that can be computed. So it is not surprising that at the beginning of the
theory of computability, it was such functions that were studied. The most
familiar examples of computable numerical functions, such as addition, mul-
tiplication, exponentiation (of natural numbers) share an interesting feature:
they can be defined recursively. It is thus quite natural to attempt a general
definition of computable function on the basis of recursive definitions. Among
the many possible ways to define number-theoretic functions recursively, one
particulalry simple pattern of definition here becomes central: so-called prim-
itive recursion.
In addition to computable functions, we might be interested in computable
sets and relations. A set is computable if we can compute the answer to
whether or not a given number is an element of the set, and a relation is com-
putable iff we can compute whether or not a tuple hn1 , . . . , nk i is an element
of the relation. By considering the characteristic function of a set or relation,
discussion of computable sets and relations can be subsumed under that of
325
CHAPTER 25. RECURSIVE FUNCTIONS
l (0) = 1
l ( x + 1) = 2 · l ( x ).
It is pretty clear that there is only one function, l, that meets these two criteria.
This is an instance of a definition by primitive recursion. We can define even
more fundamental functions like addition and multiplication by
f ( x, 0) = x
f ( x, y + 1) = f ( x, y) + 1
and
g( x, 0)= 0
g( x, y + 1) = f ( g( x, y), x ).
h( x, 0)= 1
h( x, y + 1) = g(h( x, y), x ).
We can also compose functions to build more complex ones; for example,
k( x) = x x + ( x + 3) · x
= f (h( x, x ), g( f ( x, 3), x )).
Let zero( x ) be the function that always returns 0, regardless of what x is,
and let succ( x ) = x + 1 be the successor function. The set of primitive recursive
functions is the set of functions from Nn to N that you get if you start with
zero and succ by iterating the two operations above, primitive recursion and
composition. The idea is that primitive recursive functions are defined in a
straightforward and explicit way, so that it is intuitively clear that each one
can be computed using finite means.
h( x0 , . . . , xl −1 ) = f ( g0 ( x0 , . . . , xl −1 ), . . . , gk−1 ( x0 , . . . , xl −1 )).
h(0, z0 , . . . , zk−1 )= f ( z 0 , . . . , z k −1 )
h( x + 1, z0 , . . . , zk−1 ) = g( x, h( x, z0 , . . . , zk−1 ), z0 , . . . , zk−1 )
Pin ( x0 , . . . , xn−1 ) = xi ,
for each natural number n and i < n. These are not terribly exciting in them-
selves: Pin is simply the k-place function that always returns its ith argument.
But the allow us to define new functions by disregarding arguments or switch-
ing arguments, as we’ll see later.
In the end, we have the following:
Definition 25.3. The set of primitive recursive functions is the set of functions
from Nn to N, defined inductively by the following clauses:
Put more concisely, the set of primitive recursive functions is the smallest
set containing zero, succ, and the projection functions Pjn , and which is closed
under composition and primitive recursion.
Another way of describing the set of primitive recursive functions keeps
track of the “stage” at which a function enters the set. Let S0 denote the set of
starting functions: zero, succ, and the projections. Once Si has been defined,
let Si+1 be the set of all functions you get by applying a single instance of
composition or primitive recursion to functions in Si . Then
[
S= Si
i ∈N
h( x, y) = f ( x, g( x, x, y), y).
h( x, y) = f ( P02 ( x, y), g( P02 ( x, y), P02 ( x, y), P12 ( x, y)), P12 ( x, y)).
x+0 = x
x + (y + 1) = succ( x + y).
In other words, addition is the function add defined recursively by the equa-
tions
add(0, x )
= x
add(y + 1, x ) = succ(add(y, x )).
But even this is not a strict primitive recursive definition; we need to put it in
the form
add(0, x ) = f (x)
add(y + 1, x ) = g(y, add(y, x ), x )
for some 1-place primitive recursive function f and some 3-place primitive
recursive function g. We can take f to be P01 , and we can define g using com-
position,
g(y, w, x ) = succ( P13 (y, w, x )).
using composition.
One advantage to having the precise description of the primitive recur-
sive functions is that we can be systematic in describing them. For example,
we can assign a “notation” to each such function, as follows. Use symbols
zero, succ, and Pin for zero, successor, and the projections. Now suppose f
is defined by composition from a k-place function h and l-place functions g0 ,
. . . , gk−1 , and we have assigned notations H, G0 , . . . , Gk−1 to the latter func-
tions. Then, using a new symbol Compk,l , we can denote the function f by
Compk,l [ H, G0 , . . . , Gk−1 ]. For the functions defined by primitive recursion,
we can use analogous notations of the form Reck [ G, H ], where k denotes that
arity of the function being defined. With this setup, we can denote the addi-
tion function by
Rec2 [ P01 , Comp1,3 [succ, P13 ]].
and suppose the functions f and g are computable. Then h(0, ~z) can obviously
be computed, since it is just f (~z) which we assume is computable. h(1, ~z) can
then also be computed, since 1 = 0 + 1 and so h(1, ~z) is just
Thus, to compute h( x, ~z) in general, successively compute h(0, ~z), h(1, ~z), . . . ,
until we reach h( x, ~z).
Thus, primitive recursion yields a new computable function if the func-
tions f and g are computable. Composition of functions also results in a com-
putable function if the functions f and gi are computable.
Since the basic functions zero, succ, and Pin are computable, and compo-
sition and primitive recursion yield computable functions from computable
functions, his means that every primitive recursive function is computable.
1. Constants: for each natural number n, the function that always returns n
primitive recursive function, since it is equal to succ(succ(. . . succ(zero( x )))).
3. Addition, x + y
4. Multiplication, x · y
6. Factorial, x! = 1 · 2 · 3 · · · · · x
pred(0) = 0, pred( x + 1) = x
x −̇ 0 = x, x −̇ (y + 1) = pred( x −̇ y)
max( x, y) = x + (y −̇ x )
In our definitions, we’ll often use constants n. This is ok because the con-
stant function constn ( x ) is primitive recursive (defined from zero and succ).
So if, e.g., we want to define the function f ( x ) = 2 · x can obtain it by com-
position from constn ( x ) and multiplication as f ( x ) = const2 ( x ) · P01 ( x ). We’ll
make use of this trick from now on.
You’ll also have noticed that the definition of pred does not, strictly speak-
ing, fit into the pattern of definition by primitive recursion, since that pattern
requires an extra argument. It is also odd in that it does not actually pred( x )
in the definition of pred( x + 1). But we can define pred0 ( x, y) by
and then define pred from it by composition, e.g., as pred( x ) = pred0 ( P01 ( x ), zero( x )).
The set of primitive recursive functions is further closed under the follow-
ing two operations:
y
g(y, ~z) = ∑ f ( x, ~z).
x =0
y
h(y, ~z) = ∏ f (x,~z).
x =0
We can also define boolean operations, where 1 stands for true, and 0 for false:
1. Negation, not( x ) = 1 −̇ x
2. Conjunction, and( x, y) = x · y
Other classical boolean operations like or( x, y) and ifthen( x, y) can be defined
from these in the usual way.
It should be clear that one can compose relations with other primitive re-
cursive functions. So the following are also primitive recursive:
1. Negation, ¬ P
2. Conjunction, P ∧ Q
3. Disjunction, P ∨ Q
4. If . . . then, P → Q
are all primitive recursive, if P and Q are. For suppose χ P (~z) an χQ (~z) are
primitive recursive. Then the relation R(~z) that holds iff both P(~z) and Q(~z)
hold has the characteristic function χ R (~z) = and(χ P (~z), χQ (~z)).
One can also define relations using bounded quantification:
(∀ x < y) R( x, ~z)
which holds if and only if R( x, ~z) holds for every x less than y.
cond(0, y, z) = y, cond( x + 1, y, z) = z.
1. Definition by cases: if g0 (~x ), . . . , gm (~x ) are functions, and R1 (~x ), . . . , Rm−1 (~x )
are relations, then the function f defined by
g0 (~x ) if R0 (~x )
g 1 (~
x ) if R1 (~x ) and not R0 (~x )
.
f (~x ) = ..
gm−1 (~x ) if Rm−1 (~x ) and none of the previous hold
gm (~x ) otherwise
For m greater than 1, one can just compose definitions of this form.
Proposition 25.5. If R( x, ~z) is primitive recursive, so is the function m R (y, ~z) which
returns the least x less than y such that R( x, ~z) holds, if there is one, and 0 otherwise.
We will write the function m R as
Proof. Note than there can be no x < 0 such that R( x, ~z) since there is no x < 0
at all. So m R ( x, 0) = 0.
In case the bound is y + 1 we have three cases: (a) There is an x < y such
that R( x, ~z), in which case m R (y + 1, ~z) = m R (y, ~z). (b) There is no such x
but R(y, ~z) holds, then m R (y + 1, ~z) = y. (c) There is no x < y + 1 such that
R( x, ~z), then m R (y + 1, ~z) = 0. So,
m R (0, ~z) = 0
m R (y, ~z)
if (∃ x < y) R( x, ~z)
m R (y + 1, ~z) = y otherwise, provided R(y, ~z)
0 otherwise.
25.7 Primes
Bounded quantification and bounded minimization provide us with a good
deal of machinery to show that natural functions and relations are primitive
recursive. For example, consider the relation relation “x divides y”, written
x | y. x | y holds if division of x by y is possible without remainder, i.e., if y is
an integer multiple of x. (If it doesn’t hold, i.e., the remainder when dividing
x by y is > 0, we write x - y.) In other words, x | y iff for some z, x · z = y.
Obviously, any such z, if it exists, must be ≤ y. So, we have that x | y iff for
some z ≤ y, x · z = y. We can define the relation x | y by bounded existential
quantification from = and multiplication by
x | y ⇔ (∃z ≤ y) ( x · z) = y.
We’ve thus shown that x | y is primitive recursive.
A natural number x is prime if it is neither 0 nor 1 and is only divisible by
1 and itself. In other words, prime numbers are such that, whenever y | x,
either y = 1 or y = x. To test if x is prime, we only have to check if y | x for
all y ≤ x, since if y > x, then automatically y - x. So, the relation Prime( x ),
which holds iff x is prime, can be defined by
Prime( x ) ⇔ x ≥ 2 ∧ (∀y ≤ x ) (y | x → y = 1 ∨ y = x )
and is thus primitive recursive.
The primes are 2, 3, 5, 7, 11, etc. Consider the function p( x ) which returns
the xth prime in that sequence, i.e., p(0) = 2, p(1) = 3, p(2) = 5, etc. (For
convenience we will often write p( x ) as p x (p0 = 2, p1 = 3, etc.)
If we had a function nextPrime(x), which returns the first prime number
larger than x, p can be easily defined using primitive recursion:
p (0) = 2
p( x + 1) = nextPrime( p( x ))
Since nextPrime( x ) is the least y such that y > x and y is prime, it can be
easily computed by unbounded search. But it can also be defined by bounded
minimization, thanks to a result due to Euclid: there is always a prime number
between x and x! + 1.
nextPrime(x) = (min y ≤ x! + 1) (y > x ∧ Prime(y)).
This shows, that nextPrime( x ) and hence p( x ) are (not just computable but)
primitive recursive.
(If you’re curious, here’s a quick proof of Euclid’s theorem. Suppose pn
is the largest prime ≤ x and consider the product p = p0 · p1 · · · · · pn of all
primes ≤ x. Either p + 1 is prime or there is a prime between x and p + 1.
Why? Suppose p + 1 is not prime. Then some prime number q | p + 1 where
q < p + 1. None of the primes ≤ x divide p + 1. (By definition of p, each
of the primes pi ≤ x divides p, i.e., with remainder 0. So, each of the primes
pi ≤ x divides p + 1 with remainder 1, and so pi - p + 1.) Hence, q is a prime
> x and < p + 1. And p ≤ x!, so there is a prime > x and ≤ x! + 1.)
25.8 Sequences
The set of primitive recursive functions is remarkably robust. But we will be
able to do even more once we have developed an adequate means of handling
1. len(s), which returns the length of the sequence s: Let R(i, s) be the rela-
tion defined by
3. element(s, i ), which returns the ith element of s (where the initial ele-
ment is called the 0th), or 0 if i is greater than or equal to the length of
s: (
0 if i ≥ len(s)
element(s, i ) = j +2
min j < s ( pi 6 | s) − 1 otherwise
Instead of using the official names for the functions defined above, we
introduce a more compact notation. We will use (s)i instead of element(s, i ),
and hs0 , . . . , sk i to abbreviate
append(append(. . . append(Λ, s0 ) . . . ), sk ).
most k prime factors, each at most pk−1 , and each raised to at most x + 1 in the
prime factorization of s. In other words, if we define
k ·( x +1)
sequenceBound( x, k) = pk−1 ,
then the numeric code of the sequence s described above is at most sequenceBound( x, k).
Having such a bound on sequences gives us a way of defining new func-
tions using bounded search. For example, suppose we want to define the
function concat(s, t), which concatenates two sequences. One first option is to
define a “helper” function hconcat(s, t, n) which concatenates the first n sym-
bols of t to s. This function can be defined by primitive recursion, as follows:
hconcat(s, t, 0) = s
hconcat(s, t, n + 1) = append(hconcat(s, t, n), (t)n )
But using bounded search, we can be lazy. All we need to do is write down a
primitive recursive specification of the object (number) we are looking for, and
a bound on how far to look. The following works:
h( x ) = g( x, x ) + 1
= f x ( x ) + 1.
g0 ( x )
= x+1
gn+1 ( x ) = gnx ( x )
You can confirm that each function gn is primitive recursive. Each successive
function grows much faster than the one before; g1 ( x ) is equal to 2x, g2 ( x )
is equal to 2x · x, and g3 ( x ) grows roughly like an exponential stack of x 2’s.
Ackermann’s function is essentially the function G ( x ) = gx ( x ), and one can
show that this grows faster than any primitive recursive function.
Let us return to the issue of enumerating the primitive recursive functions.
Remember that we have assigned symbolic notations to each primitive recur-
sive function; so it suffices to enumerate notations. We can assign a natural
number #( F ) to each notation F, recursively, as follows:
#(0) = h0i
#( S ) = h1i
#( Pin ) = h2, n, i i
#(Compk,l [ H, G0 , . . . , Gk−1 ]) = h3, k, l, #( H ), #( G0 ), . . . , #( Gk−1 )i
#(Recl [ G, H ]) = h4, l, #( G ), #( H )i
Here I am using the fact that every sequence of numbers can be viewed as
a natural number, using the codes from the last section. The upshot is that
every code is assigned a natural number. Of course, some sequences (and
hence some numbers) do not correspond to notations; but we can let f i be the
unary primitive recursive function with notation coded as i, if i codes such a
notation; and the constant 0 function otherwise. The net result is that we have
an explicit way of enumerating the unary primitive recursive functions.
(In fact, some functions, like the constant zero function, will appear more
than once on the list. This is not just an artifact of our coding, but also a result
of the fact that the constant zero function has more than one notation. We will
later see that one can not computably avoid these repetitions; for example,
there is no computable function that decides whether or not a given notation
represents the constant zero function.)
We can now take the function g( x, y) to be given by f x (y), where f x refers
to the enumeration we have just described. How do we know that g( x, y) is
computable? Intuitively, this is clear: to compute g( x, y), first “unpack” x,
and see if it a notation for a unary function; if it is, compute the value of that
function on input y.
You may already be convinced that (with some work!) one can write
a program (say, in Java or C++) that does this; and now we can appeal to
the Church-Turing thesis, which says that anything that, intuitively, is com-
putable can be computed by a Turing machine.
Of course, a more direct way to show that g( x, y) is computable is to de-
scribe a Turing machine that computes it, explicitly. This would, in partic-
ular, avoid the Church-Turing thesis and appeals to intuition. But, as noted
above, working with Turing machines directly is unpleasant. Soon we will
have built up enough machinery to show that g( x, y) is computable, appeal-
ing to a model of computation that can be simulated on a Turing machine:
namely, the recursive functions.
things:
2. Add something to the definition, so that some new partial functions are
included.
The first is easy. As before, we will start with zero, successor, and projec-
tions, and close under composition and primitive recursion. The only differ-
ence is that we have to modify the definitions of composition and primitive
recursion to allow for the possibility that some of the terms in the definition
are not defined. If f and g are partial functions, we will write f ( x ) ↓ to mean
that f is defined at x, i.e., x is in the domain of f ; and f ( x ) ↑ to mean the
opposite, i.e., that f is not defined at x. We will use f ( x ) ' g( x ) to mean that
either f ( x ) and g( x ) are both undefined, or they are both defined and equal.
We will use these notations for more complicated terms as well. We will adopt
the convention that if h and g0 , . . . , gk all are partial functions, then
h( g0 (~x ), . . . , gk (~x ))
the least x such that f (0, ~z), f (1, ~z), . . . , f ( x, ~z) are all defined, and
f ( x, ~z) = 0, if such an x exists
that our original definition is more general, since it allows for the possibility
that f ( x, ~z) is not everywhere defined (whereas, in contrast, the characteristic
function of a relation is always total).
Definition 25.6. The set of partial recursive functions is the smallest set of partial
functions from the natural numbers to the natural numbers (of various arities)
containing zero, successor, and projections, and closed under composition,
primitive recursion, and unbounded search.
Definition 25.7. The set of recursive functions is the set of partial recursive
functions that are total.
for every x.
The proof of the normal form theorem is involved, but the basic idea is
simple. Every partial recursive function has an index e, intuitively, a number
coding its program or definition. If f ( x ) ↓, the computation can be recorded
systematically and coded by some number s, and that s codes the computation
of f on input x can be checked primitive recursively using only x and the
definition e. This means that T is primitive recursive. Given the full record of
the computation s, the “upshot” of s is the value of f ( x ), and it can be obtained
from s primitive recursively as well.
The normal form theorem shows that only a single unbounded search is
required for the definition of any partial recursive function. We can use the
numbers e as “names” of partial recursive functions, and write ϕe for the func-
tion f defined by the equation in the theorem. Note that any partial recursive
function can have more than one index—in fact, every partial recursive func-
tion has infinitely many indices.
is not computable.
In the context of partial recursive functions, the role of the specification
of a program may be played by the index e given in Kleene’s normal form
theorem. If f is a partial recursive function, any e for which the equation in
the normal form theorem holds, is an index of f . Given a number e, the normal
form theorem states that
Note that h(e, x ) = 0 if ϕe ( x ) ↑, but also when e is not the index of a partial
recursive function at all.
1. If h(ed , ed ) = 1 then ϕed (ed ) ↓. But ϕed ' d, and d(ed ) is defined iff
h(ed , ed ) = 0. So h(ed , ed ) 6= 1.
2. If h(ed , ed ) = 0 then either ed is not the index of a partial recursive func-
tion, or it is and ϕed (ed ) ↑. But again, ϕed ' d, and d(ed ) is undefined iff
ϕ ed ( e d ) ↓.
The upshot is that ed cannot, after all, be the index of a partial recursive func-
tion. But if h were partial recursive, d would be too, and so our definition of
ed as an index of it would be admissible. We must conclude that h cannot be
partial recursive.
Problems
Problem 25.1. Multiplication satisfies the recursive equations
0·y = y
( x + 1) · y = ( x · y ) + x
Give the explicit precise definition of the function mult( x, y) = x · y, assuming
that add( x, y) = x + y is already defined. Give the complete notation for mult.
Problem 25.2. Show that
2x
..
2.
f ( x, y) = 2 y 2’s
is primitive recursive.
Problem 25.3. Show that d( x, y) = b x/yc (i.e., division, where you disregard
everything after the decimal point) is primitive recursive. When y = 0, we
stipulate d( x, y) = 0. Give an explicit definifion of d using primitive recursion
and composition. You will have detour through an axiliary function—you
cannot use recursion on the arguments x or y themselves.
sconcat(hs0 , . . . , sk i) = s0 _ . . . . . . _ sk .
26.1 Introduction
The lambda calculus was originally designed by Alonzo Church in the early
1930s as a basis for constructive logic, and not as a model of the computable
functions. But soon after the Turing computable functions, the recursive func-
tions, and the general recursive functions were shown to be equivalent, lambda
computability was added to the list. The fact that this initially came as a small
surprise makes the characterization all the more interesting.
Lambda notation is a convenient way of referring to a function directly
by a symbolic expression which defines it, instead of defining a name for it.
Instead of saying “let f be the function defined by f ( x ) = x + 3,” one can
say, “let f be the function λx. ( x + 3).” In other words, λx. ( x + 3) is just a
name for the function that adds three to its argument. In this expression, x
is a dummy variable, or a placeholder: the same function can just as well
be denoted by λy. (y + 3). The notation works even with other parameters
around. For example, suppose g( x, y) is a function of two variables, and k is a
natural number. Then λx. g( x, k) is the function which maps any x to g( x, k).
This way of defining a function from a symbolic expression is known as
lambda abstraction. The flip side of lambda abstraction is application: assuming
one has a function f (say, defined on the natural numbers), one can apply it to
any value, like 2. In conventional notation, of course, we write f (2) for the
result.
What happens when you combine lambda abstraction with application?
Then the resulting expression can be simplified, by “plugging” the applicand
in for the abstracted variable. For example,
(λx. ( x + 3))(2)
346
26.2. THE SYNTAX OF THE LAMBDA CALCULUS
can be simplified to 2 + 3.
Up to this point, we have done nothing but introduce new notations for
conventional notions. The lambda calculus, however, represents a more radi-
cal departure from the set-theoretic viewpoint. In this framework:
The system without any constants at all is called the pure lambda calculus.
We will follow a few notational conventions:
1. When parentheses are left out, application takes place from left to right.
For example, if M, N, P, and Q are terms, then MNPQ abbreviates
((( MN ) P) Q).
4. Also, some terms can be reduced in more than one way; for example,
by contracting the innermost one. Note, in this case, however, that both
terms further reduce to the same term, zv.
The final outcome in the last example is not a coincidence, but rather il-
lustrates a deep and important property of the lambda calculus, known as the
“Church-Rosser property.”
Corollary 26.2. Suppose M can be reduced to normal form. Then this normal form
is unique.
Finally, we will say that two terms M and N are β-equivalent, or just equiv-
alent, if they reduce to a common term; in other words, if there is some P such
that M . P and N . P. This is written M ≡ N. Using ??, you can check that ≡ is
an equivalence relation, with the additional property that for every M and N,
if M . N or N . M, then M ≡ N. (In fact, one can show that ≡ is the smallest
equivalence relation having this property.)
Definition 26.3. For each natural number n, define the numeral n to be the
lambda term λx. λy. ( x ( x ( x (. . . x (y))))), where there are n x’s in all.
Proof. Wwe need to show that every partial computable function f is rep-
resented by a lambda term f . By Kleene’s normal form theorem, it suffices
to show that every primitive recursive function is represented by a lambda
term, and then that the functions so represented are closed under suitable
compositions and unbounded search. To show that every primitive recursive
function is represented by a lambda term, it suffices to show that the initial
functions are represented, and that the partial functions that are represented
by lambda terms are closed under composition, primitive recursion, and un-
bounded search.
We will use a more conventional notation to make the rest of the proof
more readable. For example, we will write M( x, y, z) instead of Mxyz. While
this is suggestive, you should remember that terms in the untyped lambda
calculus do not have associated arities; so, for the same term M, it makes just
as much sense to write M ( x, y) and M( x, y, z, w). But using this notation indi-
cates that we are treating M as a function of three variables, and helps make
the intentions behind the definitions clearer. In a similar way, we will say
“define M by M ( x, y, z) = . . . ” instead of “define M by M = λx. λy. λz. . . ..”
f ( x0 , . . . , xl −1 ) = h( g0 ( x0 , . . . , xl −1 ), . . . , gk−1 ( x0 , . . . , xl −1 )).
In other words, the language of the lambda calculus is well suited to represent
composition.
So, in general, given lambda terms G 0 and H 0 , it suffices to find a term F such
that
for every natural number n; the fact that G 0 and H 0 represent g and h means
that whenever we plug in numerals m ~ for ~z, F (n + 1, m
~ ) will normalize to the
right answer.
But for this, it suffices to find a term F satisfying
F (0) ≡ G
F (n + 1) ≡ H (n, F (n))
K (y) = λx. y.
In other words, K is the term λy. λx. y. Looking at it differently, for every M,
K ( M ) is a constant function that returns M on any input.
Now define D ( x, y, z) by D ( x, y, z) = z(K (y)) x. Then we have
D ( M, N, 0) . 0(K ( N )) M . M and
D ( M, N, 1) . 1(K ( N )) M . K ( N ) M . N,
as required.
Proof. We need to show that given any terms, G and H, we can find a term F
such that
F (0) ≡ G
F (n + 1) ≡ H (n, F (n))
for every natural number n. The idea is roughly to compute sequences of pairs
In other words, on input n, F iterates T n times on h0, G i, and then returns the
second component. To start with, we have
1. 0( T, h0, G i) ≡ h0, G i
2. F (0) ≡ G
By induction on n, we can show that for each natural number one has the
following:
1. n + 1( T, h0, G i) ≡ hn + 1, F (n + 1)i
2. F (n + 1) ≡ H (n, F (n))
For the second clause, we have
F (n + 1) . (n + 1( T, h0, G i))1
≡ ( T (n( T, h0, G i)))1
≡ ( T (hn, F (n)i))1
≡ (hn + 1, H (n, F (n))i)1
≡ H (n, F (n)).
Here we have used the induction hypothesis on the second-to-last line. For
the first clause, we have
Here we have used the second clause in the last line. So we have shown
F (0) ≡ G and, for every n, F (n + 1) ≡ H (n, F (n)), which is exactly what
we needed.
diag( x ) = xx
and
l ( x ) = g(diag( x ))
k = (λx. g( xx ))(λx. g( xx ))
. g((λx. g( xx ))(λx. g( xx )))
= gk.
If one takes
Y = λg. ((λx. g( xx ))(λx. g( xx )))
then Yg and g(Yg) reduce to a common term; so Yg ≡ β g(Yg). This is known
as “Curry’s combinator.” If instead one takes
g( x ) ' µy f ( x, y).
Proof. The idea is roughly as follows. Given x, we will use the fixed-point
lambda term Y to define a function h x (n) which searches for a y starting at n;
then g( x ) is just h x (0). The function h x can be expressed as the solution of a
fixed-point equation:
(
n if f ( x, n) = 0
h x (n) '
h x (n + 1) otherwise.
We can do this using the fixed-point term Y. First, let U be the term
and then let H be the term YU. Notice that the only free variable in H is x. Let
us show that H satisfies the equation above.
By the definition of Y, we have
H = YU ≡ U (YU ) = U ( H ).
H (n) ≡ U ( H, n)
. D (n, H (S(n)), F ( x, n)),
as required. Notice that if you substitute a numeral m for x in the last line, the
expression reduces to n if F (m, n) reduces to 0, and it reduces to H (S(n)) if
F (m, n) reduces to any other numeral.
To finish off the proof, let G be λx. H (0). Then G represents g; in other
words, for every m, G (m) reduces to reduces to g(m), if g(m) is defined, and
has no normal form otherwise.
Computability Theory
27.1 Introduction
The branch of logic known as Computability Theory deals with issues having to
do with the computability, or relative computability, of functions and sets. It is
a evidence of Kleene’s influence that the subject used to be known as Recursion
Theory, and today, both names are commonly used.
Let us call a function f : N → 7 N partial computable if it can be computed
in some model of computation. If f is total we will simply say that f is com-
putable. A relation R with computable characteristic function χ R is also called
computable. If f and g are partial functions, we will write f ( x ) ↓ to mean that
f is defined at x, i.e., x is in the domain of f ; and f ( x ) ↑ to mean the opposite,
i.e., that f is not defined at x. We will use f ( x ) ' g( x ) to mean that either f ( x )
and g( x ) are both undefined, or they are both defined and equal.
One can explore the subject without having to refer to a specific model
of computation. To do this, one shows that there is a universal partial com-
putable function, Un(k, x ). This allows us to enumerate the partial computable
functions. We will adopt the notation ϕk to denote the k-th unary partial com-
putable function, defined by ϕk ( x ) ' Un(k, x ). (Kleene used {k} for this pur-
pose, but this notation has not been used as much recently.) Slightly more
generally, we can uniformly enumerate the partial computable functions of
arbitrary arities, and we will use ϕnk to denote the k-th n-ary partial recursive
function.
Recall that if f (~x, y) is a total or partial function, then µy f (~x, y) is the
function of ~x that returns the least y such that f (~x, y) = 0, assuming that all of
f (~x, 0), . . . , f (~x, y − 1) are defined; if there is no such y, µy f (~x, y) is undefined.
357
CHAPTER 27. COMPUTABILITY THEORY
relation “s codes the record of computation of the function with index e for
input x” and the function “output of computation sequence with code s” are
then computable; in fact, they are primitive recursive.
This fundamental fact is very powerful, and allows us to prove a number
of striking and important results about computability, independently of the
model of computation chosen.
for every x.
Proof Sketch. For any model of computation one can rigorously define a de-
scription of the computable function f and code such description using a nat-
ural number k. One can also rigorously define a notion of “computation se-
quence” which records the process of computing the function with index k for
input x. These computation sequences can likewise be coded as numbers s.
This can be done in such a way that (a) it is decidable whether a number s
codes the computation sequence of the function with index k on input x and
(b) what the end result of the computation sequence coded by s is. In fact, the
relation in (a) and the function in (b) are primitive recursive.
Theorem 27.2. Every partial computable function has infinitely many indices.
It is helpful to think of sm m
n as acting on programs. That is, sn takes a pro-
gram, x, for an (m + n)-ary function, as well as fixed inputs a0 , . . . , am−1 ; and
it returns a program, sm n ( x, a0 , . . . , am−1 ), for the n-ary function of the remain-
ing arguments. It you think of x as the description of a Turing machine, then
sm
n ( x, a0 , . . . , am−1 ) is the Turing machine that, on input y0 , . . . , yn−1 , prepends
a0 , . . . , am−1 to the input string, and runs x. Each sm n is then just a primitive
recursive function that finds a code for the appropriate Turing machine.
Proof. Let Un(k, x ) ' U (µs T (k, x, s)) in Kleene’s normal form theorem.
Proof. This theorem says that there is no total computable function that is uni-
versal for the total computable functions. The proof is a simple diagonaliza-
tion: if Un0 (k, x ) were total and computable, then
d( x ) = Un0 ( x, x ) + 1
would also be total and computable. However, for every k, d(k ) is not equal
to Un0 (k, k).
Theorem ?? above shows that we can get around this diagonalization ar-
gument, but only at the expense of allowing partial functions. It is worth
trying to understand what goes wrong with the diagonalization argument,
when we try to apply it in the partial case. In particular, the function h( x ) =
Un( x, x ) + 1 is partial recursive. Suppose h is the k-th function in the enumer-
ation; what can we say about h(k )?
But now Un0 (k, x ) is a total function, and is computable if h is. For instance,
we could define g using primitive recursion, by
g(0, k, x ) ' 0
g(y + 1, k, x ) ' Un(k, x );
then
Un0 (k, x ) ' g(h(k, x ), k, x ).
And since Un0 (k, x ) agrees with Un(k, x ) wherever the latter is defined, Un0 is
universal for those partial computable functions that happen to be total. But
this contradicts ??.
1. computable functions
To sort this out, it might help to draw a big square representing all the partial
functions from N to N, and then mark off two overlapping regions, corre-
sponding to the total functions and the computable partial functions, respec-
tively. It is a good exercise to see if you can describe an object in each of the
resulting regions in the diagram.
Theorem 27.9. Let S be a set of natural numbers. Then the following are equivalent:
1. S is computably enumerable.
The first three clauses say that we can equivalently take any non-empty
computably enumerable set to be enumerated by either a computable func-
tion, a partial computable function, or a primitive recursive function. The
fourth clause tells us that if S is computably enumerable, then for some index
e,
S = { x : ϕe ( x ) ↓}.
In other words, S is the set of inputs on for which the computation of ϕe
halts. For that reason, computably enumerable sets are sometimes called semi-
decidable: if a number is in the set, you eventually get a “yes,” but if it isn’t,
you never get a “no”!
Proof. Since every primitive recursive function is computable and every com-
putable function is partial computable, (3) implies (1) and (1) implies (2).
(Note that if S is empty, S is the range of the partial computable function that
is nowhere defined.) If we show that (2) implies (3), we will have shown the
first three clauses equivalent.
So, suppose S is the range of the partial computable function ϕe . If S is
empty, we are done. Otherwise, let a be any element of S. By Kleene’s normal
form theorem, we can write
otherwise, it returns a.We need to show that S is the range of f , i.e., for any
natural number y, y ∈ S if and only if it is in the range of f . In the forwards
direction, suppose y ∈ S. Then y is in the range of ϕe , so for some x and s,
T (e, x, s) and U (s) = y; but then y = f (h x, si). Conversely, suppose y is in the
range of f . Then either y = a, or for some z, T (e, (z)0 , (z)1 ) and U ((z)1 ) = y.
Since, in the latter case, ϕe ( x ) ↓= y, either way, y is in S.
(The notation ϕe ( x ) ↓= y means “ϕe ( x ) is defined and equal to y.” We
could just as well use ϕe ( x ) = y, but the extra arrow is sometimes helpful in
reminding us that we are dealing with a partial function.)
To finish up the proof of ??, it suffices to show that (1) and (4) are equiv-
alent. First, let us show that (1) implies (4). Suppose S is the range of a com-
putable function f , i.e.,
Let
g(y) = µx f ( x ) = y.
Then g is a partial computable function, and g(y) is defined if and only if for
some x, f ( x ) = y. In other words, the domain of g is the range of f . Expressed
in terms of Turing machines: given a Turing machine F that enumerates the
elements of S, let G be the Turing machine that semi-decides S by searching
through the outputs of F to see if a given element is in the set.
Finally, to show (4) implies (1), suppose that S is the domain of the partial
computable function ϕe , i.e.,
S = { x : ϕe ( x ) ↓}.
S = { x : ∃y R( x, y)}.
S = { x : ∃y T (e, x, y)}.
f ( x ) ' µy AtomRx, y.
Then k enumerates A ∪ B; the idea is that k just alternates between the enumer-
ations offered by f and g. Enumerating A ∩ B is tricker. If A ∩ B is empty, it
Theorem 27.12. Let A be any set of natural numbers. Then A is computable if and
only if both A and A are computably enumerable.
function. But now we have that for every x, x ∈ A if and only if T (e, x, h( x )),
i.e., if ϕe is the one that is defined. Since T (e, x, h( x )) is a computable relation,
A is computable.
27.14 Reducibility
We now know that there is at least one set, K0 , that is computably enumerable
but not computable. It should be clear that there are others. The method of
reducibility provides a powerful method of showing that other sets have these
properties, without constantly having to return to first principles.
Generally speaking, a “reduction” of a set A to a set B is a method of
transforming answers to whether or not elements are in B into answers as
to whether or not elements are in A. We will focus on a notion called “many-
one reducibility,” but there are many other notions of reducibility available,
with varying properties. Notions of reducibility are also central to the study
of computational complexity, where efficiency issues have to be considered as
well. For example, a set is said to be “NP-complete” if it is in NP and every
NP problem can be reduced to it, using a notion of reduction that is similar to
the one described below, only with the added requirement that the reduction
can be computed in polynomial time.
We have already used this notion implicitly. Define the set K by
K = { x : ϕ x ( x ) ↓},
K0 = {he, x i : ϕe ( x ) ↓}.
Proposition 27.16. Let A and B be any sets, and suppose A is many-one reducible
to B.
1. If B is computably enumerable, so is A.
2. If B is computable, so is A.
Proof. Let f be a many-one reduction from A to B. For the first claim, just
check that if B is the domain of a partial function g, then A is the domain
of g ◦ f :
x ∈ Aiff f ( x ) ∈ B
iff g( f ( x )) ↓ .
For the second claim, remember that if B is computable then B and B are
computably enumerable. It is not hard to check that f is also a many-one
reduction of A to B, so, by the first part of this proof, A and A are computably
enumerable. So A is computable as well. (Alternatively, you can check that
χ A = χ B ◦ f ; so if χ B is computable, then so is χ A .)
So, it turns out that all the examples of computably enumerable sets that
we have considered so far are either computable, or complete. This should
seem strange! Are there any examples of computably enumerable sets that
are neither computable nor complete? The answer is yes, but it wasn’t until
the middle of the 1950s that this was established by Friedberg and Muchnik,
independently.
In terms of the informal argument above, s(e, x, y) is an index for the ma-
chine that, for any input z, ignores that input and computes ϕ x (y).
In particular, we have
is a reduction of K0 to K1 .
Proof. To see that Tot is not computable, it suffices to show that K is reducible
to it. Let h( x, y) be defined by
(
0 if x ∈ K
h( x, y) '
undefined otherwise
Note that h( x, y) does not depend on y at all. It should not be hard to see that
h is partial computable: on input x, y, the we compute h by first simulating the
function ϕ x on input x; if this computation halts, h( x, y) outputs 0 and halts.
So h( x, y) is just Z (µs T ( x, x, s)), where Z is the constant zero function.
Using the s-m-n theorem, there is a primitive recursive function k( x ) such
that for every x and y,
(
0 if x ∈ K
ϕk( x) (y) =
undefined otherwise
Theorem 27.21 (Rice’s Theorem). Let C be any set of partial computable functions,
and let A = {n : ϕn ∈ C }. If A is computable, then either C is ∅ or C is the set of
all the partial computable functions.
An index set is a set A with the property that if n and m are indices which
“compute” the same function, then either both n and m are in A, or neither is.
It is not hard to see that the set A in the theorem has this property. Conversely,
if A is an index set and C is the set of functions computed by these indices,
then A = {n : ϕn ∈ C }.
With this terminology, Rice’s theorem is equivalent to saying that no non-
trivial index set is decidable. To understand what the theorem says, it is
helpful to emphasize the distinction between programs (say, in your favorite
programming language) and the functions they compute. There are certainly
questions about programs (indices), which are syntactic objects, that are com-
putable: does this program have more than 150 symbols? Does it have more
than 22 lines? Does it have a “while” statement? Does the string “hello world”
every appear in the argument to a “print” statement? Rice’s theorem says that
no nontrivial question about the program’s behavior is computable. This in-
cludes questions like these: does the program halt on input 0? Does it ever
halt? Does it ever output an even number?
Proof of Rice’s theorem. Suppose C is neither ∅ nor the set of all the partial com-
putable functions, and let A be the set of indices of functions in C. We will
show that if A were computable, we could solve the halting problem; so A is
not computable.
Without loss of generality, we can assume that the function f which is
nowhere defined is not in C (otherwise, switch C and its complement in the
argument below). Let g be any function in C. The idea is that if we could
decide A, we could tell the difference between indices computing f , and in-
dices computing g; and then we could use that capability to solve the halting
problem.
where P02 (z0 , z1 ) = z0 is the 2-place projection function returning the 0-th ar-
gument, which is computable.
Then h is a composition of partial computable functions, and the right side
is defined and equal to g(y) just when Un( x, x ) and g(y) are both defined.
Notice that for a fixed x, if ϕ x ( x ) is undefined, then h( x, y) is undefined for
every y; and if ϕ x ( x ) is defined, then h( x, y) ' g(y). So, for any fixed value
of x, either h( x, y) acts just like f or it acts just like g, and deciding whether or
not ϕ x ( x ) is defined amounts to deciding which of these two cases holds. But
this amounts to deciding whether or not h x (y) ' h( x, y) is in C or not, and if
A were computable, we could do just that.
More formally, since h is partial computable, it is equal to the function ϕk
for some index k. By the s-m-n theorem there is a primitive recursive function
s such that for each x, ϕs(k,x) (y) = h x (y). Now we have that for each x, if
ϕ x ( x ) ↓, then ϕs(k,x) is the same function as g, and so s(k, x ) is in A. On the
other hand, if ϕ x ( x ) ↑, then ϕs(k,x) is the same function as f , and so s(k, x )
is not in A. In other words we have that for every x, x ∈ K if and only if
s(k, x ) ∈ A. If A were computable, K would be also, which is a contradiction.
So A is not computable.
1. { x : 17 is in the range of ϕ x }
2. { x : ϕ x is constant}
3. { x : ϕ x is total}
2. For every computable function f ( x ), there is an index e such that for every y,
ϕ e ( y ) ' ϕ f ( e ) ( y ).
Proof. (1) ⇒ (2): Given f , define g by g( x, y) ' Un( f ( x ), y). Use (1) to get an
index e such that for every y,
ϕe (y) = Un( f (e), y)
= ϕ f ( e ) ( y ).
(2) ⇒ (1): Given g, use the s-m-n theorem to get f such that for every x
and y, ϕ f ( x) (y) ' g( x, y). Use (2) to get an index e such that
ϕe ( y ) = ϕ f (e) ( y )
= g(e, y).
This concludes the proof.
Before showing that statement (1) is true (and hence (2) as well), consider
how bizarre it is. Think of e as being a computer program; statement (1) says
that given any partial computable g( x, y), you can find a computer program
e that computes ge (y) ' g(e, y). In other words, you can find a computer
program that computes a function that references the program itself.
Theorem 27.24. The two statements in ?? are true. Specifically, for every partial
computable function g( x, y), there is an index e such that for every y,
ϕe (y) ' g(e, y).
Proof. The ingredients are already implicit in the discussion of the halting
problem above. Let diag( x ) be a computable function which for each x re-
turns an index for the function f x (y) ' ϕ x ( x, y), i.e.
ϕdiag( x) (y) ' ϕ x ( x, y).
Think of diag as a function that transforms a program for a 2-ary function into
a program for a 1-ary function, obtained by fixing the original program as its
first argument. The function diag can be defined formally as follows: first
define s by
s( x, y) ' Un2 ( x, x, y),
where Un2 is a 3-ary function that is universal for partial computable 2-ary
functions. Then, by the s-m-n theorem, we can find a primitive recursive func-
tion diag satisfying
ϕdiag( x) (y) ' s( x, y).
Now, define the function l by
l ( x, y) ' g(diag( x ), y).
and let plq be an index for l. Finally, let e = diag(plq). Then for every y, we
have
ϕe (y) ' ϕdiag(plq) (y)
' ϕplq (plq, y)
' l (plq, y)
' g(diag(plq), y)
' g(e, y),
as required.
What’s going on? Suppose you are given the task of writing a computer
program that prints itself out. Suppose further, however, that you are working
with a programming language with a rich and bizarre library of string func-
tions. In particular, suppose your programming language has a function diag
which works as follows: given an input string s, diag locates each instance of
the symbol ‘x’ occuring in s, and replaces it by a quoted version of the original
string. For example, given the string
hello x world
as output. In that case, it is easy to write the desired program; you can check
that
print(diag(’print(diag(x))’))
does the trick. For more common programming languages like C++ and Java,
the same idea (with a more involved implementation) still works.
We are only a couple of steps away from the proof of the fixed-point theo-
rem. Suppose a variant of the print function print( x, y) accepts a string x and
another numeric argument y, and prints the string x repeatedly, y times. Then
the “program”
g(diag(’g(diag(x), y)’), y)
which is a program that, on input y, runs g on the program itself and y. Think-
ing of “quoting” with “using an index for,” we have the proof above.
For now, it is o.k. if you want to think of the proof as formal trickery, or
black magic. But you should be able to reconstruct the details of the argument
given above. When we prove the incompleteness theorems (and the related
“fixed-point theorem”) we will discuss other ways of understanding why it
works.
The same idea can be used to get a “fixed point” combinator. Suppose you
have a lambda term g, and you want another term k with the property that k
is β-equivalent to gk. Define terms
diag( x ) = xx
and
l ( x ) = g(diag( x ))
using our notational conventions; in other words, l is the term λx. g( xx ). Let
k be the term ll. Then we have
k = (λx. g( xx ))(λx. g( xx ))
. g((λx. g( xx ))(λx. g( xx )))
= gk.
If one takes
Y = λg. ((λx. g( xx ))(λx. g( xx )))
then Yg and g(Yg) reduce to a common term; so Yg ≡ β g(Yg). This is known
as “Curry’s combinator.” If instead one takes
Y = (λxg. g( xxg))(λxg. g( xxg))
then in fact Yg reduces to g(Yg), which is a stronger statement. This latter
version of Y is known as “Turing’s combinator.”
and then using the fixed-point lemma to find an index e such that ϕe (y) =
g(e, y).
For a concrete example, the “greatest common divisor” function gcd(u, v)
can be defined by
(
v if 0 = 0
gcd(u, v) '
gcd(mod(v, u), u) otherwise
Problems
Problem 27.1. Give a reduction of K to K0 .
Turing Machines
383
CHAPTER 27. COMPUTABILITY THEORY
28.1 Introduction
What does it mean for a function, say, from N to N to be computable? Among
the first answers, and the most well known one, is that a function is com-
putable if it can be computed by a Turing machine. This notion was set out
by Alan Turing in 1936. Turing machines are an example of a model of compu-
tation—they are a mathematically precise way of defining the idea of a “com-
putational procedure.” What exactly that means is debated, but it is widely
agreed that Turing machines are one way of specifying computational proce-
dures. Even though the term “Turing machine” evokes the image of a physi-
cal machine with moving parts, strictly speaking a Turing machine is a purely
mathematical construct, and as such it idealizes the idea of a computational
procedure. For instance, we place no restriction on either the time or memory
requirements of a Turing machine: Turing machines can compute something
even if the computation would require more storage space or more steps than
there are atoms in the universe.
It is perhaps best to think of a Turing machine as a program for a spe-
cial kind of imaginary mechanism. This mechanism consists of a tape and a
read-write head. In our version of Turing machines, the tape is infinite in one di-
rection (to the right), and it is divided into squares, each of which may contain
a symbol from a finite alphabet. Such alphabets can contain any number of dif-
ferent symbols, say, but we will mainly make do with three: ., 0, and 1. When
the mechanism is started, the tape is empty (i.e., each square contains the sym-
bol 0) except for the leftmost square, which contains ., and a finite number of
squares which contain the input. At any time, the mechanism is in one of a
finite number of states. At the outset, the head scans the leftmost square and
in a specified initial state. At each step of the mechanism’s run, the content
of the square currently scanned together with the state the mechanism is in
and the Turing machine program determine what happens next. The Turing
machine program is given by a partial function which takes as input a state q
385
CHAPTER 28. TURING MACHINE COMPUTATIONS
2. A proof of the equivalence of two definitions (in case the new definition
has a greater intuitive appeal).
Our goal is to try to define the notion of computability “in principle,” i.e.,
without taking into account practical limitations of time and space. Of course,
with the broadest definition of computability in place, one can then go on
to consider computation with bounded resources; this forms the heart of the
subject known as “computational complexity.”
0, 1, R
start q0 q1
Recall that the Turing machine has a read/write head and a tape with the
input written on it. The instruction can be read as if reading a blank in state q0 ,
write a stroke, move right, and move to state q1 . This is equivalent to the transition
function mapping hq0 , 0i to hq1 , 1, Ri.
Example 28.1. Even Machine: The following Turing machine halts if, and only
if, there are an even number of strokes on the tape.
0, 0, R
1, 1, R
start q0 q1
1, 1, R
The above machine halts only when the input is an even number of strokes.
Otherwise, the machine (theoretically) continues to operate indefinitely. For
any machine and input, it is possible to trace through the configurations of the
machine in order to determine the output. We will give a formal definition
of configurations later. For now, we can intuitively think of configurations
as a series of diagrams showing the state of the machine at any point in time
during operation. Configurations show the content of the tape, the state of the
machine and the location of the read/write head.
Let us trace through the configurations of the even machine if it is started
with an input of 4 1s. In this case, we expect that the machine will halt. We
will then run the machine on an input of 3 1s, where the machine will run
forever.
The machine starts in state q0 , scanning the leftmost 1. We can represent
the initial state of the machine as follows:
.10 1110 . . .
.111 110 . . .
.1110 10 . . .
As the machine continues, the rules are applied again in the same order, re-
sulting in the following two configurations:
.11111 0 . . .
.111100 . . .
The machine is now in state q0 scanning a blank. Based on the transition
diagram, we can easily see that there is no instruction to be carried out, and
thus the machine has halted. This means that the input has been accepted.
Suppose next we start the machine with an input of three strokes. The first
few configurations are similar, as the same instructions are carried out, with
only a small difference of the tape input:
.10 110 . . .
.111 10 . . .
.1110 0 . . .
.11101 . . .
The machine has now traversed past all the strokes, and is reading a blank
in state q1 . As shown in the diagram, there is an instruction of the form
δ(q1 , 0) = hq1 , 0, Ri. Since the tape is infinitely blank to the right, the ma-
chine will continue to execute this instruction forever, staying in state q1 and
moving ever further to the right. The machine will never halt, and does not
accept the input.
It is important to note that not all machines will halt. If halting means that
the machine runs out of instructions to execute, then we can create a machine
that never halts simply by ensuring that there is an outgoing arrow for each
symbol at each state. The even machine can be modified to run infinitely by
adding an instruction for scanning a blank at q0 .
Example 28.2.
0, 0, R 0, 0, R
1, 1, R
start q0 q1
1, 1, R
state, and for what symbol, the machine halts. Whenever there is a gap in the
table is a possible point for the machine to halt. Unlike state diagrams and
instruction sets, where the points at which the machine halts are not always
immediately obvious, any halting points are quickly identified by finding the
gaps in the machine table.
Example 28.3. The machine table for the even machine is:
0 1
q0 1, q1 , R
q1 0, q1 , 0 1, q0 , R
So far we have only considered machines that read and accept input. How-
ever, Turing machines have the capacity to both read and write. An example
of such a machine (although there are many, many examples) is a doubler. A
doubler, when started with a block of n strokes on the tape, outputs a block
of 2n strokes.
1, 1, R 1, 1, R
1, 0, R 0, 0, R
start q0 q1 q2
0, 0, R 0, 1, R
q5 q4 q3
0, 0, L 1, 1, L
1, 1, L 1, 1, L 0, 1, L
3. q ∈ Q
Intuitively, the sequence C is the content of the tape (symbols of all squares
from the leftmost square to the last non-blank or previously visited square), n
is the number of the square the read/write head is scanning (beginning with
0 being the number of the leftmost square), and q is the current state of the
machine.
Example 28.12. Addition: Build a machine that, when given an input of two
non-empty strings of 1’s of length n and m, computes the function f (n, m) =
n + m.
We want to come up with a machine that starts with two blocks of strokes
on the tape and halts with one block of strokes. We first need a method to
carry out. The input strokes are separated by a blank, so one method would
be to write a stroke on the square containing the blank, and erase the first (or
last) stroke. This would result in a block of n + m 1’s. Alternatively, we could
proceed in a similar way to the doubler machine, by erasing a stroke from the
first block, and adding one to the second block of strokes until the first block
has been removed completely. We will proceed with the former example.
1, 1, R 1, 1, R 1, 0, N
0, 1, R 0, 0, L
start q0 q1 q2
Example 28.13. Halting States. To elucidate this concept, let us begin with an
alteration of the even machine. Instead of having the machine halt in state q0
if the input is even, we can add an instruction to send the machine into a halt
state.
0, 0, R
1, 1, R
start q0 q1
1, 1, R
0, 0, N
Let us further expand the example. When the machine determines that the
input is odd, it never halts. We can alter the machine to include a reject state
by replacing the looping instruction with an instruction to go to a reject state r.
1, 1, R
start q0 q1
1, 1, R
0, 0, N 0, 0, N
h r
advantages. The definition of halting used so far in this chapter makes the
proof of the Halting Problem intuitive and easy to demonstrate. For this rea-
son, we continue with our original definition.
The examples of Turing machines we have seen so far have been fairly sim-
ple in nature. But in fact, any problem that can be solved with any modern
programming language can als o be solved with Turing machines. To build
more complex Turing machines, it is important to convince ourselves that we
can combine them, so we can build machines to solve more complex prob-
lems by breaking the procedure into simpler parts. If we can find a natural
way to break a complex problem down into constituent parts, we can tackle
the problem in several stages, creating several simple Turing machines and
combining then into one machine that can solve the problem. This point is
especially important when tackling the Halting Problem in the next section.
In order to build this machine, we can combine two machines we are al-
ready familiar with: the addition machine, and the doubler. We begin by
drawing a state diagram for the addition machine.
1, 1, R 1, 1, R 1, 0, N
0, 1, R 0, 0, L
start q0 q1 q2
machine.
1, 1, R 1, 1, R
0, 1, R 0, 0, L
start q0 q1 q2
1, 0, L
1, 1, L q3
., ., R
q4
1, 1, R 1, 1, R
0, 1, R 0, 0, L
start q0 q1 q2
1, 0, L
1, 1, L q3
1, 1, L ., ., R
0, 0, L 0, 0, R
q8 q9 q4
1, 1, L 1, 1, L 1, 0, R
0, 1, L q7 q6 q5
0, 1, R 0, 0, R
1, 1, R 1, 1, R
the same function is computed by some Turing machine, eve if we have not in
fact constructed it.
The other use of the Church-Turing thesis is more philosophically interest-
ing. It can be shown that there are functions whch cannot be computed by a
Turing machines. From this, using the Church-Turing thesis, one can conclude
that it cannot be effectively computed, using any procedure whatsoever. For
if there were such a procedure, by the Church-Turing thesis, it would follow
that there would be a Turing machine. So if we can prove that there is no
Turing machine that computes it, there also can’t be an effective procedure.
In particular, the Church-Turing thesis is invoked to claim that the so-called
halting problem not only cannot be solved by Turing machines, it cannot be
effectively solved at all.
Problems
Problem 28.1. Choose an arbitary input and trace through the configurations
of the doubler machine in ??.
Problem 28.2. The double machine in ?? writes its output to the right of the
input. Come up with a new method for solving the doubler problem which
generates its output immediately to the right of the end-of-tape marker. Build
a machine that executes your method. Check that your machine works by
tracing through the configurations.
Problem 28.3. Design a Turing-machine with alphabet {0, A, B} that accepts
any string of As and Bs where the number of As is the same as the number of
Bs and all the As precede all the Bs, and rejects any string where the number
of As is not equal to the number of Bs or the As do not precede all the Bs.
(E.g., the machine should accept AABB, and AAABBB, but reject both AAB
and AABBAABB.)
Problem 28.4. Design a Turing-machine with alphabet {0, A, B} that takes as
input any string α of As and Bs and duplicates them to produce an output of
the form αα. (E.g. input ABBA should result in output ABBAABBA).
Problem 28.5. Alphabetical?: Design a Turing-machine with alphabet {0, A, B}
that when given as input a finite sequence of As and Bs checks to see if all
the As appear left of all the Bs or not. The machine should leave the input
string on the tape, and output either halt if the string is “alphabetical”, or
loop forever if the string is not.
Problem 28.6. Alphabetizer: Design a Turing-machine with alphabet {0, A, B}
that takes as input a finite sequence of As and Bs rearranges them so that
all the As are to the left of all the Bs. (e.g., the sequence BABAA should
become the sequence AAABB, and the sequence ABBABB should become
the sequence AABBBB).
Problem 28.7. Trace through the configurations of the machine for input h3, 5i.
Problem 28.8. Subtraction: Design a Turing machine that when given an input
of two non-empty strings of strokes of length n and m, where n > m, computes
the function f (n, m) = n − m.
Undecidability
29.1 Introduction
It might seem obvious that not every function, even every arithmetical func-
tion, can be computable. There are just too many, whose behavior is too
complicated. Functions defined from the decay of radioactive particles, for
instance, or other chaotic or random behavior. Suppose we start counting 1-
second intervals from a given time, and define the function f (n) as the num-
ber of particles in the universe that decay in the n-th 1-second interval after
that initial moment. This seems like a candidate for a function we cannot ever
hope to compute.
But it is one thing to not be able to imagine how one would compute such
functions, and quite another to actually prove that they are uncomputable.
In fact, even functions that seem hopelessly complicated may, in an abstract
sense, be computable. For instance, suppose the universe is finite in time—
some day, in the very distant future the universe will contract into a single
point, as some cosmological theories predict. Then there is only a finite (but
incredibly large) number of seconds from that initial moment for which f (n)
is defined. And any function which is defined for only finitely many inputs is
computable: we could list the outputs in one big table, or code it in one very
big Turing machine state transition diagram.
We are often interested in special cases of functions whose values give the
answers to yes/no questions. For instance, the question “is n a prime num-
ber?” is associated with the function
(
1 if n is prime
isprime(n) =
0 otherwise.
We say that a yes/no question can be effectively decided, if the associated 1/0-
valued function is effectively computable.
To prove mathematically that there are functions which cannot be effec-
tively computed, or problems that cannot effectively decided, it is essential to
401
CHAPTER 29. UNDECIDABILITY
fix a specific model of computation, and show about it that there are functions
it cannot compute or problems it cannot decide. We can show, for instance,
that not every function can be computed by Turing machines, and not ev-
ery problem can be decided by Turing machines. We can then appeal to the
Church-Turing thesis to conclude that not only are Turing machines not pow-
erful enough to compute every function, but no effective procedure can.
The key to proving such negative results is the fact that we can assign
numbers to Turing machines themselves. The easiest way to do this is to enu-
merate them, perhaps by fixing a specific way to write down Turing machines
and their programs, and then listing them in a systematic fashion. Once we
see that this can be done, then the existence of Turing-uncomputable functions
follows by simple cardinality considerations: the set of functions from N to N
(in fact, even just from N to {0, 1}) are non-enumerable, but since we can enu-
merate all the Turing machines, the set of Turing-computable functions is only
denumerable.
We can also define specific functions and problems which we can prove
to be uncomputable and undecidable, respectively. One such problem is the
so-called Halting Problem. Turing machines can be finitely described by list-
ing their instructions. Such a description of a Turing machine, i.e., a Turing
machine program, can of course be used as input to another Turing machine.
So we can consider Turing machines that decide questions about other Tur-
ing machines. One particularly interesting question is this: “Does the given
Turing machine eventually halt when started on input n?” It would be nice if
there were a Turing machine that could decide this question: think of it as a
quality-control Turing machine which ensures that Turing machines don’t get
caught in infinite loops and such. The interestign fact, which Turing proved,
is that there cannot be such a Turing machine. There cannot be a single Turing
machine which, when started on input consisting of a description of a Turing
machine M and some number n, will always halt with either output 1 or 0
according to whether M machine would have halted when started on input n
or not.
by the lexicographic ordering. Each Turing machine thus receives an index: its
place in the enumeration M1 , M2 , M3 , . . . of Turing machine descriptions.
We know that there must be non-Turing-computable functions: the set of
Turing machine descriptions—and hence the set of Turing machines—is enu-
merable, but the set of all functions from N to N is not. But we can find
specific examples of non-computable function as well. One such function is
the halting function.
Definition 29.3 (Halting problem). The Halting Problem is the problem of de-
termining (for any m, w) whether the Turing machine Me halts for an input
of n strokes.
2. Now suppose Me does not halt for an input of e 1s. Then s(e) = 0, and
S, when started on input e, halts with a blank tape. J, when started on
a blank tape, immediately halts. Again, Me does what S followed by J
would do, so Me must halt for an input of e 1’s.
The bulk of our proof will consist in describing these sentences τ ( M, w) and
α( M, w) and verifying that τ ( M, w) → α( M, w) is valid iff M halts on input w.
3. A constant symbol
For each number n there is a canonical term n, the numeral for n, which
represents it in L M . 0 is , 1 is 0 , 2 is 00 , and so on. More formally:
0=
n + 1 = n0
∀ x ∀y ( x 0 = y0 → x = y)
b) A sentence that says that every number is less than its successor:
∀x x < x0
∀ x ∀y ( x < y → x 6= y)
Qq0 (1, 0)
∀ x (k < x → S0 ( x, 0))
∀ x ∀y ((Qqi ( x, y) ∧ Sσ ( x, y)) →
(Qq j ( x 0 , y0 ) ∧ Sσ0 ( x, y0 ) ∧ ϕ( x, y)))
This says that if, after y steps, the machine is in state qi scanning
square x which contains symbol σ, then after y + 1 steps it is scan-
ning square x + 1, is in state q j , square x now contains σ0 , and every
square other than x contains the same symbol as it did after y steps.
b) For every instruction δ(qi , σ) = hq j , σ0 , Li, the sentence:
∀ x ∀y ((Qqi ( x 0 , y) ∧ Sσ ( x 0 , y)) →
(Qq j ( x, y0 ) ∧ Sσ0 ( x 0 , y0 ) ∧ ϕ( x, y))) ∧
∀y ((Qqi (, y) ∧ Sσ (, y)) →
(Qq j (, y0 ) ∧ Sσ0 (, y0 ) ∧ ϕ(, y)))
Take a moment to think about how this works: now we don’t start
with “if scanning square x . . . ” but: “if scanning square x + 1 . . . ” A
move to the left means that in the next step the machine is scanning
square x. But the square that is written on is x + 1. We do it this
way since we don’t have subtraction or a predecessor function.
Note that numbers of the form x + 1 are 1, 2, . . . , i.e., this doesn’t
cover the case where the machine is scanning square 0 and is sup-
posed to move left (which of course it can’t—it just stays put). That
special case is covered by the second conjunction: it says that if, af-
ter y steps, the machine is scanning square 0 in state qi and square 0
contains symbol σ, then after y + 1 steps it’s still scanning square 0,
is now in state q j , the symbol on square 0 is σ0 , and the squares
other than square 0 contain the same symbols they contained ofter
y steps.
c) For every instruction δ(qi , σ ) = hq j , σ0 , N i, the sentence:
∀ x ∀y ((Qqi ( x, y) ∧ Sσ ( x, y)) →
(Qq j ( x, y0 ) ∧ Sσ0 ( x, y0 ) ∧ ϕ( x, y)))
Let τ ( M, w) be the conjunction of all the above sentences for Turing machine M
and input w
In order to express that M eventually halts, we have to find a sentence that
says “after some number of steps, the transition function will be undefined.”
Let X be the set of all pairs hq, σi such that δ(q, σ ) is undefined. Let α( M, w)
then be the sentence
_
∃ x ∃y ( (Qq ( x, y) ∧ Sσ ( x, y)))
hq,σi∈ X
∃ x ∃y Qh ( x, y)
expresses that the machine eventually halts.
Proposition 29.8. If m < k, then τ ( M, w) m < k
Proof. Exercise.
The strategy for the converse is very different. Here we assume that
τ ( M, w) → α( M, w) and have to prove that M halts on input w. From the hy-
pothesis we get that τ ( M, w) α( M, w), i.e., α( M, w) is true in every structure
in which τ ( M, w) is true. So we’ll describe a structure M in which τ ( M, w)
is true: its domain will be N, and the interpretation of all the Qq and Sσ
will be given by the configurations of M during a run on input w. So, e.g.,
M Qq (m, n) iff T, when run on input w for n steps, is in state q and scan-
ning square m. Now since τ ( M, w) α( M, w) by hypothesis, and since M
τ ( M, w) by construction, M α( M, w). But M α( M, w) iff there is some
n ∈ |M| = N so that M, run on input w, is in a halting configuration after n
steps.
Proof. Suppose that M halts for input w after n steps. There is some state q,
square m, and symbol σ such that:
Lemma 29.11. For each n, if M has not halted after n steps, τ ( M, w) χ( M, w, n).
Inductive hypothesis: If M has not halted before the nth step, then τ ( M, w)
χ( M, w, n). We have to show that (unless χ( M, w, n) describes a halting con-
figuration), τ ( M, w) χ( M, w, n + 1).
Suppose n > 0 and after n steps, M started on w is in state q scanning
square m. Since M does not halt after n steps, there must be an instruction of
one of the following three forms in the program of M:
1. δ(q, σ) = hq0 , σ0 , Ri
2. δ(q, σ) = hq0 , σ0 , Li
3. δ(q, σ ) = hq0 , σ0 , N i
1. Suppose there is an instruction of the form ??. By ??, ??, this means that
∀ x ∀y ((Qq ( x, y) ∧ Sσ ( x, y)) →
(Qq0 ( x 0 , y0 ) ∧ Sσ0 ( x, y0 ) ∧ ϕ( x, y)))
We now get
as follows: The first line comes directly from the consequent of the pre-
ceding conditional, by modus ponens. Each conjunct in the middle
line—which excludes Sσm (m, n0 )—follows from the corresponding con-
junct in χ( M, w, n) together with ϕ(m, n).
Proof. By ??, we know that, for any time n, the description χ( M, w, n) of the
configuration of M at time n is entailed by τ ( M, w). Suppose M halts after k
steps. It will be scanning square m, say. Then χ( M, w, k) describes a halting
configuration of M, i.e., it contains as conjuncts both Qq (m, k) and Sσ (m, k)
with δ(q, σ ) undefined. By ?? Thus, χ( M, w, k ) α( M, w). But since ( M, w)
χ( M, w, k), we have τ ( M, w) α( M, w) and therefore τ ( M, w) → α( M, w) is
valid.
Qq and Sσ as follows:
Proof. Suppose the decision problem were solvable, i.e., suppose there were
a Turing machine D of the following sort. Whenever D is started on a tape
that contains a sentence ψ of first-order logic as input, D eventually halts,
and outputs 1 iff ψ is valid and 0 otherwise. Then we could solve the halt-
ing problem as follows. We construct a Turing machine E that, given as input
the number e of Turing machine Me and input w, computes the correspond-
ing sentence τ ( Me , w) → α( Me , w) and halts, scanning the leftmost square on
the tape. The machine E _ D would then, given input e and w, first com-
pute τ ( Me , w) → α( Me , w) and then run the decision problem machine D on
that input. D halts with output 1 iff τ ( Me , w) → α( Me , w) is valid and out-
puts 0 otherwise. By ?? and ??, τ ( Me , w) → α( Me , w) is valid iff Me halts on
input w. Thus, E _ D, given input e and w halts with output 1 iff Me halts
on input w and halts with output 0 otherwise. In other words, E _ D would
solve the halting problem. But we know, by ??, that no such Turing machine
can exist.
Problems
Problem 29.1. The Three Halting (3-Halt) problem is the problem of giving a
decision procedure to determine whether or not an arbitrarily chosen Turing
Machine halts for an input of three strokes on an otherwise blank tape. Prove
that the 3-Halt problem is unsolvable.
Problem 29.2. Show that if the halting problem is solvable for Turing machine
and input pairs Me and n where e 6= n, then it is also solvable for the cases
where e = n.
Problem 29.3. We proved that the halting problem is unsolvable if the input
is a number e, which identifies a Turing machine Me via an enumaration of
all Turing machines. What if we allow the description of Turing machines
from ?? directly as input? (This would require a larger alphabet of course.)
Can there be a Turing machine which decides the halting problem but takes
as input descriptions of Turing machines rather than indices? Explain why or
why not.
Problem 29.6. Give a derivation of Sσi (i, n0 ) from Sσi (i, n) and ϕ(m, n) (as-
suming i 6= m, i.e., either i < m or m < i).
0
Problem 29.7. Give a derivation of ∀ x (k < x → S0 ( x, n0 )) from ∀ x (k < x →
S0 ( x, n0 )), ∀ x x < x 0 , and ∀ x ∀y ∀z (( x < y ∧ y < z) → x < z).)
Incompleteness
415
CHAPTER 29. UNDECIDABILITY
Introduction to Incompleteness
417
CHAPTER 30. INTRODUCTION TO INCOMPLETENESS
Basic Laws of Arithmetic, Frege set out to show that all of arithmetic could be
derived in his Begriffsschrift from purely logical assumption. Unfortunately,
these assumptions turned out to be inconsistent, as Russell showed in 1902.
But setting aside the inconsistent axiom, Frege more or less invented mod-
ern logic singlehandedly, a startling achievement. Quantificational logic was
also developed independently by algebraically-minded thinkers after Boole,
including Peirce and Schröder.
Let us now turn to developments in the foundations of mathematics. Of
course, since logic plays an important role in mathematics, there is a good deal
of interaction with the developments I just described. For example, Frege de-
veloped his logic with the explicit purpose of showing that all of mathematics
could be based solely on his logical framework; in particular, he wished to
show that mathematics consists of a priori analytic truths instead of, as Kant
had maintained, a priori synthetic ones.
Many take the birth of mathematics proper to have occurred with the
Greeks. Euclid’s Elements, written around 300 B.C., is already a mature rep-
resentative of Greek mathematics, with its emphasis on rigor and precision.
The definitions and proofs in Euclid’s Elements survive more or less in tact
in high school geometry textbooks today (to the extent that geometry is still
taught in high schools). This model of mathematical reasoning has been held
to be a paradigm for rigorous argumentation not only in mathematics but in
branches of philosophy as well. (Spinoza even presented moral and religious
arguments in the Euclidean style, which is strange to see!)
Calculus was invented by Newton and Leibniz in the seventeenth century.
(A fierce priority dispute raged for centuries, but most scholars today hold
that the two developments were for the most part independent.) Calculus in-
volves reasoning about, for example, infinite sums of infinitely small quanti-
ties; these features fueled criticism by Bishop Berkeley, who argued that belief
in God was no less rational than the mathematics of his time. The methods of
calculus were widely used in the eighteenth century, for example by Leonhard
Euler, who used calculations involving infinite sums with dramatic results.
In the nineteenth century, mathematicians tried to address Berkeley’s crit-
icisms by putting calculus on a firmer foundation. Efforts by Cauchy, Weier-
strass, Bolzano, and others led to our contemporary definitions of limits, con-
tinuity, differentiation, and integration in terms of “epsilons and deltas,” in
other words, devoid of any reference to infinitesimals. Later in the century,
mathematicians tried to push further, and explain all aspects of calculus, in-
cluding the real numbers themselves, in terms of the natural numbers. (Kro-
necker: “God created the whole numbers, all else is the work of man.”) In
1872, Dedekind wrote “Continuity and the irrational numbers,” where he
showed how to “construct” the real numbers as sets of rational numbers (which,
as you know, can be viewed as pairs of natural numbers); in 1888 he wrote
“Was sind und was sollen die Zahlen” (roughly, “What are the natural num-
bers, and what should they be?”) which aimed to explain the natural numbers
in purely “logical” terms. In 1887 Kronecker wrote “Über den Zahlbegriff”
(“On the concept of number”) where he spoke of representing all mathemati-
cal object in terms of the integers; in 1889 Giuseppe Peano gave formal, sym-
bolic axioms for the natural numbers.
The end of the nineteenth century also brought a new boldness in dealing
with the infinite. Before then, infinitary objects and structures (like the set of
natural numbers) were treated gingerly; “infinitely many” was understood
as “as many as you want,” and “approaches in the limit” was understood as
“gets as close as you want.” But Georg Cantor showed that it was possible to
take the infinite at face value. Work by Cantor, Dedekind, and others help to
introduce the general set-theoretic understanding of mathematics that is now
widely accepted.
This brings us to twentieth century developments in logic and founda-
tions. In 1902 Russell discovered the paradox in Frege’s logical system. In 1904
Zermelo proved Cantor’s well-ordering principle, using the so-called “axiom
of choice”; the legitimacy of this axiom prompted a good deal of debate. Be-
tween 1910 and 1913 the three volumes of Russell and Whitehead’s Principia
Mathematica appeared, extending the Fregean program of establishing mathe-
matics on logical grounds. Unfortunately, Russell and Whitehead were forced
to adopt two principles that seemed hard to justify as purely logical: an axiom
of infinity and an axiom of “reducibility.” In the 1900’s Poincaré criticized the
use of “impredicative definitions” in mathematics, and in the 1910’s Brouwer
began proposing to refound all of mathematics in an “intuitionistic” basis,
which avoided the use of the law of the excluded middle (ϕ ∨ ¬ ϕ).
Strange days indeed! The program of reducing all of mathematics to logic
is now referred to as “logicism,” and is commonly viewed as having failed,
due to the difficulties mentioned above. The program of developing mathe-
matics in terms of intuitionistic mental constructions is called “intuitionism,”
and is viewed as posing overly severe restrictions on everyday mathemat-
ics. Around the turn of the century, David Hilbert, one of the most influen-
tial mathematicians of all time, was a strong supporter of the new, abstract
methods introduced by Cantor and Dedekind: “no one will drive us from the
paradise that Cantor has created for us.” At the same time, he was sensitive
to foundational criticisms of these new methods (oddly enough, now called
“classical”). He proposed a way of having one’s cake and eating it too:
2. Use safe, “finitary” methods to prove that these formal deductive sys-
tems are consistent.
Hilbert’s work went a long way toward accomplishing the first goal. In
1899, he had done this for geometry in his celebrated book Foundations of ge-
can be proved in them. It also makes sense to develop less restricted methods
of proof for establishing the consistency of these systems, and to find ways to
measure how hard it is to prove their consistency. Since Gödel showed that
(almost) every formal system has questions it cannot settle, it makes sense to
look for “interesting” questions a given formal system cannot settle, and to
figure out how strong a formal system has to be to settle them. To the present
day, logicians have been pursuing these questions in a new mathematical dis-
cipline, the theory of proofs.
30.2 Definitions
In order to carry out Hilbert’s project of formalizing mathematics and show-
ing that such a formalization is consistent and complete, the first order of busi-
ness would be that of picking a language, logical framework, and a system of
axioms. For our purposes, let us suppose that mathematics can be formalized
in a first-order language, i.e., that there is some set of constant symbols, func-
tion symbols, and predicate symbols which, together with the connectives and
quatifiers of first-order logic, allow us to express the claims of mathematics.
Most people agree that such a language exists: the language of set theory, in
which ∈ is the only non-logical symbol. That such a simple language is so
expressive is of course a very implausible claim at first sight, and it took a
lot of work to establish that practically of all mathematics can be expressed
in this very austere vocabulary. To keep things simple, for now, let’s restrict
our discussion to arithmetic, so the part of mathematics that just deals with
the natural numbers N. The natural language in which to express facts of
arithmetic is L A . L A contains a single two-place predicate symbol <, a sin-
gle constant symbol , one one-place function symbol 0, and two two-place
function symbols + and ×.
There are two easy ways to specify theories. One is as the set of sentences
true in some structure. For instance, consider the structure for L A in which
the domain is N and all non-logical symbols are interpreted as you would
expect.
1. |N| = N
2. N = 0
(( ϕ() ∧ ∀ x ( ϕ( x ) → ϕ( x 0 ))) → ∀ x ϕ( x ))
Definition 30.7. A theory Γ is complete iff for every sentence ϕ in its language,
either Γ ϕ or Γ ¬ ϕ.
is computable.
ϕ(, y1 , . . . , yn ) ∧ ∀ x ( ϕ( x, y1 , . . . , yn ) → ϕ( x 0 , y1 , . . . , yn ))
Definition 30.11. A set X is called computably enumerable (c.e. for short) iff it
is empty or it has a computable enumeration.
and to generalize Gödel’s proof to apply make it depend only on these fea-
tures. But we are now in a position to state a very general version of the first
incompleteness theorem for theories in the language L A of arithmetic.
To say that Γ is not complete is to say that for at least one sentence ϕ,
Γ 0 ϕ and Γ 0 ¬ ϕ. Such a sentence is called independent (of Γ ). We can in
fact relatively quickly prove that there must be independent sentences. But
the power of Gödel’s proof of the theorem lies in the fact that it exhibits a
specific example of such an independent sentence. The intriguing construction
produces a sentence GΓ , called a Gödel sentence for Γ, which is unprovable
because in Γ, GΓ is equivalent to the claim that GΓ is unprovable in Γ. It does
so constructively, i.e., given an axiomatization of Γ and a description of the
proof system, the proof gives a method for actually writing down GΓ .
The construction in Gödel’s proof requires that we find a way to express
in L A the properties of and operations on terms and formulas of L A itself.
These include properties such as “ϕ is a sentence,” “δ is a derivation of ϕ,”
and operations such as ϕ[t/x ]. This way must (a) express these properties
and relations via a “coding” of symbols and sequences thereof (which is what
terms, formulas, derivations, etc. are) as natural numbers (which is what L A
can talk about). It must (b) do this in such a way that Γ will prove the relevant
facts, so we must show that these properties are coded by decidable properties
of natural numbers and the operations correspond to computable functions on
natural numbers. This is called “arithmetization of syntax.”
Before we investigate how syntax can be arithmetized, however, we will
consider the condition that Γ is “strong enough,” i.e., represents all com-
putable functions and decidable relations. This requires that we give a precise
definition of “computable.” This can be done in a number of ways, e.g., via
the model of Turing machines, or as those functions computable by programs
in some general-purpose programming language. Since our aim is to repre-
sent these functions and relations in a theory in the language L A , however, it
is best to pick a simple definition of computability of just numerical functions.
This is the notion of recursive function. So we will first discuss the recursive
functions. We will then show that Q already represents all recursive functions
and relations. This will allow us to apply the incompleteness theorem to spe-
cific theories such as Q and PA, since we will have established that these are
examples of theories that are “strong enough.”
The end result of the arithmetization of syntax is a formula Prov Γ ( x ) which,
via the coding of formulas as numbers, expresses provability from the axioms
of Γ. Specifically, if ϕ is coded by the number n, and Γ ` ϕ, then Γ ` ProvΓ (n).
This “provability predicate” for Γ allows us also to express, in a certain sense,
the consistency of Γ as a sentence of L A : let the “consistency statemetn” for Γ
The preceding theorem shows that no theory that represents all decidable
relations can be decidable. We will show that Q does represent all decidable
relations; this means that all theories that include Q, such as PA and TA, also
do, and hence also are not decidable.
We can also use this result to obtain a weak version of the first incomplete-
ness theorem. Any theory that is axiomatizable and complete is decidable.
Consistent theories that are axiomatizable and represent all decidable proper-
ties then cannot be complete.
Problems
Problem 30.1. Show that TA = { ϕ : N ϕ} is not axiomatizable. You may
assume that TA represents all decidable properties.
Arithmetization of Syntax
31.1 Introduction
In order to connect computability and logic, we need a way to talk about the
objects of logic (symbols, terms, formulas, derivations), operations on them,
and their properties and relations, in a way amenable to computational treat-
ment. We can do this directly, by considering computable functions and re-
lations on symbols, sequences of symbols, and other objects built from them.
Since the objects of logical syntax are all finite and built from an enumerable
sets of symbols, this is possible for some models of computation. But other
models of computation—such as the recursive functions—-are restricted to
numbers, their relations and functions. Moreover, ultimately we also want
to be able to deal with syntax within certain theories, specifically, in theo-
ries formulated in the language of arithmetic. In these cases it is necessary to
arithmetize syntax, i.e., to represent syntactic objects, operations on them, and
their relations, as numbers, arithmetical functions, and arithmetical relations,
respectively. The idea, which goes back to Leibniz, is to assign numbers to
syntactic objects.
It is relatively straightforward to assign numbers to symbols as their “codes.”
Some symbols pose a bit of a challenge, since, e.g., there are infinitely many
variables, and even infinitely many function symbols of each arity n. But of
course it’s possible to assign numbers to symbols systematically in such a way
that, say, v2 and v3 are assigned different codes. Sequences of symbols (such
as terms and formulas) are a bigger challenge. But if can deal with sequences
of numbers purely arithmetically (e.g., by the powers-of-primes coding of se-
quences), we can extend the coding of individual symbols to coding of se-
quences of symbols, and then further to sequences or other arrangements of
429
CHAPTER 31. ARITHMETIZATION OF SYNTAX
⊥ ¬ ∨ ∧ → ∀ ∃ = ( ) ,
together with enumerable sets of variables and constant symbols, and enu-
merable sets of function symbols and predicate symbols of arbitrary arity. We
can assign codes to each of these symbols in such a way that every symbol is
assigned a unique number as its code, and no two different symbols are as-
signed the same number. We know that this is possible since the set of all
symbols is enumerable and so there is a bijection between it and the set of nat-
ural numbers. But we want to make sure that we can recover the symbol (as
well as some information about it, e.g., the arity of a function symbol) from
its code in a computable way. There are many possible ways of doing this,
of course. Here is one such way, which uses primitive recursive functions.
(Recall that hn0 , . . . , nk i is the number coding the sequence of numbers n0 , . . . ,
nk .)
⊥ ¬ ∨ ∧ → ∀
h0, 0i h0, 1i h0, 2i h0, 3i h0, 4i h0, 5i
∃ = ( ) ,
h0, 6i h0, 7i h0, 8i h0, 9i h0, 10i
1. Fn( x, n) iff x is the code of fin for some i, i.e., x is the code of an n-ary function
symbol.
2. Pred( x, n) iff x is the code of Pin for some i or x is the code of = and n = 2,
i.e., x is the code of an n-ary predicate symbol.
Note that codes and Gödel numbers are different things. For instance, the
variable v5 has a code cv5 = h1, 5i = 22 · 36 . But the variable v5 considered as
a term is also a sequence of symbols (of length 1). The Gödel number # v5 # of the
2 6
term v5 is hcv5 i = 2cv5 +1 = 22 ·3 +1 .
where pi is the i-th prime (starting with p0 = 2). So for instance, the formula
v0 = , or, more explicitly, =(v0 , c0 ), has the Gödel number
Here, c= is h0, 7i = 20+1 · 37=1 , cv0 is h1, 0i = 21+1 · 30+1 , etc. So # = (v0 , c0 )# is
Proposition 31.5. The relations Term( x ) and ClTerm( x ) which hold iff x is the
Gödel number of a term or a closed term, respectively, are primitive recursive.
1. si is a variable v j , or
2. si is a constant symbol c j , or
Alternative proof of ??. The inductive definition says that constant symbols and
variables are terms, and if t1 , . . . , tn are terms, then so is f jn (t1 , . . . , tn ), for any
n and j. So terms are formed in stages: constant symbols and variables at
stage 0, terms involving one function symbol at stage 1, those involving at
least two nested function symbols at stage 2, etc. Let’s say that a sequence of
symbols s is a term of level l iff s can be formed by applying the inductive
definition of terms l (or fewer) times, i.e., it “becomes” a term by stage l or
before. So s is a term of level l + 1 iff
1. s is a variable v j , or
2. s is a constant symbol c j , or
3. s is built from n terms t1 , . . . , tn of level l and an n-place function sym-
bol f jn .
x = # f jn (# _ flatten(z) _ # )# ,
We can now define Term( x ) by lTerm( x, x ), since the level of a term is always
less than the Gödel number of the term.
num(0) = # #
num(n + 1) = # 0(# _ num(n) _ # )# .
Proof. The number x is the Gödel number of an atomic formula iff one of the
following holds:
1. There are n, j < x, and z < x such that for each i < n, Term((z)i ) and
x=
# n #
P j ( _ flatten(z) _ # )# .
3. x = # ⊥# .
Proposition 31.8. The relation Frm( x ) which holds iff x is the Gödel number of
a formula is primitive recursive.
Proposition 31.9. The relation FreeOcc( x, z, i ), which holds iff the i-th symbol of the
formula with Gödel number x is a free occurrence of the variable with Gödel number z,
is primitive recursive.
Proof. Exercise.
Proposition 31.10. The property Sent( x ) which holds iff x is the Gödel number of a
sentence is primitive recursive.
31.5 Substitution
Proposition 31.11. There is a primitive recursive function Subst( x, y, z) with the
property that
Subst(# ϕ# , # t# , # u# ) = # ϕ[t/u]#
hSubst( x, y, z, 0) = Λ
hSubst( x, y, z, i + 1) =
(
hSubst( x, y, z, i ) _ y if FreeOcc( x, z, i + 1)
append(hSubst( x, y, z, i ), ( x )i+1 ) otherwise.
Proposition 31.12. The relation FreeFor( x, y, z), which holds iff the term with
Gödel number y is free for the variable with Gödel number z in the formula with
Gödel number x, is primitive recursive.
Proof. Exercise.
31.6 Derivations in LK
In order to arithmetize derivations, we must represent derivations as num-
bers. Since derivations are trees of sequents where each inference carries also
a label, a recursive representation is the most obvious approach: we represent
a derivation as a tuple, the components of which are the end-sequent, the la-
bel, and the representations of the sub-derivations leading to the premises of
the last inference.
Rule: ¬L ¬R ∧L ∨R →R
k: 7 8 9 10 11
Rule: ∀L ∀R ∃L ∃R =
k: 12 13 14 15 16
1. Γ ⇒ ∆ is an initial sequent.
3. π is a correct LK-derivation.
Proof. We have to show that the corresponding relations between Gödel num-
bers of formulas, sequences of Gödel numbers of formulas (which code se-
quences of formulas), and Gödel numbers of sequents, are primitive recur-
sive.
2. Here we have to show that for each rule of inference R the relation
FollowsByR (s, s0 ) which holds if s and s0 are the Gödel numbers of con-
clusion and premise of a correct application of R is primitive recursive.
If R has two premises, FollowsByR of course has three arguments.
For instance, Γ ⇒ ∆ follows correctly from Γ 0 ⇒ ∆0 by ∃R iff Γ = Γ 0
and there is a sequence of formulas ∆00 , a formula ϕ, a variable x and a
closed term t such that ∆0 = ∆00 , ϕ[t/x ] and ∆ = ∆00 , ∃ x ϕ. We just have
to translate this into Gödel numbers. If s = # Γ ⇒ ∆# then (s)0 = # Γ# and
(s)1 = # ∆# . So, FollowsBy∃R (s, s0 ) holds iff
( s )0 = ( s 0 )0 ∧
(∃d < s) (∃ f < s) (∃ x < s) (∃t < s0 ) (Frm( f ) ∧ Var(y) ∧ Term(t) ∧
(s0 )1 = d _ hSubst( f , t, x )i ∧
(s)1 = d _ h#(∃) _ y _ f i
hDeriv(s, 0) ⇔ true
hDeriv(s, n + 1) ⇔
((s)0 = 0 ∧ InitialSeq((s)1 )) ∨
((s)0 = 1 ∧
((s)2 = 1 ∧ FollowsByCL ((s)1 , ((s)3 )1 )) ∨
..
.
((s)2 = 16 ∧ FollowsBy= ((s)1 , ((s)3 )1 )) ∧
hDeriv((s)3 , n)) ∨
((s)0 = 2 ∧
((s)2 = 1 ∧ FollowsByCut ((s)1 , ((s)3 )1 ), ((s)4 )1 )) ∨
..
.
((s)2 = 4 ∧ FollowsBy→L ((s)1 , ((s)3 )1 ), ((s)4 )1 )) ∧
hDeriv((s)3 , n) ∧ hDeriv((s)4 , n))
by
[( ϕ ∧ ψ)]1
ϕ ∧Elim
1 →Intro
( ϕ → ψ)
The Gödel number of the assumption would be d0 = h0, # ( ϕ ∧ ψ)# , 1i. The
Gödel number of the derivation ending in the conclusion of ∧Elim would be
d1 = h1, # ϕ# , 0, 1, d0 i (1 since ∧Elim has one premise, Gödel number of conclu-
sion ϕ, 0 because no assumption is discharged, 1 is the number coding ∧Elim).
The Gödel number of the entire derivation then is h1, # ( ϕ → ψ)# , 1, 3, d1 i, i.e.,
# #
# ( ϕ → ψ )# +1 2 ·3# ϕ# +1 ·51 ·72 ·11(21 ·3 ( ϕ∧ψ) +1 ·52 ) )
22 · 3 · 52 · 74 · 11(2 .
2. All assumption in δ with label n are of the form ϕ (i.e., we can discharge the
assumption ϕ using label n in δ).
3. ϕ is an undischarged assumption of δ.
Proof. We have to show that the corresponding relations between Gödel num-
bers of formulas, sequences of Gödel numbers of formulas (which code sets
of formulas), and Gödel numbers of derivations are primitive recursive.
1. We want to show that Assum( x, d, n), which holds if x is the Gödel num-
ber of an assumption of the derivation with Gödel number d labelled n,
is primitive recursive. For this we need a helper relation hAssum( x, d, n, i )
which holds if the formula ϕ with Gödel number x occurs as an initial
formula with label n in the derivation with Gödel number d within i
hAssum( x, d, n, 0) ⇔ T
hAssum( x, d, n, i + 1) ⇔
Sent( x ) ∧ (d = h0, x, ni ∨
((d)0 = 1 ∧ hAssum( x, (d)4 , n, i )) ∨
((d)0 = 2 ∧ (hAssum( x, (d)4 , n, i ) ∨
hAssum( x, (d)5 , n, i ))) ∨
((d)0 = 3 ∧ (hAssum( x, (d)3 , n, i ) ∨
hAssum( x, (d)2 , n, i )) ∨ hAssum( x, (d)3 , n, i ))
If the number i is large enough, e.g., larger than the maximum num-
ber of inferences between an initial formula and the end-formula of δ,
it holds of x, d, n, and i iff ϕ is an initial formula in δ labelled n. The
number d itself is larger than that maximum number of inferences. So
we can define
hNotOpen( x, d, n, 0) ⇔ T
hNotOpen( x, d, n, i + 1) ⇔
( d )2 = n ∨
((d)0 = 1 ∧ hNotOpen( x, (d)4 , n, i )) ∨
((d)0 = 2 ∧ hNotOpen( x, (d)4 , n, i ) ∧
hNotOpen( x, (d)5 , n, i ))) ∨
((d)0 = 3 ∧ hNotOpen( x, (d)3 , n, i ) ∧
hNotOpen( x, (d)4 , n, i ) ∧ hNotOpen( x, (d)5 , n, i ))
Note that all assumptions of the form ϕ labelled n are discharged in δ iff
either the last inference of δ discharges them (i.e., the last inference has
label n), or if it is discharged in all of the immediate subderivations.
A formula ϕ is an open assumption of δ iff it is an initial formula of δ
(with label n) and is not discharged in δ (by a rule with label n). We can
4. Here we have to show that for each rule of inference R the relation
FollowsByR ( x, d1 , n) which holds if x is the Gödel number of the conclu-
sion and d1 is the Gödel number of a derivation ending in the premise
of a correct application of R with label n is primitive recursive, and sim-
ilarly for rules with two or three premises.
The simplest case is that of the =Intro rule. Here there is no premise,
i.e., d1 = 0. However, ϕ must be of the form t = t, for a closed term t.
Here, a primitive recursive definition is
Sent( x ) ∧ (∃y < x ) (∃v < x ) (∃t < d) (Frm(y) ∧ Term(t) ∧ Var(v) ∧
FreeFor(y, t, v) ∧ Subst(y, t, v) = (d1 )1 ∧ x = (# ∃# _ v _ z))
hDeriv(d, 0) ⇔ T
hDeriv(d, i + 1) ⇔
(∃ x < d) (∃n < d) (Sent( x ) ∧ d = h0, x, ni) ∨
((d)0 = 1 ∧
((d)3 = 1 ∧ FollowsBy∧Elim ((d)1 , (d)4 , (d)2 ) ∨
..
.
((d)3 = 10 ∧ FollowsBy=Intro ((d)1 , (d)4 , (d)2 )) ∧
nDeriv((d)4 , i )) ∨
((d)0 = 2 ∧
((d)3 = 1 ∧ FollowsBy∧Intro ((d)1 , (d)4 , (d)5 , (d)2 )) ∨
..
.
((d)3 = 3 ∧ FollowsBy¬Elim ((d)1 , (d)4 , (d)5 , (d)2 )) ∧
hDeriv((d)4 , i ) ∧ hDeriv((d)5 , i )) ∨
((d)0 = 3 ∧
FollowsBy∨Elim ((d)1 , (d)3 , (d)4 , (d)5 , (d)2 ) ∧
hDeriv((d)3 , i ) ∧ hDeriv((d)4 , i )) ∧ hDeriv((d)5 , i )
PrfΓ ( x, y) ⇔ Deriv( x ) ∧ ( x )1 = y ∧
(∀z < x ) (OpenAssum(z, x ) → R Γ (z))
1. ψ → (ψ ∨ ϕ)
2. (ψ → (ψ ∨ ϕ)) → ( ϕ → (ψ → (ψ ∨ ϕ)))
3. ϕ → (ψ → (ψ ∨ ϕ))
1. ϕ is an axiom.
4. δ is a correct derivation.
Proof. We have to show that the corresponding relations between Gödel num-
bers of formulas and Gödel numbers of derivations are primitive recursive.
ψ → ( χ → ψ ).
2. The ith line in δ is justified by modus ponens iff there are lines j and
k < i where the sentence on line j is some formula ϕ, the sentence on
line k is ϕ → ψ, and the sentence on line i is ψ.
All of these can be tested primitive recursively, since the Gödel numbers
of ψ, ϕ( x ), and x are less than the Gödel number of the formula on line i,
and that of a less than the Gödel number of the formula on line j:
QR1 (d, i ) ⇔ (∃b < (d)i ) (∃ x < (d)i ) (∃ a < (d)i ) (∃c < (d) j ) (
Var( x ) ∧ Const(c) ∧
( d ) i = # (# _ b _ # →# _ # ∀# _ x _ a _ # )# ∧
(d) j = # (# _ b _ # →# _ Subst( a, c, x ) _ # )# ∧
Sent(b) ∧ Sent(Subst( a, c, x )) ∧ (∀k < len(b)) (b)k 6= (c)0 )
Here we assume that c and x are the Gödel numbers of the variable and
constant considered as terms (i.e., not their symbol codes). We test that x
is the only free variable of ϕ( x ) by testing if ϕ( x )[c/x ] is a sentence, and
ensure that c does not occur in ψ by requiring that every symbol of ψ is
different from c.
We leave the other version of QR as an exercise.
hCond(s, y, 0) = y
hCond(s, y, n + 1) = # (# _ (s)n _ # →# _ Cond(s, y, n) _ # )#
Cond(s, y) = hCond(s, y, len(s))
The bound on s is given by considering that each (s)i is the Gödel number of
a subformula of the last line of the derivation, i.e., is less than ( x )len( x)−1 . The
number of antecedents ψ ∈ Γ, i.e., the length of s, is less than the length of the
last line of x.
Problems
Problem 31.1. Show that the function flatten(z), which turns the sequence
h# t1 # , . . . , # tn # i into # t1 , . . . , tn # , is primitive recursive.
Problem 31.2. Give a detailed proof of ?? along the lines of the first proof of
??
Problem 31.3. Give a detailed proof of ?? along the lines of the alternate proof
of ??
Problem 31.4. Prove ??. You may make use of the fact that any substring of
a formula which is a formula is a sub-formula of it.
2. FollowsBy= (s, s0 ),
3. FollowsBy∀R (s, s0 ).
1. FollowsBy→Elim ( x, d1 , d2 , n),
2. FollowsBy=Elim ( x, d1 , d2 , n),
3. FollowsBy∨Elim ( x, d1 , d2 , d3 , n),
4. FollowsBy∀Intro ( x, d1 , n).
For the last one, you will have to also show that you can test primitive re-
cursively if the formula with Gödel number x and the derivation with Gödel
number d satisfy the eigenvariable condition, i.e., the eigenvariable a of the
∀Intro inference occurs neither in x nor in an open assumption of d.
Problem 31.8. Define the following relations as in ??:
Representability in Q
32.1 Introduction
We will describe a very minimal such theory called “Q” (or, sometimes, “Robin-
son’s Q,” after Raphael Robinson). We will say what it means for a function
to be representable in Q, and then we will prove the following:
A function is representable in Q if and only if it is computable.
For one thing, this provides us with another model of computability. But we
will also use it to show that the set { ϕ : Q ` ϕ} is not decidable, by reducing
the halting problem to it. By the time we are done, we will have proved much
stronger things than this.
The language of Q is the language of arithmetic; Q consists of the fol-
lowing axioms (to be used in conjunction with the other axioms and rules of
first-order logic with identity predicate):
∀ x ∀y ( x 0 = y0 → x = y) (Q1 )
∀ x 6= x0 (Q2 )
∀ x ( x 6= → ∃y x = y0 ) (Q3 )
∀ x ( x + ) = x (Q4 )
∀ x ∀y ( x + y0 ) = ( x + y)0 (Q5 )
∀ x ( x × ) = (Q6 )
∀ x ∀y ( x × y0 ) = (( x × y) + x ) (Q7 )
∀ x ∀y ( x < y ↔ ∃z (z0 + x ) = y) (Q8 )
For each natural number n, define the numeral n to be the term 000...0 where
there are n tick marks in all. So, 0 is the constant symbol by itself, 1 is 0 , 2 is
00 , etc.
As a theory of arithmetic, Q is extremely weak; for example, you can’t even
prove very simple facts like ∀ x x 6= x 0 or ∀ x ∀y ( x + y) = (y + x ). But we will
449
CHAPTER 32. REPRESENTABILITY IN Q
( ϕ() ∧ ∀ x ( ϕ( x ) → ϕ( x 0 ))) → ∀ x ϕ( x )
∀y (( ϕ() ∧ ∀ x ( ϕ( x ) → ϕ( x 0 ))) → ∀ x ϕ( x ))
Using instances of the induction schema, one can prove much more from the
axioms of PA than from those of Q. In fact, it takes a good deal of work to
find “natural” statements about the natural numbers that can’t be proved in
Peano arithmetic!
1. ϕ f (n0 , . . . , nk , m)
2. ∀y ( ϕ f (n0 , . . . , nk , y) → m = y).
There are other ways of stating the definition; for example, we could equiv-
alently require that Q proves ∀y ( ϕ f (n0 , . . . , nk , y) ↔ y = m).
There are two directions to proving the theorem. The left-to-right direction
is fairly straightforward once arithmetization of syntax is in place. The other
direction requires more work. Here is the basic idea: we pick “general recur-
sive” as a way of making “computable” precise, and show that every general
recursive function is representable in Q. Recall that a function is general re-
cursive if it can be defined from zero, the successor function succ, and the
projection functions Pin , using composition, primitive recursion, and regular
minimization. So one way of showing that every general recursive function is
representable in Q is to show that the basic functions are representable, and
whenever some functions are representable, then so are the functions defined
from them using composition, primitive recursion, and regular minimization.
In other words, we might show that the basic functions are representable, and
that the representable functions are “closed under” composition, primitive
recursion, and regular minimization. This guarantees that every general re-
cursive function is representable.
It turns out that the step where we would show that representable func-
tions are closed under primitive recursion is hard. In order to avoid this step,
we show first that in fact we can do without primitive recursion. That is, we
show that every general recursive function can be defined from basic func-
tions using composition and regular minimization alone. To do this, we show
that primitive recursion can actually be done by a specific regular minimiza-
tion. However, for this to work, we have to add some additional basic func-
tions: addition, multiplication, and the characteristic function of the identity
relation χ= . Then, we can prove the theorem by showing that all of these basic
functions are representable in Q, and the representable functions are closed
under composition and regular minimization.
Proof. Let’s first give the intuitive idea for why this is true. If f ( x0 , . . . , xk ) is
representable in Q, there is a formula ϕ( x0 , . . . , xk , y) such that
Q ` ϕ f ( n0 , . . . , n k , m ) iff m = f ( n0 , . . . , n k ).
A ( n0 , . . . , n k , m ) =
Subst(Subst(. . . Subst(# ϕ f # , num(n0 ), # x0 # ),
. . . ), num(nk ), # xk # ), num(m), # y# )
This looks complicated, but it’s just the function A(n0 , . . . , nk , m) = # ϕ f (n0 , . . . , nk , m)# .
Now, consider the relation R(n0 , . . . , nk , s) which holds if (s)0 is the Gödel
number of a derivation from Q of ϕ f (n0 , . . . , nk , (s)1 ):
Lemma 32.4. There is a function β(d, i ) such that for every sequence a0 , . . . , an there
is a number d, such that for every i ≤ n, β(d, i ) = ai . Moreover, β can be defined
from the basic functions using just composition and regular minimization.
Definition 32.5. Two natural numbers a and b are relatively prime if their great-
est common divisor is 1; in other words, they have no other divisors in com-
mon.
Definition 32.6. a ≡ b mod c means c | ( a − b), i.e., a and b have the same
remainder when divided by c.
Here is the Chinese Remainder theorem:
Theorem 32.7. Suppose x0 , . . . , xn are (pairwise) relatively prime. Let y0 , . . . , yn be
any numbers. Then there is a number z such that
z ≡ y0 mod x0
z ≡ y1 mod x1
..
.
z ≡ yn mod xn .
j = max(n, y0 , . . . , yn ) + 1,
and let
x0 = 1 + j!
x1 = 1 + 2 · j!
x2 = 1 + 3 · j!
..
.
xn = 1 + (n + 1) · j!
Since p divides 1 + (i + 1) j!, it can’t divide j! as well (otherwise, the first divi-
sion would leave a remainder of 1). So p divides i − k, since p divides (i − k) j!.
But |i − k| is at most n, and we have chosen j > n, so this implies that p | j!,
again a contradiction. So there is no prime number dividing both xi and xk .
Clause (2) is easy: we have yi < j < j! < xi .
Now let us prove the β function lemma. Remember that we can use 0,
successor, plus, times, χ= , projections, and any function defined from them
using composition and minimization applied to regular functions. We can
also use a relation if its characteristic function is so definable. As before we can
show that these relations are closed under boolean combinations and bounded
quantification; for example:
1. not( x ) = χ= ( x, 0)
2. (min x ≤ z) R( x, y) = µx ( R( x, y) ∨ x = z)
3. (∃ x ≤ z) R( x, y) ⇔ R((min x ≤ z) R( x, y), y)
We can then show that all of the following are also definable without primitive
recursion:
2. Projections
and
L(z) = (min y ≤ q) (∃ x ≤ z [z = J ( x, y)]).
3. x < y
4. x | y
Now define
β∗ (d0 , d1 , i ) = rem(1 + (i + 1)d1 , d0 )
and
β(d, i ) = β∗ (K (d), L(d), i ).
This is the function we need. Given a0 , . . . , an , as above, let
j = max(n, a0 , . . . , an ) + 1,
d0 ≡ a i mod (1 + (i + 1)d1 )
ai = rem(1 + (i + 1)d1 , d0 ).
β(d, i ) = β ∗ ( d0 , d1 , i )
= rem(1 + (i + 1)d1 , d0 )
= ai
which is what we need. This completes the proof of the β-function lemma.
We need to show that h can be defined from f and g using just composition
and regular minimization, using the basic functions and functions defined
from them using composition and regular minimization (such as β).
Lemma 32.8. If h can be defined from f and g using primitive recursion, it can be
defined from f , g, the functions zero, succ, Pin , add, mult, χ= , using composition
and regular minimization.
Proof. First, define an auxiliary function ĥ( x, ~z) which returns the least num-
ber d such that d codes a sequence which satisfies
1. (d)0 = f (~z), and
2. for each i < x, (d)i+1 = g(i, (d)i , ~z),
where now (d)i is short for β(d, i ). In other words, ĥ returns the sequence
hh(0, ~z), h(1, ~z), . . . , h( x, ~z)i. We can write ĥ as
ĥ( x, z) = µd ( β(d, 0) = f (~z) ∧ ∀i < x β(d, i + 1) = g(i, β(d, i ), ~z)).
n + m = n + m and
∀y ((n + m) = y → y = n + m).
is represented in Q by
( x0 = x1 ∧ y = 1) ∨ ( x0 6 = x1 ∧ y = 0).
Note that the lemma does not say much: in essence it says that Q can
prove that different numerals denote different objects. For example, Q proves
000 6= 0000 . But showing that this holds in general requires some care. Note also
that although we are using induction, it is induction outside of Q.
Proof of ??. If n = m, then n and m are the same term, and χ= (n, m) = 1. But
Q ` (n = m ∧ 1 = 1), so it proves ϕ= (n, m, 1). If n 6= m, then χ= (n, m) = 0.
By ??, Q ` n 6= m and so also (n 6= m ∧ = ). Thus Q ` ϕ= (n, m, 0).
For the second part, we also have two cases. If n = m, we have to show that
that Q ` ∀( ϕ= (n, m, y) → y = 1). Arguing informally, suppose ϕ= (n, m, y),
i.e.,
( n = n ∧ y = 1) ∨ ( n 6 = n ∧ y = 0)
The left disjunct implies y = 1 by logic; the right contradicts n = n which is
provable by logic.
Suppose, on the other hand, that n 6= m. Then ϕ= (n, m, y) is
( n = m ∧ y = 1) ∨ ( n 6 = m ∧ y = 0)
Lemma 32.15. Q ` (n + m) = n + m
Q ` (n + m) = n + m,
we can replace the left side with n + m and get n + m = y, for arbitrary y.
Proof. Exercise.
Lemma 32.17. Q ` (n × m) = n · m
Proof. Exercise.
h( x0 , . . . , xl −1 ) = f ( g0 ( x0 , . . . , xl −1 ), . . . , gk−1 ( x0 , . . . , xl −1 )).
Q ` ϕ g (n, k)
Q ` ϕ f (k, m)
Q ` ϕ g (n, k) ∧ ϕ f (k, m)
Q ` ∀z ( ϕ f (k, z) → z = m)
since ϕ f represents f . Using just a little bit of logic, we can show that also
The same idea works in the more complex case where f and gi have arity
greater than 1.
Proposition 32.20. If ϕ f (y0 , . . . , yk−1 , z) represents f (y0 , . . . , yk−1 ) in Q, and
ϕ gi ( x0 , . . . , xl −1 , y) represents gi ( x0 , . . . , xl −1 ) in Q, then
∃ y 0 , . . . ∃ y k − 1 ( ϕ g0 ( x 0 , . . . , x l − 1 , y 0 ) ∧ · · · ∧
ϕ gk−1 ( x0 , . . . , xl −1 , yk−1 ) ∧ ϕ f (y0 , . . . , yk−1 , z))
represents
h( x0 , . . . , xk−1 ) = f ( g0 ( x0 , . . . , xk−1 ), . . . , g0 ( x0 , . . . , xk−1 )).
Proof. Exercise.
Q ` ( x 0 + n) = ( x + n)0 .
Q ` ( x 0 + 0) = x 0 by axiom Q4 (32.1)
Q ` ( x + 0) = x by axiom Q4 (32.2)
0 0
Q ` ( x + 0) = x by ?? (32.3)
0 0
Q ` ( x + 0) = ( x + 0) by ?? and ??
It is again worth mentioning that this is weaker than saying that Q proves
∀ x ∀y ( x 0 + y) = ( x + y)0 . Although this sentence is true in N, Q does not
prove it.
Q ` ∀ x ( x < n + 1 → ( x = ∨ · · · ∨ x = n)).
Proof. Let us do 1 and part of 2, informally (i.e., only giving hints as to how to
construct the formal derivation).
For part 1, by the definition of <, we need to prove ¬∃y (y0 + x ) =
in Q, which is equivalent (using the axioms and rules of first-order logic) to
∀y (y0 + x ) 6= 0. Here is the idea: suppose (y0 + x ) = . If x = , we have
(y0 + ) = . But by axiom Q4 of Q, we have (y0 + ) = y0 , and by axiom Q2
we have y0 6= , a contradiction. So ∀y (y0 + x ) 6= . If x 6= , by axiom Q3 ,
there is a z such that x = z0 . But then we have (y0 + z0 ) = 0. By axiom Q5 , we
have (y0 + z)0 = , again contradicting axiom Q2 .
For part 2, use induction on n. Let us consider the base case, when n = 0.
In that case, we need to show x < 1 → x = . Suppose x < 1. Then by the
defining axiom for <, we have ∃y (y0 + x ) = 0 . Suppose y has that property;
so we have y0 + x = 0 .
Q ` ϕ g (m, n, ).
Q ` ¬ ϕ g (k, n, ).
We get that
Proof. For definiteness, and using the Church-Turing Thesis, let’s say that a
function is computable iff it is general recursive. The general recursive func-
tions are those which can be defined from the zero function zero, the successor
function succ, and the projection function Pin using composition, primitive re-
cursion, and regular minimization. By ??, any function h that can be defined
from f and g can also be defined using composition and regular minimiza-
tion from f , g, and zero, succ, Pin , add, mult, χ= . Consequently, a function is
general recursive iff it can be defined from zero, succ, Pin , add, mult, χ= using
composition and regular minimization.
We’ve furthermore shown that the basic functions in question are repre-
sentable in Q (????????????), and that any function defined from representable
functions by composition or regular minimization (??, ??) is also representable.
Thus every general recursive function is representable in Q.
∀ y ( ϕ χ R ( n0 , . . . , n k , y ) → y = 0).
32.10 Undecidability
We call a theory T undecidable if there is no computational procedure which, af-
ter finitely many steps and unfailingly, provides a correct answer to the ques-
tion “does T prove ϕ?” for any sentence ϕ in the language of T. So Q would
be decidable iff there were a computational procedure which decides, given a
sentence ϕ in the language of arithmetic, whether Q ` ϕ or not. We can make
this more precise by asking: Is the relation ProvQ (y), which holds of y iff y is
the Gödel number of a sentence provable in Q, recursive? The answer is: no.
is not recursive.
Proof. Suppose it were. Then we could solve the halting problem as follows:
Given e and n, we know that ϕe (n) ↓ iff there is an s such that T (e, n, s),
where T is Kleene’s predicate from ??. Since T is primitive recursive it is
representable in Q by a formula ψT , that is, Q ` ψT (e, n, s) iff T (e, n, s). If
Q ` ψT (e, n, s) then also Q ` ∃y ψT (e, n, y). If no such s exists, then Q `
¬ψT (e, n, s) for every s. But Q is ω-consistent, i.e., if Q ` ¬ ϕ(n) for ev-
ery n ∈ N, then Q 0 ∃y ϕ(y). We know this because the axioms of Q
are true in the standard model N. So, Q 0 ∃y ψT (e, n, y). In other words,
Q ` ∃y ψT (e, n, y) iff there is an s such that T (e, n, s), i.e., iff ϕe (n) ↓. From
e and n we can compute # ∃y ψT (e, n, y)# , let g(e, n) be the primitive recursive
function which does that. So
(
1 if ProvQ ( g(e, n))
h(e, n) =
0 otherwise.
This would show that h is recursive if ProvQ is. But h is not recursive, by ??,
so ProvQ cannot be either.
Problems
Problem 32.1. Prove that y = , y = x 0 , and y = xi represent zero, succ, and
Pin , respectively.
Problem 32.4. Using the proofs of ?? and ?? as a guide, carry out the proof of
?? in detail.
33.1 Introduction
A theory is a set of sentences that is deductively closed, that is, with the
property that whenever T proves ϕ then ϕ is in T. It is probably best to think
of a theory as being a collection of sentences, together with all the things that
these sentences imply. From now on, I will use Q to refer to the theory consist-
ing of the set of sentences derivable from the eight axioms in ??. Remember
that we can code formula of Q as numbers; if ϕ is such a formula, let # ϕ#
denote the number coding ϕ. Modulo this coding, we can now ask whether
various sets of formulas are computable or not.
33.2 Q is C.e.-Complete
Theorem 33.1. Q is c.e. but not decidable. In fact, it is a complete c.e. set.
466
33.3. ω-CONSISTENT EXTENSIONS OF Q ARE UNDECIDABLE
Proof. It is not hard to see that Q is c.e., since it is the set of (codes for) sen-
tences y such that there is a proof x of y in Q:
Q = {y : ∃ x PrfQ ( x, y)}.
But we know that PrfQ ( x, y) is computable (in fact, primitive recursive), and
any set that can be written in the above form is c.e.
Saying that it is a complete c.e. set is equivalent to saying that K ≤m Q,
where K = { x : ϕ x ( x ) ↓}. So let us show that K is reducible to Q. Since
Kleene’s predicate T (e, x, s) is primitive recursive, it is representable in Q, say,
by ϕ T . Then for every x, we have
x ∈ K → ∃s T ( x, x, s)
→ ∃s (Q ` ϕ T ( x, x, s))
→ Q ` ∃s ϕ T ( x, x, s).
Theorem 33.5. Let T be any consistent theory that includes Q. Then T is not decid-
able.
S(n) → T ` θS (n)
→ R (# θ S ( u )# , n )
and
Let “true arithmetic” be the theory { ϕ : N ϕ}, that is, the set of sentences
in the language of arithmetic that are true in the standard interpretation.
This theorems is not that far from Gödel’s original 1931 formulation of the
First Incompleteness Theorem. Aside from the more modern terminology, the
key differences are this: Gödel has “ω-consistent” instead of “consistent”; and
he could not say “axiomatizable” in full generality, since the formal notion of
computability was not in place yet. (The formal models of computability were
developed over the following decade, including by Gödel, and in large part to
be able to characterize the kinds of theories that are susceptible to the Gödel
phenomenon.)
The theorem says you can’t have it all, namely, completeness, consistency,
and axiomatizability. If you give up any one of these, though, you can have
the other two: Q is consistent and computably axiomatized, but not com-
plete; the inconsistent theory is complete, and computably axiomatized (say,
by {0 6= 0}), but not consistent; and the set of true sentence of arithmetic is
complete and consistent, but it is not computably axiomatized.
S(n) → Q ` θS (n)
→ θS (n) ∈ C
and
Theorem 33.11. Let T be any theory in the language of arithmetic that is consistent
with Q (i.e., T ∪ Q is consistent). Then T is undecidable.
C = { ϕ : T ` α → ϕ }.
Corollary 33.12. First-order logic for the language of arithmetic (that is, the set
{ ϕ : ϕ is provable in first-order logic}) is undecidable.
Theorem 33.13. Suppose T is a theory in a language in which one can interpret the
language of arithmetic, in such a way that T is consistent with the interpretation of
Q. Then T is undecidable. If T proves the interpretation of the axioms of Q, then no
consistent extension of T is decidable.
The proof is just a small modification of the proof of the last theorem; one
could use a counterexample to get a separation of Q and Q̄. One can take ZFC,
Zermelo-Fraenkel set theory with the axiom of choice, to be an axiomatic foun-
dation that is powerful enough to carry out a good deal of ordinary mathemat-
ics. In ZFC one can define the natural numbers, and via this interpretation,
the axioms of Q are true. So we have
The language of ZFC has only a single binary relation, ∈. (In fact, you
don’t even need equality.) So we have
Corollary 33.16. First-order logic for any language with a binary relation symbol is
undecidable.
This result extends to any language with two unary function symbols,
since one can use these to simulate a binary relation symbol. The results just
cited are tight: it turns out that first-order logic for a language with only unary
relation symbols and at most one unary function symbol is decidable.
One more bit of trivia. We know that the set of sentences in the language
, 0 , +, ×, < true in the standard model is undecidable. In fact, one can de-
fine < in terms of the other symbols, and then one can define + in terms of
× and 0 . So the set of true sentences in the language , 0 , × is undecidable.
On the other hand, Presburger has shown that the set of sentences in the lan-
guage , 0 , + true in the language of arithmetic is decidable. The procedure is
computationally infeasible, however.
34.1 Introduction
Hilbert thought that a system of axioms for a mathematical structure, such as
the natural numbers, is inadequate unless it allows one to derive all true state-
ments about the structure. Combined with his later interest in formal systems
of deduction, this suggests that he thought that we should guarantee that, say,
the formal systems we are using to reason about the natural numbers is not
only consistent, but also complete, i.e., every statement in its language is either
provable or its negation is. Gödel’s first incompleteness theorem shows that
no such system of axioms exists: there is no complete, consistent, axiomatiz-
able formal system for arithmetic. In fact, no “sufficiently strong,” consistent,
axiomatizable mathematical theory is complete.
A more important goal of Hilbert’s, the centerpiece of his program for the
justification of modern (“classical”) mathematics, was to find finitary consis-
tency proofs for formal systems representing classical reasoning. With regard
to Hilbert’s program, then, Gödel’s second incompleteness theorem was a
much bigger blow. The second incompleteness theorem can be stated in vague
terms, like the first incompleteness theorem. Roughly speaking, it says that no
sufficiently strong theory of arithmetic can prove its own consistency. We will
have to take “sufficiently strong” to include a little bit more than Q.
The idea behind Gödel’s original proof of the incompleteness theorem can
be found in the Epimenides paradox. Epimenides, a Cretan, asserted that all
Cretans are liars; a more direct form of the paradox is the assertion “this sen-
tence is false.” Essentially, by replacing truth with provability, Gödel was able
to formalize a sentence which, in a roundabout way, asserts that it itself is not
provable. If that sentence were provable, the theory would then be inconsis-
tent. Assuming ω-consistency—a property stronger than consistency—Gödel
was able to show that this sentence is also not refutable from the system of
axioms he was considering.
The first challenge is to understand how one can construct a sentence that
473
CHAPTER 34. INCOMPLETENESS AND PROVABILITY
refers to itself. For every formula ϕ in the language of Q, let pϕq denote the
numeral corresponding to # ϕ# . Think about what this means: ϕ is a formula in
the language of Q, # ϕ# is a natural number, and pϕq is a term in the language
of Q. So every formula ϕ in the language of Q has a name, pϕq, which is a
term in the language of Q; this provides us with a conceptual framework in
which formulas in the language of Q can “say” things about other formulas.
The following lemma is known as the fixed-point lemma.
Lemma 34.1. Let T be any theory extending Q, and let ψ( x ) be any formula with
only the variable x free. Then there is a sentence ϕ such that T proves ϕ ↔ ψ(pϕq).
The lemma asserts that given any property ψ( x ), there is a sentence ϕ that
asserts “ψ( x ) is true of me.”
How can we construct such a sentence? Consider the following version of
the Epimenides paradox, due to Quine:
“Yields falsehood when preceded by its quotation” yields false-
hood when preceded by its quotation.
This sentence is not directly self-referential. It simply makes an assertion
about the syntactic objects between quotes, and, in doing so, it is on par with
sentences like
1. “Robert” is a nice name.
that Quine’s liar sentence is not the diagonalization of ‘yields a falsehood’ but
of ‘yields a falsehood when preceded by its own quotation.’ So the property
being diagonalized to yield the liar sentence itself involves diagonalization!
In the language of arithmetic, we form quotations of a formula with one
free variable by computing its Gödel numbers and then substituting the stan-
dard numeral for that Gödel number into the free variable. The diagonal-
ization of α( x ) is α(n), where n = # α( x )# . (From now on, let’s abbreviate
# α ( x )# as pα ( x )q.) So if ψ ( x ) is “is a falsehood,” then “yields a falsehood if
it can prove ψ(di ag (pψ(di ag ( x ))q)) ↔ ψ(pϕq). But the left hand side is, by
definition, ϕ.
Of course, di ag will in general not be a function symbol of T, and cer-
tainly is not one of Q. But, since diag is computable, it is representable in Q
by some formula θdiag ( x, y). So instead of writing ψ(di ag ( x )) we can write
∃y (θdiag ( x, y) ∧ ψ(y)). Otherwise, the proof sketched above goes through,
and in fact, it goes through already in Q.
Lemma 34.2. Let ψ( x ) be any formula with one free variable x. Then there is a
sentence ϕ such that Q ` ϕ ↔ ψ(pϕq).
You should compare this to the proof of the fixed-point lemma in com-
putability theory. The difference is that here we want to define a statement in
terms of itself, whereas there we wanted to define a function in terms of itself;
this difference aside, it is really the same idea.
¬Prf T (0, pγT q), ¬Prf T (1, pγT q), ¬Prf T (2, pγT q), . . .
and so does T. On the other hand, by ??, ¬γT is equivalent to ∃ x Prf T ( x, pγT q).
So T is ω-inconsistent.
Proof. Recall that Prov T (y) is defined as ∃ x Prf T ( x, y), where Prf T ( x, y) repre-
sents the decidable relation which holds iff x is the Gödel number of a deriva-
tion of the sentence with Gödel number y. The relation that holds between x
and y if x is the Gödel number of a refutation of the sentence with Gödel num-
ber y is also decidable. Let not( x ) be the primitive recursive function which
does the following: if x is the code of a formula ϕ, not( x ) is a code of ¬ ϕ.
Then RefT ( x, y) holds iff PrfT ( x, not(y)). Let Ref T ( x, y) represent it. Then, if
T ` ¬ ϕ and δ is a corresponding derivation, Q ` Ref T (pδq, pϕq). We define
RProv T (y) as
but that’s just RProv T (pρ T q). By ??, Q ` ¬ρ T . Since T extends Q, also T `
¬ρ T . We’ve assumed that T ` ρ T , so T would be inconsistent, contrary to the
assumption of the theorem.
Now, let’s show that T 0 ¬ρ T . Again, suppose it did, and suppose n
is the Gödel number of a derivation of ¬ρ T . Then RefT (n, # ρ T # ) holds, and
since Ref T represents RefT in Q, Q ` Ref T (n, pρ T q). We’ll again show that
T would then be inconsistent because it would also prove ρ T . Since Q `
ρ T ↔ ¬RProv T (pρ T q), and since T extends Q, it suffices to show that Q `
¬RProv T (pρ T q). The sentence ¬RProv T (pρ T q), i.e.,
is logically equivalent to
We argue informally using logic, making use of facts about what Q proves.
Suppose x is arbitrary and Prf T ( x, pρ T q). We already know that T 0 ρ T , and
so for every k, Q ` ¬Prf T (k, pρ T q). Thus, for every k it follows that x 6= k. In
particular, we have (a) that x 6= n. We also have ¬( x = 0 ∨ x = 1 ∨ · · · ∨ x =
n − 1) and so by ??(2), (b) ¬( x < n). By ??, n < x. Since Q ` Ref T (n, pρ T q), we
have n < x ∧ Ref T (n, pρ T q), and from that ∃z (z < x ∧ Ref T (z, pρ T q)). Since x
was arbitrary we get
as required.
( ϕ(0) ∧ ∀ x ( ϕ( x ) → ϕ( x 0 ))) → ∀ x ϕ( x )
for every formula ϕ. Notice that this is really a schema, which is to say, in-
finitely many axioms (and it turns out that PA is not finitely axiomatizable).
But since one can effectively determine whether or not a string of symbols is
an instance of an induction axiom, the set of axioms for PA is computable. PA
is a much more robust theory than Q. For example, one can easily prove that
addition and multiplication are commutative, using induction in the usual
The only way to verify that these three properties hold is to describe the for-
mula ProvPA (y) carefully and use the axioms of PA to describe the relevant
formal proofs. Conditions (1) and (2) are easy; it is really condition (3) that
requires work. (Think about what kind of work it entails. . . ) Carrying out the
details would be tedious and uninteresting, so here we will ask you to take it
on faith that PA has the three properties listed above. A reasonable choice of
ProvPA (y) will also satisfy
Now suppose PA proves ConPA . Then it proves ¬ProvPA (pγPA q). But since
γPA is a Gödel sentence, this is equivalent to γPA . So PA proves γPA .
To make the argument more precise, we will let γPA be the Gödel sentence
for PA and use the provability conditions (1)–(3) above to show that PA proves
ConPA → γPA . This will show that PA doesn’t prove ConPA . Here is a sketch
γ ↔ ¬Prov(pγq) (34.5)
γ is a Gödel sentence
γ → ¬Prov(pγq) (34.6)
from ??
γ → (Prov(pγq) → ⊥) (34.7)
from ?? by logic
Prov(pγ → (Prov(pγq) → ⊥)q) (34.8)
by from ?? by condition P1
Prov(pγq) → Prov(p(Prov(pγq) → ⊥)q) (34.9)
from ?? by condition P2
Prov(pγq) → (Prov(pProv(pγq)q) → Prov(p⊥q)) (34.10)
from ?? by condition P2 and logic
Prov(pγq) → Prov(pProv(pγq)q) (34.11)
by P3
Prov(pγq) → Prov(p⊥q) (34.12)
from ?? and ?? by logic
Con → ¬Prov(pγq) (34.13)
contraposition of ?? and Con ≡ ¬Prov(p⊥q)
Con → γ
from ?? and ?? by logic
The use of logic in the above just elementary facts from propositional logic,
e.g., ?? uses ` ¬ ϕ ↔ ( ϕ → ⊥) and ?? uses ϕ → (ψ → χ), ϕ → ψ ` ϕ → χ. The
use of condition P2 in ?? and ?? relies on instances of P2, Prov(pϕ → ψq) →
(Prov(pϕq) → Prov(pψq)). In the first one, ϕ ≡ γ and ψ ≡ Prov(pγq) → ⊥; in
the second, ϕ ≡ Prov(pGq) and ψ ≡ ⊥.
The more abstract version of the incompleteness theorem is as follows:
Theorem 34.7. Let T be any axiomatized theory extending Q and let Prov T (y) be
any formula satisfying provability conditions P1–P3 for T. Then if T is consistent,
then T does not prove ConT .
The moral of the story is that no “reasonable” consistent theory for math-
ematics can prove its own consistency. Suppose T is a theory of mathematics
that includes Q and Hilbert’s “finitary” reasoning (whatever that may be).
Then, the whole of T cannot prove the consistency of T, and so, a fortiori, the
finitary fragment can’t prove the consistency of T either. In that sense, there
cannot be a finitary consistency proof for “all of mathematics.”
There is some leeway in interpreting the term “finitary,” and Gödel, in the
1931 paper, grants the possibility that something we may consider “finitary”
may lie outside the kinds of mathematics Hilbert wanted to formalize. But
Gödel was being charitable; today, it is hard to see how we might find some-
thing that can reasonably be called finitary but is not formalizable in, say,
ZFC.
T ` Prov T (pδq) ↔ δ.
If it were provable, T ` Prov T (pδq) by condition (1), but the same conclusion
follows if we apply modus ponens to the equivalence above. Hence, we don’t
get that T is inconsistent, at least not by the same argument as in the case of
the Gödel sentence. This of course does not show that T does prove δ.
We can make headway on this question if we generalize it a bit. The left-to-
right direction of the fixed point equivalence, Prov T (pδq) → δ, is an instance of
a general schema called a reflection principle: Prov T (pϕq) → ϕ. It is called that
because it expresses, in a sense, that T can “reflect” about what it can prove;
basically it says, “If T can prove ϕ, then ϕ is true,” for any ϕ. This is true for
sound theories only, of course, and this suggests that theories will in general
not prove every instance of it. So which instances can a theory (strong enough,
and satisfying the provability conditions) prove? Certainly all those where ϕ
itself is provable. And that’s it, as the next result shows.
Theorem 34.8. Let T be an axiomatizable theory extending Q, and suppose Prov T (y)
is a formula satisfying conditions P1–P3 from ??. If T proves Prov T (pϕq) → ϕ, then
in fact T proves ϕ.
2. Suppose X is true.
3. Then what it says holds; i.e., we have: if X is true, then Santa Claus
exists.
4. Since we are assuming X is true, we can conclude that Santa Claus exists,
by modus ponens from (2) and (3).
5. We have succeeded in deriving (4), “Santa Claus exists,” from the as-
sumption (2), “X is true.” By conditional proof, we have shown: “If X is
true, then Santa Claus exists.”
A formalization of this idea, replacing “is true” with “is provable,” and “Santa
Claus exists” with ϕ, yields the proof of Löb’s theorem. The trick is to apply
the fixed-point lemma to the formula Prov T (y) → ϕ. The fixed point of that
corresponds to the sentence X in the preceding sketch.
Proof. Suppose ϕ is a sentence such that T proves Prov T (pϕq) → ϕ. Let ψ(y) be
the formula Prov T (y) → ϕ, and use the fixed-point lemma to find a sentence θ
With Löb’s theorem in hand, there is a short proof of the first incomplete-
ness theorem (for theories having a provability predicate satisfying conditions
P1–P3: if T ` Prov T (p⊥q) → ⊥, then T ` ⊥. If T is consistent, T 0 ⊥. So,
T 0 Prov T (p⊥q) → ⊥, i.e., T 0 ConT . We can also apply it to show that δ, the
fixed point of Prov T ( x ), is provable. For since
T ` Prov T (pδq) ↔ δ
in particular
T ` Prov T (pδq) → δ
Now one can ask, is the converse also true? That is, is every relation defin-
able in N computable? The answer is no. For example:
so ∃s θ T (z, x, s) defines H in N.
Theorem 34.12. The set of true statements of arithmetic is not definable in arith-
metic.
However, for any language strong enough to represent the diagonal function,
and any linguistic predicate T ( x ), we can construct a sentence X satisfying
“X if and only if not T (‘X’).” Given that we do not want a truth predicate
to declare some sentences to be both true and false, Tarski concluded that
one cannot specify a truth predicate for all sentences in a language without,
somehow, stepping outside the bounds of the language. In other words, a the
truth predicate for a language cannot be defined in the language itself.
Problems
Problem 34.1. Show that PA proves γPA → ConPA .
2. T ` ϕ → Prov T (pϕq).
4. T ` Prov T (pϕq) → ϕ
Second-order Logic
488
34.9. THE UNDEFINABILITY OF TRUTH
Basic syntax and semantics for SOL covered so far. As a chapter it’s
too short. Substitution for second-order variables has to be covered to
be able to talk about derivation systems for SOL, and there’s some subtle
issues there.
35.1 Introduction
In first-order logic, we combine the non-logical symbols of a given language,
i.e., its constant symbols, function symbols, and predicate symbols, with the
logical symbols to express things about first-order structures. This is done
using the notion of satisfaction, which relates a structure M, together with a
variable assignment s, and a formula ϕ: M, s ϕ holds iff what ϕ expresses
when its constant symbols, function symbols, and predicate symbols are in-
terpreted as M says, and its free variables are interpreted as s says, is true.
The interpretation of the identity predicate = is built into the definition of
M, s ϕ, as is the interpretation of ∀ and ∃. The former is always interpreted
as the identity relation on the domain |M| of the structure, and the quanti-
fiers are always interpreted as ranging over the entire domain. But, crucially,
quantification is only allowed over elements of the domain, and so only object
variables are allowed to follow a quantifier.
In second-order logic, both the language and the definition of satisfaction
are extended to include free and bound function and predicate variables, and
quantification over them. These variables are related to function symbols and
predicate symbols the same way that object variables are related to constant
symbols. They play the same role in the formation of terms and formulas
of second-order logic, and quantification over them is handled in a similar
way. In the standard semantics, the second-order quantifiers range over all
possible objects of the right type (n-place functions from |M| to |M| for func-
490
35.2. TERMS AND FORMULAS
tion variables, n-place relations for predicate variables). For instance, while
∀v (P (v0 ) ∨ ¬P (v0 )) is a formula in both first- and second-order logic, in
the latter we can also consider ∀V ∀v (V (v0 ) ∨ ¬V (v0 )) and ∃V ∀v (V (v0 ) ∨
¬V (v0 )). Since these contain no free varaibles, they are sentences of second-
order logic. Here, V is a second-order 1-place predicate variable. The allow-
able interpretations of V are the same that we can assign to a 1-place predicate
symbol like P , i.e., subsets of |M|. Quantification over them then amounts
to saying that ∀v (V (v0 ) ∨ ¬V (v0 )) holds for all ways of assigning a subset
of |M| as the value of V , or for at least one. Since every set either contains or
fails to contain a given object, both are true in any structure.
Definition 35.1 (Second-order Terms). The set of second-order terms of L, Trm2 (L),
is defined by adding to ?? the clause
So, a second-order term looks just like a first-order term, except that where
a first-order term contains a function symbol fi n , a second-order term may
contain a function variable uin in its place.
Definition 35.2 (Second-order formula). The set of second-order formulas Frm2 (L)
of the language L is defined by adding to ?? the clauses
35.3 Satisfaction
To define the satisfaction relation M, s ϕ for second-order formulas, we have
to extend the definitions to cover second-order variables.
t ≡ u ( t1 , . . . , t n ):
ValM M M
s ( t ) = s ( u )(Vals ( t1 ), . . . , Vals ( tn )).
1. ϕ ≡ X n t1 , . . . , tn : M, s ϕ iff hValM M n
s ( t1 ), . . . , Vals ( tn )i ∈ s ( X ).
And when we say that subsets, relations, functions exist that have a property,
or that all of them have it, we can use second-order quantification in speci-
fying this property as well. This lets us define relations not definable in first-
order logic, and express properties of the domain not expressible in first-order
logic.
ψR ( X ) ≡ ∀ x ∀y ( R( x, y) → X ( x, y)) ∧
∀ x ∀y ∀z (( X ( x, y) ∧ X (y, z)) → X ( x, z))
Here, somewhat confusingly, we use R as the predicate symbol for R. The first
conjunct says that R ⊆ X and the second that X is transitive.
To say that X is the smallest such relation is to say that it is itself included in
every relation that includes R and is transitive. So we can define the transitive
closure of R by the formula
R∗ ( X ) ≡ ψR ( X ) ∧ ∀Y (ψR (Y ) → ∀ x ∀y ( X ( x, y) → Y ( x, y)))
M, s R∗ ( X ) iff s( X ) = R∗ . The transitive closure of R cannot be expressed
in first-order logic.
consider a one-place function symbol f and say that the function f M assigned
to it in a structure M is injective and ran( f ) 6= |M|:
∀ x ∀y ( f ( x ) = f (y) → x = y) ∧ ∃y ∀ x y 6= f ( x )
M Inf iff |M| is infinite. We can then define Fin ≡ ¬Inf; M Fin iff |M| is
finite. No single sentence of pure first-order logic can express that the domain
is infinite although an infinite set of them can. There is no set of sentences of
pure first-order logic that is satisfied in a structure iff its domain is finite.
m0 , m1 , m2 , . . .
for some s. Let m = s(z) and f = s(u) and consider M = {m, f (m), f ( f (m)), . . . }.
Let s0 be the X-variant of s with s( X ) = M. Then
Problems
Problem 35.1. Show that ∀ X ( X (v ) → X (v )) (note: → not ↔!) defines Id|M| .
Problem 35.2. The sentence Inf ∧ Count is true in all and only denumerable
domains. Adjust the definition of Count so that it becomes a different sentence
that directly expresses that the domain is denumerable, and prove that it does.
36.1 Introduction
First-order logic also has two more properties: it is compact (if every fi-
nite subset of a set Γ of sentences is satisfiable, Γ itself is satisfiable) and the
Löwenheim-Skolem Theorem holds for it (if Γ has an infinite model it has a de-
numerable model). Both of these results fail for second-order logic. Again, the
reason is that second-order logic can express facts about the size of domains
that first-order logic cannot.
497
CHAPTER 36. METATHEORY OF SECOND-ORDER LOGIC
∀ x x0 6=
∀ x ∀y ( x 0 = y0 → x = y)
∀ x ∀y ( x < y ↔ ∃z ( x + z0 ) = y)
∀ x ( x + ) = x
∀ x ∀y ( x + y0 ) = ( x + y)0
∀ x ( x × ) =
∀ x ∀y ( x × y0 ) = (( x × y) + x )
( ϕ() ∧ ∀ x ( ϕ( x ) → ϕ( x 0 ))) → ∀ x ϕ( x )
The latter is a “schema,” i.e., a pattern that generates infinitely many sen-
tences of the language of arithmetic, one for each formula ϕ( x ). We call this
schema the (first-order) axiom schema of induction. In second-order Peano arith-
metic PA2 , induction can be stated as a single sentence. PA2 consists of the
first eight axioms above plus the (second-order) induction axiom:
∀ X ( X () ∧ ∀ x ( X ( x ) → X ( x 0 ))) → ∀ x X ( x ))
It says that if a subset X of the domain contains M and with any x ∈ |M| also
contains 0M ( x ) (i.e., it is “closed under successor”) it contains everything in
the domain (i.e., X = |M|).
The induction axiom guarantees that any structure satisfying it contains
only those elements of |M| the axioms require to be there, i.e., the values of n
for n ∈ N. A model of PA2 contains no non-standard numbers.
Proof. Let N = {ValM (n) : n ∈ N}, and suppose M PA2 . Of course, for any
n ∈ N, ValM (n) ∈ |M|, so N ⊆ |M|.
Now for inclusion in the other direction. Consider a variable assignment s
with s( X ) = N. By assumption,
Proof. By ??, the domain of any model of PA2 is exhausted by ValM (n). Any
such model is also a model of Q. By ??, any such model is standard, i.e.,
isomorphic to N.
Above we defined PA2 as the theory that contains the first eight arith-
metical axioms plus the second-order induction axiom. In fact, thanks to the
expressive power of second-order logic, only the first two of the arithmetical
axioms plus induction are needed for second-order Peano arithmetic.
Proposition 36.3. Let PA2† be the second-order theory containing the first two arith-
metical axioms (the successor axioms) and the second-order induction axiom. >, +,
and × are definable in PA2† .
Proof. Exercise.
Theorem 36.6. There is no sound and complete proof system for second-order logic.
is satisfied in a structure iff its domain is infinite. Let ϕ≥n be a sentence that
asserts that the domain has at least n elements, e.g.,
ϕ ≥ n ≡ ∃ x 1 . . . ∃ x n ( x 1 6 = x 2 ∧ x 1 6 = x 3 ∧ · · · ∧ x n −1 6 = x n )
Consider
Γ = {¬Inf, ϕ≥1 , ϕ≥2 , ϕ≥3 , . . . }
It is finitely satisfiable, since for any finite subset Γ0 there is some k so that
ϕ≥k ∈ Γ but no ϕ≥n ∈ Γ for n > k. If |M| has k elements, M Γ0 . But, Γ is not
satisfiable: if M ¬Inf, |M| must be finite, say, of size k. Then M 2 ϕ≥k+1 .
Theorem 36.8. The Löwenheim-Skolem Theorem fails for second-order logic: There
are sentences with infinite models but no enumerable models.
Theorem 36.9. There are sentences with denumerable but not with non-enumerable
models.
Proof. Count ∧ Inf is true in N but not in any structure M with |M| non-
enumerable.
Problems
Problem 36.1. Prove ??.
37.1 Introduction
Since second-order logic can quantify over subsets of the domain as well as
functions, it is to be expected that some amount, at least, of set theory can be
carried out in second-order logic. By “carry out,” we mean that it is possible
to express set theoretic properties and statements in second-order logic, and is
possible without any special, non-logical vocabulary for sets (e.g., the mem-
bership predicate symbol of set theory). For instance, we can define unions
and intersections of sets and the subset relationship, but also compare the
sizes of sets, and state results such as Cantor’s Theorem.
502
37.3. CARDINALITIES OF SETS
Two sets are the same size, or “equinumerous,” X ≈ Y, iff there is a bijec-
tive function f : X → Y.
∃u (∀ x ( X ( x ) → Y (u( x ))) ∧
∀ x ∀y (u( x ) = u(y) → x = y) ∧
∀y (Y (y) → ∃ x ( X ( x ) ∧ y = u( x ))))
Proof. The is satisfied in a structure M if, for any subsets X ⊆ |X| and Y ⊆ |M|,
if X Y and Y X then X ≈ Y. But this holds for any sets X and Y—it is the
Schröder-Bernstein Theorem.
∃u (∀ x ∀y (u( x ) = u(y) → x = y) ∧
∃y ( X (y) ∧ ∀ x ( X ( x ) → y 6= u( x )))
We know from Cantor’s Theorem that there are non-enumerable sets, and
in fact, that there are infinitely many different levels of infinite sizes. Set the-
ory develops an entire arithmetic of sizes of sets, and assigns infinite cardinal
numbers to sets. The natural numbers serve as the cardinal numbers measur-
ing the sizes of finite sets. The cardinality of denumerable sets is the first infi-
nite cardinality, called ℵ0 (“aleph-nought” or “aleph-zero”). The next infinite
size is ℵ1 . It is the smallest size a set can be without being countable (i.e., of
size ℵ0 ). We can define “X has size ℵ0 ” as Aleph0 ( X ) ↔ Inf( X ) ∧ Count( X ).
X has size ℵ1 iff all its subsets are finite or have size ℵ0 , but is not itself of
size ℵ0 . Hence we can express this by the formula Aleph1 ( X ) ≡ ∀Y (Y ⊆
X → (¬Inf(Y ) ∨ Aleph0 (Y ))) ∧ ¬Aleph0 ( X ). Being of size ℵ2 is defined simi-
larly, etc.
There is one size of special interest, the so-called cardinality of the contin-
uum. It is the size of ℘(N), or, equivalently, the size of R. That a set is the size
of the continuum can also be expressed in second-order logic, but requires a
bit more work.
Pow(Y, R, X ) ≡
∀ Z ( Z ⊆ X → ∃ x (Y ( x ) ∧ Codes( x, R, Z ))) ∧
∀ x (Y ( x ) → ∀ Z (Codes( x, R, Z ) → Z ⊆ X )
With this trick, we can express statements about the power set by quantify-
ing over the codes of subsets rather than the subsets themselves. For instance,
Cantor’s Theorem can now be expressed by saying that there is no injective
function from the domain of any relation that codes the power set of X to X
itself.
∀ X ∀ R (Pow( R, X )→
¬∃u (∀ x ∀y (u( x ) = u(y) → x = y)∧
∀Y (Codes( x, R, Y ) → X (u( x )))))
is valid.
expresses that s( X ) ≈ R.
M ∃ X ∃Y ∃ R (Aleph0 ( X ) ∧ Pow(Y, R, X )∧
∃u (∀ x ∀y (u( x ) = u(y) → x = y) ∧
∀y (Y (y) → ∃ x y = u( x ))))
The Continuum Hypothesis is the statement that the size of the continuum
is the first non-enumerable cardinality, i.e, that ℘(N) has size ℵ1 .
CH ≡ ∀ X (Aleph1 ( X ) ↔ Cont( x ))
is valid.
Note that it isn’t true that ¬CH is valid iff the Continuum Hypothesis is
false. In an enumerable domain, there are no subsets of size ℵ1 and also no
subsets of the size of the continuum, so CH is always true in an enumerable
domain. However, we can give a different sentence that is valid iff the Con-
tinuum Hypothesis is false:
is valid.
507
CHAPTER 37. SECOND-ORDER LOGIC AND SET THEORY
38.1 Introduction
Modal Logic deals with modal propositions and the entailment relations among
them. Examples of modal propositions are the following:
1. It is necessary that 2 + 2 = 4.
Possibility and necessity are not the only modalities: other unary connectives
are also classified as modalities, for instance, “it ought to be the case that ϕ,”
“It will be the case that ϕ,” “Dana knows that ϕ,” or “Dana believes that ϕ.”
Modal logic makes its first appearance in Aristotle’s De Interpretatione: he
was the first to notice that necessity implies possibility, but not vice versa; that
possibility and necessity are inter-definable; that If ϕ ∧ ψ is possibly true then
ϕ is possibly true and ψ is possibly true, but not conversely; and that if ϕ → ψ
is necessary, then if ϕ is necessary, so is ψ.
The first modern approach to modal logic was the work of C. I. Lewis, cul-
minating with Lewis and Langford, Symbolic Logic (1932). Lewis & Langford
were unhappy with the representation of implication by means of the material
conditional: ϕ → ψ is a poor substitute for “ϕ implies ψ.” Instead, they pro-
posed to characterize implication as “Necessarily, if ϕ then ψ,” symbolized
as ϕ J ψ. In trying to sort out the different properties, Lewis indentified five
different modal systems, S1, . . . , S4, S5, the last two of which are still in use.
The approach of Lewis and Langford was purely syntactical: they identi-
fied reasonable axioms and rules and investigated what was provable with
those means. A semantic approach remained elusive for a long time, until a
509
CHAPTER 38. SYNTAX AND SEMANTICS OF NORMAL MODAL LOGICS
first attempt was made by Rudolf Carnap in Meaning and Necessity (1947) us-
ing the notion of a state description, i.e., a collection of atomic sentences (those
that are “true” in that state description). After lifting the truth definition to
arbitrary sentences ϕ, Carnap defines ϕ to be necessarily true if it is true in all
state descriptions. Carnap’s approach could not handle iterated modalities, in
that sentences of the form “Possibly necessarily . . . possibly ϕ” always reduce
to the innermost modality.
The major breakthrough in modal semantics came with Saul Kripke’s arti-
cle “A Completeness Theorem in Modal Logic” (JSL 1959). Kripke based his
work on Leibniz’s idea that a statement is necessarily true if it is true “at all
possible worlds.” This idea, though, suffers from the same drawbacks as Car-
nap’s, in that the truth of statement at a world w (or a state description s) does
not depend on w at all. So Kripke assumed that worlds are related by an ac-
cessibility relation R, and that a statement of the form “Necessarily ϕ” is true at
a world w if and only if ϕ is true at all worlds w0 accessible from w. Semantics
that provide some version of this approach are called Kripke semantics and
made possible the tumultuous development of modal logics (in the plural).
When interpreted by the Kripke semantics, modal logic shows us what re-
lational structures look like “from the inside.” A relational structure is just a set
equipped with a binary relation (for instance, the set of students in the class
ordered by their social security number is a relational structure). But in fact re-
lational structures come in all sorts of domains: besides relative possibility of
states of the world, we can have epistemic states of some agent related by epis-
temic possibility, or states of a dynamical system with their state transitions,
etc. Modal logic can be used to model all of these: the first give us ordinary,
alethic, modal logic; the others give us epistemic logic, dynamic logic, etc.
We focus on one particular angle, known to modal logicians as “corre-
spondence theory.” One of the most significant early discoveries of Kripke’s
is that many properties of the accessibility relation R (whether it is transitive,
symmetric, etc.) can be characterized in the modal language itself by means
of appropriate “modal schemas.” Modal logicians say, for instance, that the
reflexivity of R “corresponds” to the schema “If necessarily ϕ, then ϕ”. We
explore mainly the correspondence theory of a number of classical systems of
modal logic (e.g., S4 and S5) obtained by a combination of the schemas D, T,
B, 4, and 5.
Definition 38.2. Formulas of the basic modal language are inductively defined
as follows:
1. ⊥ is an atomic formula.
6. If ϕ is a formula, so is ϕ.
♦( p2 → p3 ) → (♦( p2 → p3 ) ∧ ¬p1 )
¬p1 → (¬p1 ∧ ♦( p2 → p3 ))
Note that simultaneous substitution is in general not the same as iterated sub-
stitution, e.g., compare ϕ[θ1 /p1 , θ2 /p2 ] above with ϕ[θ1 /p1 ][θ2 /p2 ]:
Definition 38.5. A model for the basic modal language is a triple M = hW, R, V i,
where
p
w2
q
p
w1
¬q
¬p
w3
¬q
1. ϕ ≡ ⊥: Never M, w ⊥.
2. M, w p iff w ∈ V ( p)
3. ϕ ≡ ¬ψ: M, w ϕ iff M, w 1 ψ.
6. ϕ ≡ (ψ → χ): M, w ϕ iff M, w 1 ψ or M, w χ.
2. M, w ♦ϕ iff M, w ¬¬ ϕ.
2. Exercise.
38.7 Validity
Formulas that are true in all models, i.e., true at every world in every model,
are particularly interesting. They represent those modal propositions which
are true regardless of how and ♦ are interpreted, as long as the interpreta-
tion is “normal” in the sense that it is generated by some accessibility relation
on possible worlds. We call such formulas valid. For instance, ( p ∧ q) → p
is valid. Some formulas one might expect to be valid on the basis of the alethic
interpretation of , such as p → p, are not valid, however. Part of the interest
of relational models is that different interpretations of and ♦ can be captured
by different kinds of accessibility relations. This suggests that we should de-
fine validity not just relative to all models, but relative to all models of a certain
kind. It will turn out, e.g., that p → p is true in all models where every world
is accessible from itself, i.e., R is reflexive. Defining validity relative to classes
of models enables us to formulate this succinctly: p → p is valid in the class
of reflexive models.
Proof. By induction on ϕ.
1. ϕ ≡ ⊥: Both v 2 ⊥ and M, w 1 ⊥.
2. ϕ ≡ pi :
v p i ⇔ v( p i ) = T by definition of v pi ;
⇔ M, w θi by assumption
⇔ M, w pi [θ1 /p1 , . . . , θn /pn ] since pi [θ1 /p1 , . . . , θn /pn ] ≡ θi .
3. ϕ ≡ ¬ψ:
v ¬ψ ⇔ v 2 ψ by definition of v ;
⇔ M, w 1 ψ[θ1 /p1 , . . . , θn /pn ] by induction hypothesis;
⇔ M, w ¬ψ[θ1 /p1 , . . . , θn /pn ] by definition of v .
4. ϕ ≡ (ψ ∧ χ):
v ψ ∧ χ ⇔ v ψ and v χ by definition of v ;
⇔ M, w ψ[θ1 /p1 , . . . , θn /pn ] and
M, w χ[θ1 /p1 , . . . , θn /pn ], by induction hypothesis;
⇔ M, w (ψ ∧ χ)[θ1 /p1 , . . . , θn /pn ] by definition of M, w .
5. ϕ ≡ (ψ ∨ χ):
v ψ ∨ χ ⇔ v ψ or v χ by definition of v ;
⇔ M, w ψ[θ1 /p1 , . . . , θn /pn ] or
M, w χ[θ1 /p1 , . . . , θn /pn ], by induction hypothesis;
⇔ M, w (ψ ∨ χ)[θ1 /p1 , . . . , θn /pn ] by definition of M, w .
6. ϕ ≡ (ψ → χ):
v ψ → χ ⇔ v 2 ψ or v χ by definition of v ;
⇔ M, w 1 ψ[θ1 /p1 , . . . , θn /pn ] or
M, w χ[θ1 /p1 , . . . , θn /pn ], by induction hypothesis;
⇔ M, w (ψ → χ)[θ1 /p1 , . . . , θn /pn ] by definition of M, w .
♦ϕ ↔ ¬¬ ϕ. (DUAL)
Proof. Exercise.
Proposition 38.21. A formula ϕ is valid iff all its substitution instances are. In
other words, a schema is valid iff its characteristic formula is.
Note, however, that it is not true that a schema is true in a model iff its
characteristic formula is. Of course, the “only if” direction holds: if every
instance of ϕ is true in M, ϕ itself is true in M. But it may happen that ϕ
is true in M but some instance of ϕ is false at some world in M. For a very
simple counterexample consider p in a model with only one world w and
V ( p) = {w}, so that p is true at w. But ⊥ is an instance of p, and not true at w.
38.10 Entailment
With the definition of truth at a world, we can define an entailment relation
between formulas. A formula ψ entails ϕ iff, whenever ψ is true, ϕ is true as
well. Here, “whenever” means both “whichever model we consider” as well
as “whichever world in that model we consider.”
w2 p w3 p
w1 ¬ p
Problems
Problem 38.1. Consider the model of ??. Which of the following hold?
1. M, w1 q;
2. M, w3 ¬q;
3. M, w1 p ∨ q;
4. M, w1 ( p ∨ q );
5. M, w3 q;
6. M, w3 ⊥;
7. M, w1 ♦q;
8. M, w1 q;
9. M, w1 ¬¬q.
Problem 38.2. Complete the proof of ??.
Problem 38.5. Consider the following model M for the language comprising
p1 , p2 , p3 as the only propositional variables:
p1 p1
¬ p 2 w1 w3 p2
¬ p3 p3
p1
w2 p2
¬ p3
Are the following formulas and schemas true in the model M, i.e., true at
every world in M? Explain.
1. p → ♦p (for p atomic);
2. ϕ → ♦ϕ (for ϕ arbitrary);
3. p → p (for p atomic);
1. p → (q → p);
2. ¬⊥;
3. p → (q → p).
Problem 38.9. Prove the claim in the “only if” part of the proof of ??. (Hint:
use induction on ϕ.)
Problem 38.10. Show that none of the following formulas are valid:
D: p → ♦p;
T: p → p;
B: p → ♦p;
4: p → p;
5: ♦p → ♦p.
Problem 38.11. Prove that the schemas in the first column of ?? are valid and
those in the second column are not valid.
Problem 38.12. Decide whether the following schemas are valid or invalid:
2. ♦( ϕ → ψ) ∨ (ψ → ϕ).
Problem 38.13. For each of the following schemas find a model M such that
every instance of the formula is true in M:
1. p → ♦♦p;
2. ♦p → p.
Frame Definability
39.1 Introduction
One question that interests modal logicians is the relationship between the
accessibility relation and the truth of certain formulas in models with that ac-
cessibility relation. For instance, suppose the accessibility relation is reflexive,
i.e., for every w ∈ W, Rww. In other words, every world is accessible from
itself. That means that when ϕ is true at a world w, w itself is among the
accessible worlds at which ϕ must therefore be true. So, if the accessibility
relation R of M is reflexive, then whatever world w and formula ϕ we take,
ϕ → ϕ will be true there (in other words, the schema p → p and all its
substitution instances are true in M).
The converse, however, is false. It’s not the case, e.g., that if p → p is
true in M, then R is reflexive. For we can easily find a non-reflexive model M
where p → p is true at all worlds: take the model with a single world w,
not accessible from itself, but with w ∈ V ( p). By picking the truth value of p
suitably, we can make ϕ → ϕ true in a model that is not reflexive.
The solution is to remove the variable assignment V from the equation. If
we require that p → p is true at all worlds in M, regardless of which worlds
are in V ( p), then it is necessary that R is reflexive. For in any non-reflexive
model, there will be at least one world w such that not Rww. If we set V ( p) =
W \ {w}, then p will be true at all worlds other than w, and so at all worlds
accessible from w (since w is guaranteed not to be accessible from w, and w is
the only world where p is false). On the other hand, p is false at w, so p → p
is false at w.
This suggests that we should introduce a notation for model structures
without a valuation: we call these frames. A frame F is simply a pair hW, Ri
consisting of a set of worlds with an accessibility relation. Every model hW, R, V i
is then, as we say, based on the frame hW, Ri. Conversely, a frame determines
the class of models based on it; and a class of frames determines the class of
models which are based on any frame in the class. And we can define F ϕ,
522
39.2. PROPERTIES OF ACCESSIBILITY RELATIONS
If R is . . . then . . . is true in M:
serial: ∀u∃vRuv p → ♦p (D)
reflexive: ∀wRww p → p (T)
symmetric: p → ♦p (B)
∀u∀v( Ruv → Rvu)
transitive: p → p (4)
∀u∀v∀w(( Ruv ∧ Rvw) → Ruw)
euclidean: ♦p → ♦p (5)
∀w∀u∀v(( Rwu ∧ Rwv) → Ruv
Table 39.1: Five correspondence facts.
the notion of a formula being valid in a frame as: M ϕ for all M based on F.
With this notation, we can establish correspondence relations between for-
mulas and classes of frames: e.g., F p → p if, and only if, F is reflexive.
Theorem 39.1. Let M = hW, R, V i be a model. If R has the property on the left side
of ??, every instance of the formula on the right side is true in M.
Proof. Here is the case for B: to show that the schema is true in a model we
need to show that all of its instances are true all worlds in the model. So
let ϕ → ♦ϕ be a given instance of B, and let w ∈ W be an arbitrary world.
Suppose the antecedent ϕ is true at w, in order to show that ♦ϕ is true at
w. So we need to show that ♦ϕ is true at all w0 accessible from w. Now, for
any w0 such that Rww0 we have, using the hypothesis of symmetry, that also
Rw0 w (see ??). Since M, w ϕ, we have M, w0 ♦ϕ. Since w0 was an arbitrary
world such that Rww0 , we have M, w ♦ϕ.
We leave the other cases as exercises.
Notice that the converse implications of ?? do not hold: it’s not true that
if a model verifies a schema, then the accessibility relation of that model has
the corresponding property. In the case of T and reflexive models, it is easy to
give an example of a model in which T itself fails: let W = {w} and V ( p) = ∅.
Then R is not reflexive, but M, w p and M, w 1 p. But here we have just
a single instance of T that fails in M, other instances, e.g., ¬ p → ¬ p are true.
w w0
ϕ ♦ϕ
♦ϕ
Proposition 39.2. Let M = hW, R, V i be a model such that W = {u, v}, where
worlds u and v are related by R: i.e., both Ruv and Rvu. Suppose that for all p:
u ∈ V ( p) ⇔ v ∈ V ( p). Then:
Since M is not reflexive (it is, in fact, irreflexive), the converse of ?? fails in the case
of T (similar arguments can be given for some—though not all—the other schemas
mentioned in ??).
39.3 Frames
Definition 39.3. A frame is a pair F = hW, Ri where W is a non-empty set of
worlds and R a binary relation on W. A model M is based on a frame F =
hW, Ri if and only if M = hW, R, V i.
If R is . . . then . . . is true in M:
partially functional:
♦p → p
∀w∀u∀v(( Rwu ∧ Rwv) → u = v)
functional: ∀w∃v∀u( Rwu ↔ u = v) ♦p ↔ p
weakly dense:
p → p
∀u∀v( Ruv → ∃w( Ruw ∧ Rwv))
weakly connected:
(( p ∧ p) → q) ∨
∀w∀u∀v(( Rwu ∧ Rwv) → (L)
((q ∧ q) → p)
( Ruv ∨ u = v ∨ Rvu))
weakly directed:
∀w∀u∀v(( Rwu ∧ Rwv) → ♦p → ♦p (G)
∃t( Rut ∧ Rvt)
Table 39.2: Five more correspondence facts.
Definition 39.5. If C is a class of frames, we say ϕ defines C iff F ϕ for all and
only frames F ∈ C .
Theorem 39.6. If the formula on the right side of ?? is valid in a frame F, then F has
the property on the left side.
You’ll notice a difference between the proof for D and the other cases: no
mention was made of the valuation V. In effect, we proved that if M D then
M is serial. So D defines the class of serial models, not just frames.
Corollary 39.8. Each formula on the right side of ?? defines the class of frames which
have the property on the left side.
Proof. In ??, we proved that if a model has the property on the left, the formula
on the right is true in it. Thus, if a frame F has the property on the left, the
formula on the left is valid in F. In ??, we proved the converse implications: if
a formula on the right is valid in F, F has the property on the left.
?? also shows that the properties can be combined: for instance if both
B and 4 are valid in F then the frame is both symmetric and transitive, etc.
Many important modal logics are characterized as the set of formulas valid
in all frames that combine some frame properties, and so we can characterize
them as the set of formulas valid in all frames in which the corresponding
defining formulas are valid. For instance, the classical system S4 is the set of
all formulas valid in all reflexive and transitive frames, i.e., in all those where
both T and 4 are valid. S5 is the set of all formulas valid in all reflexive,
symmetric, and euclidean frames, i.e., all those where all of T, B, and 5 are
valid.
Logical relationships between properties of R in general correspond to re-
lationships between the corresponding defining formulas. For instance, every
reflexive relation is serial; hence, whenever T is valid in a frame, so is D. (Note
that this relationship is not that of entailment. It is not the case that whenever
M, w T then M, w D.) We record some such relationships.
( Q( a1 , a2 ) ∧ · · · ∧ Q( an−1 , an ))
Now consider the set of formulas
Γ = { β, ϕ1 , ϕ2 , . . . }.
Proof. Exercise.
[w]
[z]
[u]
[v]
Proposition 39.13. Let R be an equivalence relation, and for each w ∈ W define the
equivalence class of w as the set [w] = {w0 ∈ W : Rww0 }. Then:
1. w ∈ [w];
1. W 0 = [w];
2. R0 is universal on W 0 ;
3. V 0 ( p) = V ( p) ∩ W 0 .
1. ϕ ≡ ⊥: STx ( ϕ) = ⊥.
2. ϕ ≡ pi : STx ( ϕ) = Pi ( x ).
M, w ϕ iff M0 , s STx ( ϕ)
Proof. By induction on ϕ.
F ϕ iff F0 ϕ0
0
Proof. F0 ϕ0 iff for every structure M0 where PiM ⊆ W for i = 1, . . . , n, and
for every s with s( x ) ∈ W, M0 , s STx ( ϕ). By ??, that is the case iff for all
models M based on F and every world w ∈ W, M, w ϕ, i.e., F ϕ.
Proof. The monadic second-order sentence ϕ0 of the preceding proof has the
required property.
This means, of course, that the two sentences are equivalent. Here’s how you
might convince yourself of this directly: First suppose the second-order sen-
tence is true in a structure M. Since x and X is universally quantified, the
remainder must hold for any x ∈ W and set X ⊆ W, e.g, the set {z : Rxz}
where R = QM . So, for any s with s( x ) ∈ W and s( X ) = {z : Rzx } we have
M ∀y ( Q( x, y) → X (y)) → X ( x ). But by the way we’ve picked s( X ) that
means M, s ∀y ( Q( x, y) → Q( x, y)) → Q( x, x ), which is equivalent to Q( x, x )
since the antecedent is valid. Since s( x ) is arbitrary, we have M ∀ x Q( x, x ).
Now suppose that M Q( x, x ) and show that M ∀ X ∀ x (∀y ( Q( x, y) →
X (y)) → X ( x )). Pick any assignment s, and assume M, s ∀y ( Q( x, y) →
X (y)). Let s0 be the y-variant of s with s0 (y) = x; we have M, s0 Q( x, y) →
X (y)), i.e., M, s Q( x, x ) → X ( x )). Since M ∀ x Q( x, x ), the antecedent is
true, and we have M, s X ( x ), which is what we needed to show.
Since some definable classes of frames are not first-order definable, not
every monadic-second order sentence of the form ϕ0 is equivalent to a first-
order sentence. There is no effective method to decide which ones are.
Problems
Problem 39.1. Complete the proof of ??
Problem 39.3. Let M = hW, R, V i be a model. Show that if R satisfies the left-
hand properties of ??, every instance of the corresponding right-hand formula
is true in M.
Problem 39.4. Show that if the formula on the right side of ?? is valid in a
frame F, then F has the property on the left side. To do this, consider a frame
that does not satisfy the property on the left, and define a suitable V such that
the formula on the right is false at some world.
2. If R is reflexive, it is serial.
Explain why this suffices for the proof that the conditions are equivalent.
Axiomatic Derivations
40.1 Introduction
We have a semantics for the basic modal language in terms of modal models,
and a notion of a formula being valid—true at all worlds in all models—or
valid with respect to some class of models or frames—true at all worlds in
all models in the class, or based on the frame. Logic usually connects such
semantic characterizations of validity with a proof-theoretic notion of deriv-
ability. The aim is to define a notion of derivability in some system such that
a formula is derivable iff it is valid.
The simplest and historically oldest derivation systems are so-called Hilbert-
type or axiomatic derivation systems. Hilbert-type derivation systems for
many modal logics are relatively easy to construct: they are simple as ob-
jects of metatheoretical study (e.g., to prove soundness and completeness).
However, they are much harder to use to prove formulas in than, say, natural
deduction systems.
In Hilbert-type derivation systems, a derivation of a formula is a sequence
of formulas leading from certain axioms, via a handful of inference rules, to
the formula in question. Since we want the derivation system to match the
semantics, we have to guarantee that the set of derivable formulas are true
in all models (or true in all models in which all axioms are true). We’ll first
isolate some properties of modal logics that are necessary for this to work:
the “normal” modal logics. For normal modal logics, there are only two in-
ference rules that need to be assumed: modus ponens and necessitation. As
axioms we take all (substitution instances) of tautologies, and, depending on
the modal logic we deal with, a number of modal axioms. Even if we are just
interested in the class of all models, we must also count all substitution in-
stances of K and Dual as axioms. This alone generates the minimal normal
modal logic K.
534
40.2. NORMAL MODAL LOGICS
ϕ ϕ→ψ
MP
ψ
We say a formula ψ follows from formulas ϕ, χ by modus ponens iff χ ≡ ϕ → ψ.
With this definition, it will turn out that the set of derivable formulas forms
a normal modal logic, and that any derivable formula is true in every model
in which every axiom is true. This property of derivations is called soundness.
The converse, completeness, is harder to prove.
In order to use the relational semantics for modal logics, we also have to re-
quire that all formulas valid in all modal models are included. It turns out that
this requirement is met as soon as all instances of K and DUAL are derivable,
and whenever a formula ϕ is derivable, so is ϕ. A modal logic that satisfies
these conditions is called normal. (Of course, there are also non-normal modal
logics, but the usual relational models are not adequate for them.)
Proposition 40.6. Every normal modal logic is closed under rule RK,
ϕ 1 → ( ϕ 2 → · · · ( ϕ n −1 → ϕ n ) · · · )
RK
ϕ1 → (ϕ2 → · · · (ϕn−1 → ϕn ) · · · ).
Proof. By induction on n: If n = 1, then the rule is just NEC, and every normal
modal logic is closed under NEC.
Now suppose the result holds for n − 1; we show it holds for n.
Assume
ϕ 1 → ( ϕ 2 → · · · ( ϕ n −1 → ϕ n ) · · · ) ∈ Σ
4. We have Kϕ1 . . . ϕn ` K, so K ∈ Σ.
40.4 Proofs in K
In order to practice proofs in the smallest modal system, we show the valid
formulas on the left-hand side of ?? can all be given K-proofs.
Proof.
1. ϕ → (ψ → ϕ) TAUT
2. ( ϕ → (ψ → ϕ)) NEC , 1
3. ( ϕ → (ψ → ϕ)) → (ϕ → (ψ → ϕ)) K
4. ϕ → (ψ → ϕ) MP , 2, 3
Proof.
1. ( ϕ ∧ ψ) → ϕ TAUT
2. (( ϕ ∧ ψ) → ϕ) NEC
3. (( ϕ ∧ ψ) → ϕ) → (( ϕ ∧ ψ) → ϕ) K
4. ( ϕ ∧ ψ) → ϕ MP , 2, 3
5. ( ϕ ∧ ψ) → ψ TAUT
6. (( ϕ ∧ ψ) → ψ) NEC
7. (( ϕ ∧ ψ) → ψ) → (( ϕ ∧ ψ) → ψ) K
8. ( ϕ ∧ ψ) → ψ MP , 6, 7
9. (( ϕ ∧ ψ) → ϕ) →
((( ϕ ∧ ψ) → ϕ) →
(( ϕ ∧ ψ) → (ϕ ∧ ψ))) TAUT
10. (( ϕ ∧ ψ) → ϕ) →
(( ϕ ∧ ψ) → (ϕ ∧ ψ)) MP , 4, 9
11. ( ϕ ∧ ψ) → (ϕ ∧ ψ) MP , 4, 10.
Note that the formula on line 9 is an instance of the tautology
( p → q) → (( p → r ) → ( p → (q ∧ r ))).
Proof.
1. ϕ → (ψ → ( ϕ ∧ ψ)) TAUT
2. ( ϕ → (ψ → ( ϕ ∧ ψ))) NEC , 1
3. ( ϕ → (ψ → ( ϕ ∧ ψ))) → (ϕ → (ψ → ( ϕ ∧ ψ))) K
4. ϕ → (ψ → ( ϕ ∧ ψ)) MP , 2, 3
5. (ψ → ( ϕ ∧ ψ)) → (ψ → ( ϕ ∧ ψ)) K
6. (ϕ → (ψ → ( ϕ ∧ ψ))) →
((ψ → ( ϕ ∧ ψ)) → (ψ → ( ϕ ∧ ψ))) →
(ϕ → (ψ → ( ϕ ∧ ψ)))) TAUT
7. ((ψ → ( ϕ ∧ ψ)) → (ψ → ( ϕ ∧ ψ))) →
(ϕ → (ψ → ( ϕ ∧ ψ))) MP , 4, 6
8. ϕ → (ψ → ( ϕ ∧ ψ))) MP , 5, 7
9. (ϕ → (ψ → ( ϕ ∧ ψ)))) →
((ϕ ∧ ψ) → ( ϕ ∧ ψ)) TAUT
10. (ϕ ∧ ψ) → ( ϕ ∧ ψ) MP , 8, 9
The formulas on lines 6 and 9 are instances of the tautologies
( p → q) → ((q → r ) → ( p → r ))
( p → (q → r )) → (( p ∧ q) → r )
Proof.
1. ♦¬ p ↔ ¬¬¬ p DUAL
2. (♦¬ p ↔ ¬¬¬ p) →
(¬¬¬ p → ♦¬ p) TAUT
3. ¬¬¬ p → ♦¬ p MP , 1, 2
4. ¬¬ p → p TAUT
5. (¬¬ p → p) NEC , 4
6. (¬¬ p → p) → (¬¬ p → p) K
7. (¬¬ p → p) MP , 5, 6
8. (¬¬ p → p) → (¬p → ¬¬¬ p) TAUT
9. ¬p → ¬¬¬ p MP , 7, 8
10. (¬p → ¬¬¬ p) →
((¬¬¬ p → ♦¬ p) → (¬p → ♦¬ p)) TAUT
11. (¬¬¬ p → ♦¬ p) → (¬p → ♦¬ p) MP , 9, 10
12. ¬p → ♦¬ p MP , 3, 11
The formulas on lines 8 and 10 are instances of the tautologies
( p → q) → (¬q → ¬ p)
( p → q) → ((q → r ) → ( p → r )).
We will indicate use of this proposition by RK. Let’s illustrate how these
results help establishing derivability results more easily.
Proposition 40.18. K ` (ϕ ∧ ψ) → ( ϕ ∧ ψ)
Proof.
1. K ` ϕ → (ψ → ( ϕ ∧ ψ)) TAUT
2. K ` ϕ → (ψ → ( ϕ ∧ ψ))) RK , 1
3. K ` (ϕ ∧ ψ) → ( ϕ ∧ ψ) PL , 2
Proof. Exercise.
Proof.
1. K ` ♦¬ p ↔ ¬¬¬ p DUAL
2. K ` ¬¬¬ p → ♦¬ p PL , 1
3. K ` ¬p → ♦¬ p re-write p for ¬¬ p
Proof. It is tedious but routine to verify (by induction on the length of the
derivation of ψ) that applying a substitution to an entire derivation also re-
sults in a correct derivation. Specifically, substitution instances of tautological
instances are themselves tautological instances, substitution instances of in-
stances of DUAL and K are themselves instances of DUAL and K, and applica-
tions of MP and NEC remain correct when substituting formulas for proposi-
tional variables in both premise(s) and conclusion.
Proof.
1. K ` ( ϕ → ψ) → (¬ψ → ¬ ϕ) PL
2. K ` ( ϕ → ψ ) → (¬ ψ → ¬ ϕ ) RK , 1
3. K ` (¬ψ → ¬ ϕ) → (¬¬ ϕ → ¬¬ψ) TAUT
4. K ` (¬ψ → ¬ ϕ) → (¬¬ ϕ → ¬¬ψ) PL , 2, 3
5. K ` ( ϕ → ψ) → (♦ϕ → ♦ψ) re-writing ♦ for ¬¬.
Proof.
Proof.
1. K ` ¬( ϕ ∨ ψ) → ¬ ϕ TAUT
2. K ` ¬( ϕ ∨ ψ) → ¬ ϕ RK , 1
3. K ` ¬¬ ϕ → ¬¬( ϕ ∨ ψ) PL , 2
4. K ` ♦ϕ → ♦( ϕ ∨ ψ) re-writing
5. K ` ♦ψ → ♦( ϕ ∨ ψ) similarly
6. K ` (♦ϕ ∨ ♦ψ) → ♦( ϕ ∨ ψ) PL , 4, 5.
Proof.
1. K ` ¬ ϕ → (¬ψ → ¬( ϕ ∨ ψ) TAUT
2. K ` ¬ ϕ → (¬ψ → ¬( ϕ ∨ ψ) RK
3. K ` ¬ ϕ → (¬¬( ϕ ∨ ψ) → ¬¬ψ)) PL , 2
4. K ` ¬¬( ϕ ∨ ψ) → (¬ ϕ → ¬¬ψ) PL , 3
5. K ` ¬¬( ϕ ∨ ψ) → (¬¬¬ψ → ¬¬ ϕ) PL , 4
6. K ` ♦( ϕ ∨ ψ) → (¬♦ψ → ♦ϕ) re-writing ♦ for ¬¬
7. K ` ♦( ϕ ∨ ψ) → (♦ψ ∨ ♦ϕ) PL , 6.
p → ♦p (T♦ )
♦p → p (B♦ )
♦♦p → ♦p (4♦ )
♦p → p (5♦ )
Each of the above dual formulas is obtained from the corresponding for-
mula by substituting ¬ p for p, contraposing, replacing ¬¬ by ♦, and replac-
ing ¬♦¬ by . D, i.e., ϕ → ♦ϕ is its own dual in that sense.
1. KT5 ` B;
2. KT5 ` 4;
3. KDB4 ` T;
4. KB4 ` 5;
5. KB5 ` 4;
6. KT ` D.
1. KT5 ` B:
1. KT5 ` ♦ϕ → ♦ϕ 5
2. KT5 ` ϕ → ♦ϕ T♦
3. KT5 ` ϕ → ♦ϕ PL .
2. KT5 ` 4:
3. KDB4 ` T:
1. KDB4 ` ♦ϕ → ϕ B♦
2. KDB4 ` ϕ → ♦ϕ D with ϕ for p
3. KDB4 ` ϕ → ϕ PL 1, 2
4. KDB4 ` ϕ → ϕ 4
5. KDB4 ` ϕ → ϕ PL , 1, 4.
4. KB4 ` 5:
5. KB5 ` 4:
6. KT ` D:
1. KT ` ϕ → ϕ T
2. KT ` ϕ → ♦ϕ T♦
3. KT ` ϕ → ♦ϕ PL , 1, 2
The following proposition shows that the classical system S5 has several
equivalent axiomatizations. This should not surprise, as the various combina-
tions of axioms all characterize equivalence relations (see ??).
Proof. Exercise.
40.9 Soundness
A derivation system is called sound if everything that can be derived is valid.
When considering modal systems, i.e., derivations where in addition to K we
can use instances of some formulas ϕ1 , . . . , ϕn , we want every derivable for-
mula to be true in any model in which ϕ1 , . . . , ϕn are true.
Proposition 40.31. KD ( KT
Proof. This is the syntactic counterpart to the semantic fact that all reflexive
relations are serial. To show KD ⊆ KT we need to see that KD ` ψ implies
KT ` ψ, which follows from KT ` D, as shown in ????. To show that the in-
clusion is proper, by Soundness (??), it suffices to exhibit a model of KD where
T, i.e., p → p, fails (an easy task left as an exercise), for then by Soundness
KD 0 p → p.
Proof. By ?? we know that all instances of T and B are true in every reflexive
symmetric model (respectively). So by soundness, it suffices to find a reflex-
ive symmetric model containing a world at which some instance of 4 fails, and
similarly for 5. We use the same model for both claims. Consider the symmet-
ric, reflexive model in ??. Then M, w1 1 p → p, so 4 fails at w1 . Similarly,
M, w2 1 ♦¬ p → ♦¬ p, so the instance of 5 with ϕ = ¬ p fails at w2 .
w1 p w2 p w3 ¬ p
p ♦¬ p
1p 1♦¬ p
1♦¬ p
Proof. By ?? we know that all instances of D and 5 are true in all serial eu-
clidean models. So it suffices to find a serial euclidean model containing a
w4 ¬ p
p p
w2 w3
w1 ¬ p
p, 1p
world at which some instance of 4 fails. Consider the model of ??, and notice
that M, w1 1 p → p.
2. Reflexivity: If ϕ ∈ Γ then Γ `Σ ϕ;
40.13 Consistency
Consistency is an important property of sets of formulas. A set of formulas is
inconsistent if a contradiction, such as ⊥, is derivable from it; and otherwise
consistent. If a set is inconsistent, its formulas cannot all be true in a model at a
world. For the completeness theorem we prove the converse: every consistent
set is true at a world in a model, namely in the “canonical model.”
So for instance, the set {( p → q), p, ¬q} is consistent relatively to propo-
sitional logic, but not K-consistent. Similarly, the set {♦p, ♦p → q, ¬q} is not
K5-consistent.
Proof. These facts follow easily using classical propositional logic. We give the
argument for ??. Proceed contrapositively and suppose neither Γ ∪ { ϕ} nor
Γ ∪ {¬ ϕ} is Σ-consistent. Then by ??, both Γ, ϕ `Σ ⊥ and Γ, ¬ ϕ `Σ ⊥. By the
deduction theorem Γ `Σ ϕ → ⊥ and Γ `Σ ¬ ϕ → ⊥. But ( ϕ → ⊥) → ((¬ ϕ →
⊥) → ⊥) is a tautological instance, hence by ????, Γ `Σ ⊥.
Problems
Problem 40.1. Prove ??.
1. ¬ p → ( p → q)
2. (p ∨ q) → ( p ∨ q)
3. ♦p → ♦( p ∨ q)
2. K ` ( ϕ ∨ ψ) → (♦ϕ ∨ ψ);
Problem 40.8. Provide a single reflexive transitive model showing that both
KT4 0 B and KT4 0 5.
41.1 Introduction
If Σ is a modal system, then the soundness theorem establishes that if Σ ` ϕ,
then ϕ is valid in any class C of models in which all instances of all formulas
in Σ are valid. In particular that means that if K ` ϕ then ϕ is true in all
models; if KT ` ϕ then ϕ is true in all reflexive models; if KD ` ϕ then ϕ is
true in all serial models, etc.
Completeness is the converse of soundness: that K is complete means that
if a formula ϕ is valid, ` ϕ, for instance. Proving completeness is a lot harder
to do than proving soundness. It is useful, first, to consider the contrapositive:
K is complete iff whenever 0 ϕ, there is a countermodel, i.e., a model M such
that M 1 ϕ. Equivalently (negating ϕ), we could prove that whenever 0
¬ ϕ, there is a model of ϕ. In the construction of such a model, we can use
information contained in ϕ. When we find models for specific formulas we
often do the same: E.g., if we want to find a countermodel to p → q, we know
that it has to contain a world where p is true and q is false. And a world
where q is false means there has to be a world accessible from it where q is
false. And that’s all we need to know: which worlds make the propositional
variables true, and which worlds are accessible from which worlds.
In the case of proving completeness, however, we don’t have a specific
formula ϕ for which we are constructing a model. We want to establish that
a model exists for every ϕ such that 0Σ ¬ ϕ. This is a minimal requirement,
since if `Σ ¬ ϕ, by soundness, there is no model for ϕ (in which Σ is true).
Now note that 0Σ ¬ ϕ iff ϕ is Σ-consistent. (Recall that Σ 0Σ ¬ ϕ and ϕ 0Σ ⊥
are equivalent.) So our task is to construct a model for every Σ-consistent
formula.
The trick we’ll use is to find a Σ-consistent set of formulas that contains ϕ,
but also other formulas which tell us what the world that makes ϕ true has to
550
41.2. COMPLETE Σ-CONSISTENT SETS
look like. Such sets are complete Σ-consistent sets. It’s not enough to construct
a model with a single world to make ϕ true, it will have to contain multiple
worlds and an accessibility relation. The complete Σ-consistent set contain-
ing ϕ will also contain other formulas of the form ψ and ♦χ. In all accessible
worlds, ψ has to be true; in at least one, χ has to be true. In order to accom-
plish this, we’ll simply take all possible complete Σ-consistent sets as the basis
for the set of worlds. A tricky part will be to figure out when a complete
Σ-consistent set should count as being accessible from another in our model.
We’ll show that in the model so defined, ϕ is true at a world—which is
also a complete Σ-consistent set—iff ϕ is an element of that set. If ϕ is Σ-
consistent, it will be an element of at least one complete Σ-consistent set (a
fact we’ll prove), and so there will be a world where ϕ is true. So we will have
a single model where every Σ-consistent formula ϕ is true at some world. This
single model is the canonical model for Σ.
1. Γ is deductively closed in Σ.
2. Σ ⊆ Γ.
3. ⊥ ∈
/Γ
4. ¬ ϕ ∈ Γ if and only if ϕ ∈
/ Γ.
5. ϕ ∧ ψ ∈ Γ iff ϕ ∈ Γ and ψ ∈ Γ
6. ϕ ∨ ψ ∈ Γ iff ϕ ∈ Γ or ψ ∈ Γ
7. ϕ → ψ ∈ Γ iff ϕ ∈
/ Γ or ψ ∈ Γ
4. If ¬ ϕ ∈ Γ, then by consistency ϕ ∈
/ Γ; and if ϕ ∈
/ Γ then ϕ ∈ Γ since Γ is
complete Σ-consistent.
5. Exercise.
7. Exercise.
If we now let ∆ = ∞
S
n =0 ∆ n .
We have to show that this definition actually yields a set ∆ with the re-
quired properties, i.e., Γ ⊆ ∆ and ∆ is complete Σ-consistent.
for some ni . Let n be the largest of these. Since ni ≤ n, ∆ ni ⊆ ∆ n . So, all ϕi are
in some ∆ n . This would mean ∆ n `Σ ⊥, i.e., ∆ n is Σ-inconsistent.
To show that each ∆ n is Σ-consistent, we use a simple induction on n.
∆ 0 = Γ, and we assumed Γ was Σ-consistent. So the claim holds for n = 0.
Now suppose it holds for n, i.e., ∆ n is Σ-consistent. ∆ n+1 is either ∆ n ∪ { ϕn }
is that is Σ-consistent, otherwise it is ∆ n ∪ {¬ ϕn }. In the first case, ∆ n+1 is
clearly Σ-consistent. However, by ????, either ∆ n ∪ { ϕn } or ∆ n ∪ {¬ ϕn } is
consistent, so ∆ n+1 is consistent in the other case as well.
Γ = {ψ : ψ ∈ Γ }
♦Γ = {♦ψ : ψ ∈ Γ }
and
−1 Γ = {ψ : ψ ∈ Γ }
♦−1 Γ = {ψ : ♦ψ ∈ Γ }
−1 Γ = {ψ : ψ ∈ Γ }
i.e., it’s just the set of all those formulas of Γ that start with .
Proof. Suppose −1 Γ `Σ ϕ; then by ??, −1 Γ ` ϕ. But since −1 Γ ⊆ Γ,
also Γ `Σ ϕ by Monotony.
Lemma 41.9. Suppose Γ and ∆ are complete Σ-consistent. Then: −1 Γ ⊆ ∆ if and
only if ♦∆ ⊆ Γ.
Definition 41.11. Let Σ be a normal modal logic. The canonical model for Σ is
MΣ = hW Σ , RΣ , V Σ i, where:
1. MΣ = {∆ : ∆ is complete Σ-consistent}.
3. V Σ ( p) = {∆ : p ∈ ∆}.
Proof. By induction on ϕ.
1. ϕ ≡ ⊥: MΣ , ∆ 1 ⊥ by ??, and ⊥ ∈
/ ∆ by ????.
4. ϕ ≡ ψ ∧ χ: Exercise.
6. ϕ ≡ ψ → χ: Exercise.
ψ ∈ ∆0 . By ??, ψ ∈ ∆.
Now assume ψ ∈ ∆. Let ∆0 ∈ W Σ be such that RΣ ∆∆0 , i.e., −1 ∆ ⊆
∆0 . Since ψ ∈ ∆, ψ ∈ −1 ∆. Consequently, ψ ∈ ∆0 . By inductive
hypothesis, MΣ , ∆0 ψ. Since ∆0 is arbitrary with RΣ ∆∆0 , for all ∆0 ∈ W Σ
such that RΣ ∆∆0 , MΣ , ∆0 ψ. By ??, MΣ , ∆ ψ.
8. ϕ ≡ ♦ψ: Exercise.
Corollary 41.15. The basic modal logic K is complete with respect to the class of all
models, i.e., if ϕ then K ` ϕ.
Theorem 41.16. If a normal modal logic Σ contains one of the formulas on the left-
hand side of ??, then the canonical model for Σ has the corresponding property on the
right-hand side.
If Σ contains . . . . . . the canonical model for Σ is:
D: ϕ → ♦ϕ serial;
T: ϕ → ϕ reflexive;
B: ϕ → ♦ϕ symmetric;
4: ϕ → ϕ transitive;
5: ♦ϕ → ♦ϕ euclidean.
Table 41.1: Basic correspondence facts.
Theorem 41.17. Let CD , CT , CB , C4 , and C5 be the class of all serial, reflexive, sym-
metric, transitive, and euclidean models (respectively). Then for any schemas ϕ1 , . . . ,
ϕn among D, T, B, 4, and 5, the system Kϕ1 . . . ϕn is determined by the class of
models C = C ϕ1 ∩ · · · ∩ C ϕn .
3. If Σ contains the schema ϕ → ϕ then the canonical model for Σ is weakly
dense.
ϕ1 , . . . , ϕn , ♦ψ1 , . . . , ♦ψm `Σ ⊥
⇒ ϕ1 , . . . , ϕn `Σ (♦ψ1 ∧ · · · ∧ ♦ψm ) → ⊥, deduction theorem;
⇒ ϕ1 , . . . , ϕn `Σ ♦(ψ1 ∧ · · · ∧ ψm ) → ⊥, Σ is normal;
⇒ ϕ1 , . . . , ϕn `Σ ¬(ψ1 ∧ · · · ∧ ψm ), PL ;
⇒ ϕ1 , . . . , ϕn `Σ ¬(ψ1 ∧ · · · ∧ ψm ), ??;
⇒ ϕ1 , . . . , ϕn `Σ ¬(ψ1 ∧ · · · ∧ ψm ), by the schema;
⇒ ∆ 1 `Σ ¬(ψ1 ∧ · · · ∧ ψm ), Monotony;
⇒ ¬(ψ1 ∧ · · · ∧ ψm ) ∈ ∆ 1 , deductive closure;
⇒ ¬(ψ1 ∧ · · · ∧ ψm ) ∈ ∆ 2 , since RΣ ∆ 1 ∆ 2 .
On the strength of these examples, one might think that every system Σ of
modal logic is complete, in the sense that it proves every formula which is valid
in every frame in which every theorem of Σ is valid. Unfortunately, there are
many systems that are not complete in this sense.
Problems
Problem 41.1. Complete the proof of ??.
42.1 Introduction
One important question about a logic is always whether it is decidable, i.e., if
there is an effective procedure which will answer the question “is this formula
valid.” Propositional logic is decidable: we can effectively test if a formula is
a tautology by constructing a truth table, and for a given formula, the truth
table is finite. But we can’t obviously test if a modal formula is true in all
models, for there are infinitely many of them. We can list all the finite models
relevant to a given formula, since only the assignment of subsets of worlds
to propositional variables which actually occur in the formula are relevant. If
the accessibility relation is fixed, the possible different assignments V ( p) are
just all the subsets of W, and if |W | = n there are 2n of those. If our formula ϕ
contains m propositional variables there are then 2nm different models with n
worlds. For each one, we can test if ϕ is true at all worlds, simply by comput-
ing the truth value of ϕ in each. Of course, we also have to check all possible
accessibility relations, but there are only finitely many relations on n worlds
2
as well (specifically, the number of subsets of W × W, i.e., 2n .
If we are not interested in the logic K, but a logic defined by some class of
models (e.g., the reflexive transitive models), we also have to be able to test
if the accessibility relation is of the right kind. We can do that whenever the
frames we are interested in are definable by modal formulas (e.g., by testing if
T and 4 valid in the frame). So, the idea would be to run through all the finite
frames, test each one if it is a frame in the class we’re interested in, then list all
the possible models on that frame and test if ϕ is true in each. If not, stop: ϕ
is not valid in the class of models of interest.
There is a problem with this idea: we don’t know when, if ever, we can stop
looking. If the formula has a finite countermodel, our procedure will find it.
But if it has no finite countermodel, we won’t get an answer. The formula may
be valid (no countermodels at all), or it have only an infinite countermodel,
which we’ll never look at. This problem can be overcome if we can show that
561
CHAPTER 42. FILTRATIONS AND DECIDABILITY
every formula that has a countermodel has a finite countermodel. If this is the
case we say the logic has the finite model property.
But how would we show that a logic has the finite model property? One
way of doing this would be to find a way to turn an infinite (counter)model
of ϕ into a finite one. If that can be done, then whenever there is a model
in which ϕ is not true, then the resulting finite model also makes ϕ not true.
That finite model will show up on our list of all finite models, and we will
eventually determine, for every formula that is not valid, that it isn’t. Our
procedure won’t terminate if the formula is valid. If we can show in addition
that there is some maximum size that the finite model our procedure provides
can have, and that this maximum size depends only on the formula ϕ, we
will have a size up to which we have to test finite models in our search for
countermodels. If we haven’t found a countermodel by then, there are none.
Then our procedure will, in fact, decide the question “is ϕ valid?” for any
formula ϕ.
A strategy that often works for turning infinite structures into finite struc-
tures is that of “identifying” elements of the structure which behave the same
way in relevant respects. If there are infinitely many worlds in M that be-
have the same in relevant respects, then we might hope that there are only
finitely many “classes” of such worlds. In other words, we partition the set
of worlds in the right way. Each partition contains infinitely many worlds,
but there are only finitely many partitions. Then we define a new model M∗
where the worlds are the partitions. Finitely many partitions in the old model
give us finitely many worlds in the new model, i.e., a finite model. Let’s call
the partition a world w is in [w]. We’ll want it to be the case that M, w ϕ iff
M∗ , [w] ϕ, since we want the new model to be a countermodel to ϕ if the old
one was. This requires that we define the partition, as well as the accessibility
relation of M∗ in the right way.
To see how this would go, first imagine we have no accessibility relation.
M, w ψ iff for some v ∈ W, M, v ψ, and the same for M∗ , except with
[w] and [v]. As a first idea, let’s say that two worlds u and v are equivalent
(belong to the same partition) if they agree on all propositional variables in M,
i.e., M, u p iff M, v p. Let V ∗ ( p) = {[w] : M, w p}. Our aim is to show
that M, w ϕ iff M∗ , [w] ϕ. Obviously, we’d prove this by induction: The
base case would be ϕ ≡ p. First suppose M, w p. Then [w] ∈ V ∗ by
definition, so M∗ , [w] p. Now suppose that M∗ , [w] p. That means that
∗
[w] ∈ V ( p), i.e., for some v equivalent to w, M, v p. But “w equivalent to v”
means “w and v make all the same propositional variables true,” so M, w p.
Now for the inductive step, e.g., ϕ ≡ ¬ψ. Then M, w ¬ψ iff M, w 1 ψ
iff M∗ , [w] 1 ψ (by inductive hypothesis) iff M∗ , [w] ¬ψ. Similarly for the
other non-modal operators. It also works for : suppose M∗ , [w] ψ. That
means that for every [u], M∗ , [u] ψ. By inductive hypothesis, for every u,
M, u ψ. Consequently, M, w ψ.
In the general case, where we have to also define the accessibility relation
for M∗ , things are more complicated. We’ll call a model M∗ a filtration if its
accessibility relation R∗ satisfies the conditions required to make the induc-
tive proof above go through. Then any filtration M∗ will make ϕ true at [w]
iff M makes ϕ true at w. However, now we also have to show that there are
filtrations, i.e., we can define R∗ so that it satisfies the required conditions. In
order for this to work, however, we have to require that worlds u, v count as
equivalent not just when they agree on all propositional variables, but on all
sub-formulas of ϕ. Since ϕ has only finitely many sub-formulas, this will still
guarantee that the filtration is finite. There is not just one way to define a fil-
tration, and in order to make sure that the accessibility relation of the filtration
satisfies the required properties (e.g., reflexive, transitive, etc.) we have to be
inventive with the definition of R∗ .
42.2 Preliminaries
Filtrations allow us to establish the decidability of our systems of modal logic
by showing that they have the finite model property, i.e., that any formula that
is true (false) in a model is also true (false) in a finite model. Filtrations are
defined relative to sets of formulas which are closed under subformulas.
For instance, given a formula ϕ, the set of all its sub-formulas is closed
under sub-formulas. When we’re defining a filtration of a model through the
set of sub-formulas of ϕ, it will have the property we’re after: it makes ϕ true
(false) iff the original model does.
The set of worlds of a filtration of M through Γ is defined as the set of all
equivalence classes of the following equivalence relation.
The equivalence class [w]≡ of a world w, or [w] for short, is the set of all worlds
≡-equivalent to w:
[ w ] = { v : v ≡ w }.
Proof. The relation ≡ is reflexive, since w makes exactly the same formulas
from Γ true as itself. It is symmetric since if u makes the same formulas from Γ
true as v, the same holds for v and u. It is also transitive, since if u makes the
same formulas from Γ true as v, and v as w, then u makes the same formulas
from Γ true as w.
The relation ≡, like any equivalence relation, divides W into partitions, i.e.,
subsets of W which are pairwise disjoint, and together cover all of W. Every
w ∈ W is an element of one of the partitions, namely of [w], since w ≡ w. So
the partitions [w] cover all of W. They are pairwise disjoint, for if u ∈ [w] and
u ∈ [v], then u ≡ w and u ≡ v, and by symmetry and transitivity, w ≡ v, and
so [w] = [v].
42.3 Filtrations
Rather than define “the” filtration of M through Γ, we define when a model M∗
counts as a filtration of M. All filtrations have the same set of worlds W ∗ and
the same valuation V ∗ . But different filtrations may have different accessibil-
ity relations R∗ . To count as a filtration, R∗ has to satisfy a number of condi-
tions, however. These conditions are exactly what we’ll require to prove the
main result, namely that M, w ϕ iff M∗ , [w] ϕ, provided ϕ ∈ Γ.
1. W ∗ = {[w] : w ∈ W };
2. For any u, v ∈ W:
3. V ∗ ( p) = {[u] : u ∈ V ( p)}.
It’s worthwhile thinking about what V ∗ ( p) is: the set consisting of the
equivalence classes [w] of all worlds w where p is true in M. On the one
hand, if w ∈ V ( p), then [w] ∈ V ∗ ( p) by that definition. However, it is not
necessarily the case that if [w] ∈ V ∗ ( p), then w ∈ V ( p). If [w] ∈ V ∗ ( p) we are
only guaranteed that [w] = [u] for some u ∈ V ( p). Of course, [w] = [u] means
that w ≡ u. So, when [w] ∈ V ∗ ( p) we can (only) conclude that w ≡ u for some
u ∈ V ( p ).
1. ϕ ≡ ⊥: Neither M, w ϕ nor M∗ , w ϕ.
4. Exercise.
6. Exercise.
8. Exercise.
What holds for truth at worlds in a model also holds for truth in a model
and validity in a class of models.
Proof. We need to check that R∗ , so defined, satisfies ????. We check the three
conditions in turn.
If Ruv then since u ∈ [u] and v ∈ [v], also R∗ [u][v], so ?? is satisfied.
For ??, suppose ϕ ∈ Γ, R∗ [u][v], and M, u ϕ. By definition of R∗ ,
there are u ≡ u and v ≡ v such that Ru v . Since u and u0 agree on Γ, also
0 0 0 0
1. If ϕ ∈ Γ and M, u ϕ then M, v ϕ;
Proof. Given the definition of R∗ , the only condition that is left to verify is
the implication from Ruv to R∗ [u][v]. So assume Ruv. Suppose ϕ ∈ Γ and
M, u ϕ; then obviously M, v ϕ, and ?? is satisfied. Suppose ♦ϕ ∈ Γ and
M, v ϕ. Then M, u ♦ϕ since Ruv, and ?? is satisfied.
1 2 3 4
¬p p ¬p p
every odd number makes p true and p and p → p false; every even number
makes p and p → p true, but p false. So W ∗ = {[1], [2]}, where [1] =
{1, 3, 5, . . . } and [2] = {2, 4, 6, . . . }. Since 2 ∈ V ( p), [2] ∈ V ∗ ( p); since 1 ∈
/
V ( p ), [1] ∈/ V ∗ ( p). So V ∗ ( p) = {[2]}.
Any filtration based on W ∗ must have an accessibility relation that in-
cludes h[1], [2]i, h[2], [1]i: since R12, we must have R∗ [1][2] by ????, and since
R23 we must have R∗ [2][3], and [3] = [1]. It cannot include h[1], [1]i: if it did,
we’d have R∗ [1][1], M, 1 p but M, 1 p, contradicting ??. Nothing re-
quires or rules out that R∗ [2][2]. So, there are two possible filtrations of M,
corresponding to the two accessibility relations
{h[1], [2]i, h[2], [1]i} and {h[1], [2]i, h[2], [1]i, h[2], [2]i}.
In either case, p and p → p are false and p is true at [1]; p and p → p are
true and p is false at [2].
Proof. The size of W ∗ is the number of different classes [w] under the equiva-
lence relation ≡. Any two worlds u, v in such class—that is, any u and v such
that u ≡ v—agree on all formulas ϕ in Γ, ϕ ∈ Γ either ϕ is true at both u and
v, or at neither. So each class [w] corresponds to subset of Γ, namely the set of
all ϕ ∈ Γ such that ϕ is true at the worlds in [w]. No two different classes [u]
and [v] correspond to the same subset of Γ. For if the set of formulas true at u
and that of formulas true at v are the same, then u and v agree on all formulas
in Γ, i.e., u ≡ v. But then [u] = [v]. So, there is an injective function from
W ∗ to ℘( Γ ), and hence |W ∗ | ≤ |℘( Γ )|. Hence if Γ contains n sentences, the
cardinality of W ∗ is no greater than 2n .
Proof. K is the set of valid formulas, i.e., any model is a model of K. By ??, if
Mϕ[w], then M∗ ϕ[w] for any filtration of M through the set Γ of sub-formulas
of ϕ. Any formula only has finitely many sub-formulas, so Γ is finite. By ??,
|W ∗ | ≤ 2n , where n is the number of formulas in Γ. And since K imposes no
restriction on models, M∗ is a K-model.
To show that a logic L has the finite model property via filtrations it is
essential that the filtration of an L-model is itself a L-model. Often this re-
quires a fair bit of work, and not any filtration yields a L-model. However, for
universal models, this still holds.
Proposition 42.15. Let U be the class of universal models (see ??) and UFin the class
of all finite universal models. Then any formula ϕ is valid in U if and only if it is
valid in UFin .
Proof. Finite universal models are universal models, so the left-to-right direc-
tion is trivial. For the right-to left direction, suppose that ϕ is false at some
world w in a universal model M. Let Γ contain ϕ as well as all of its subfor-
mulas; clearly Γ is finite. Take a filtration M∗ of M; then M∗ is finite by ??, and
by ??, ϕ is false at [w] in M∗ . It remains to observe that M∗ is also universal:
given u and v, by hypothesis Ruv and by Definition ????, also R∗ [u][v].
Proof. By ??, if ϕ is true at a world in some reflexive and euclidean model then
it is true at a world in a universal model. By ??, it is true at a world in a finite
universal model (namely the filtration of the model through the set of sub-
formulas of ϕ). Every universal model is also reflexive and euclidean; so ϕ is
true at a world in a finite reflexive euclidean model.
42.7 S5 is Decidable
The finite model property gives us an easy way to show that systems of modal
logic given by schemas are decidable (i.e., that there is a computable procedure
to determine whether a formulas is derivable in the system or not).
The above proof works for S5 because filtrations of universal models are
automatically universal. The same holds for reflexivity and seriality, but more
work is needed for other properties.
2. Suppose R∗ [u][v] if and only if C1 (u, v) ∧ C3 (u, v). Then R∗ is transitive, and
M∗ = hW ∗ , R∗ , V ∗ i is a filtration if M is transitive.
2. Exercise.
3. Exercise.
4. Exercise.
¬ p w1 w2 p
p p
¬ p w3 w4 p w5 ¬ p
p 1p 1p
[ w2 ] p
p
¬ p [ w1 ] [ w1 ] = [ w3 ]
p
[ w4 ] p [ w5 ] ¬ p
1p 1p
1. If M is symmetric, so is M∗ .
2. If M is transitive, so is M∗ .
3. If M is euclidean, so is M∗ .
Problems
Problem 42.1. Complete the proof of ??
Problem 42.2. Complete the proof of ??.
Problem 42.3. Consider the following model M = hW, R, V i where W = {0σ :
σ ∈ B∗ }, the set of sequences of 0s and 1s starting with 0, with Rσσ0 iff σ0 = σ0
or σ0 = σ1, and V ( p) = {σ0 : σ ∈ B∗ } and V (q) = {σ1 : σ ∈ B∗ \ {1}}. Here’s
a picture:
000
p
00
¬q
p
001
¬q
¬p
0 q
p
¬q 010
p
01
¬q
¬p
011
q
¬p
q
Problem 42.6. Show that any filtration of a serial or reflexive model is also
serial or reflexive (respectively).
Modal Tableaux
Draft chapter on prefixed tableaux for modal logic. Needs more ex-
amples, completeness proofs, and discussion of how one can find coun-
termodels from unsuccessful searches for closed tableaux.
43.1 Introduction
Tableaux are certain (downward-branching) trees of signed formulas, i.e., pairs
consisting of a truth value sign (T or F) and a sentence
T ϕ or F ϕ.
{F ϕ, Tψ1 , . . . , Tψn }.
For modal logics, we have to both extend the notion of signed formula
and add rules that cover and ♦ In addition to a sign(T or F), formulas in
modal tableaux also have prefixes σ. The prefixes are non-empty sequences of
positive integers, i.e., σ ∈ (Z+ )∗ \ {Λ}. When we write such prefixes without
574
43.2. RULES FOR K
σ T¬ ϕ σ F ¬ϕ
¬T ¬F
σFϕ σ Tϕ
σ Tϕ ∧ ψ
∧T σFϕ ∧ ψ
σ Tϕ ∧F
σ F ϕ | σ Fψ
σ Tψ
σFϕ ∨ ψ
σ Tϕ ∨ ψ ∨F
∨T σFϕ
σ T ϕ | σ Tψ
σ Fψ
σFϕ → ψ
σ Tϕ → ψ →F
→T σ Tϕ
σ F ϕ | σ Tψ
σ Fψ
the surrounding h i, and separate the individual elements by .’s instead of ,’s.
If σ is a prefix, then σ.n is σ _ hni; e.g., if σ = 1.2.1, then σ.3 is 1.2.1.3. So for
instance,
1.2 Tϕ → ϕ
σ Tϕ and σFϕ
σ Tϕ σ F ϕ
T F
σ.n T ϕ σ.n F ϕ
σ T♦ϕ σ F ♦ϕ
♦T ♦F
σ.n T ϕ σ.n F ϕ
The rules for setting up assumptions is also as for ordinary tableaux, ex-
cept that for asusmptions we always use the prefix 1. (It does not matter which
prefix we use, as long as it’s the same for all assumptions.) So, e.g., we say that
ψ1 , . . . , ψn ` ϕ
1 Tψ1 , . . . , 1 Tψn , 1 F ϕ.
For the modal operators and ♦, the prefix of the conclusion of the rule
applied to a formula with prefix σ is σ.n. However, which n is allowed de-
pends on whether the sign is T or F.
The T rule extends a branch containing σ Tϕ by σ.n T ϕ. Similarly, the
F♦ rule extends a branch containing σ F ♦ϕ by σ.n F ϕ. They can only be ap-
plied for a prefix σ.n which already occurs on the branch in which it is applied.
Let’s call such a prefix “used” (on the branch).
The F rule extends a branch containing σ F ϕ by σ.n F ϕ. Similarly, the
T♦ rule extends a branch containing σ T♦ϕ by σ.n T ϕ. These rules, however,
can only be applied for a prefix σ.n which does not already occur on the branch
in which it is applied. We call such prefixes “new” (to the branch).
The rules are given in ??.
The requirements that the restriction that the prefix for T must be used
is necessary as otherwise we would count the following as a closed tableau:
1. 1 T ϕ Assumption
2. 1 F ♦ϕ Assumption
3. 1.1 T ϕ T 1
4. 1.1 F ϕ ♦F 2
⊗
7. 1.1 F ϕ 1.1 F ψ ∧F 6
8. 1.1 T ϕ 1.1 T ψ T 4; T 5
⊗ ⊗
7. 1.1 T ϕ 1.1 T ψ ∨T 6
8. 1.1 F ϕ 1.1 F ψ ♦F 4; ♦F 5
⊗ ⊗
43.4 Soundness
This soundness proof reuses the soundness proof for classical propo-
sitional logic, i.e., it proves everything from scratch. That’s ok if you want
a self-contained soundness proof. If you already have seen soundness for
ordinary tableau this will be repetitive. It’s planned to make it possible
to switch between self-contained version and a version building on the
non-modal case.
In order to show that prefixed tableau are sound, we have to show that if
1 Tψ1 , . . . , 1 Tψn , 1 F ϕ
Definition 43.3. Let P be some set of prefixes, i.e., P ⊆ (Z+ )∗ \ {Λ} and let M
be a model. A function f : P → W is an interpretation of P in M if, whenever σ
and σ.n are both in P, then R f (σ ) f (σ.n).
Relative to an interpretation of prefixes P we can define:
1. M satisfies σ T ϕ iff M, f (σ ) ϕ.
2. M satisfies σ F ϕ iff M, f (σ ) 1 ϕ.
Definition 43.4. Let Γ be a set of prefixed formulas, and let P( Γ ) be the set of
prefixes that occur in it. If f is an interpretation of P( Γ ) in M, we say that M
satisfies Γ with respect to f , M, f Γ, if M satisfies every prefixed formula
in Γ with respect to f . Γ is satisfiable iff there is a model M and interpretation f
of P( Γ ) such that M, f Γ.
Proposition 43.5. If Γ contains both σ T ϕ and σ F ϕ, for some formula ϕ and pre-
fix σ, then Γ is unsatisfiable.
Proof. We call a branch of a tableau satisfiable iff the set of signed formulas
on it is satisfiable, and let’s call a tableau satisfiable if it contains at least one
satisfiable branch.
We show the following: Extending a satisfiable tableau by one of the rules
of inference always results in a satisfiable tableau. This will prove the theo-
rem: any closed tableau results by applying rules of inference to the tableau
consisting only of assumptions from Γ. So if Γ were satisfiable, any tableau
for it would be satisfiable. A closed tableau, however, is clearly not satisfiable,
since all its branches are closed and closed branches are unsatisfiable.
Suppose we have a satisfiable tableau, i.e., a tableau with at least one sat-
isfiable branch. Applying a rule of inference either adds signed formulas to a
branch, or splits a branch in two. If the tableau has a satisfiable branch which
is not extended by the rule application in question, it remains a satisfiable
branch in the extended tableau, so the extended tableau is satisfiable. So we
only have to consider the case where a rule is applied to a satisfiable branch.
Let Γ be the set of signed formulas on that branch, and let σ S ϕ ∈ Γ be
the signed formula to which the rule is applied. If the rule does not result in a
split branch, we have to show that the extended branch, i.e., Γ together with
the conclusions of the rule, is still satisfiable. If the rule results in split branch,
we have to show that at least one of the two resulting branches is satisfiable.
First, we consider the possible inferences with only one premise.
σ Tϕ σ F ♦ϕ
T T♦
σ Tϕ σFϕ
σ Tϕ σ F ♦ϕ
D D♦
σ T♦ϕ σ F ϕ
σ Tϕ σ F ♦ϕ
4 4♦
σ.n Tϕ σ.n F ♦ϕ
Logic R is . . . Rules
T = KT reflexive T, T♦
D = KD serial D, D♦
K4 transitive 4, 4♦
B = KTB reflexive, T, T♦
symmetric B, B♦
S4 = KT4 reflexive, T, T♦,
transitive 4, 4♦
S5 = KT4B reflexive, T, T♦,
transitive, 4, 4♦,
euclidean 4r, 4r♦
1. 1 F ϕ → ♦ϕ Assumption
2. 1 T ϕ →F 1
3. 1 F ♦ϕ →F 1
4. 1.1 F ♦ϕ F 3
5. 1 F ♦ϕ 4r♦ 4
6. 1.1 F ϕ ♦F 5
7. 1.1 T ϕ T 2
⊗
Proposition 43.14. 4r and 4r♦ are sound for euclidean models.
Proof. 1. The branch is expanded by applying 4r to σ.n Tψ ∈ Γ: This re-
sults in a new signed formula σ Tψ on the branch. Suppose M, f Γ,
in particular, M, f (σ.n) ψ. Since f is an interpretation of prefixes on
the branch into M, we know that R f (σ ) f (σ.n). Now let w be any world
such that R f (σ )w. Since R is euclidean, R f (σ.n)w. Since M, f (σ ).n
ψ, M, w ψ. Hence, M, f (σ ) ψ, and M, f satisfies σ Tψ.
Corollary 43.15. The tableau systems given in ?? are sound for the respective classes
of models.
n Tϕ n F ϕ
T F
m Tϕ mFϕ
m is used m is new
n T♦ϕ n F ♦ϕ
♦T ♦F
m Tϕ mFϕ
m is new m is used
1. 1 F ♦ϕ → ♦ϕ Assumption
2. 1 T ♦ϕ →F 1
3. 1 F ♦ϕ →F 1
4. 2 F ♦ϕ F 3
5. 3T ϕ ♦T 2
6. 3F ϕ ♦F 4
⊗
1. the prefixed formulas that are the corresponding conclusions of the rule,
in the case of propositional stacking rules;
3. at least one possible conclusion in the case of modal rules that require a
new prefix;
Proposition 43.18. Every finite Γ has a tableau in which every branch is complete.
Proof. Consider an open branch in a tableau for Γ. There are finitely many
prefixed formulas in the branch to which a rule could be applied. In some
fixed order (say, top to bottom), for each of these prefixed formulas for which
the conditions (1)–(4) do not already hold, apply the rules that can be applied
to it to extend the branch. In some cases this will result in branching; apply
the rule at the tip of each resulting branch for all remaining prefixed formu-
las. Since the number of prefixed formulas is finite, and the number of used
prefixes on the branch is finite, this procedure eventually results in (possibly
many) branches extending the original branch. Apply the procedure to each,
and repeat. But by construction, every branch is closed.
and
V ( p) = {σ : σ T p ∈ ∆}.
3. ϕ ≡ ψ ∧ ϕ: Exercise.
5. ϕ ≡ ψ → ϕ: Exercise.
7. ϕ ≡ ♦ψ: Exercise.
Since Γ ⊆ ∆, M(∆) Γ.
applied once on a branch for any signed formula σ S ϕ. New prefixes are only
generated by the F and ♦T rules, and also only have to be applied once (and
produce a single new prefix). T and ♦F have to be applied potentially mul-
tiple times, but only once per prefix, and only finitely many new prefixes are
generated. So the construction either results in a closed branch or a complete
branch after finitely many stages.
Once a tableau with an open complete branch is constructed, the proof of
?? gives us an explict model that satisfies the original set of prefixed formulas.
So not only is it the case that if Γ ϕ, then a closed tableau exists and Γ ` ϕ, if
we look for the closed tableau in the right way and end up with a “complete”
tableau, we’ll not only know that Γ 2 ϕ but actually be able to construct a
countermodel.
The tableau is of course not finished yet. In the next step, we consider the
only line without a checkmark: the prefixed formula 1 T( p ∨ q) on line 2.
The construction of the closed tableau says to apply the T rule for every
prefix used on the branch, i.e., for both 1.1 and 1.2:
Now lines 2, 8, and 9, don’t have checkmarks. But no new prefix has been
added, so we apply ∨T to lines 8 and 9, on all resulting branches (as long as
they don’t close):
¬p p
1.1 q 1.2 ¬q
¬p
1 ¬q
There is one remaining open branch, and it is complete. From it we define the
model with worlds W = {1, 1.1, 1.2} (the only prefixes appearing on the open
branch), the accessibility relation R = {h1, 1.1i, h1, 1.2i}, and the assignment
V ( p) = {1.2} (because line 11 contains 1.2 T p) and V (q) = {1.1} (because
line 10 contains 1.1 Tq). The model is pictured in ??, and you can verify that it
is a countermodel to ( p ∨ q) → (p ∨ q).
Problems
Problem 43.1. Find closed tableaux in K for the following formulas:
1. ¬ p → ( p → q)
2. (p ∨ q) → ( p ∨ q)
3. ♦p → ♦( p ∨ q)
Problem 43.2. Complete the proof of ??.
Problem 43.3. Give closed tableaux that show the following:
1. KT5 ` B;
2. KT5 ` 4;
3. KDB4 ` T;
4. KB4 ` 5;
5. KB5 ` 4;
6. KT ` D.
Intuitionistic Logic
590
43.10. COUNTERMODELS FROM TABLEAUX
Introduction
Theorem 44.1. There are irrational numbers a and b such that ab is rational.
√
√ 2 √
Proof. Consider 2 . If this is rational, we are done: we can let a = b = 2.
592
44.2. SYNTAX OF INTUITIONISTIC LOGIC
Does this constitute a valid proof? Most mathematicians feel that it does.
But again, there is something a little bit unsatisfying here: we have proved the
existence of a pair of real numbers with a certain property, without being able
to say which pair of numbers it is. It is possible to prove the √
same result, but in
such a way that the pair a, b is given in the proof: take a = 3 and b = log3 4.
Then √ log 4
ab = 3 3 = 31/2·log3 4 = (3log3 4 )1/2 = 41/2 = 2,
since 3log3 x = x.
Intuitionistic logic is designed to capture a kind of reasoning where moves
like the one in the first proof are disallowed. Proving the existence of an x
satisfying ϕ( x ) means that you have to give a specific x, and a proof that it
satisfies ϕ, like in the second proof. Proving that ϕ or ψ holds requires that
you can prove one or the other.
Formally speaking, intuitionistic logic is what you get if you restrict a
proof system for classical logic in a certain way. From the mathematical point
of view, these are just formal deductive systems, but, as already noted, they
are intended to capture a kind of mathematical reasoning. One can take this
to be the kind of reasoning that is justified on a certain philosophical view of
mathematics (such as Brouwer’s intuitionism); one can take it to be a kind of
mathematical reasoning which is more “concrete” and satisfying (along the
lines of Bishop’s constructivism); and one can argue about whether or not
the formal description captures the informal motivation. But whatever philo-
sophical positions we may hold, we can study intuitionistic logic as a formally
presented logic; and for whatever reasons, many mathematical logicians find
it interesting to do so.
1. ⊥ is an atomic formula.
1. ¬ ϕ abbreviates ϕ → ⊥.
2. ϕ ↔ ψ abbreviates ( ϕ → ψ) ∧ (ψ → ϕ).
p1 (h N1 , N2 i) = N1
p2 (h N1 , N2 i) = N2
Here is what f does: First it applies p1 to its input M. That yields a construc-
tion of ϕ. Then it applies p2 to M, yielding a construction of ϕ → ⊥. Such a
construction, in turn, is a function p2 ( M) which, if given as input a construc-
tion of ϕ, yields a construction of ⊥. In other words, if we apply p2 ( M ) to
p1 ( M), we get a construction of ⊥. Thus, we can define f ( M) = p2 ( p1 ( M )).
As you can see, using the BHK interpretation to show the intuitionistic
validity of formulas quickly becomes cumbersome and confusing. Luckily,
there are better derivation systems for intuitionistic logic, and more precise
semantic interpretations.
Conjunction
ϕ1 ϕ2 ϕ1 ∧ ϕ2
i ∈ {1, 2}
ϕ1 ∧ ϕ2 ∧Intro ϕi ∧Elimi
Conditional
[ ϕ]u
ϕ→ψ ϕ
ψ
→Elim
ψ
u →Intro
ϕ→ψ
Disjunction
[ ϕ1 ] u [ ϕ2 ] u
ϕi
∨Introi i ∈ {1, 2}
ϕ1 ∨ ϕ2
ϕ1 ∨ ϕ2 χ χ
u
χ ∨Elim
Absurdity
⊥ ⊥
ϕ I
Rules for ¬
Since ¬ ϕ is defined as ϕ → ⊥, we strictly speaking do not need rules for ¬.
But if we did, this is what they’d look like:
[ ϕ]n
¬ϕ ϕ
¬Elim
⊥
⊥
¬ ϕ ¬Intro
n
Examples of Derivations
1. ` ϕ → (¬ ϕ → ⊥), i.e., ` ϕ → (( ϕ → ⊥) → ⊥)
[ ϕ ]2 [ ϕ → ⊥]1
→Elim
⊥
1 →Intro
( ϕ → ⊥) → ⊥
2 →Intro
ϕ → ( ϕ → ⊥) → ⊥
2. ` (( ϕ ∧ ψ) → χ) → ( ϕ → (ψ → χ))
[ ϕ ]2 [ ψ ]1
∧Intro
[( ϕ ∧ ψ) → χ]3 ϕ∧ψ
χ →Elim
1 →Intro
ψ→χ
2 →Intro
ϕ → (ψ → χ)
3 →Intro
(( ϕ ∧ ψ) → χ) → ( ϕ → (ψ → χ))
[ ϕ ∧ ( ϕ → ⊥)]1 [ ϕ ∧ ( ϕ → ⊥)]1
∧Elim ∧Elim
ϕ→⊥ ϕ
→Elim
⊥
1 →Intro
( ϕ ∧ ( ϕ → ⊥)) → ⊥
[ ϕ ]1
∨Intro
[( ϕ ∨ ( ϕ → ⊥)) → ⊥]2 ϕ ∨ ( ϕ → ⊥)
→Elim
⊥
1 →Intro
ϕ→⊥
2 ∨Intro
[( ϕ ∨ ( ϕ → ⊥)) → ⊥] ϕ ∨ ( ϕ → ⊥)
→Elim
⊥
2 →Intro
(( ϕ ∨ ( ϕ → ⊥)) → ⊥) → ⊥
Proof. Every natural deduction rule is also a rule in classical natural deduc-
tion, so every derivation in intuitionistic logic is also a derivation in classical
logic.
1. ϕi ∈ Γ; or
2. ϕi is an axiom; or
3. ϕi follows from some ϕ j and ϕk with j < i and k < i by modus ponens,
i.e., ϕk ≡ ϕ j → ϕi .
Definition 44.10 (Axioms). The set of Ax0 of axioms for the intuitionistic propo-
sitional logic are all formulas of the following forms:
( ϕ ∧ ψ) → ϕ (44.1)
( ϕ ∧ ψ) → ψ (44.2)
ϕ → (ψ → ( ϕ ∧ ψ)) (44.3)
ϕ → ( ϕ ∨ ψ) (44.4)
ϕ → (ψ ∨ ϕ) (44.5)
( ϕ → χ) → ((ψ → χ) → (( ϕ ∨ ψ) → χ)) (44.6)
ϕ → (ψ → ϕ) (44.7)
( ϕ → (ψ → χ)) → (( ϕ → ψ) → ( ϕ → χ)) (44.8)
⊥→ϕ (44.9)
Problems
Semantics
45.1 Introduction
No logic is satisfactorily described without a semantics, and intuitionistic logic
is no exception. Whereas for classical logic, the semantics based on valu-
ations is canonical, there are several competing semantics for intuitionistic
logic. None of them are completely satisfactory in the sense that they give an
intuitionistically acceptable account of the meanings of the connectives.
The semantics based on relational models, similar to the semantics for
modal logics, is perhaps the most popular one. In this semantics, proposi-
tional variables are assigned to worlds, and these worlds are related by an
accessibility relation. That relation is always a partial order, i.e., it is reflexive,
antisymmetric, and transitive.
Intuitively, you might think of these worlds as states of knowledge or “ev-
identiary situations.” A state w0 is accessible from w iff, for all we know, w0 is
a possible (future) state of knowledge, i.e., one that is compatible with what’s
known at w. Once a proposition is known, it can’t become un-known, i.e.,
whenever ϕ is known at w and Rww0 , ϕ is known at w0 as well. So “knowl-
edge” is monotonic with respect to the accessibility relation.
If we define “ϕ is known” as in epistemic logic as “true in all epistemic
alternatives,” then ϕ ∧ ψ is known at w if in all epistemic alternatives, both ϕ
and ψ are known. But since knowledge is monotonic and R is reflexive, that
means that ϕ ∧ ψ is known at w iff ϕ and ψ are known at w. For the same
602
45.2. RELATIONAL MODELS
1. W is a non-empty set,
1. ϕ ≡ p: M, w ϕ iff w ∈ V ( p).
2. ϕ ≡ ⊥: not M, w ϕ.
4. ϕ ≡ ψ ∧ χ: M, w ϕ iff M, w ψ and M, w χ.
Proof. Exercise.
2. If M Γ and Γ ϕ, then M ϕ.
We may write X for a topology if the collection of open sets can be inferred
from the context; note that, still, only after X is endowed with open sets can it
be called a topology.
Definition 45.7. A topological model of intuitionistic propositional logic is a
triple X = h X, O , V i where O is a topology on X and V is a function assigning
an open set in O to each propositional variable.
Given a topological model X, we can define [ ϕ]X inductively as follows:
1. V (⊥) = ∅
2. [ p]X = V ( p)
3. [ ϕ ∧ ψ]X = [ ϕ]X ∩ [ψ]X
4. [ ϕ ∨ ψ]X = [ ϕ]X ∪ [ψ]X
5. [ ϕ → ψ]X = Int(( X \ [ ϕ]X ) ∪ [ψ]X )
Here, Int(V ) is the function that maps a set V ⊆ X to its interior, that is, the
union of all open sets it contains. In other words,
[
Int(V ) = {U : U ⊆ V and U ∈ O}.
Note that the interior of any set is always open, since it is a union of open
sets. Thus, [ ϕ]X is always an open set.
Although topological semantics is highly abstract, there are ways to think
about it that might motivate it. Suppose that the elements, or “points,” of X
are points at which statements can be evaluated. The set of all points where ϕ
is true is the proposition expressed by ϕ. Not every set of points is a potential
proposition; only the elements of O are. ϕ ψ iff ψ is true at every point at
which ϕ is true, i.e., [ ϕ]X ⊆ [ψ]X , for all X. The absurd statement ⊥ is never
true, so [⊥]]X = ∅. How must the propositions expressed by ψ ∧ χ, ψ ∨ χ, and
ψ → χ be related to those expressed by ψ and χ for the intuitionistically valid
laws to hold, i.e., so that ϕ ` ψ iff [ ϕ]X ⊂ [ψ]X . ⊥ ` ϕ for any ϕ, and only
∅ ⊆ U for all U. Since ψ ∧ χ ` ψ, [ψ ∧ χ]X ⊆ [ψ]X , and similarly [ψ ∧ χ]X ⊆
[χ]X . The largest set satisfying W ⊆ U and W ⊆ V is U ∩ V. Conversely,
ψ ` ψ ∨ χ and χ ` ψ ∨ χ, and so [ψ]X ⊆ [ψ ∨ χ]X and [χ]X ⊆ [ψ ∨ χ]X . The
smallest set W such that U ⊆ W and V ⊆ W is U ∪ V. The definition for
→ is tricky: ϕ → ψ expresses the weakest proposition that, combined with ϕ,
entails ψ. That ϕ → ψ combined with ϕ entails ψ is clear from ( ϕ → ψ) ∧ ϕ ` ψ.
So [ ϕ → ψ]X should be the greatest open set such that [ ϕ → ψ]X ∩ [ ϕ]X ⊂ [ψ]X ,
leading to our definition.
Problems
Problem 45.1. Show that according to ??, M, w ¬ ϕ iff M, w ϕ → ⊥.
The soundness proof relies on the fact that all axioms are intuitionisti-
cally valid; this still needs to be proved, e.g., in the Semantics chapter.
607
CHAPTER 46. SOUNDNESS AND COMPLETENESS
4. The derivation ends in ∨Intro: Suppose the premise is ψ, and the undis-
charged assumptions of the derivation ending in ψ are Γ. Then we have
Γ ` ψ and by inductive hypothesis, Γ B. We have to show that
Γ ψ ∨ χ. Suppose M Γ. Since Γ ψ, M ψ. But then also
M ψ ∨ χ. Similarly, if the premise is χ, we have that Γ χ.
Suppose M, w Γ. We want to show that that for all w0 such that Rww0 ,
if M, w0 ψ, then M, w0 χ. So assume that Rww0 and M, w0 ψ. By
??, M, w0 Γ. Since Γ ∪ {ψ} χ, M, w0 χ, which is what we wanted
to show.
2. If Γ ` ϕ then ϕ ∈ Γ, and
3. If ϕ ∨ ψ ∈ Γ then ϕ ∈ Γ or ψ ∈ Γ.
Lemma 46.4 (Lindenbaum’s Lemma). If Γ 0 ϕ, there is a Γ ∗ ⊇ Γ such that Γ ∗ is
prime and Γ ∗ 0 ϕ.
1. Γn ` ψi ∨ χi
2. ψi ∈
/ Γn and χi ∈
/ Γn
1. Λ ∈ N∗ .
3. Nothing else is in N∗ .
1. ∆(Λ) = ∆
2. ∆(σ.n) = (
(∆(σ) ∪ {ψn })∗ if ∆(σ ) ∪ {ψn } 0 χn
∆(σ ) otherwise
Here by (∆(σ ) ∪ {ψn })∗ we mean the prime set of formulas which exists by ??
applied to the set ∆(σ ) ∪ {ψn }. Note that by this definition, if ∆(σ ) ∪ {ψn } 0
χn , then ∆(σ.n) ` ψn and ∆(σ.n) 0 χn . Note also that ∆(σ ) ⊆ ∆(σ.n) for any n.
If ∆ is prime, then ∆(σ ) is prime for all σ.
Definition 46.5. Suppose ∆ is prime. Then the canonical model for ∆ is defined
by:
3. V ( p) = {σ : p ∈ ∆(σ )}.
Proof. By induction on ϕ.
3. ϕ ≡ ¬ψ: exercise.
Problems
Problem 46.1. Complete the proof of ??. For the cases for ¬Intro and ¬Elim,
use the definition of M, w ¬ ϕ in ??, i.e., don’t treat ¬ ϕ as defined by ϕ → ⊥.
Propositions as Types
47.1 Introduction
Historically the lambda calculus and intuitionistic logic were developed sepa-
rately. Haskell Curry and William Howard independently discovered a close
similarity: types in a typed lambda calculus correspond to formulas in intu-
itionistic logic in such a way that a derivation of a formula corresponds di-
rectly to a typed lambda term with that formula as its type. Moreover, beta re-
duction in the typed lambda calculus corresponds to certain transformations
of derivations.
For instance, a derivation of ϕ → ψ corresponds to a term λx ϕ . N ψ , which
has the function type ϕ → ψ. The inference rules of natural deduction corre-
spond to typing rules in the typed lambda calculus, e.g.,
[ ϕ] x
x:ϕ ⇒ N:ψ
corresponds to λ
⇒ λx ϕ . N ψ : ϕ → ψ
ψ
x →Intro
ϕ→ψ
where the rule on the right means that if x is of type ϕ and N is of type ψ, then
λx ϕ . N is of type ϕ → ψ.
613
CHAPTER 47. PROPOSITIONS AS TYPES
The →Elim rule corresponds to the typing rule for composition terms, i.e.,
ϕ→ψ ϕ
ψ
→Elim corresponds to
⇒ P : ϕ→ψ ⇒ Q:ϕ
app
⇒ P ϕ → ψ ϕ
Q :ψ
[ ϕ] x
ϕ
.1
ψ
x →Intro
ϕ→ψ ϕ
ψ
→Elim
ψ
(λx ϕ . Pψ ) Q .1 P[ Q/x ].
Similar correspondences hold between the rules for ∧ and “product” types,
and between the rules for ∨ and “sum” types.
This correspondence between terms in the simply typed lambda calculus
and natural deduction derivations is called the “Curry-Howard”, or “propo-
sitions as types” correspondence. In addition to formulas (propositions) cor-
responding to types, and proofs to terms, we can summarize the correspon-
dences as follows:
logic program
proposition type
proof term
assumption variable
discharged assumption bind variable
not discharged assumption free variable
implication function type
conjunction product type
disjunction sum type
absurdity bottom type
Γ ⇒ ϕ∧ψ Γ ⇒ ϕ∧ψ
∧Elim ∧Elim
Γ ⇒ ϕ Γ ⇒ ψ
The label ∧Elim hints at the relation with the rule of the same name in natural
deduction.
Likewise, suppose we have Γ, ϕ ⇒ ψ, meaning we have a derivation with
undischarged assumptions Γ, ϕ and end-formula ψ. If we apply the →Intro
rule, we have a derivation with Γ as undischarged assumptions and ϕ → ψ as
the end-formula, i.e., Γ ⇒ ϕ → ψ. Note how this has made the discharge of
assumptions more explicit.
Γ, ϕ ⇒ ψ
→Intro
Γ ⇒ ϕ→ψ
We can draw conclusions from other rules in the same fashion, which is
spelled out as follows:
Γ ⇒ ϕ ∆ ⇒ ψ
∧Intro
Γ, ∆ ⇒ ϕ ∧ ψ
Γ ⇒ ϕ∧ψ Γ ⇒ ϕ∧ψ
∧Elim1 ∧Elim2
Γ ⇒ ϕ Γ ⇒ ψ
Γ ⇒ ϕ Γ ⇒ ψ
∨Intro1 ∨Intro2
Γ ⇒ ϕ∨ψ Γ ⇒ ϕ∨ψ
Γ ⇒ ϕ∨ψ ∆, ϕ ⇒ χ ∆0 , ψ ⇒ χ
∨Elim
Γ, ∆, ∆0 ⇒ χ
Γ, ϕ ⇒ ψ ∆ ⇒ ϕ→ψ Γ ⇒ ϕ
→Intro →Elim
Γ ⇒ ϕ→ψ Γ, ∆ ⇒ ψ
Γ ⇒ ⊥ ⊥
I
Γ ⇒ ϕ
ϕ ⇒ ϕ
Together, these rules can be taken as a calculus about what natural deduc-
tion derivations exist. They can also be taken as a notational variant of natural
deduction, in which each step records not only the formula derived but also
the undischarged assumptions from which it was derived.
ϕ ⇒ ϕ
ϕ ⇒ ϕ ∨ ( ϕ → ⊥) ψ ⇒ ψ
ϕ, ψ→ ⇒ ⊥
(ψ ⇒ ϕ → ⊥
(ψ ⇒ ϕ ∨ ( ϕ → ⊥) (ψ ⇒ ψ
(ψ ⇒ ⊥
⇒ ψ→⊥
Definition 47.1 (Proof terms). Proof terms are inductively generated by the
following rules:
Definition 47.3 (Typing pair). A typing pair is a pair h Γ, Mi, where Γ is a typ-
ing context and M is a proof term.
Since in general terms only make sense with specific contexts, we will
speak simply of “terms” from now on instead of “typing pair”; and it will
be apparent when we are talking about the literal term M.
1. Assumptions discharged in the same step (that is, with the same number
on the square bracket) must be assigned the same variable.
ϕ into x : ϕ.
With assumptions all associated with variables (which are terms), we can now
inductively translate the rest of the deduction tree. The modified natural de-
duction rules taking into account context and proof terms are given below.
Given the proof terms for the premise(s), we obtain the corresponding proof
term for conclusion.
M1 : ϕ1 M2 : ϕ2
∧Intro
h M1 , M2 i : ϕ1 ∧ ϕ2
M : ϕ1 ∧ ϕ2 M : ϕ1 ∧ ϕ2
∧Elim1 ∧Elim2
pi ( M ) : ϕ 1 pi ( M ) : ϕ 2
In ∧Intro we assume we have ϕ1 witnessed by term M1 and ϕ2 witnessed
by term M2 . We pack up the two terms into a pair h M1 , M2 i which witnesses
ϕ1 ∧ ϕ2 .
In ∧Elimi we assume that M witnesses ϕ1 ∧ ϕ2 . The term witnessing ϕi
is pi ( M). Note that M is not necessary of the form h M1 , M2 i, so we cannot
simply assign M1 to the conclusion ϕi .
Note how this coincides with the BHK interpretation. What the BHK in-
terpretation does not specify is how the function used as proof for ϕ → ψ is
supposed to be obtained. If we think of proof terms as proofs or functions of
proofs, we can be more explicit.
[ x : ϕ]
P : ϕ→ψ Q:ϕ
→Elim
PQ : ψ
N:ψ
→Intro
λx ϕ . N : ϕ → ψ
The λ notation should be understood as the same as in the lambda calculus,
and PQ means applying P to Q.
M1 : ϕ1 M2 : ϕ2
ϕ1 ∨Intro1 ϕ2 ∨Intro2
in1 ( M1 ) : ϕ1 ∨ ϕ2 in2 ( M2 ) : ϕ1 ∨ ϕ2
[ x1 : ϕ1 ] [ x2 : ϕ2 ]
M : A1 ∨ ϕ2 N1 : χ N2 : χ
∨Elim
case( M, x1 .N1 , x2 .N2 ) : χ
ϕ
The proof term in1 1 ( M1 ) is a term witnessing ϕ1 ∨ ϕ2 , where M1 witnesses
ϕ1 .
The term case( M, x1 .N1 , x2 .N2 ) mimics the case clause in programming
languages: we already have the derivation of ϕ ∨ ψ, a derivation of χ assum-
ing ϕ, and a derivation of χ assuming ψ. The case operator thus select the
appropriate proof depending on M; either way it’s a proof of χ.
N:⊥ ⊥I
contr ϕ ( N ) : ϕ
[ x : ϕ ]1
ϕ→⊥
[y : ( ϕ ∨ ( ϕ → ⊥)) → ⊥]2 in1 ( x ) : ϕ ∨ ( ϕ → ⊥)
ϕ→⊥
y(in1 ( x )) : ⊥
1
ϕ→⊥
ϕ
λx . y(in1 ( x )) : ϕ → ⊥
ϕ ϕ→⊥
[y : ( ϕ ∨ ( ϕ → ⊥)) → ⊥]2 in2 (λx ϕ . y(in1 ( x ))) : ϕ ∨ ( ϕ → ⊥)
ϕ ϕ →⊥
y(in2 (λx ϕ . yin1 ( x ))) : ⊥
2
→⊥
λy( ϕ∨( ϕ→⊥))→⊥ . y(in2 (λx ϕ . yin1
ϕ ϕ
( x ))) : (( ϕ ∨ ( ϕ → ⊥)) → ⊥) → ⊥
The tree has no assumptions, so the context is empty; we get:
ϕ→⊥
` λy( ϕ∨( ϕ→⊥))→⊥ . y(in2 (λx ϕ . yin1
ϕ
( x ))) : (( ϕ ∨ ( ϕ → ⊥)) → ⊥) → ⊥
If we leave out the last →Intro, the assumptions denoted by y would be in the
context and we would get:
ϕ ϕ→⊥
y : (( ϕ ∨ ( ϕ → ⊥)) → ⊥) ` y(in2 (λx ϕ . yin1 ( x ))) : ⊥
Another example: ` ϕ → ( ϕ → ⊥) → ⊥
[ x : ϕ ]2 [y : ϕ → ⊥]1
yx : ⊥
1
λy ϕ→⊥ . yx : ( ϕ → ⊥) → ⊥
2
λx ϕ . λy ϕ→⊥ . yx : ϕ → ( ϕ → ⊥) → ⊥
Again all assumptions are discharged and thus the context is empty, the re-
sulting term is
` λx ϕ . λy ϕ→⊥ . yx : ϕ → ( ϕ → ⊥) → ⊥
If we leave out the last two →Intro inferences, the assumptions denoted by
both x and y would be in context and we would get
x : ϕ, y : ϕ → ⊥ ` yx : ⊥
For each natural deduction rule, the term in the conclusion is always formed
by wrapping some operator around the terms assigned to the premise(s). Rules
correspond uniquely to such operators. For example, from the structure of
the S we infer that the last rule applied must be →Intro, since it is of the form
λy... . . . ., and the λ operator corresponds to →Intro. In general we can recover
the skeleton of the derivation solely by the structure of the term, e.g.,
[ x ]1
ϕ→⊥
∨Intro1
[ y : ]2 in1 (x) :
ϕ→⊥
→Elim
y(in1 ( x )) :
1
ϕ→⊥
→Intro
λx ϕ . y(in1 ( x )) :
ϕ ϕ→⊥
∨Intro2
[ y : ]2 in2 (λx ϕ . yin1 ( x )) :
ϕ ϕ→⊥
→Elim
y(in2 (λx ϕ . yin1 ( x ))) :
2
ϕ→⊥
→Intro
λy( ϕ∨( ϕ→⊥))→⊥ . y(in2 (λx ϕ . y(in1
ϕ
( x )))) :
Our next step is to recover the formulas these terms witness. We define a
function F ( Γ, M) which denotes the formula witnessed by M in context Γ, by
induction on M as follows:
F ( Γ, x ) = Γ ( x )
F ( Γ, h N1 , N2 i = F ( Γ, N1 ) ∧ F ( Γ, N2 )
F ( Γ, pi ( N ) = ϕi if F ( Γ, N ) = ϕ1 ∧ ϕ2
(
ϕ F ( N ) ∨ ϕ if i = 1
F ( Γ, ini ( N ) =
ϕ ∨ F ( N ) if i = 2
F ( Γ, case( M, x1 .N1 , x2 .N2 )) = F ( Γ ∪ { xi : F ( Γ, M)}, Ni )
F ( Γ, λx ϕ . N ) = ϕ → F ( Γ ∪ { x : ϕ}, N )
F ( Γ, N M ) = ψ if F ( Γ, N ) = ϕ → ψ
ϕ→ψ ϕ
ψ
→Elim
Γ ` M1 : ϕ1 ∆ ` M2 : ϕ2 Γ ` M : ϕ1 ∧ ϕ2
∧Intro ∧Elimi
Γ, ∆ ` h M1 , M2 i : ϕ1 ∧ ϕ2 Γ ` pi ( M ) : ϕ i
Γ ` M1 : ϕ1 Γ ` M2 : ϕ2
ϕ2 ∨Intro1 ϕ ∨Intro2
Γ ` in1 ( M ) : ϕ1 ∨ ϕ2 Γ ` in2 1 ( M ) : ϕ1 ∨ ϕ2
Γ ` M : ϕ∨ψ ∆ 1 , x1 : ϕ1 ` N1 : χ ∆ 2 , x2 : ϕ2 ` N2 : χ
0 ∨Elim
Γ, ∆, ∆ ` case( M, x1 .N1 , x2 .N2 ) : χ
Γ, x : ϕ ` N : ψ Γ`Q:ϕ ∆` P : ϕ→ψ
→Intro →Elim
Γ ` λx ϕ . N : ϕ → ψ Γ, ∆ ` PQ : ψ
Γ`M:⊥
⊥Elim
Γ ` contr ϕ ( M ) : ϕ
These are the typing rules of the simply typed lambda calculus extended
with product, sum and bottom.
In addition, the F ( Γ, M ) is actually a type checking algorithm; it returns
the type of the term with respect to the context, or is undefined if the term is
ill-typed with respect to the context.
47.6 Reduction
ϕ ϕ→ψ
ψ
→Elim [χ]
∧Intro
ψ∧χ
ψ
∧Elim
→Intro
χ→ψ
ϕ ϕ→ψ
ψ
→Elim
→Intro
χ→ψ
D1 D2
.1 Di
ϕ1 ϕ2
ϕ1 ∧ ϕ2 ∧Intro ϕi
ϕi ∧ Elim i
The .1 symbol has a similar meaning as in the lambda calculus, i.e., a sin-
gle step of a reduction. In the proof term syntax for derivations, the above
reduction rule thus becomes:
ϕ ϕ
( Γ, pi h M1 1 , M2 2 i) .1 ( Γ, Mi )
In the typed lambda calculus, this is the beta reduction rule for the product
type.
Note the type annotation on M1 and M2 : while in the standard term syntax
only λx ϕ . N has such notion, we reuse the notation here to remind us of the
formula the term is associated with in the corresponding natural deduction
derivation, to reveal the correspondence between the two kinds of syntax.
In natural deduction, a pair of inferences such as those on the left, i.e., a
pair that is subject to cancelling is called a cut. In the typed lambda calculus
the term on the left of .1 is called a redex, and the term to the right is called
the reductum. Unlike untyped lambda calculus, where only (λx. N ) Q is con-
sidered to be redex, in the typed lambda calculus the syntax is extended to
ϕ
terms involving h N, M i, pi ( N ), ini ( N ), case( N, x1 .M1 , x2 .M2 ), and contr N (),
with corresponding redexes.
Similarly we have reduction for disjunction:
[ ϕ1 ] u [ ϕ2 ] u D
D
D1 D2 .1 ϕi
ϕi
ϕ1 ∨ ϕ2 ∨Intro χ χ Di
u
χ ∨Elim
χ
This is the beta reduction rule of for sum types. Here, M[ N/x ] means replac-
ing all assumptions denoted by variable x in M with N,
It would be nice if we pass the context Γ to the substitution function so that
it can check if the substitution makes sense. For example, xy[ ab/y] does not
make sense under the context { x : ϕ → θ, y : ϕ, a : ψ → χ, b : ψ} since then we
[ ϕ]u
D0
D
ϕ
D0 .1
ψ
u →Intro D
ϕ→ψ ϕ
ψ
→Elim
ψ
For proof terms, this amounts to ordinary beta reduction:
( Γ, (λx ϕ . N ψ ) Q ϕ ) .1 ( Γ, N ψ [ Q ϕ /x ϕ ])
Absurdity has only an elimination rule and no introduction rule, thus there
is no such reduction for it.
Note that the above notion of reduction concerns only deductions with a
cut at the end of a derivation. We would of course like to extend it to reduction
of cuts anywhere in a derivation, or reductions of subterms of proof terms
which constitute redexes. Note that, however, the conclusion of the reduction
does not change after reduction, thus we are free to continue applying rules
to both sides of .1 . The resulting pairs of trees constitutes an extended notion
of reduction; it is analogous to compatibility in the untyped lambda calculus.
It’s easy to see that the context Γ does not change during the reduction
(both the original and the extended version), thus it’s unnecessary to men-
tion the context when we are discussing reductions. In what follows we will
assume that every term is accompanied by a context which does no change
during reduction. We then say “proof term” when we mean a proof term ac-
companied by a context which makes it well-typed.
As in lambda calculus, the notion of normal-form term and normal deduc-
tion is given:
Definition 47.5. A proof term with no redex is said to be in normal form; like-
wise, a derivation without cuts is a normal derivation. A proof term is in normal
form if and only if its counterpart derivation is normal.
47.7 Normalization
In this section we prove that, via some reduction order, any deduction can
be reduced to a normal deduction, which is called the normalization property.
len( p) = 0
len( ϕ ∧ ψ) = len( ϕ) + len(ψ) + 1
len( ϕ ∨ ψ) = len( ϕ) + len(ψ) + 1
len( ϕ → ψ) = len( ϕ) + len(ψ) + 1.
The complexity of a proof term is measured by the most complex redex in it,
and 0 if it is normal:
Lemma 47.7. If M contracts to M0 , and cr( M ) > cr( N ) for all proper redex sub-
terms N of M, then cr( M ) > mr( M0 ).
sponding redex in Ni with equal cut rank, which is less than cr( M ) by
assumption; or the cut rank equals len( ϕi ), which by definition is less
ϕ χ ϕ χ
than cr(case(ini ( N ϕi ), x1 1 .N1 , x2 2 .N2 )).
Theorem 47.8. All proof terms reduce to normal form; all derivations reduce to nor-
mal derivations.
Proof. The second follows from the first. We prove the first by complete in-
duction on m = mr( M), where M is a proof term.
1. If m = 0, M is already normal.
2. Otherwise, we proceed by induction on n, the number of redexes in M
with cut rank equal to m.
a) If n = 1, select any redex N such that m = cr( N ) > cr( P) for any
proper sub-term P which is also a redex of course. Such a redex
must exist, since any term only has finitely many subterms.
Let N 0 denote the reductum of N. Now by the lemma mr( N 0 ) <
mr( N ), thus we can see that n, the number of redexes with cr(=)m
is decreased. So m is decreased (by 1 or more), and we can apply
the inductive hypothesis for m.
b) For the induction step, assume n > 1. the process is similar, except
that n is only decreased to a positive number and thus m does not
change. We simply apply the induction hypothesis for n.
Counterfactuals
628
Chapter 48
Introduction
If Γ, ϕ ψ then Γ ϕ → ψ (48.1)
ϕ → ψ ¬ϕ ∨ ψ (48.2)
¬ϕ ∨ ψ ϕ → ψ (48.3)
ψ ϕ→ψ (48.4)
¬ϕ ϕ → ψ (48.5)
629
CHAPTER 48. INTRODUCTION
¬( ϕ → ψ) ϕ ∧ ¬ψ (48.6)
ϕ ∧ ¬ψ ¬( ϕ → ψ) (48.7)
ϕ, ϕ → ψ ψ (48.8)
ϕ → ψ, ϕ → χ ϕ → (ψ ∧ χ) (48.9)
ϕ → ψ ( ϕ ∧ χ) → ψ (48.10)
ϕ → ψ, ψ → χ ϕ → χ (48.11)
ϕ → ψ ¬ψ → ¬ ϕ (48.12)
¬ψ → ¬ ϕ ϕ → ψ (48.13)
Lewis introduced the strict conditional J and argued that it, not the material
conditional, corresponds to implication. In alethic modal logic, ϕ J ψ can
be defined as ( ϕ → ψ). A strict conditional is thus true (at a world) iff the
corresponding material conditional is necessary.
How does the strict conditional fare vis-a-vis the paradoxes of the material
conditional? A strict conditional with a false antecedent and one with a true
consequent, may be true, or it may be false. Moreover, ( ϕ J ψ) ∨ (ψ J ϕ) is
not valid. The strict conditional ϕ J ψ is also not equivalent to ¬ ϕ ∨ ψ, so it is
not truth functional.
1 Reading “→” as “implies” is still widely practised by mathematicians and computer scien-
tists, although philosophers try to avoid the confusions Lewis highlighted by pronouncing it as
“only if.”
We have:
ϕ J ψ ¬ ϕ ∨ ψ but: (48.14)
¬ϕ ∨ ψ 2 ϕ J ψ (48.15)
ψ2 ϕJψ (48.16)
¬ϕ 2 ϕ J ψ (48.17)
¬( ϕ → ψ) 2 ϕ ∧ ¬ψ but: (48.18)
ϕ ∧ ¬ψ ¬( ϕ J ψ) (48.19)
ϕ, ϕ J ψ ψ (48.20)
ϕ J ψ, ϕ J χ ϕ J (ψ ∧ χ) (48.21)
ϕ J ψ ( ϕ ∧ χ) J ψ (48.22)
ϕ J ψ, ψ J χ ϕ J χ (48.23)
ϕ J ψ ¬ψ J ¬ ϕ (48.24)
¬ψ J ¬ ϕ ϕ J ψ (48.25)
However, the strict conditional still has its own “paradoxes.” Just as a ma-
terial conditional with a false antecedent or a true consequent is true, a strict
conditional with a necessarily false antecedent or a necessarily true consequent
is true. Moreover, any true strict conditional is necessarily true, and any false
strict conditional is necessarily false. In other words, we have
ϕ ϕ J ψ (48.26)
¬ ψ ϕ J ψ (48.27)
ϕ J ψ ( ϕ J ψ ) (48.28)
¬( ϕ J ψ) ¬( ϕ J ψ) (48.29)
These are not problems if you think of J as “implies.” Logical entailment rela-
tionships are, after all, mathematical facts and so can’t be contingent. But they
do raise issues if you want to use J as a logical connective that is supposed to
capture “if . . . then . . . ,” especially the last two. For surely there are “if . . . then
. . . ” statements that are contingently true or contingently false—in fact, they
generally are neither necessary nor impossible.
48.4 Counterfactuals
A very common and important form of “if . . . then . . . ” constructions in En-
glish are built using the past subjunctive form of to be: “if it were the case that
. . . then it would be the case that . . . ” Because usually the antecedent of such
a conditional is false, i.e., counter to fact, they are called counterfactual con-
ditionals (and because they use the subjunctive form of to be, also subjunctive
conditionals. They are distinguished from indicative conditionals which take
the form of “if it is the case that . . . then it is the case that . . . ” Counterfac-
tual and indicative conditionals differ in truth conditions. Consider Adams’s
famous example:
The first is indicative, the second counterfactual. The first is clearly true: we
know JFK was killed by someone, and if that someone wasn’t (contrary to the
Warren Report) Lee Harvey Oswald, then someone else killed JFK. The second
one says something different. It claims that if Oswald hadn’t killed Kennedy,
i.e., if the Dallas shooting had been avoided or had been unsuccessful, history
would have subsequently unfolded in such a way that another assassination
would have been successful. In order for it to be true, it would have to be the
case that powerful forces had conspired to ensure JFK’s death (as many JFK
conspiracy theorists believe).
It is a live debate whether the indicative conditional is correctly captured
by the material conditional, in particular, whether the paradoxes of the ma-
terial conditional can be “explained” in a way that is compatible with it giv-
ing the truth conditions for English indicative conditionals. By contrast, it
is uncontroversial that counterfactual conditionals cannot be symbolized cor-
rectly by the material conditionals. That is clear because, even though gener-
ally the antecedents of counterfactuals are false, not all counterfactuals with
false antecedents are true—for instance, if you believe the Warren Report, and
there was no conspiracy to assassinate JFK, then Adams’s counterfactual con-
ditional is an example.
Counterfactual conditionals play an important role in causal reasoning: a
prime example of the use of counterfactuals is to express causal relationships.
E.g., striking a match causes it to light, and you can express this by saying
“if this match were struck, it would light.” Material, and generally indicative
conditionals, cannot be used to express this: “the match is struck → the match
lights” is true if the match is never struck, regardless of what would happen
if it were. Even worse, “the match is struck → the match turns into a bouquet
of flowers” is also true if it is never struck, but the match would certainly not
turn into a bouquet of flowers if it were struck.
Problems
Problem 48.1. Give S5-counterexamples to the entailment relations which do
not hold for the strict conditional, i.e., for:
1. ¬ p 2 ( p → q)
2. q 2 ( p → q)
3. ¬( p → q) 2 p ∧ ¬q
4. 2 ( p → q) ∨ (q → p)
Problem 48.2. Show that the valid entailment relations hold for the strict con-
ditional by giving S5-proofs of:
1. ( ϕ → ψ) ¬ ϕ ∨ ψ
2. ϕ ∧ ¬ψ ¬( ϕ → ψ)
3. ϕ, ( ϕ → ψ) ψ
4. ( ϕ → ψ), ( ϕ → χ) ( ϕ → (ψ ∧ χ))
5. ( ϕ → ψ) (( ϕ ∧ χ) → ψ)
6. ( ϕ → ψ), (ψ → χ) ( ϕ → χ)
7. ( ϕ → ψ) (¬ψ → ¬ ϕ)
8. (¬ψ → ¬ ϕ) ( ϕ → ψ)
1. ¬ψ ϕ J ψ
2. ϕ J ψ ( ϕ J ψ)
3. ¬( ϕ J ψ) ¬( ϕ J ψ)
49.1 Introduction
Stalnaker and Lewis proposed accounts of counterfactual conditionals such
as “If the match were struck, it would light.” Their accounts were propos-
als for how to properly understand the truth conditions for such sentences.
The idea behind both proposals is this: to evaluate whether a counterfactual
conditional is true, we have to consider those possible worlds which are min-
imally different from the way the world actually is to make the antecedent
true. If the consequent is true in these possible worlds, then the counterfac-
tual is true. For instance, suppose I hold a match and a matchbook in my
hand. In the actual world I only look at them and ponder what would hap-
pen if I were to strike the match. The minimal change from the actual world
where I strike the match is that where I decide to act and strike the match. It
is minimal in that nothing else changes: I don’t also jump in the air, striking
the match doesn’t also light my hair on fire, I don’t suddenly lose all strength
in my fingers, I am not simultaneously doused with water in a SuperSoaker
ambush, etc. In that alternative possibility, the match lights. Hence, it’s true
that if I were to strike the match, it would light.
This intuitive account can be paired with formal semantics for logics of
counterfactuals. Lewis introduced the symbol “” for the counterfactual
while Stalnaker used the symbol “>”. We’ll use , and add it as a binary
connective to propositional logic. So, we have, in addition to formulas of the
form ϕ → ψ also formulas of the form ϕ ψ. The formal semantics, like the
relational semantics for modal logic, is based on models in which formulas are
evaluated at worlds, and the satisfaction condition defining M, w ϕ ψ is
given in terms of M, w0 ϕ and M, w0 ψ for some (other) worlds w0 . Which
w0 ? Intuitively, the one(s) closest to w for which it holds that M, w0 ϕ. This
requires that a relation of “closeness” has to be included in the model as well.
Lewis introduced an instructive way of representing counterfactual situa-
tions graphically. Each possible world is at the center of a set of nested spheres
636
49.2. SPHERE MODELS
w ϕ
The closest ϕ-worlds are those worlds w0 where ϕ is satisfied which lie in the
smallest sphere around the center world w (the gray area). Intuitively, ϕ ψ
is satisfied at w if ψ is true at all closest ϕ-worlds.
1. Ow is centered on w: {w} ∈ Ow .
The intuition behind Ow is that the worlds “around” w are stratified ac-
cording to how far away they are from w. The innermost sphere is just w by
itself, i.e., the set {w}: w is closer to w than the worlds in any other sphere. If
S ( S0 , then the worlds in S0 \ S are further way from w than the worlds in S:
S0 \ S is the “layer” between the S and the worlds outside of S0 . In particular,
we have to think of the spheres as containing all the worlds within their outer
surface; they are not just the individual layers.
w1 w7
w5
w p
w6
w2
w3
w4
1. For all u ∈
S
Ow , M, u 1 χ, or
2. For some S ∈ Ow ,
w ϕ
w ϕ
w ϕ
w ϕ
so M, v 1 ϕ ψ.
u v
w1
w
w2
q
Example 49.3. The sphere semantics invalidates the inference, i.e., we have
p r 2 ( p ∧ q) r. Consider the model M = hW, O, V i where W =
{w, w1 , w2 }, Ow = {{w}, {w, w1 }, {w, w1 , w2 }}, V ( p) = {w1 , w2 }, V (q) =
{w2 }, and V (r ) = {w1 }. There is a p-admitting sphere S = {w, w1 } and p → r
is true at all worlds in it, so M, w p r. There is also a ( p ∧ q)-admitting
sphere S0 = {w, w1 , w2 } but M, w2 1 ( p ∧ q) → r, so M, w 1 ( p ∧ q) r (see
??).
49.5 Transitivity
For the material conditional, the chain rule holds: ϕ → ψ, ψ → χ ϕ → χ.
In other words, the material conditional is transitive. Is the same true for
counterfactuals? Consider the following example due to Stalnaker.
If Hoover had been born (at the same time he actually did), not in the United
States, but in Russia, he would have grown up in the Soviet Union and become
a Communist (let’s assume). So the first premise is true. Likewise, the second
premise, considered in isolation is true. The conclusion, however, is false:
in all likelihood, Hoover would have been a fervent Communist if he had
been born in the USSR, and not been a traitor (to his country). The intuitive
assignment of truth values is borne out by the Stalnaker-Lewis account. The
closest possible world to ours with the only change being Hoover’s place of
birth is the one where Hoover grows up to be a good citizen of the USSR.
This is the closest possible world where the antecedent of the first premise
and of the conclusion is true, and in that world Hoover is a loyal member of
the Communist party, and so not a traitor. To evaluate the second premise, we
have to look at a different world, however: the closest world where Hoover is
a Communist, which is one where he was born in the United States, turned,
and thus became a traitor.1
Example 49.4. The sphere semantics invalidates the inference, i.e., we have
p q, q r 2 p r. Consider the model M = hW, O, V i where W =
{w, w1 , w2 }, Ow = {{w}, {w, w1 }, {w, w1 , w2 }}, V ( p) = {w2 }, V (q) = {w1 , w2 },
and V (r ) = {w1 }. There is a p-admitting sphere S = {w, w1 , w2 } and q → q is
true at all worlds in it, so M, w p q. There is also a q-admitting sphere
S0 = {w, w1 } and M 1 q → r is true at all worlds in it, so M, w q r. How-
ever, the p-admitting sphere {w, w1 , w2 } contains a world, namely w2 , where
M, w2 1 p → r.
49.6 Contraposition
Material and strict conditionals are equivalent to their contrapositives. Coun-
terfactuals are not. Here is an example due to Kratzer:
cal and political assumptions, e.g., that it is possible that Hoover could have been born to Russian
parents, or that Communists in the US of the 1950s were traitors to their country.
¬q
q
w w1
w2
p
¬p
The first sentence is true: humans don’t live hundreds of years. The second
is clearly false: if Goethe weren’t dead now, he would be still alive, and so
couldn’t have died in 1832.
Problems
Problem 49.1. Find a convincing, intuitive example for the failure of transi-
tivity of counterfactuals.
Hoover’s being born in Russia is a more remote possibility than him being a
Communist?
Methods
645
CHAPTER 49. MINIMAL CHANGE SEMANTICS
Proofs
50.1 Introduction
Based on your experiences in introductory logic, you might be comfortable
with a proof system—probably a natural deduction or Fitch style proof sys-
tem, or perhaps a proof-tree system. You probably remember doing proofs
in these systems, either proving a formula or show that a given argument is
valid. In order to do this, you applied the rules of the system until you got
the desired end result. In reasoning about logic, we also prove things, but in
most cases we are not using a proof system. In fact, most of the proofs we
consider are done in English (perhaps, with some symbolic language thrown
in) rather than entirely in the language of first-order logic. When constructing
such proofs, you might at first be at a loss—how do I prove something without
a proof system? How do I start? How do I know if my proof is correct?
Before attempting a proof, it’s important to know what a proof is and how
to construct one. As implied by the name, a proof is meant to show that some-
thing is true. You might think of this in terms of a dialogue—someone asks
you if something is true, say, if every prime other than two is an odd number.
To answer “yes” is not enough; they might want to know why. In this case,
you’d give them a proof.
In everyday discourse, it might be enough to gesture at an answer, or give
an incomplete answer. In logic and mathematics, however, we want rigorous
proof—we want to show that something is true beyond any doubt. This means
that every step in our proof must be justified, and the justification must be
cogent (i.e., the assumption you’re using is actually assumed in the statement
of the theorem you’re proving, the definitions you apply must be correctly
applied, the justifications appealed to must be correct inferences, etc.).
Usually, we’re proving some statement. We call the statements we’re prov-
ing by various names: propositions, theorems, lemmas, or corollaries. A
proposition is a basic proof-worthy statement: important enough to record,
but perhaps not particularly deep nor applied often. A theorem is a signifi-
647
CHAPTER 50. PROOFS
cant, important proposition. Its proof often is broken into several steps, and
sometimes it is named after the person who first proved it (e.g., Cantor’s The-
orem, the Löwenheim-Skolem theorem) or after the fact it concerns (e.g., the
completeness theorem). A lemma is a proposition or theorem that is used to
in the proof of a more important result. Confusingly, sometimes lemmas are
important results in themselves, and also named after the person who intro-
duced them (e.g., Zorn’s Lemma). A corollary is a result that easily follows
from another one.
A statement to be proved often contains some assumption that clarifies
about which kinds of things we’re proving something. It might begin with
“Let ϕ be a formula of the form ψ → χ” or “Suppose Γ ` ϕ” or something
of the sort. These are hypotheses of the proposition, theorem, or lemma, and
you may assume these to be true in your proof. They restrict what we’re
proving about, and also introduce some names for the objects we’re talking
about. For instance, if your proposition begins with “Let ϕ be a formula of the
form ψ → χ,” you’re proving something about all formulas of a certain sort
only (namely, conditionals), and it’s understood that ψ → χ is an arbitrary
conditional that your proof will talk about.
tant point, and it is worth looking at in a bit more detail. Definitions are used
to abbreviate properties and relations so we can talk about them more suc-
cinctly. The introduced abbreviation is called the definiendum, and what it
abbreviates is the definiens. In proofs, we often have to go back to how the
definiendum was introduced, because we have to exploit the logical structure
of the definiens (the long version of which the defined term is the abbrevia-
tion) to get through our proof. By unpacking definitions, you’re ensuring that
you’re getting to the heart of where the logical action is.
We’ll start with an example. Suppose you want to prove the following:
In order to even start the proof, we need to know what it means for two sets
to be identical; i.e., we need to know what the “=” in that equation means for
sets. Sets are defined to be identical whenever they have the same elements.
So the definition we have to unpack is:
and the same set, even though we use different letters for it on the left and the right side. But the
ways in which that set is picked out may be different, and that makes the definition non-trivial.
Proposition 50.3. For any sets X and Y: (a) for every x, if x ∈ X or x ∈ Y, then
x ∈ Y or x ∈ X, and (b) for every x, if x ∈ Y or x ∈ X, then x ∈ X or x ∈ Y.
our proof will have the form: (a) prove that every element of U is an element
of V; (b) every element of V is an element of U; (c) therefore, from (a) and (b)
by definition of =, U = V. But we would usually not write it this way. Instead
we might write something like,
Using a Conjunction
Perhaps the simplest inference pattern is that of drawing as conclusion one of
the conjuncts of a conjunction. In other words: if we have assumed or already
proved that p and q, then we’re entitled to infer that p (and also that q). This is
such a basic inference that it is often not mentioned. For instance, once we’ve
unpacked the definition of U = V we’ve established that every element of U is
an element of V and vice versa. From this we can conclude that every element
of V is an element of U (that’s the “vice versa” part).
Proving a Conjunction
Sometimes what you’ll be asked to prove will have the form of a conjunc-
tion; you will be asked to “prove p and q.” In this case, you simply have
to do two things: prove p, and then prove q. You could divide your proof
into two sections, and for clarity, label them. When you’re making your first
notes, you might write “(1) Prove p” at the top of the page, and “(2) Prove q”
in the middle of the page. (Of course, you might not be explicitly asked to
prove a conjunction but find that your proof requires that you prove a con-
junction. For instance, if you’re asked to prove that U = V you will find that,
after unpacking the definition of =, you have to prove: every element of U is
an element of V and every element of V is an element of U).
Proving a Disjunction
When what you are proving takes the form of a disjunction (i.e., it is an state-
ment of the form “p or q”), it is enough to show that one of the disjuncts is true.
However, it basically never happens that either disjunct just follows from the
assumptions of your theorem. More often, the assumptions of your theorem
are themselves disjunctive, or you’re showing that all things of a certain kind
have one of two properties, but some of the things have the one and others
have the other property. This is where proof by cases is useful (see below).
Conditional Proof
Many theorems you will encounter are in conditional form (i.e., show that if
p holds, then q is also true). These cases are nice and easy to set up—simply
assume the antecedent of the conditional (in this case, p) and prove the con-
clusion q from it. So if your theorem reads, “If p then q,” you start your proof
with “assume p” and at the end you should have proved q.
Conditionals may be stated in different ways. So instead of “If p then q,”
a theorem may state that “p only if q,” “q if p,” or “q, provided p.” These all
mean the same and require assuming p and proving q from that assumption.
Recall that a biconditional (“p if and only if (iff) q”) is really two conditionals
put together: if p then q, and if q then p. All you have to do, then, is two
instances of conditional proof: one for the first conditional and another one
for the second. Sometimes, however, it is possible to prove an “iff” statement
by chaining together a bunch of other “iff” statements so that you start with
“p” an end with “q”—but in that case you have to make sure that each step
really is an “iff.”
Universal Claims
Using a universal claim is simple: if something is true for anything, it’s true
for each particular thing. So if, say, the hypothesis of your proof is X ⊆ Y, that
means (unpacking the definition of ⊆), that, for every x ∈ X, x ∈ Y. Thus, if
you already know that z ∈ X, you can conclude z ∈ Y.
Proving a universal claim may seem a little bit tricky. Usually these state-
ments take the following form: “If x has P, then it has Q” or “All Ps are Qs.”
Of course, it might not fit this form perfectly, and it takes a bit of practice to
figure out what you’re asked to prove exactly. But: we often have to prove
that all objects with some property have a certain other property.
The way to prove a universal claim is to introduce names or variables, for
the things that have the one property and then show that they also have the
other property. We might put this by saying that to prove something for all Ps
you have to prove it for an arbitrary P. And the name introduced is a name
for an arbitrary P. We typically use single letters as these names for arbitrary
things, and the letters usually follow conventions: e.g., we use n for natural
numbers, ϕ for formulas, X for sets, f for functions, etc.
The trick is to maintain generality throughout the proof. You start by as-
suming that an arbitrary object (“x”) has the property P, and show (based only
on definitions or what you are allowed to assume) that x has the property Q.
Because you have not stipulated what x is specifically, other that it has the
property P, then you can assert that all every P has the property Q. In short,
x is a stand-in for all things with property P.
Proof by Cases
Suppose you have a disjunction as an assumption or as an already established
conclusion—you have assumed or proved that p or q is true. You want to
prove r. You do this in two steps: first you assume that p is true, and prove r,
then you assume that q is true and prove r again. This works because we
assume or know that one of the two alternatives holds. The two steps establish
that either one is sufficient for the truth of r. (If both are true, we have not one
but two reasons for why r is true. It is not necessary to separately prove that
r is true assuming both p and q.) To indicate what we’re doing, we announce
that we “distinguish cases.” For instance, suppose we know that x ∈ Y ∪ Z.
Y ∪ Z is defined as { x : x ∈ Y or x ∈ Z }. In other words, by definition, x ∈ Y
or x ∈ Z. We would prove that x ∈ X from this by first assuming that x ∈ Y,
and proving x ∈ X from this assumption, and then assume x ∈ Z, and again
prove x ∈ X from this. You would write “We distinguish cases” under the
assumption, then “Case (1): x ∈ Y” underneath, and “Case (2): x ∈ Z halfway
down the page. Then you’d proceed to fill in the top half and the bottom half
of the page.
Proof by cases is especially useful if what you’re proving is itself disjunc-
tive. Here’s a simple example:
have to go into all this detail when you write down your own proofs.
Since x ∈ X, X 6= ∅.
you want to use it in your proof, you can just pretend that you have a name
for one of the things which your hypothesis says exist. Since X contains at
least one thing, there are things to which that name might refer. You might of
course not be able to pick one out or describe it further (other than that it is
∈ X). But for the purpose of the proof, you can pretend that you have picked
it out and give a name to it. It’s important to pick a name that you haven’t
already used (or that appears in your hypotheses), otherwise things can go
wrong. In your proof, you indicate this by going from “for some x, x ∈ X” to
“Let a ∈ X.” Now you can reason about a, use some other hypotheses, etc.,
until you come to a conclusion, p. If p no longer mentions a, p is independent
of the asusmption that a ∈ X, and you’ve shown that it follows just from the
assumption “for some x, x ∈ X.”
Let a ∈ X.
It’s maybe good practice to keep bound variables like “x” separate from
hypothtical names like a, like we did. In practice, however, we often don’t
and just use x, like so:
However, when you do this, you have to be extra careful that you use different
x’s and y’s for different existential claims. For instance, the following is not a
correct proof of “If X 6= ∅ and Y 6= ∅ then X ∩ Y 6= ∅” (which is not true).
Can you spot where the incorrect step occurs and explain why the result does
not hold?
50.5 An Example
Our first example is the following simple fact about unions and intersections
of sets. It will illustrate unpacking definitions, proofs of conjunctions, of uni-
versal claims, and proof by cases.
This completes the first case of the proof by cases. Now we want
to derive the conclusion in the second case, where z ∈ Y ∩ Z.
Again, we are working with the intersection of two sets. Let’s ap-
ply the definition of ∩:
So, if z ∈ X ∪ (Y ∩ Z ) then z ∈ ( X ∪ Y ) ∩ ( X ∪ Z ).
Now we just want to show the other direction, that every element
of ( X ∪ Y ) ∩ ( X ∪ Z ) is an element of X ∪ (Y ∩ Z ). As before, we
prove this universal claim by assuming we have an arbitrary ele-
ment of the first set and show it must be in the second set. Let’s
state what we’re about to do.
Now for the second case, z ∈ Y. Here we’ll unpack the second ∪
and do another proof-by-cases:
Ok, this was a bit weird. We didn’t actually need the assumption
that z ∈ Y for this case, but that’s ok.
So, if z ∈ ( X ∪ Y ) ∩ ( X ∪ Z ) then z ∈ X ∪ (Y ∩ Z ).
We’ve unpacked all the definitions that are given to us in the as-
sumption. Now we can move onto the conclusion. We want to
show that X ∪ ( Z \ X ) = Z, and so we set up a proof similarly
to the last example: we show that every element of X ∪ ( Z \ X ) is
also an element of Z and, conversely, every element of Z is an ele-
ment of X ∪ ( Z \ X ). We can shorten this to: X ∪ ( Z \ X ) ⊆ Z and
Z ⊆ X ∪ ( Z \ X ). (Here we’re doing the opposite of unpacking a
definition, but it makes the proof a bit easier to read.) Since this is
a conjunction, we have to prove both parts. To show the first part,
i.e., that every element of X ∪ ( Z \ X ) is also an element of Z, we
assume that z ∈ X ∪ ( Z \ X ) for an arbitrary z and show that z ∈ Z.
By the definition of ∪, we can conclude that z ∈ X or z ∈ Z \ X
from z ∈ X ∪ ( Z \ X ). You should now be getting the hang of this.
Here we’ve used the fact recorded earlier which followed from the
hypothesis of the proposition that X ⊆ Z. The first case is com-
plete, and we turn to the second case, z ∈ ( Z \ X ). Recall that
Z \ X denotes the difference of the two sets, i.e., the set of all ele-
ments of Z which are not elements of X. But any element of Z not
in X is in particular an element of Z.
Great, we’ve proved the first direction. Now for the second direc-
tion. Here we prove that Z ⊆ X ∪ ( Z \ X ). So we assume that
z ∈ Z and prove that z ∈ X ∪ ( Z \ X ).
Either z ∈ X or z ∈
/ X. In the former case, z ∈ X ∪ ( Z \ X ). In the latter case,
z ∈ Z and z ∈
/ X, so z ∈ Z \ X. But then z ∈ X ∪ ( Z \ X ).
q is true and proving ¬ p from it. If you prove ¬ p by contradiction, that means
assuming p in addition to q. If you can prove ¬q from p, you have shown that
the assumption p leads to something that contradicts your other assumption q,
since q and ¬q cannot both be true. Of course, you have to use other inference
patterns in your proof of the contradiction, as well as unpacking definitions.
Let’s consider an example.
Proposition 50.10. If X ⊆ Y and Y = ∅, then X has no elements.
X ∩ (X ∪ Y) = X
This is the first half of the proof of the identity: it estabishes that if an
arbitrary z is an element of the left side, it is also an element of the right, i.e.,
X ∩ ( X ∪ Y ) ⊆ X. Assume that z ∈ X ∩ ( X ∪ Y ). Since z is an element of
the intersection of two sets iff it is an element of both sets, we can conclude
that z ∈ X and also z ∈ X ∪ Y. In particular, z ∈ X, which is what we
wanted to show. Since that’s all that has to be done for the first half, we know
that the rest of the proof must be a proof of the second half, i.e., a proof that
X ⊆ X ∩ ( X ∪ Y ).
2. Talk to your classmates. You are not alone. Others in the class may also
struggle—but the may struggle with different things. Talking it out with
your peers can give you a different perspective on the problem that
might lead to a breakthrough. Of course, don’t just copy their solution:
ask them for a hint, or explain where you get stuck and ask them for the
next step. And when you do get it, reciprocate. Helping someone else
along, and explaining things will help you understand better, too.
3. Ask for help. You have many resources available to you—your instructor
and teaching assistant are there for you and want you to succeed. They
should be able to help you work out a problem and identify where in
the process you’re struggling.
4. Take a break. If you’re stuck, it might be because you’ve been staring at the
problem for too long. Take a short break, have a cup of tea, or work on
a different problem for a while, then return to the problem with a fresh
mind. Sleep on it.
Notice how these strategies require that you’ve started to work on the
proof well in advance? If you’ve started the proof at 2am the day before it’s
due, these might not be so helpful.
This might sound like doom and gloom, but solving a proof is a challenge
that pays off in the end. Some people do this as a career—so there must be
something to enjoy about it. Like basically everything, solving problems and
doing proofs is something that requires practice. You might see classmates
who find this easy: they’ve probably just had lots of practice already. Try not
to give in too easily.
If you do run out of time (or patience) on a particular problem: that’s ok. It
doesn’t mean you’re stupid or that you will never get it. Find out (from your
instructor or another student) how it is done, and identify where you went
wrong or got stuck, so you can avoid doing that the next time you encounter
a similar issue. Then try to do it without looking at the solution. And next
time, start (and ask for help) earlier.
Motivational Videos
Feel like you have no motivation to do your homework? Feeling down? These
videos might help!
• https://www.youtube.com/watch?v=ZXsQAXx_ao0
• https://www.youtube.com/watch?v=BQ4yd2W50No
• https://www.youtube.com/watch?v=StTqXEQ2l-Y
Problems
Problem 50.1. Suppose you are asked to prove that X ∩ Y 6= ∅. Unpack all
the definitions occuring here, i.e., restate this in a way that does not mention
“∩”, “=”, or “∅.
Induction
51.1 Introduction
668
51.2. INDUCTION ON N
51.2 Induction on N
In its simplest form, induction is a technique used to prove results for all nat-
ural numbers. It uses the fact that by starting from 0 and repeatedly adding 1
we eventually reach every natural number. So to prove that something is true
for every number, we can (1) establish that it is true for 0 and (2) show that
whenever it is true for a number n, it is also true for the next number n + 1. If
we abbreviate “number n has property P” by P(n), then a proof by induction
that P(n) for all n ∈ N consists of:
To make this crystal clear, suppose we have both (1) and (2). Then (1) tells us
that P(0) is true. If we also have (2), we know in particular that if P(0) then
P(0 + 1), i.e., P(1). (This follows from the general statement “for any n, if P(n)
then P(n + 1)” by putting 0 for n. So by modus ponens, we have that P(1).
From (2) again, now taking 1 for n, we have: if P(1) then P(2). Since we’ve
just established P(1), by modus ponens, we have P(2). And so on. For any
number k, after doing this k steps, we eventually arrive at P(k). So (1) and (2)
together establish P(k ) for any k ∈ N.
Let’s look at an example. Suppose we want to find out how many different
sums we can throw with n dice. Although it might seem silly, let’s start with
0 dice. If you have no dice there’s only one possible sum you can “throw”:
no dots at all, which sums to 0. So the number of different possible throws
is 1. If you have only one die, i.e., n = 1, there are six possible values, 1
through 6. With two dice, we can throw any sum from 2 through 12, that’s
11 possibilities. With three dice, we can throw any number from 3 to 18, i.e.,
16 different possibilities. 1, 6, 11, 16: looks like a pattern: maybe the answer
is 5n + 1? Of course, 5n + 1 is the maximum possible, because there are only
5n + 1 numbers between n, the lowest value you can throw with n dice (all
1’s) and 6n, the highest you can throw (all 6’s).
Theorem 51.1. With n dice one can throw all 5n + 1 possible values between n and
6n.
Proof. Let P(n) be the claim: “It is possible to throw any number between n
and 6n using n dice.” To use induction, we prove:
1. The induction basis P(1), i.e., with just one die, you can throw any num-
ber between 1 and 6.
(1) Is proved by inspecting a 6-sided die. It has all 6 sides, and every num-
ber between 1 and 6 shows up one on of the sides. So it is possible to throw
any number between 1 and 6 using a single die.
To prove (2), we assume the antecedent of the conditional, i.e., P(k). This
assumption is called the inductive hypothesis. We use it to prove P(k + 1). The
hard part is to find a way of thinking about the possible values of a throw of
k + 1 dice in terms of the possible values of throws of k dice plus of throws of
the extra k + 1-st die—this is what we have to do, though, if we want to use
the inductive hypothesis.
The inductive hypothesis says we can get any number between k and 6k
using k dice. If we throw a 1 with our (k + 1)-st die, this adds 1 to the total.
So we can throw any value between k + 1 and 6k + 1 by throwing 5 dice and
then rolling a 1 with the (k + 1)-st die. What’s left? The values 6k + 2 through
6k + 6. We can get these by rolling k 6s and then a number between 2 and 6
with our (k + 1)-st die. Together, this means that with k + 1 dice we can throw
any of the numbers between k + 1 and 6(k + 1), i.e., we’ve proved P(k + 1)
using the assumption P(k), the inductive hypothesis.
s0 = 0
s n +1 = s n + ( n + 1 )
s0 = 0,
s1 = s0 + 1 = 1,
s2 = s1 + 2 = 1+2 = 3
s3 = s2 + 3 = 1 + 2 + 3 = 6, etc.
Proof. We have to prove (1) that s0 = 0 · (0 + 1)/2 and (2) if sn = n(n + 1)/2
then sn+1 = (n + 1)(n + 2)/2. (1) is obvious. To prove (2), we assume the
inductive hypothesis: sn = n(n + 1)/2. Using it, we have to show that sn+1 =
(n + 1)(n + 2)/2.
What is sn+1 ? By the definition, sn+1 = sn + (n + 1). By inductive hypoth-
esis, sn = n(n + 1)/2. We can substitute this into the previous equation, and
n ( n + 1)
s n +1 = + ( n + 1) =
2
n ( n + 1) 2( n + 1)
= + =
2 2
n ( n + 1) + 2( n + 1)
= =
2
(n + 2)(n + 1)
= .
2
The important lesson here is that if you’re proving something about some
inductively defined sequence an , induction is the obvious way to go. And
even if it isn’t (as in the case of the possibilities of dice throws), you can use
induction if you can somehow relate the case for n + 1 to the case for n.
This variant is useful if establishing the claim for n can’t be made to just
rely on the claim for n − 1 but may require the assumption that it is true for
one or more l < n.
Definition 51.3 (Nice terms). The set of nice terms is inductively defined as
follows:
This definition tells us that something counts as a nice term iff it can be
constructed according to the two conditions (1) and (2) in some finite number
of steps. In the first step, we construct all nice terms just consisting of letters
by themselves, i.e.,
a, b, c, d
In the second step, we apply (2) to the terms we’ve constructed. We’ll get
for all combinations of two letters. In the third step, we apply (2) again, to any
two nice terms we’ve constructed so far. We get new nice term such as [a ◦ [a ◦
Proposition 51.4. For any n, the number of [ in a nice term of length n is < n/2.
Proof. To prove this result by (strong) induction, we have to show that the
following conditional claim is true:
If for every k < n, any parexpression of length k has k/2 [’s, then
any parexpression of length n has n/2 [’s.
To show this conditional, assume that its antecedent is true, i.e., assume that
for any k < n, parexpressions of length k contain < k/2 [’s. We call this
assumption the inductive hypothesis. We want to show the same is true for
parexpressions of length n.
So suppose t is a nice term of length n. Because parexpressions are induc-
tively defined, we have three two cases: (1) t is a letter by itself, or t is [r ◦ s]
for some nice terms r and s.
2. t is [s ◦ s0 ] for some nice terms s and s0 . Let’s let k be the length of s and
k0 be the length of s0 . Then the length n of t is k + k0 + 3 (the lengths of s
and s0 plus three symbols [, ◦, ]). Since k + k0 + 3 is always greater than
k, k < n. Similarly, k0 < n. That means that the induction hypothesis
applies to the terms s and s0 : the number m of [ in s is < k/2, and the
number of [ in s0 is < k0 /2.
k k0 k + k0 + 2 k + k0 + 3
m + m0 + 1 < + +1 = < = n/2.
2 2 2 2
In each case, we’ve shown that the number of [ in t is < n/2 (on the basis of
the inductive hypothesis). By strong induction, the proposition follows.
o (s, s0 ) =[s ◦ s0 ]
You can even think of the natural numbers N themselves as being given be an
inductive definition: the initial object is 0, and the operation is the successor
function x + 1.
In order to prove something about all elements of an inductively defined
set, i.e., that every element of the set has a property P, we must:
2. Prove that for each operation o, if the arguments have P, so does the
result.
For instance, in order to prove something about all nice terms, we would
prove that it is true about all letters, and that it is true about [s ◦ s0 ] provided
it is true of s and s0 individually.
Proposition 51.5. The number of [ equals the number of ] in any nice term t.
Proof. We use structural induction. Nice terms are inductively defined, with
letters as initial objects and the operations o for constructing new nice terms
out of old ones.
1. The claim is true for every letter, since the number of [ in a letter by itself
is 0 and the number of ] in it is also 0.
2. Suppose the number of [ in s equals the number of ], and the same is true
for s0 . The number of [ in o (s, s0 ), i.e., in [s ◦ s0 ], is the sum of the number
of [ in s and s0 . The number of ] in o (s, s0 ) is the sum of the number of
] in s and s0 . Thus, the number of [ in o (s, s0 ) equals the number of ] in
o (s, s0 ).
Proposition 51.6. Every proper initial segment of a nice term t has more [’s than ]’s.
Proof. By induction on t:
2. If t0 is [s ◦ s0 ], then t v t0 iff t = t0 , t v s, or t v s0 .
This definition, for instance, will tell us that a v [b ◦ a]. For (2) says that
a v [b ◦ a] iff a = [b ◦ a], or a v b, or a v a. The first two are false: a
clearly isn’t identical to [b ◦ a], and by (1), a v b iff a = b, which is also false.
However, also by (1), a v a iff a = a, which is true.
It’s important to note that the success of this definition depends on a fact
that we haven’t proved yet: every nice term t is either a letter by itself, or there
are uniquely determined nice terms s and s0 such that t = [s ◦ s0 ]. “Uniquely
determined” here means that if t = [s ◦ s0 ] it isn’t also = [r ◦ r 0 ] with s 6= r or
s0 6= r 0 . If this were the case, then clause (2) may come in conflict with itself:
reading t0 as [s ◦ s0 ] we might get t v t0 , but if we read t0 as [r ◦ r 0 ] we might
get not t v t0 . Before we prove that this can’t happen, let’s look at an example
where it can happen.
If t0 = s ◦ s0 , then t v t0 iff t = t0 , t v s, or t v s0 .
Proposition 51.9. Suppose t is a nice term. Then either t is a letter by itself, or there
are uniquely determined nice terms s, s0 such that t = [s ◦ s0 ].
We can also define functions inductively: e.g., we can define the function f
that maps any nice term to the maximum depth of nested [. . . ] in it as follows:
Definition 51.10. The depth of a nice term, f (t), is defined inductively as fol-
lows:
f (s) = 0 if s is a letter
f ([s ◦ s0 ] = max( f (s), f (s0 )) + 1
For instance
f ([a ◦ b]) = max( f (a), f (b)) + 1 =
= max(0, 0) + 1 = 1, and
f ([[a ◦ b] ◦ c]) = max( f ([a ◦ b]), f (c)) + 1 =
= max(1, 0) + 1 = 2.
Here, of course, we assume that s an s0 are nice terms, and make use of
the fact that every nice term is either a letter or of the form [s ◦ s0 ]. It is again
important that it can be of this form in only one way. To see why, consider
again the bracketless terms we defined earlier. The corresponding “defini-
tion” would be:
g(s) = 0 if s is a letter
g(s ◦ s0 ) = max( g(s), g(s0 )) + 1
Now consider the bracketless term a ◦ b ◦ c ◦ d. It can be read in more than
one way, e.g., as s ◦ s0 with s = a and s0 = b ◦ c ◦ d, or as r ◦ r 0 with r = a ◦ b
and r 0 = c ◦ d. Calculating g according to the first way of reading it would
give
g(s ◦ s0 ) = max( g(a), g(b ◦ c ◦ d)) + 1 =
= max(0, 2) + 1 = 3
Problems
Problem 51.1. Define the set of supernice terms by
Problem 51.2. Prove by structural induction that no nice term starts with ].
Problem 51.3. Give an inductive definition of the function l, where l (t) is the
number of symbols in the nice term t.
Problem 51.4. Prove by induction on nice terms t that f (t) < l (t) (where l (t)
is the number of symbols in t and f (t) is the depth of t as defined in ??).
History
679
Chapter 52
Biographies
Further Reading For full biographies of Cantor, see ? and ?. Cantor’s rad-
ical views are also described in the BBC Radio 4 program A Brief History of
Mathematics (?). If you’d like to hear about Cantor’s theories in rap form, see
?.
680
52.2. ALONZO CHURCH
the time, young girls were meant to be educated in arts and were not allowed
to attend college preparatory schools. However, after auditing classes at the
Universities of Göttingen and Erlangen (where her father was professor of
mathematics), Noether was eventually able to enrol as a student at Erlangen
in 1904, when their policy was updated to allow female students. She received
her doctorate in mathematics in 1907.
Despite her qualifications, Noether experienced much resistance during
her career. From 1908–1915, she taught at Erlangen without pay. During this
time, she caught the attention of David Hilbert, one of the world’s foremost
mathematicians of the time, who invited her to Göttingen. However, women
were prohibited from obtaining professorships, and she was only able to lec-
ture under Hilbert’s name, again without pay. During this time she proved
what is now known as Noether’s theorem, which is still used in theoretical
physics today. Noether was finally granted the right to teach in 1919. Hilbert’s
response to continued resistance of his university colleagues reportedly was:
“Gentlemen, the faculty senate is not a bathhouse.”
In the later 1920s, she concentrated on work in abstract algebra, and her
contributions revolutionized the field. In her proofs she often made use of
the so-called ascending chain condition, which states that there is no infinite
strictly increasing chain of certain sets. For instance, certain algebraic struc-
tures now known as Noetherian rings have the property that there are no
infinite sequences of ideals I1 ( I2 ( . . . . The condition can be generalized to
any partial order (in algebra, it concerns the special case of ideals ordered by
the subset relation), and we can also consider the dual descending chain con-
dition, where every strictly decreasing sequence in a partial order eventually
ends. If a partial order satisfies the descending chain condition, it is possible
to use induction along this order in a similar way in which we can use induc-
tion along the < order on N. Such orders are called well-founded or Noetherian,
and the corresponding proof principle Noetherian induction.
Noether was Jewish, and when the Nazis came to power in 1933, she was
dismissed from her position. Luckily, Noether was able to emigrate to the
United States for a temporary position at Bryn Mawr, Pennsylvania. During
her time there she also lectured at Princeton, although she found the univer-
sity to be unwelcoming to women (?, 81). In 1935, Noether underwent an
operation to remove a uterine tumour. She died from an infection as a result
of the surgery, and was buried at Bryn Mawr.
Further Reading For more biographical reading, see (?) and (?). ? conducted
a brief interview with Péter. For a fun read about mathematics, see Péter’s
book Playing With Infinity (?).
saw. His work on logical consequence and logical truth were written during
this time. In 1939, Tarski was visiting the United States for a lecture tour. Dur-
ing his visit, Germany invaded Poland, and because of his Jewish heritage,
Tarski could not return. His wife and children remained in Poland until the
end of the war, but were then able to emigrate to the United States as well.
Tarski taught at Harvard, the College of the City of New York, and the Insti-
tute for Advanced Study at Princeton, and finally the University of California,
Berkeley. There he founded the multidisciplinary program in Logic and the
Methodology of Science. Tarski died on October 26, 1983 at the age of 82.
Further Reading For more on Tarski’s life, see the biography Alfred Tarski:
Life and Logic (?). Tarski’s seminal works on logical consequence and truth are
available in English in (?). All of Tarski’s original works have been collected
into a four volume series, (?).
Photo Credits
691