Professional Documents
Culture Documents
Edward Nelson
Department of Mathematics
Princeton University
Copyright c _ 2011 by Edward Nelson. All rights reserved.
This book may be reproduced in whole or in part for any noncommercial purpose.
All numbers in this book are ctitious, and any resemblance to actual numbers, even or odd, is
entirely coincidental.
This is a work in progress, version of September 26, 2011.
The latest version is posted at http://www.math.princeton.edu/nelson/books.html
0
2
10 9 8 7 6 5 4 3 2 1 0
To Sarah
because you are overowing with fun and faith
Glory be to God for dappled things
For skies of couple-color as a brinded cow;
For rose-moles all in stipple upon trout that swim;
Fresh-recoal chestnut-falls; nches wings;
Landscape plotted and piecedfold, fallow, and plough;
And all trades, their gear and tackle and trim.
All things counter, original, spare, strange;
Whatever is ckle, freckl`ed (who knows how?)
With swft, slow; sweet, sour; adazzle, dm;
He fathers-forth whose beauty is past change:
Praise hm.
GERARD MANLEY HOPKINS
PART I
INCONSISTENCY
CHAPTER 1
Thesis
The aim of this work is to show that contemporary mathematics, including Peano
arithmetic, is inconsistent, to construct rm foundations for mathematics, and to begin
building on those foundations.
1. Potential versus actual innity
Let us distinguish between the concrete (i.e., the genetic in the sense of pertaining to
origins, the given, what is present) on the one hand, and on the other the formal (i.e., the
abstract, the hypothetical). All of mathematical activity is concrete, though the subject
matter is formal.
A numeral is a variable-free term of the language whose nonlogical symbols are the
constant 0 (zero) and the unary function symbol S (successor). Thus the numerals are
0, S0, SS0, SSS0, . . . .
Numerals constitute a potential innity. Given any numeral, we can construct a
new numeral by prexing it with S. Now imagine this potential innity to be completed.
Imagine the inexhaustible process of constructing numerals somehow to have been nished,
and call the result the set of all numbers, denoted by or N. Thus is thought to be an
actual innity or a completed innity. This is curious terminology, since the etymology of
innite is not nished.
As a concrete concept, the notion of numeral is clear. The attempt to formalize the
concept usually proceeds as follows:
(1) zero is a number
(2) the successor of a number is a number
(3) zero is not the successor of any number
(4) dierent numbers have dierent successors
(5) something is a number only if it is so by virtue of (1) and (2)
We shall refer to this as the usual denition. Sometimes (3) and (4) are not stated
explicitly, but it is the extremal clause (5) that is unclear. What is the meaning of by
virtue of? It is obviously circular to dene a number as something constructible by
applying (1) and (2) any number of times. We cannot characterize numbers from below,
so we attempt to characterize them from above.
7
8 CHAPTER 1. THESIS
The study of the foundations of arithmetic began in earnest with Dedekind
1
and
Peano.
2
Both of these authors gave what today would be called set-theoretic foundations
for arithmetic. In ZFC (Zermelo-Fraenkel set theory with the axiom of choice), let us write
0 for the empty set and dene the successor by
Sx = x x
where the unary function symbol (singleton) and the binary function symbol (union)
have been dened in the usual way. We dene
X is inductive 0 X & x[x X Sx X]
Then the axiom of innity of ZFC is
X[X is inductive]
and one easily proves in ZFC that there exists a unique smallest inductive set; i.e.,
!XX is inductive & Y [Y is inductive X Y ]
where the binary predicate symbol has been dened as usual. We dene the constant
to be this smallest inductive set:
= X X is inductive & Y [Y is inductive X Y ]
and we dene
x is a number x
Then the following are theorems:
(6) 0 is a number
(7) x is a number Sx is a number
(8) x is a number Sx ,= 0
(9) x is a number & y is a number & x ,= y Sx ,= Sy
These theorems are a direct expression of (1)(4) of the usual denition. But can we
express the extremal clause (5)? The induction theorem
x is a number & Y is inductive x Y
merely asserts that for any property that can be expressed in ZFC, if 0 has the property,
and if the successor of every element that has the property also has the property, then
every number has the property.
1
Richard Dedekind, Was sind und was sollen die Zahlen?, Vieweg, Braunschweig, (1888). English
translation as The nature and meaning of numbers by W. W. Beman in Richard Dedekind, Essays on the
Theory of Numbers, Open Court Publishing Company, LaSalle, Illinois. Reprinted by Dover, New York,
1963.
2
Giuseppe Peano, Arithmetices principia, nova methodo exposita, Bocca, Turin, (1889). English trans-
lation in From Frege to G odel: A source book in mathematical logic, 18791931, ed. J. van Heijenoort,
Harvard University Press, Cambridge, Massachusetts, 1967.
1. POTENTIAL VERSUS ACTUAL INFINITY 9
We cannot say, For all numbers x there exists a numeral d such that x = d since
this is a category mistake conating the formal with the concrete.
Using all the power of modern mathematics, let us try to formalize the concept of
number. Let T be any theory whose language contains the constant 0, the unary function
symbol S, and the unary predicate symbol is a number, such that (6)(9) are theorems
of T. For example, T could be the extension by denitions of ZFC described above or it
could be P (Peano arithmetic; see below) with the denition: x is a number x = x.
Have we captured the intended meaning of the extremal clause (5)? To study this
question, construct T
of T
by letting
.
The conclusion to be drawn from this argument is that it is impossible to formalize
the notion of number in such a way that the extremal clause holds.
5
Most uses of innity in mainstream mathematics involve innity as a limit of nite
objects. The situation is qualitatively dierent when it comes to the notion of truth in
arithmetic. Those who believe that Peano arithmetic must be consistent because it has
a model with universe are placing their faith in a notion of truth in that model that is
utterly beyond any nite computation.
Despite all the accumulated evidence to the contrary, mathematicians persist in be-
lieving in as a real object existing independently of any formal human construction. In a
way this is not surprising. Mathematics as a deductive discipline was invented by Pythago-
ras, possibly with some inuence from Thales. The Pythagorean religion held that all is
number, that the numbers are pre-existing and independent of human thought. Plato was
strongly inuenced by Pythagoras and has been called the greatest of the Pythagoreans.
Over two and a half millennia after Pythagoras, most mathematicians continue to hold a
religious belief in as an object existing independently of formal human construction.
Innite totalities do not exist in any sense of the word
(i.e., either really or ideally). More precisely, any mention,
or purported mention, of innite totalities is, literally,
meaningless.
ABRAHAM ROBINSON
2. Against nitism
There is obviously something inelegant about making arithmetic depend on set theory.
What today is called Peano arithmetic (P) is the theory whose nonlogical symbols are the
constant 0, the unary function symbol S, and the binary function symbols + and , and
whose nonlogical axioms are
(13) Sx ,= 0
(14) Sx = Sy x = y
(15) x + 0 = x
(16) x + Sy = S(x + y)
(17) x 0 = 0
(18) x Sy = (x y) + x
and all induction formulas
(19) A
x
(0) & x[A A
x
(Sx)] A
where A is any formula in the language of P.
5
http://frankandernest.com/cgi/view/display.pl?104-12-15
2. AGAINST FINITISM 11
The induction axiom schema (19) is usually justied as follows. Assume the basis
A
x
(0) and the induction step x[A A
x
(Sx)]. For any numeral d, a special case of the
induction step is A
x
(d) A
x
(Sd). Then we can prove A
x
(SSS0), starting with the basis
and using detachment (modus ponens) three times, and similarly we can prove A
x
(d) for
any numeral d in as many steps as there are occurrences of S in d.
This justication leaves much to be desired. The argument applies only to numerals,
and shows that there is no need at all to postulate induction for numerals. By an unspoken
conation of the genetic concept of numeral with the formal concept of number, induction
is postulated for numbers.
Induction is justied by appeal to the nitary credo: for every number x there exists
a numeral d such that x is d. It is necessary to make this precise; as someone once said, it
depends on what you mean by is. We cannot express it as a formula of arithmetic because
there exists in there exists a numeral d is a metamathematical existence assertion, not
an arithmetical formula beginning with .
Let A be a formula of P with just one free variable x such that
P
xA. By the least
number principle (which is a form of induction), there is a least number x satisfying A.
One might, thinking that every number is a numeral, assert that there exists a numeral d
such that
P
A
x
(d). But, as I learned from Simon Kochen, this does not work. The
rank of a formula is the number of occurrences of in it. Let B be the formula asserting
that there is no arithmetized proof of a contradiction all of whose formulas are of rank at
most x. Then each B
x
(d) can be proved in P by introducing a truth denition for formulas
of rank at most d. But if P is consistent then xB is not a theorem of P, by Godels second
theorem. Now let A be B xB. Then xA is a theorem of P since it is equivalent to the
tautology xB xB, but (if P is consistent) there is no numeral d such that
P
A
x
(d).
The nitary credo can be formulated precisely using the concept of the standard model
of arithmetic: for every element of N there exists a numeral d such that it can be proved
that d is equal to the name of ; but this brings us back to set theory. The nitary credo
has an innitary foundation.
The use of induction goes far beyond the application to numerals. It is used to create
new kinds of numbers (exponential, superexponential, and so forth) in the belief that they
already exist in a completed innity. If there were a completed innity N consisting of all
numbers, then the axioms of P would be true assertions about numbers and P would be
consistent.
It is not a priori obvious that P can express combinatorics, but this is well known
thanks to Godels great paper [Go31]
6
on incompleteness. As a consequence, exponentia-
tion and superexponentiation can be dened in P so that we have
(20) x 0 = S0
(21) x Sy = x (x y)
(22) x 0 = S0
(23) x Sy = x (x y)
6
Kurt G odel,
Uber formal unentscheidbare S atze der Principia Mathematica und verwanter Systeme,
Monatshefte f ur Math. und Physik, 38 (1931) 173-198. English translation in From Frege to G odel: A source
book in mathematical logic, 18791931, 596-616, ed. Jean van Heijenoort, Harvard University Press, 1967.
12 CHAPTER 1. THESIS
and similarly for primitive-recursive functions in general. For the schema of primitive
recursion to be coherent, it is necessary that the values of the functions always reduce to
a numeral, since they are dened only for 0 and iterated successors of numbers for which
they have been previously dened.
Finitists believe that primitive recursions always terminate; for example, that applying
(15)(18) and (20)(23) a sucient number of times,
SS0 SS0 SS0 SS0 SS0 SS0 SS0 SS0 SS0 SS0 SS0 SS0 SS0 SS0 SS0 SS0
reduces to a numeral. But the putative number of times these rules must be applied can
only be expressed by means of a superexponential expressionthe argument is circular.
The problem is not simply that some primitive recursions are too long. The problem is
structural: there is a sharp division between two classes of primitive recursions. This results
from work of Bellantoni and Cook [BeCo];
7
see also Bellantonis thesis [Be].
8
They indicate
that their work was strongly inuenced by previous work of Leivant, who subsequently [Le]
9
gave a more elegant form to the characterization, and it is appropriate to call the result
the BCL theorem.
While a number is being constructed by recursion, it is only potential, and when the
recursion is complete, it is actual. What Bellantoni and Cook, and Leivant, do is restrict
recursions so that they occur only on actual numbers. Then the theorem is that the class
of functions computable in this way is precisely the class of polynomial-time functions.
This is an astonishing result, since the characterization is qualitative and conceptually
motivated, saying nothing whatever about polynomials,
Bellantoni, Cook, and Leivant have revealed a profound dierence between polyno-
mial-time recursions and all other recursions. The recursions constructed by the BCL
schema enjoy a dierent ontological status from recursions in general. In the former,
recursions are performed only on objects that have already been constructed. In the
latter, for example in a superexponential recursion, one counts chickens before they are
hatched (and the chicks that they produce as well), all in the fond hope that this will
eventually take place in the completed innity by and by.
Not only is induction as a general axiom schema lacking any justication other than an
appeal to N as a completed innity, but its application to specic variable-free primitive-
recursive terms lacks a cogent justication.
We shall exhibit a superexponential recursion and prove that it does not terminate,
thus disproving Churchs Thesis from below and demonstrating that nitism is untenable.
The most extreme view, held by at least one mathematician
at a respectable university, is that eventually a contradiction
will be found even in elementary number theory.
PAUL J. COHEN
7
S. Bellantoni and S. A. Cook, A new recursion-theoretic characterization of poly-time functions,
Computational Complexity 2 (1992), 97-110, http://www.cs.toronto.edu/sacook/homepage/ptime.pdf
8
S. Bellantoni, Predicative Recursion and Computational Complexity,
ftp://ftp.cs.toronto.edu/pub/reports/theory/cs-92-264.ps.Z
9
Daniel Leivant, Ramied recurrence and computational complexity I: Word recurrence and poly-time,
in P. Cole and J. Remmel, eds., Feasible Mathematics II, Perspectives in Computer Science, Birkhauser-
Boston, (1994) 320-343.
CHAPTER 2
Logic
This chapter explains the kind of proof we shall use, but the main purpose is to discuss
informally and qualitatively some of the devices that later will be established formally in
a theory. The exposition is based on [Sh] but with greater use of special constants.
3. Languages
We use language to mean what is also called a rst-order language. The symbols
of a language are variables, logical operators, function symbols, and predicate symbols. We
use s as a syntactical variable [Sh 1.3] for symbols. Each symbol s has a number I(s),
called its index. Symbols of index 0, 1, 2, 3, and so forth, are called 0-ary, unary, binary,
ternary, and so forth. (For this reason, many writers use the neologism arity for the
index.) A concatenation s
1
s
2
. . . s
are terms, so is fu
1
. . . u
.
Note that constants are terms. We use a b c d as syntactical variables for terms.
An atomic formula is
pa
1
. . . a
(a
1
. . . a
)
for the term obtained by replacing, for all with 1 , each occurrence of x
in b
by a
. We use
4. STRUCTURES 15
A
x
1
...x
(a
1
. . . a
)
for the formula, called an instance of A, obtained by replacing, for all with 1 ,
each free occurrence of x
in A by a
is
substitutable for x
A
where x
1
, . . . , x
U
and for each -ary p in L a subset
(p) U
Thus the meaning, in a structure, of a function symbol is a function, and the meaning, in a
structure, of a predicate symbol is a predicate (i.e., a set). The elements of the universe U
are called individuals.
The functions and predicates of a structure corresponding to the function symbols
and predicate symbols of L are completely arbitrary. Recall that = does not occur in L.
The predicate assigned to it is not arbitrary; it is the diagonal of U
2
. We dene
(=) = (
1
,
2
) U
2
:
1
=
2
16 CHAPTER 2. LOGIC
Note that the rst occurrence of = here is the equality symbol and the other occurrences
are the mathematical use of =.
The meaning, in a structure, of a variable is that it denotes some individual; which
individual is arbitrary, depending on which individual is assigned to it. Let X be the set
of all variables. An assignment is a mapping : X U. The set of all assignments is U
X
.
The meaning, in a structure, of a term will depend on the individuals assigned to the
variables in it. We dene (b) as a mapping from assignments to individuals; it is the
individual denoted by b in the structure when the variables in b take the values assigned
to them by . The denition is recursive:
(x)
() = (x)
(fa
1
. . . a
() =
(f)
(a
1
)
(), . . . ,
(a
()
where I(f) = .
The meaning, in a structure, of a formula is that it is true or false, but the truth value
will depend on the individuals assigned to the variables occurring free in it. We dene
(A) to be the set of assignments satisfying it, beginning with atomic formulas:
(pa
1
. . . a
) =
U
X
:
(a
1
)
(), . . . ,
(a
()
(p)
where I(p) = .
If is an assignment and is an individual, we let
x,
(x) = and
x,
(y) = (y)
whenever y in a variable other than x. This alters so that its value at x is and leaves
the assignment of other variables unaltered. Now let W be a set of assignments. We dene
its projection by
x
W = U
X
: there exists in U such that
x,
W
This consists of all assignments that become elements of W just by changing the assignment
on x. Also, the complement of W is
W
c
= U
X
W
consisting of all assignments that are not in W.
Now we can recursively complete the denition of (A):
(A) = (A)
c
(A B) = (A) (B)
(xA) =
x
(A)
We say that an assignment satises A in case (A). This depends only on the
values that assigns to the free variables of A. Similarly, if and
() =
(b)
).
Let x
1
, . . . , x
x
1
,...,x
) in U
) =
we have (A).
Let T be the set of all assignments (for a given universe U) and let F be the empty set
of assignments. If A is closed, either (A) = T, in which case we say that A is true in ,
5. TAUTOLOGIES 17
or (A) = F, in which case we say that A is false in . We say that A is valid in in case
(A) = T; this is equivalent to saying that the closure of A is true in . Two formulas
A and B are equivalent in in case A B is valid in , which is to say that they are
satised by the same assignments; i.e., (A) = (B).
We say that L
. Let
L
for L
is an
expansion of in case it has the same universe and
in case A
1
& & A
= y
& px
1
. . . x
py
1
. . . y
or
x
1
= y
1
& & x
= y
fx
1
. . . x
= fy
1
. . . y
where p and f have index . Identity and equality axioms are valid in every structure.
A formula is a quasitautology in case it is a tautological consequence of instances of
identity and equality axioms, and A is a quasitautological consequence of A
1
, . . . , A
in
case A
1
& & A
A is a quasitautology.
THEOREM 1. The formulas
a = a
a = b b = a
a = b & b = c a = c
are quasitautologies.
Proof. The rst is an instance of an identity axiom, and the others are tautological
consequence of the instances
a = b & a = a & a = a b = a
a = a & b = c & a = b a = c
of the following equality axiom for equality
x
1
= y
1
& x
2
= y
2
& x
1
= x
2
y
1
= y
2
and of instances of identity axioms.
8. PROOFS 19
7. Special constants
Now we come to the full predicate calculus, quantiers and all. A formula of the form
xA is an instantiation, and xA is a generalization.
To each closed instantiation xA we associate a constant c
xA
, called the special
constant for xA, and xA is its subscript. We use r as a syntactical variable for special
constants. If r is the special constant for xA, its special axiom is
xA A
x
(r)
We say that u is plain in case no special constant occurs in it.
The level [Sh 4.2] of a special constant is dened recursively as follows. If A is plain,
the level of c
xA
is 1; otherwise its level is 1 plus the maximal level of the special constants
occurring in A.
Mathematicians use special constants all the time with no special mention. For exam-
ple, someone studying odd perfect numbers in the hope of showing that they do not exist
may call such a number n and proceed to derive properties of n. Then n is a special
constant. The alternative would be to enclose the entire discussion in a huge formula of
the form n[n is an odd perfect number ]. The practice is to use the same notation
for special constants as for variables, bearing in mind that the special constants are xed
throughout the discussion.
We regard special constants as logical symbols; they are a device to facilitate the
handling of quantied formulas in proofs. The nonlogical symbols are the function symbols
other than special constants and the predicate symbols other than equality; the other sym-
bols (variables, logical operators, equality, and special constants) are the logical symbols.
Semantically, let be a structure for L. Well-order the universe U of . We expand
to be a structure for the language schema obtained by adjoining all special constants,
for formulas all of whose nonlogical symbols are in L, by recursion on the level, as follows.
Let r be the special constant for xA and suppose that (r
of
strictly lower level. If there exists an individual and an assignment with (x) = such
that (A), let (r) be the least such individual; otherwise, let (r) be (0). Then the
special axioms are true in .
We dene the notion that v appears in u recursively as follows: if v occurs in u, then
v appears in u; if v occurs in the subscript of a special constant that appears in u, then
v appears in u. (That is, v appears in u if and only if it is there when all subscripts of
special constants are written out; appears in is the transitive closure of occurs in or
occurs in the subscript of a special constant occurring in.)
Generalizations are seldom or ever true,
and are usually utterly inaccurate.
AGATHA CHRISTIE
8. Proofs
Lemma 1 of [Sh 4.3] is the key to a notion of proof that is fully formal and yet close
to rigorous arguments in mathematical practice. This section is devoted to an explication
of this notion.
20 CHAPTER 2. LOGIC
We shall say that a theory is a concatenation of formulas, and use T as a syntactical
variable for theories. The formulas occurring in T are the nonlogical axioms of T. (One of
the virtues of prex notation is that an expression can be a concatenation of formulas in
only one way, so we can dene a theory to be an expression rather than a nite sequence
of formulas.) In other words, all our theories are nitely axiomatized. If innitely many
nonlogical axioms are specied in some way, we call this a theory schema. The language
of T, denoted by L(T), is the concatenation of the nonlogical symbols occurring in T,
together with 0. A theory is open in case all its nonlogical axioms are open and plain. By
T[A] is meant the theory obtained from T by adjoining A as a new nonlogical axiom.
A substitution axiom is A
x
(a) xA. (Substitution axioms are valid in every struc-
ture.) By a substitution formula, identity formula, or equality formula we mean respectively
a closed instance of a substitution axiom, identity axiom, or equality axiom.
Given a theory T, we say that a formula is in (T) in case it is a formula of one of
the following ve forms:
(24) special axiom: xA A
x
(r), r the special constant for xA
(25) substitution formula: A
x
(a) xA
(26) identity formula
(27) equality formula
(28) closed instance of a nonlogical axiom of T
We call (24)(27) logical axioms.
Shoenelds Lemma 1 asserts that if there is a proof of A in T and A
is a closed
instance of A, then A
T
A.
Proof. Let u
+
be obtained by replacing, everywhere it appears, each atomic formula
beginning with a predicate symbol not in L(T[A]) by 0 = 0 and then replacing each term
beginning with a function symbol that is not in L(T[A]) by 0. Then u
+
is an expression
of L(T[A]) and B B
+
is a homomorphism. If B is a special axiom, substitution axiom,
identity formula, or closed instance of a nonlogical axiom of T, so is B
+
. If B is an equality
9. SOME LOGICAL THEOREMS 21
formula for a symbol of L(T[A]), so is B
+
, and otherwise it is a tautological consequence
of the identity formula 0 = 0.
This is a pattern of proof that will often be employed. We construct u u
+
such that
B B
+
is a homomorphism, and so preserves tautological consequence. Then we need
only examine formulas (24)-(28) and verify whatever properties are stated in the theorem
under consideration.
A theory T
1
is an extension of the theory T in case every nonlogical axiom of T
1
is a
theorem of T. It is a conservative extension in case every formula of L(T) that is a theorem
of T
1
is a theorem of T. A theory T is consistent in case 0 ,= 0 is not a theorem of T.
Clearly, if T
1
is a conservative extension of T and T is consistent, so is T
1
.
THEOREM 3. If
T
A then T[A] is a conservative extension of T.
Proof. Let the closure of A be x
1
. . . x
= b
& A
x
1
...x
(a
1
. . . a
) A
x
1
...x
(b
1
. . . b
)
is a logical theorem.
Proof. The proof is by induction on the height of A (the number of occurrences of
logical operators in A). If A is atomic, (29) is an equality formula. If A is B, the result
holds by the induction hypothesis, using Theorem 1 to reverse the role of the as and bs.
If A is B C, the result holds by the induction hypothesis. If A is xB, let r be the special
constant for xB
x
1
...x
(a
1
. . . a
= b
& B
xx
1
...x
(ra
1
. . . a
) B
xx
1
...x
(rb
1
. . . b
).
But (29) is a tautological consequence of this, the special axiom for r, and the substitution
formula B
xx
1
...x
(rb
1
. . . b
) xB
x
1
...x
(b
1
. . . b
).
Let the closure
A of A be x
1
. . . x
A. Let A
1
be
A and, recursively for 1 < let
A
+1
be A
(r
) where r
. Denote A
by A
, and call
this A with frozen variables.
THEOREM 5.
A A
T
A
.
Proof. x
(r
A
+1
is a tautological conse-
quence of this. The second statement holds since, by denition, A is a theorem of T if and
only if
A is.
The following is the equivalence theorem [Sh 3.4].
THEOREM 6. Let A
. If
T
B B
then
T
A A
.
Proof. By induction on the height of A, it suces to consider the cases that A is B,
B C, C B, or xB. Freezing variables, we assume that these formulas are closed. The
rst three cases hold by tautological equivalence, so suppose that A is xB, A
is xB
,
and
T
B B
. From A we have B
x
(r), where r is the special constant for xB, and so
B
x
(r) and hence xB
; that is,
T
A A
.
The negation form of a formula is obtained by pushing each repeatedly to the right
using the rules of the predicate calculus. The precise denition is complicated by the fact
that we chose, following [Sh 2.4], to regard and & as dened symbols. This is convenient
in many other contexts but a nuisance here. Recall that xA abbreviates xA and that
A & B abbreviates AB. Call an occurrence of proper in case it is not displayed
in one of these two forms. Now repeatedly make the following replacements, where the
displayed occurrences of are proper.
replace: by:
xA xA
xA xA
[A B] A & B
[A & B] A B
A A
9. SOME LOGICAL THEOREMS 23
The result of making all these replacements in the subformulas of a formula is the nega-
tion form of the formula. If A is in negation form, then every proper occurrence of
immediately precedes an atomic formula.
THEOREM 8. Let A
.
Proof. We have A A, so xA xA by the equivalence theorem, but
xA is xA. This proves the equivalence of the rst replacement in the denition
of negation form. The others are tautological equivalences, so the result holds by the
equivalence theorem.
THEOREM 9. The following are logical theorems provided that x is not free in C.
(30) xB C x[B C]
(31) C xB x[C B]
(32) xB & C x[B & C]
(33) C & xB x[C & B]
(34) xB C x[B C]
(35) C xB x[C B]
(36) xB & C x[B & C]
(37) C & xB x[C & B]
Proof. Freeze the variables in (30). For the forward direction, let r be the special
constant for xB. Then B
x
(r) C is a tautological consequence of xB C and the
special axiom for xB, and B
x
(r) C x[B C] is a substitution formula (since x is
not free in C). For the backward direction, let r
) xB. The other seven cases are similar (for xB, use the
special constant for xB).
A variant of A [Sh 3.4] is a formula obtained from A by replacing a subformula xB
by yB
x
(y), where y is not free in B, zero or more times. Variants are useful for avoiding
colliding variables. We can nd a variant of A such that no variable in u occurs bound
in A; then each term occurring in u is substitutable for each free variable of A.
Call a formula adjusted in case dierent occurrences of quantiers have dierent bound
variables and no variable occurs both free and bound. Every formula has an adjusted
variant.
The relation variant of is an equivalence relation. Semantically, variants are equiv-
alent to each other in any structure. The following is the variant theorem [Sh 3.4].
24 CHAPTER 2. LOGIC
THEOREM 10. Let A
be a variant of A. Then A A
is a logical theorem.
Proof. Freezing variables, we assume that A and A
is A, and A A is a tautology.
If A is B, so that A
is B
where B is a variant of B
, then we have B
B by the
induction hypothesis (since if B is a variant of B
, then B
is B
where B
is a variant of B and C
is a variant of
C, then A A
is a tautological consequence of B B
and C C
is x
where B
x
(r) is a logical theorem
by the induction hypothesis, and B
x
(r) A
is a
tautological consequence of these formulas.
A formula is in prenex form in case it consists of a concatenation of quantiers (the
prex) followed by an open formula (the matrix). Every formula is logically equivalent to
one in prenex form: take the negation form of an adjusted variant and replace the left hand
side of one (30)(37) by the right hand side, as often as possible. The resulting formula is
a prenex form of the formula.
The following are tautologies:
A [B & C] [A B] & [A C]
[B & C] A [B A] & [C A]
A formula is in conjunctive form in case it contains no subformula that is the left hand
side of one of these equivalences. Unlike the previous procedures, repeatedly replacing the
left hand side by the right hand side may lead to an exponentially longer formula.
A formula is in normal form in case it is closed and in prenex, negation, and conjunc-
tive form.
10. Predicate extensions
Mathematics would not get very far without the freedom to dene new concepts. Let
D be a plain formula of T and let the free variables of D, in the order of free occurrence,
be x
1
, . . . , x
. Call p
D
the predicate symbol for D; it is a predicate symbol of index I(D).
Then
(38) px
1
. . . x
D
where p is the predicate symbol for D, is the dening axiom of a predicate symbol [Sh 4.6].
The formula D is the deniens. Let T
1
be the theory obtained from T by adjoining (38)
as a new nonlogical axiom; we call T
1
a p-extension of T.
Semantically, we can expand a model [Sh 2.6] of T to a model
1
of T
1
by letting
1
(p) be
x
1
...x
(D).
10. PREDICATE EXTENSIONS 25
Dene u
+
recursively, working from right to left, by replacing each variable-free
pa
1
. . . a
everywhere it appears in u by D
x
1
...x
(a
+
1
. . . a
+
). Then A A
+
is a homo-
morphism.
THEOREM 11. Let T
1
be a p-extension of T. If
T
1
A, then
+
T
A
+
. The
theory T
1
is a conservative extension of T.
Proof. If B is a special axiom, substitution formula, identity formula, or closed instance
of a nonlogical axiom of T, so is B
+
.
If B is a closed instance of the new axiom (38), then B
+
is a tautology of the form
C C.
If B is an equality formula for a function symbol or for a predicate symbol other than
the new symbol p, so is B
+
. If B is the equality formula
a
1
= b
1
& & a
= b
& pa
1
. . . a
pb
1
. . . b
then B
+
is
a
+
1
= b
+
1
& & a
+
= b
+
& D
x
1
...x
(a
+
1
. . . a
+
) D
x
1
...x
(b
+
1
. . . b
+
)
which is a logical theorem by the equality theorem.
The last statement of the theorem holds since for a formula A of L(T), the formula A
+
is A itself.
Let L
into L is a homomorphism A A
on L
such
that each A
, choose a variant D
be D
x
1
...x
(a
1
. . . a
be A.
THEOREM 12. Let T
1
be a p-extension of T. If A is a formula of L(T
1
), its trans-
lation A
. We have
T
1
A if and only if
T
A
.
Proof. The translation A is by denition a formula of L(T). To prove that
T
1
A A
x
1
...x
(a
1
. . . a
)
Freeze the variables. Then
(40)
T
1
D
x
1
...x
(a
1
. . . a
) D
x
1
...x
(a
1
. . . a
)
by the variant theorem, and (39) is a tautological consequence of (40) and a closed instance
of the dening axiom (30).
The last statement holds since T
1
is a conservative extension of T.
26 CHAPTER 2. LOGIC
11. Function extensions
Let x
1
, . . . , x
) y = y
where y
= y D
where f is the function symbol for yD, is the dening axiom of a function symbol [Sh 4.6],
with deniens D. Let T
1
be the theory obtained from T by adjoining (41) as a new
nonlogical axiom; we call T
1
an f-extension of T.
Semantically, we can expand a model of T to a model
1
of T
1
by letting
1
(f)
be
x
1
...x
y
(D). This is a function since EC and UC are valid in .
Dene u
+
recursively, working from right to left, by replacing each variable-free
fa
1
. . . a
(a
+
1
. . . a
+
). Then
A A
+
is a homomorphism.
THEOREM 13. Let T
1
be an f-extension of T. If
T
1
A, then
+
T
A
+
. The
theory T
1
is a conservative extension of T.
Proof. If B is a special axiom, substitution formula, identity formula, or a closed
instance of a nonlogical axiom of T, so is B
+
.
If B is a closed instance of the new axiom (41), and so of the form
fa
1
. . . a
= b D
x
1
...x
y
(a
1
. . . a
b)
then B
+
is
(42) r = b
+
D
x
1
...x
y
(a
+
1
. . . a
+
b
+
)
where r is the special constant for yD
x
1
...x
(a
+
1
. . . a
+
T
D
x
1
...x
y
(a
+
1
. . . a
+
r)
Hence the forward direction of (42) holds by the equality theorem, and the backward
direction by UC.
If B is an equality formula for a predicate symbol or for a function symbol other than
the new f, so is B
+
. If B is the equality formula
a
1
= b
1
& & a
= b
fa
1
. . . a
= fb
1
. . . b
then B
+
is
(43) a
+
1
= b
+
1
& & a
+
= b
+
r = r
(a
+
1
. . . a
+
) and r
(b
+
1
. . . b
+
T
D
x
1
...x
y
(a
+
1
. . . a
+
r)
Hence, by the equality theorem,
(44)
T
a
+
1
= b
+
1
& & a
+
= b
+
D
x
1
...x
y
(b
+
1
. . . b
+
r)
By a closed instance of EC and the special axiom for r
,
(45)
T
D
x
1
...x
y
(b
+
1
. . . b
+
)
But (43) is a tautological consequence of (44), (45), and the closed instance
D
x
1
...x
y
(b
+
1
. . . b
+
r) & D
x
1
...x
y
(b
+
1
. . . b
+
) r = r
of UC.
The last statement of the theorem holds since for a formula A of L(T), the formula A
+
is A itself.
Now dene a translation A A
)
Then f does not occur in a
1
. . . a
is already
dened by recursion. Let
(47) A
be z[D
x
1
...x
y
(a
1
. . . a
z) & B
]
If A is a formula of L(T
1
), we call A
the translation of A.
THEOREM 14. Let T
1
be an f-extension of T. If A is a formula of L(T
1
), its
translation A
. We have
T
1
A if and only if
T
A
.
Proof. That A
T
1
A A
) z[D
x
1
...x
y
(a
1
. . . a
z) & B]
Freeze the variables in (48). By the variant theorem, we can then replace D
by D, so
we need to prove a closed formula of the form
(49) B
z
(fa
1
. . . a
) z[D
x
1
...x
y
(a
1
. . . a
z) & B]
(now with variable-free terms a
1
, . . . , a
). Then
(50) D
x
1
...x
z
(a
1
. . . a
fa
1
. . . a
) & B
z
(fa
1
. . . a
) z[D
x
1
...x
y
(a
1
. . . a
z) & B]
28 CHAPTER 2. LOGIC
is a substitution formula, but the rst conjunct holds by the dening axiom and an identity
formula, so we have the forward direction of (49). For the the backward direction, let r be
the special constant for z[D
x
1
...x
y
(a
1
. . . a
y
(a
1
. . . a
r) & B
z
(r)
and we have
(52) r = fa
1
. . . a
by a closed instance of UC, and thus we have the left hand side of (49).
The last statement holds since T
1
is a conservative extension of T.
For a dening axiom of the form
fx
1
. . . x
= y y = b
UC and EC are trivial, and we write the dening axiom simply as
fx
1
. . . x
= b
and call it an explicit denition.
An extension by denitions of T is a theory T
1
obtained by a nite sequence of
p-extensions and f-extensions. It is possible to join all extensions by denitions of T into
a single theory schema. Let
T be T with all dening axioms adjoined. Then we can write
T
A to avoid the cumbersome phrase A is a theorem of an extension by denitions of T.
This is one advantage of the p
D
and f
yD
notation: it makes it impossible to introduce
the same symbol with two dierent dening axioms. Another is that in the arithmetization
it will suce to arithmetize just the symbols of T; then those of
T can be arithmetized in
one benign swoop simply by recursively replacing the symbols of T in the subscripts by
their arithmetizations.
12. Default formulas
A default formula is xB r = 0, where r is the special constant for xB. They are
true in the structure of 7, and now we show that they can be used in proofs of plain
formulas.
THEOREM 15. If A is a plain formula and its closure is a tautological consequence of
formulas in (T) and of default formulas, then
T
A.
Proof. Let u u
+
be dened by replacing, everywhere it appears in u, each special
constant r for xB by the special constant r for
(53) xB [x
B
x
(x
) & x = 0]
Then (53) is a logical theorem, so
(54) xB B(r)
(55) xB r = 0
are logical theorems. The map C C
+
is a homomorphism. If C is is a special axiom,
C
+
is of the form (54), and if C is a default formula, it is of the form (55). If C is a
substitution, identity, or equality formula, so is C
+
. Finally,
A
+
is
A since A is plain.
13. RELATIVIZATION 29
13. Relativization
Let A
)
where x
1
, . . . , x
for (free A) A
(We adopt the convention that if A is closed, so that free A is the empty expression, then
(free A) A
is A
.) We call A
the relativization of A by .
Let T be a theory. We say respects f in T in case
T
(x
1
) & & (x
) (fx
1
. . . x
)
where I(f) = , and respects b in T in case
T
(x
1
) & & (x
) (b)
where x
1
, . . . , x
T
A
, and let T
be T[A]. If
T
B then
T
B
.
Proof. Let
T
B. Replace each C in by C
. If C is a nonlogical axiom of T
,
then C
preserves tautological
consequence. If C is a special axiom, identity formula, or an equality formula, then C
is
a tautological consequence of C. Hence we need only consider substitution formulas.
We use default formulas, which can be eliminated by Theorem 15. Also, by Theorem 2
we assume that is an expression of L(T). Let C be a substitution formula, of the form
D
x
(b) xD. Then C
is
(57) D
x
(b) x[(x) & D
].
Every constant occurring in the variable-free term b is either a constant e of L(T), in which
case
T
(e) by hypothesis, or it is the special constant r for a closed instantiation yD
,
in which case we have (r) by the special axiom if yD
is a plain theorem
of T, is an r-extension of T. An r-extension T
is 0 ,= 0.
A relativization is the particular case of an interpretation [Sh 4.7] in which a the-
ory is interpreted in itself with the interpretation of each nonlogical symbol being the
symbol itself. In our proof of the inconsistency of P, relativizations are the only kind of
interpretation that will be used.
An extension by denitions and relativizations, or R-extension for short, of T is a
theory T
where T
0
is T and each T
for
1 is a t-, p-, f-, or r-extension of T
1
. If A is a formula of T
, its image A
is dened recursively as follows. If T
is a t-extension, A is A; if it is a p-extension or
f-extension, A is A
where A
A, then
T
A. If T is consistent,
so is T
is locally
relativizable in T in case each theory in T
is relativizable in T.
Blind unbelief is sure to err
And scan His works in vain;
God is His own interpreter
And He will make it plain.
WILLIAM COWPER
14. Bounded formulas
Let L be a language containing a binary predicate symbol which we denote by ,
though it can be arbitrary. If x does not occur in b, we use the abbreviation
xb A for x[x b & A]
(If we unabbreviate x[x b & A] we obtain xxbA, so xb abbreviates
xxb.) We call xb a bounded quantier (for ). A formula is bounded (for )
in case every occurrence in it of x is subformula of some xb where x does not occur
in b. If x does not occur in b, we also use the abbreviation xb A for xbA. This is
bounded and is logically equivalent to x[x b A].
THEOREM 18. Let respect T and let A be a bounded formula of L(
T). Then
(58)
T
(free A) [A A
]
Consequently,
(59)
T
[(free A) A] A
is [B
is B
T
(free A) x[x b & B] x[(x) & x b & B]
from which the result follows by the induction hypothesis. This proves (58), and (59) is a
tautological consequence of it by the denition (56) of A
.
Call a p-extension of T bounded in case the deniens is bounded, and an f-extension
bounded in case EC is bounded. A bounded extension by denitions of T is a theory
obtained from T by a nite sequence of bounded p-extensions and f-extensions.
THEOREM 19. Let T
be
the translation from L(T
), A
is a
bounded formula of L(T).
Proof. The proof is by induction on the number of p-extensions and f-extensions. For
each p-extension, the result is immediate from the denition of A
in 10. Consider an
f-extension as in 11. Since EC is bounded, the deniens D is of the form y _ b & C
where y does not occur in b and C is bounded. Then the result holds by (47).
15. The consistency theorem
The Hilbert-Ackermann consistency theorem is an algorithm for eliminating quanti-
ers. We follow the account in [Sh 4.3] with some modications.
We say that A
1
, . . . , A
is a tautology; that is, in case for every truth valuation V we have V(A
) = F for some
with 1 .
THEOREM 20. Let T be an inconsistent theory. Then there is a special sequence of
formulas in (T).
Proof. Since T is inconsistent,
T
0 ,= 0. Hence 0 ,= 0 is a tautological consequence
of formulas in (T). Since 0 = 0 is in (T), the result follows.
A formula belongs to r in case it is the special axiom for r or is a substitution formula
A
x
(a) xA where r is the special constant for xA. The rank of a special constant is
the rank of its subscript, so it is at least 1. A formula is in
) or is D
y
(b) yD. Since the rank of r is and
the rank of r
) or D
y
(b). For the same reason,
it cannot occur in yD unless they are the same formula, which is impossible since r
is
not r. This proves the claim.
In the special sequence (60), replace each occurrence of each xB by B
x
(r). Since this
mapping preserves tautological consequence, the new sequence is a special sequence. The
formulas A are unaected, by the claim. Each special axiom xB B
x
(r) becomes the
tautology B
x
(r) B
x
(r), so it may be deleted. We obtain the special sequence consisting
of formulas of the form
(61) A, B
x
(a) B
x
(r)
Call (r, a) a special pair for the given special sequence in case r is in M and the
formula B
x
(a) B
x
(r) is in (61). Let u
(r,a)
be obtained from u by replacing r everywhere
it appears in u by a. Note that B
x
(r)
(r,a)
is B
x
(a) since r does not appear in B. Applying
this mapping, which preserves tautological consequence, to the special sequence (61), for
each special pair (r, a) we obtain the special sequence of formulas of the form
(62) A
(r,a)
, B
x
(a
)
(r,a)
B
x
(a)
15. THE CONSISTENCY THEOREM 33
I claim that the
(63) A, A
(r,a)
are a special sequence. For if not, there is a truth valuation V assigning T to all these
formulas. Since (62) is a special sequence, for each (r, a) there exists a
such that
V
B
x
(a
)
(r,a)
B
x
(a)
= F
Therefore for all (r, a) we have V
B
x
(a)
B
x
(a) B
x
(r)
= T,
so V assigns T to every formula in (61), which is impossible. This proves the claim. Note
that there are at most
2
formulas in (63).
We must show that each A
(r,a)
either is in
1
(T) or belongs to some r
in S. If
A is an identity or equality formula or is a closed instance of a nonlogical axiom, then it
is open, and so is A
(r,a)
; that is, A
(r,a)
is in
0
(T).
Now suppose that A belongs to r
, where r
S or the rank of r
is at most 1.
Then A
(r,a)
is
yC
(r,a)
C
(r,a)
y
r
(r,a)
or
C
(r,a)
y
b
(r,a)
yC
(r,a)
Now r
is not r, so r
(r,a)
is the special constant for yC
(r,a)
. Hence A
(r,a)
belongs to r
(r,a)
.
Since r
and r
(r,a)
have the same rank, if A is in
1
(T) then so is A
(r,a)
. Finally, if r
S
then r does not appear in yC, and hence not in r
.
Consequently, r
(r,a)
is r
, and A
(r,a)
belongs to the element r
of S.
The maximal level of special constants belonging to a formula of rank in (63) is at
most 1. Now r, of level , has been replaced by a in the A
(r,a)
, and the level of special
constants appearing in a is a most , so the maximal level of special constants appearing
in (63) is at most + ( ).
Since
2
iterated times, if it can be done, is
2
formulas in
1
(T). Then we can attempt to iterate this times, and if
the superexponential algorithm terminates there is a special sequence of at most
(64)
.
.
.
(
2
)
formulas in
0
(T), where there are occurrences of
2
is a logical
theorem.
An equality substitution is
a = b & A
x
(a) A
x
(b)
It is a logical theorem by Theorem 4.
A literal is a variable-free atomic formula or the negation of a variable-free atomic
formula; the opposite of a literal A is A if A is atomic or is B if A is B.
The conjuncts of A are dened recursively as follows: if A is not a conjunction, the
conjuncts of A consists of A alone; the conjuncts of B & C are the conjuncts of B together
with the conjuncts of C. The disjuncts of A are dened similarly. Call C a proper disjunct
of A in case it is a disjunct of A but is not A.
Say that D
A.
Each A
and A
,
A
preceded by the proofs of the equality substitutions and special cases, is a proof of A.
A simple proof of A in T consists of a nite sequence C
1
, . . . , C
of variable-free
formulas, called claims, and very simple proofs of
C
1
, C
1
C
2
, . . . , C
1
& & C
1
C
, C
1
& & C
A
17. INCOMPLETENESS WITHOUT DIAGONALIZATION 35
Here is a convenient way to organize a simple proof. String all the very simple proofs
together, introduce each claim by assuming its negation, and when the claim is established
delete (or never use again) the negation of the claim and all the subsequent steps before
the establishment of the claim.
You are at liberty to make any possible Supposition:
And you may destroy one Supposition by another:
But then you may not retain the Consequences,
or any part of the Consequences of the Supposition so destroyed.
GEORGE BERKELEY
17. Incompleteness without diagonalization
The Kolmogorov complexity of a number , denoted by /(), is the length (number of
bits in the program) of the shortest Turing machine that halts and outputs . The notion
was introduced by Solomono
10
and then independently by Kolmogorov.
11
The most important theorem in the subject was proved by Chaitin.
12
Let T be a
theory capable of arithmetizing itself and expressing combinatorics, such as P or, as we shall
see, Q
0
. Let
be the numeral S. . . S0 with occurrences of S. Let K be the arithmetization
of /. Choose a number and construct a machine as follows. It systematically searches
through strings, ordered rst by length and then lexicographically. If it nds one that is a
proof in T of K(
) >
, it outputs and halts. Now can be referred to by a term of T of
length logarithmic in , so for large enough the machine is itself of length less than .
Fix such a and denote it by . Call the corresponding machine the Chaitin machine
for T.
We have
(65) if /() , there is a such that
T
K(
simply by verifying that the steps of the Turing machine in question are followed. Chaitins
theorem is
(66) if T is consistent, there do not exist and such that
T
K(
) >
) >
, which is impossible if T is consistent, by Chaitins theorem. Consequently, if T
proves the consistency of its arithmetization then T proves 2. Now suppose that = 2
and argue in the same way, and continue up to = 2
+1
. In this way, if T proves the
consistency of its arithmetization, it proves a contradiction, since 2
+1
. This yields
Godels second incompleteness theorem.
This proof is radically dierent from Godels self-referential proof. The latter derives
a contradiction from the consideration of proofs of an entirely unrestricted kind, whereas
the former derives a contradiction from the consideration of proofs of quite specic kinds,
of bounded complexity. We shall exploit this dierence.
18. The plan
Robinsons theory Q [Ro]
14
is the theory whose nonlogical axioms are those of P with-
out the induction axiom schema but with Robinsons axiom
x ,= 0 y[x = Sy]
It may be reformulated as an open theory Q
0
(Robinson arithmetic) by introducing a unary
function symbol P (predecessor) and replacing Robinsons axiom by
P0 = 0
x ,= 0 x = SPx
The theory Q
0
is quite weak, but by relativization schemata of Solovay [So]
15
[Ne]
it can be greatly strengthened by relativization. We construct a theory schema Q
0
that
is locally relativizable in Q
0
and is such that we can use induction on bounded formulas,
where bounded means that there is a polynomial bound on the length.
Robinson arithmetic has two remarkable properties. First, it proves the quasitauto-
logical consistency of its arithmetization. That is,
(68)
Q
0
Q
0
is quasitautologically consistent
14
R. M. Robinson, An essentially undecidable system, Proceedings of the International Congress of
Mathematicians, vol. 1, Cambridge, Massachusetts, (1950) 729-730.
15
Letter to P. Hajek, August 1976. Cited by Samuel R. Buss in Diusion, Quantum Theory, and
Radically Elementary Mathematics, William G. Faris, ed., Mathematical Notes 47, Princeton University
Press, Princeton, New Jersey, 2006.
18. THE PLAN 37
which is equivalent to
(69)
Q
0
s[s encodes a special sequence in
0
(Q
0
)]
Second, it proves the arithmetization of the main lemma, Theorem 22, for the Hilbert-
Ackermann consistency theorem, with the number of formulas replaced by the number
of bits in the encoded special sequence. These results will be proved in complete detail.
They were established in [Ne] without fully formal proofs, except that the second result
was in a weaker form, with only one special constant eliminated rather than all those
in M. The advantage of the present formulation is that in Theorem 22, , , and are
independent of .
Let us see what consequences follow by nitary reasoning from these two properties.
It must be emphasized that we are not adjoining any nitary assumptions to Q
0
; we are
only seeing what nitary reasoning says about what can be proved in Q
0
.
According to nitism, for any and
(70)
Q
0
p[p encodes a ( ,
)-proof of 0 ,= 0]
i.e.,
(71)
Q
0
s[s encodes a ( ,
)-special sequence in Q
0
]
For if there is such an encoded special sequence, it is an encoded ( ,
, )-special sequence
for some with , so by the arithmetization of Theorem 22, it is a theorem of Q
0
that
there is an encoded (
, 2
, 1)-special sequence. Applying this theorem times,
conclude that Q
0
proves that there is an encoded ( 1,
1
,
1
)-special sequence, where
1
=
2
. Now apply this result times, and conclude (by nitary reasoning) that Q
0
proves that there is an encoded special sequence in
0
(Q
0
), contradicting (69).
Continuing in this vein, let us examine what nitism says about what Q
0
can prove
concerning the Kritchman-Raz proof. Consider the proofs of (65). The formulas are
all of rank at most
0
for a specic
0
, and even though the may be immensely long,
there is a xed bound
0
on the level. This is because each proof operates on the given
record of the working of the Turing machine, repeatedly citing the same theorems to verify
that each step of the computation accords with the machines program. The proofs of the
arithmetizations of (66) and (67) are of a certain specic rank and level, so for certain
specic
1
and
1
0
= 1 p[p encodes a (
1
,
1
)-proof of 0 ,= 0]
By nitary reasoning from (70), we have
0
2
The proofs of 3, . . . ,
1
, where
1
= 2
+1
+ 1, increase in rank and level, but
in a manner that can be bounded explicitly. The upshot is that nitism proves that Q
0
,
and hence Q
0
, is inconsistent. But there is a well-known nitary argument, based on the
Hilbert-Ackermann consistency theorem, showing that Q
0
is consistent. Hence nitary
reasoning leads to a contradiction.
38 CHAPTER 2. LOGIC
Peano arithmetic expresses nitary reasoning and so it is inconsistent. In fact, we have
a contradiction in a small fragment of P; later we shall study how small such a fragment
can be.
In Part II we shall see that Q
0
is in fact consistent, and in Part III that sophisticated
modern mathematics can be done in it.
The entire proof that P is inconsistent is far less intricate than many proofs in contem-
porary mathematics. The inordinate length of the sequel is in deference to the well-known
dictum:
Extraordinary claims require extraordinary evidence.
CARL SAGAN
CHAPTER 4
Arithmetic
Now the formal development begins. Let us record a logical theorem.
t0. x[x = y]
This is sometimes useful for typographical reasons: if d is a long term occurring several
times in a proof, then we can use a special case of t0 such as 0;d:X to give a short name X
to the long term d.
19. Robinson arithmetic
Robinson arithmetic is the theory Q
0
whose nonlogical symbols are the constant 0,
the unary function symbols S and P (successor and predecessor), and the binary function
symbols + and , and whose eight nonlogical axioms follow.
a1. Sx ,= 0
a2. Sx = Sy x = y
a3. x + 0 = x
a4. x + Sy = S(x + y)
a5. x 0 = 0
a6. x Sy = x y + x
a7. P0 = 0
a8. x ,= 0 x = SPx
We also call this theory Q
8
. In general, we shall denote by Q
with 1
.
This is a very weak theory, but here is one theorem we can prove.
t9. x + y = 0 x = 0 & y = 0
Proof. H:x:y 3;x 8;y 4;x;Py 1;x+Py
This a condensed version, the text proof, of a simple proof (16) of the theorem. The
hypothesis H is the normal form of the negation of the closure of the theorem, namely
xy[[x + y = 0] & [x ,= 0 y ,= 0]]
This is assumed for a proof by contradiction. Then H:x:y is the special case of H where
special constants x and y are introduced. Then 3;x is the special case of a3 where the
39
40 CHAPTER 4. ARITHMETIC
special constant x is substituted for the variable, and so forth. There are also four equality
substitutions, not indicated in the text proof. For the full proof, including the eleven
inferences, click on the blue Proof hyperlink if you are reading this online, or open a
browser to http://www.math.princeton.edu/nelson/proof/and click on 9.pdf.
A text proof sometimes contains a superscript, such as
A
. This indicates that a special
case still has a quantier in it, and the superscript labels the formula so that a further
special case can be taken later.
The simple proof was automatically generated from the text proof by a program called
qea. Proofs generated by qea are simple proofs consisting of ve parts. First the theorem
as given in the text is stated. Then the normal form of the negation of the closure of the
theorem is given. This is the hypothesis H, which is assumed.
Proofs in qea are always proofs by contradiction, whence the name of the program,
for quod est absurdum. The remainder of the proof consists of steps numbered in sequence
starting with 0. Every step is a disjunction of literals containing only terms built up
from special constants. Conjuncts of the special cases of the hypothesis and of previous
results as listed in the text proof are stated. There are hyperlinks to the previous results
used. If labels a denition of the form A B, then
>
labels the forward direction
A B (which is A B) and
<
labels the backward direction A B (which is logically
equivalent to B A). Claims in simple proofs are indicated in the text proof by ? followed
by the claim.
Then (and this part is sometimes absent) there are equality substitutions. These are
always disjunctions of three literals. The rst is the negation of an equation, and the third
is obtained from the opposite of the second by replacing all occurrences of the left hand
side of the equation, shown in red, by the right hand side of the equation, also shown in red.
These are logical theorems. Qea nds the relevant equality substitutions automatically.
(This is the only sign of intelligence the present version of qea exhibits; it does not search
for relevant previously proved theorems.)
Finally come the inferences. Each of these steps is obtained from a previous step that
is a literal by removing its opposite from a previous step that is a disjunction. Qea takes
each step that is a literal and looks at all the other steps in turn to see if its opposite
occurs. If two steps are found that are literals with one being the opposite of the other,
or if a literal of the form a ,= a is found, the proof is complete. This procedure is not
guaranteed to produce the shortest or the most natural proof. Qea is fast and accurate,
but somewhat lacking in expository air.
Most proof checkers require the user to trust that the program is correct, and the
verication of such a matter is notoriously dicult. But qea prints out simple proofs that
can be checked just by inspection.
The use of qea serves two purposes, rst to ensure that the theorem is correctly proved
and second to construct a simple proof as a mathematical object in its own right that can
then be arithmetized automatically.
We cannot directly establish the associative and commutative laws for addition and
multiplication, or the distributive law, but in this section we shall interpret them by means
of a relativizing predicate. In Peano arithmetic these laws are established by successively
proving the following theorems by induction on the indicated variable, using the axioms
19. ROBINSON ARITHMETIC 41
and the previously established theorems.
x + (y + z) = (x + y) + z z
x (y + z) = (x y) + (x z) z
x (y z) = (x y) z z
0 + x = x x
x + y = y + x y
0 x = 0 x
Sx y = x y + y y
x y = y x x
These are open inductions and it is easy to relativize them, and to include the prede-
cessor P. The details follow.
d10.
10
(z) xy[(x + y) + z = x + (y + z)]
We may read
10
(z) as z associates additively.
t11.
10
(0)
Proof. H 10
<
;0:x:y 3;x+y 3;y
t12.
10
(z)
10
(Sz)
Proof. H:z 10
<
;Sz:x:y 10
>
;z;x;y 4;x+y;z 4;y;z 4;x;y+z
t13.
10
(z)
10
(Pz)
Proof. H:z 10
<
;Pz:x:y 10
>
;z;x;y 7 8;z 4;x+y;Pz 4;y;Pz 4;x;y+(Pz) 2;(x+y)+Pz;x+(y+(Pz))
t14.
10
(z
1
) &
10
(z
2
)
10
(z
1
+ z
2
)
Proof. H:z
1
:z
2
10
<
;z
1
+z
2
:x:y 10
>
;z
2
;y;z
1
10
>
;z
2
;x;y+z
1
10
>
;z
1
;x;y 10
>
;z
2
;x+y;z
1
We have proved that
10
respects 0, S, P, and + but not that it respects , so we
cannot use it as a relativizing predicate. Let us introduce stronger predicates. The idea is
to include various inductive properties in the relativizing predicate.
The distributive property:
d15.
15
(z)
10
(z) & xy[
10
(x) x (y + z) = (x y) + (x z)]
t16.
15
(0)
Proof. H 11 15
<
;0:x:y 3;y 5;x 3;xy
t17.
15
(z)
15
(Sz)
Proof. H:z 15
<
;Sz:x:y 15
>
;z;x;y 12;z 4;y;z 6;x;y+z 10
>
;x;xy;xz 6;x;z
Associativity of multiplication:
d18.
18
(z)
15
(z) & xy[
10
(x) &
15
(y) (x y) z = x (y z)]
t19.
18
(0)
Proof. H 16 18
<
;0:x:y 5;xy 5;y 5;x
42 CHAPTER 4. ARITHMETIC
t20.
18
(z)
18
(Sz)
Proof. H:z 18
<
;Sz:x:y 18
>
;z;x;y 17;z 6;xy;z 15
>
;y;x;yz 6;y;z
d21.
21
(z)
18
(z) & y[0 + y = z y = z]
t22.
21
(0)
Proof. H 19 21
<
;0:y 9;0;y
t23.
21
(z)
21
(Sz)
Proof. H:z 21
<
;Sz:y 20;z 21
>
;z;Py 3;0 8;y 4;0;Py 2;0+(Py);z
t24.
21
(0 + z) 0 + z = z
Proof. H:z 21
>
;0+z;z
To treat the commutative law for addition we rst study the commutativity of addition
by 0.
d25.
25
(z)
21
(z) & 0 + z = z
t26.
25
(0)
Proof. H 22 25
<
;0 3;0
t27.
25
(z)
25
(Sz)
Proof. H:z 25
<
;Sz 4;0;z 25
>
;z 23;z
d28.
28
(z)
25
(z) & y[(Sy) + z = S(y + z)]
t29.
28
(0)
Proof. H 26 28
<
;0:y 3;Sy 3;y
t30.
28
(z)
28
(Sz)
Proof. H:z 28
<
;Sz:y 28
>
;z;y 27;z 4;Sy;z 4;y;z
The commutative law for addition:
d31.
31
(z)
28
(z) & y[
28
(y) y + z = z + y]
t32.
31
(0)
Proof. H 29 31
<
;0:y 28
>
;y 25
>
;y 3;y
t33.
31
(z)
31
(Sz)
Proof. H:z 31
<
;Sz:y 28
>
;y;z 30;z 4;y;z 31
>
;z;y
To treat the commutative law for multiplication we rst study the commutativity of
multiplication by 0 and a variation on a6.
d34.
34
(z)
31
(z) & 0 z = 0
t35.
34
(0)
Proof. H 32 34
<
;0 5;0
19. ROBINSON ARITHMETIC 43
t36.
34
(z)
34
(Sz)
Proof. H:z 34
<
;Sz 34
>
;z 6;0;z 3;0 33;z
d37.
37
(z)
34
(z) & y[
31
(y) (Sy) z = (y z) + z]
t38.
37
(0)
Proof. H 35 37
<
;0:y 5;Sy 5;y 3;0
t39.
37
(z)
37
(Sz)
Proof. H:z 37
<
;Sz:y 37
>
;z;y 36;z 31
>
;y 28
>
;y 25
>
;y 21
>
;y 18
>
;y 15
>
;y 34
>
;z
31
>
;z 28
>
;z 25
>
;z 21
>
;z 18
>
;z 15
>
;z 12;z 6;Sy;z 12;y 10
>
;Sy;yz;z 4;z;y 31
>
;y;z
4;y;z 10
>
;Sz;yz;y 6;y;z
The commutative law for multiplication:
d40.
40
(z)
37
(z) & y[
37
(y) y z = z y]
t41.
40
(0)
Proof. H 40
<
;0:y 38 5;y 37
>
;y 34
>
;y
t42.
40
(z)
40
(Sz)
Proof. H:z 40
<
;Sz:y 40
>
;z;y 39;z 37
>
;z 34
>
;z 37
>
;y;z 6;y;z
Now we strengthen the predicate so that smaller numbers inherit the property.
d43.
43
(x) yz[y + z = x &
10
(z)
40
(y)]
t44.
43
(x)
40
(x)
Proof. H:x 43
>
;x;x;0 3;x 11
t45.
43
(0)
Proof. H 43
<
;0:y:z 9;y;z 41
t46.
43
(x)
43
(Sx)
Proof. H:x 43
<
;Sx:y:z 43
>
;x;y;Pz 42;x 44;x 3;y 8;z 4;y;Pz 2;y+Pz;x 13;z
t47.
43
(x) & u + v = x &
10
(v)
43
(u)
Proof. H:x:u:v 43
<
;u:y:z 10
>
;v;y;z 14;z;v 43
>
;x;y;z+v
Additive numbers:
d48.
48
(x) y[
43
(y)
43
(y + x)]
t49.
48
(x)
43
(x)
This is where t24 is used.
Proof. H:x 45 48
>
;x;0 44;0 44;0+x 40
>
;0+x 37
>
;0+x 34
>
;0+x 31
>
;0+x 28
>
;0+x
25
>
;0+x 24;x
t50.
48
(0)
Proof. H 48
<
;0:y 3;y
44 CHAPTER 4. ARITHMETIC
t51.
48
(x)
48
(Sx)
Proof. H:x 48
<
;Sx:y 48
>
;x;y 46;y+x 4;y;x
t52.
48
(x) & u + v = x &
10
(v)
48
(u)
Proof. H:x:u:v 48
<
;u:y 10
>
;v;y;u 48
>
;x;y 43
>
;u;v;x 47;y+x;y+u;v
t53.
48
(x)
43
(x) &
40
(x) &
37
(x) &
34
(x) &
31
(x) &
28
(x)
&
25
(x) &
21
(x) &
18
(x) &
15
(x) &
10
(x)
Proof. H:x 49;x 44;x 40
>
;x 37
>
;x 34
>
;x 31
>
;x 28
>
;x 25
>
;x 21
>
;x 18
>
;x 15
>
;x
t54.
48
(x
1
) &
48
(x
2
)
48
(x
1
+ x
2
)
Proof. H:x
1
:x
2
48
<
;x
1
+x
2
:y 53;x
2
10
>
;x
2
;y;x
1
48
>
;x
1
;y 48
>
;x
2
;y+x
1
Multiplicative numbers:
d55.
55
(x)
48
(x) & y[
48
(y)
48
(y x)]
This is it;
55
is the sought-for relativizing predicate.
t56.
55
(x)
48
(x) &
43
(x) &
40
(x) &
37
(x) &
34
(x) &
31
(x)
&
28
(x) &
25
(x) &
21
(x) &
18
(x) &
15
(x) &
10
(x)
Proof. H:x 55
>
;x 53;x
Now let us verify that
55
respects every function symbol of Q.
t57.
55
(0)
Proof. H 50 55
<
;0:y 5;y
t58.
55
(x)
55
(Sx)
Proof. H:x 55
<
;Sx:y 56;x 51;x 6;y;x 55
>
;x;y 54;yx;y
t59. x ,= 0 &
55
(x)
55
(Px)
Proof. H:x 55
<
;Px:y 8;x 4;Px;0 3;Px 11 12;0 56;x 52;x;Px;S0 6;y;Px 53;y 55
>
;x;y
52;yx;yPx;y
t60.
55
(x)
55
(Px)
Proof. H:x 59;x 7
t61.
55
(x
1
) &
55
(x
2
)
55
(x
1
+ x
2
)
Proof. H:x
1
:x
2
55
<
;x
1
+x
2
:y 56;x
1
56;x
2
54;x
1
;x
2
53;y 53;x
2
15
>
;x
2
;y;x
1
55
>
;x
1
;y
55
>
;x
2
;y 54;yx
1
;yx
2
t62.
55
(x
1
) &
55
(x
2
)
55
(x
1
x
2
)
Proof. H:x
1
:x
2
55
<
;x
1
x
2
:y 55
>
;x
2
;x
1
56;x
2
56;x
1
53;y 18
>
;x
2
;y;x
1
55
>
;x
1
;y 55
>
;x
2
;yx
1
Now let us prove the relativization of the associative and distributive laws.
t63.
55
(x) &
55
(y) &
55
(z) (x + y) + z = x + (y + z)
Proof. H:x:y:z 56;z 10
>
;z;x;y
20. ORDER 45
t64.
55
(x) &
55
(y) &
55
(z) x (y + z) = (x y) + (x z)
Proof. H:x:y:z 56;z 56;x 15
>
;z;x;y
t65.
55
(x) &
55
(y) &
55
(z) (x y) z = x (y z)
Proof. H:x:y:z 56;z 56;y 56;x 18
>
;z;x;y
Next we establish the relativizations of the commutative laws.
t66.
55
(x) &
55
(y) x + y = y + x
Proof. H:x:y 56;x 56;y 31
>
;x;y
t67.
55
(x) &
55
(y) x y = y x
Proof. H:x:y 56;x 56;y 40
>
;y;x
Adjoin the following ve axioms to Q
67
.
a68. (x + y) + z = x + (y + z)
a69. x (y + z) = (x y) + (x z)
a70. (x y) z = x (y z)
a71. x + y = y + x
a72. x y = y x
Then Q
72
is relativizable in Q
67
by the relativizing predicate symbol
55
, and hence
it is relativizable in Q
0
.
Axioms, denitions, and theorems containing the letter are auxiliary, and will not
be referred to again once the relativization they serve has been accomplished.
20. Order
We introduce (less than) and prove some properties of it.
d73. x y z[x + z = y]
t74. x x + y
Proof. H:x:y 73
<
;x;x+y;y
t75. y x + y
Proof. H:y:x 74;y;x 71;x;y
t76. Sx Sy x y
Proof. H:x:y 73
>
;Sx;Sy:z 71;Sx;z 4;z;x 2;z+x;y 71;x;z 73
<
;x;y;z
t77. Sx + y = x + Sy
Proof. H:x:y 71;Sx;y 4;y;x 71;y;x 4;x;y
t78. x y Sx Sy
Proof. H:x:y 73
>
;x;y:z 4;x;z 77;x;z 73
<
;Sx;Sy;z
46 CHAPTER 4. ARITHMETIC
t79. 0 x
Proof. H:x 73
<
;0;x;x 71;0;x 3;x
t80. x x
Proof. H:x 73
<
;x;x;0 3;x
t81. x Sx
Proof. H:x 4;x;0 3;x 73
<
;x;Sx;S0
t82. x 0 x = 0
Proof. H:x 73
>
;x;0:u 9;x;u
t83. y Sx y x y = Sx
Proof. H:y:x 73
>
;y;Sx:z 3;y 8;z 4;y;Pz 2;x;y+Pz 73
<
;y;x;Pz
t84. x y & y z x z
Proof. H:x:y:z 73
>
;x;y:u 73
>
;y;z:v 68;x;u;v 73
<
;x;z;u+v
t85. Px x
Proof. H:x 8;x 80;0 81;Px 7
Monotonicity of addition and multiplication.:
t86. x y z + x z + y
Proof. H:x:y:z 73
>
;x;y:u 68;z;x;u 73
<
;z+x;z+y;u
t87. x y x + z y + z
Proof. H:x:y:z 86;x;y;z 71;x;z 71;y;z
t88. x y z x z y
Proof. H:x:y:z 73
>
;x;y:u 69;z;x;u 73
<
;zx;zy;zu
t89. x y x z y z
Proof. H:x:y:z 88;x;y;z 72;x;z 72;y;z
t90. x x
& y y
x y x
Proof. H:x:x
:y:y
88;y;y
;x 89;x;x
;y
84;xy;xy
;x
[
0
(x) (x)]
Let y = x in dBI2.
Proof. H:x BI2
>
;x;x 80;x
tBI4. ind
0
(0)
If y 0 then y = 0, and we have (0) since is inductive.
Proof. H BI1
>
BI2
<
;0:y 82;y
tBI5. ind
[
0
(x)
0
(S(x))]
Suppose
0
(x) and y Sx. We need to show that (y). Then y x or y = Sx. In
the rst case we have the result since
0
(x), and in the second case it holds by tBI3 and
the inductivity of .
Proof. H:x BI2
<
;Sx:y BI2
>
;x;Py 83;y;x BI2
>
;x;y BI1
>
;x BI3;x
tBI6. ind
[
0
(x) & u x
0
(u)]
Suppose
0
(x) and u x and y u. We need to show that (y). But y x, so this
holds since
0
(x).
Proof. H:x:u BI2
<
;u:y 84;y;u;x BI2
>
;x;y
Dene
dBI7.
1
(x) y[
0
(y)
0
(y + x)]
We show that
1
is stronger than
0
(and consequently stronger than ), is inductive
and hereditary, and respects +. The proof makes essential use of t68, the associativity of
addition.
tBI8. ind
[
1
(x)
0
(x)]
Let y = 0 in dBI7.
Proof. H:x BI7
>
;x;0 3;x 71;x;0 BI4
tBI9.
1
(0)
This is merely the statement that
0
(y)
0
(y + 0).
Proof. H BI7
<
;0:y 3;y
tBI10. ind
[
1
(x)
1
(Sx)]
Suppose
1
(x) and
0
(y). We need to show that
0
(y + Sx); i.e., that
0
S(y + x)
.
We have
0
(y + x) since
1
(x), so the result holds by tBI5.
Proof. H:x BI7
<
;Sx:y BI5;y+x 4;y;x BI7
>
;x;y
tBI11. ind
[
1
(x) & u x
1
(u)]
Suppose
1
(x) and u x and
0
(y). We need to show that
0
(y+u). But y+u y+x
and we have
0
(y + x) since
1
(x), so the result holds by tBI6.
Proof. H:x:u BI7
<
;u:y 86;u;x;y BI6;y+x;y+u BI7
>
;x;y
48 CHAPTER 4. ARITHMETIC
tBI12. ind
[
1
(x
1
) &
1
(x
2
)
1
(x
1
+ x
2
)]
Suppose
1
(x
1
) and
1
(x
2
) and
0
(y). We need to show that
0
y + (x
1
+ x
2
)
. We
have
0
(y +x
1
) since
1
(x
1
), and so
0
(y +x
1
) +x
2
since
1
(x
2
). Thus the result holds
by the associativity of addition.
Proof. H:x
1
:x
2
BI7
<
;x
1
+x
2
:y 68;y;x
1
;x
2
BI7
>
;x
1
;y BI7
>
;x
2
;y+x
1
Dene
dBI13.
2
(x) y[
1
(y)
1
(y x)]
We show that
2
is stronger than
1
(and consequently stronger than ), is hereditary,
and is not only inductive but respects every function symbol of Q. The proof makes
essential use of t70, the associativity of multiplication.
tBI14. ind
[
2
(x)
1
(x)]
Let y = 1 in dBI13. (We have
1
(1) by tBI9 and tBI10.)
Proof. H:x BI13
>
;x;S0 BI10;0 BI9 72;S0;x 6;x;0 5;x 71;0;x 3;x
tBI15. ind
2
(0)
Since y 0 = 0, this holds by tBI9.
Proof. H BI13
<
;0:y 5;y BI9
tBI16. ind
[
2
(x)
2
(Sx)]
Suppose
2
(x) and
1
(y). We need to show that
1
(y Sx); i.e., that
1
(y x + y).
We have
1
(y x) since
2
(x), so the result holds by tBI12.
Proof. H:x BI13
<
;Sx:y BI12;yx;y 6;y;x BI13
>
;x;y
tBI17. ind
[
2
(x) & u x
2
(u)]
Suppose
2
(x) and u x and
1
(y). We need to show that
1
(y u). But y u y x,
and we have
1
(y x) since
2
(x). Thus the result holds by tBI11.
Proof. H:x:u BI13
<
;u:y 88;u;x;y BI11;yx;yu BI13
>
;x;y
tBI18. ind
[
2
(x
1
) &
2
(x
2
)
2
(x
1
+ x
2
)]
Suppose
2
(x
1
) and
2
(x
2
) and
1
(y). We need to show that
1
y (x
1
+ x
2
)
; i.e.,
that
1
(y x
1
+y x
2
). We have
1
(y x
1
) since
2
(x
1
) and
1
(y x
2
) since
2
(x
2
), so the
result holds by tBI12.
Proof. H:x
1
:x
2
BI13
<
;x
1
+x
2
:y 69;y;x
1
;x
2
BI13
>
;x
1
;y BI13
>
;x
2
;y BI12;yx
1
;yx
2
tBI19. ind
[
2
(x
1
) &
2
(x
2
)
2
(x
1
x
2
)]
Suppose
2
(x
1
) and
2
(x
2
) and
1
(y). We need to show that
1
y (x
1
x
2
)
. We
have
1
(y x
1
) since
2
(x
1
), and so
1
(y x
1
) x
2
[
2
(x) (x)]
This holds since
2
(x)
1
(x) and
1
(x)
0
(x) and
0
(x) (x).
Proof. H:x BI14;x BI8;x BI3;x
tBI21. ind
[
2
(x)
2
(Px)]
This holds by tBI17 since Px x.
Proof. H:x 85;x BI17;x;Px
This is the rst relativization schema. If is inductive and essentially bounded for ,
then
2
is a relativizer over Q.
Next we prove that an induction formula (0) & x
[(x
) (Sx
)] (x) is itself
inductive.
tBI22. (0) & x
[(x
) (Sx
)] (0)
Proof. H
tBI23. (0) & x
[(x
) (Sx
[(x
)
(Sx
)] (Sx)
Proof. H:x:x
A A
;x
A
;x
are
the free variables of B other than x; call such a essentially bounded for . Then is
a relativizer over Q. The same holds for a unary predicate symbol with dening axiom
(x) x
1
. . . x
B where B is as above.
Adjoin the axiom schema of bounded induction (BI):
aBI. (0) & x
[(x
) (Sx
)] (x)
where is essentially bounded for . This induction formula is inductive by tBI22
and tBI23, and its prenex form is essentially bounded. This theory schema is bounded
number theory. It is locally relativizable in Q
0
, meaning that any nite portion of it is
relativizable in Q
0
. We shall adjoin particular cases of BI one by one.
22. Even or odd
We shall prove that every number is even or odd. Here is a semantic indication
that induction is necessary to prove this. Take a nonstandard model of P and let be a
nonstandard number. Take the external set U of all standard numbers together with all
numbers obtained by repeatedly applying the functions symbols of Q
90
to . Then U is
the universe of a model of Q
90
, but there is no individual in U such that either 2 =
or 2 + 1 = .
d91. 1 = S0
d92. 2 = SS0
50 CHAPTER 4. ARITHMETIC
t93. 1 ,= 0 & 2 ,= 0 & 1 ,= 2
Proof. H 91 92 1;0 1;1 2;0;1
t94. Sx = x + 1
Proof. H:x 91 4;x;0 3;x
t95. 1 + 1 = 2
Proof. H 91 92 4;S0;0 3;S0
t96. x 1 = x
Proof. H:x 91 6;x;0 5;x 3;x 71;x;0
t97. 1 x = x
Proof. H:x 96;x 72;x;1
t98. x + x = 2 x
Proof. H:x 92 6;x;S0 6;x;0 5;x 3;x 71;x;0 72;2;x
t99. 2 x Sy x y
Proof. H:x:y 98;x 8;x 4;x;Px 76;x+Px;y 74;x;Px 84;x;x+Px;y 79;y
d100. x is even yx[x = 2 y]
d101. x is odd yx[x = 2 y + 1]
t102. 2 y is even
Proof. H:y 100
<
;2y;y 98;y 73
<
;y;2y;y
t103. y 2 is even
Proof. H:y 102;y 72;2;y
t104. 2 y + 1 is odd
Proof. H:y 98;y 73
<
;y;y+y;y 73
<
;2y;2y+1;1 84;y;2y;2y+1 101
<
;2y+1;y
t105. 0 is even
Proof. H 5;2 102;0;0
t106. 1 is odd
Proof. H 104;0 5;2 3;1 71;0;1
t107. x is even Sx is odd
Proof. H:x 100
>
;x:y 94;2y 81;x 84;y;x;Sx 104;y
t108. x is odd Sx is even
Proof. H:x 101
>
;x:y 94;2y+1 68;2y;1;1 95 94;x 87;y;x;1 96;2 69;2;y;1 102;y+1
Whenever we perform a bounded induction, we introduce an auxiliary predicate sym-
bol of the form
110 111;x
118 119;x
101
>
;y:y
68;2x
;2y
;1 69;2;x
;y
104;x
+y
121;x+y
t123. x is even & y is odd x + y is odd
Proof. H:x:y 100
>
;x:x
101
>
;y:y
68;2x
;2y
;1 69;2;x
;y
104;x
+y
70;2;x
;y 102;x
y
52 CHAPTER 4. ARITHMETIC
t125. y is even x y is even
Proof. H:y:x 72;y;x 124;y;x
t126. x is odd & y is odd x y is odd
Proof. H:x:y 101
>
;x:x
101
>
;y:y
69;2x
+1;2y
;1 96;2x
+1 102;y
125;2y
;2x
+1 104;x
123;(2x
+1)(2y
);2x
+1
t127. x is odd & x y is even y is even
Proof. H:x:y 113;y 121;y 113;xy 121;xy 126;x;y
23. Miscellaneous arithmetic
We prove some theorems, in no particular order, for later use.
t128. (x + y) z = x z + y z
Proof. H:x:y:z 72;x+y;z 69;z;x;y 72;x;z 72;y;z
t129. x ,= 0 1 x
Proof. H:x 8;x 94;Px 71;Px;1 73
<
;1;x;Px
t130. x y & x ,= y Sx y
Proof. H:x:y 73
>
;x;y:z 3;x 8;z 4;x;Pz 71;x;Pz 4;Pz;x 71;Pz;Sx 73
<
;Sx;y;Pz
t131. x 1 x = 0 x = 1
Proof. H:x 73
>
;x;1:y 8;x 71;SPx;y 4;y;Px 91 2;0;y+Px 9;y;Px 3;x
t132. x y = z & z ,= 0 x z
Proof. H:x:y:z 5;x 8;y 6;x;Py 71;xPy;x 73
<
;x;z;xPy
t133. x y = 0 x = 0 y = 0
Proof. H:x:y 8;y 6;x;Py 71;xPy;x 73
<
;x;0;xPy 82;x
t134. x y = 1 x = 1 & y = 1
Proof. H:x:y 91 1;0 132;x;y;1 131;x 72;x;y 5;y 132;y;x;1 131;y 5;x
The cancellation law for addition:
d135.
135
(x) yz[y + x = z + x y = z]
The deniens is not a bounded formula, but it is essentially bounded.
t136.
135
(0)
Proof. H 135
<
;0:y:z 3;y 3;z
t137.
135
(x)
135
(Sx)
Proof. H:x 135
<
;Sx:y:z 135
>
;x;y;z 4;y;x 4;z;x 2;y+x;z+x
t138.
135
(x)
Proof. H:x BI,135;x:x
136 137;x
147 148;x
t150. x ,= 0 & y x = z x y = z
Proof. H:x:y:z 149;y 146
>
;y;x;z 80;z
t151. x ,= 0 & x y = x z y = z
Proof. H:x:y:z 72;x;y 72;x;z 150;x;y;z
t152. x y + x = z y + z x = z
Proof. H:x:y:z 96;x 96;z 69;x;y;1 69;z;y;1 9;y;1 93 150;y+1;x;z
t153. x ,= 0 & x = x y y = 1
Proof. H:x:y 96;x 151;x;1;y
t154. x ,= 0 & x = z x y z = 1 & y = 1
Proof. H:x:z:y 72;z;xy 70;x;y;z 153;x;yz 134;y;z
54 CHAPTER 4. ARITHMETIC
t155. x is odd & x y = 2 z y
[x y
= z]
Proof. H:x:y:z
A
102;z 127;x;y 100
>
;y:y
A
;y
70;x;2;y
72;x;2 70;2;x;y
92 1;S0 151;2;xy
;z
Now we introduce < (strictly less than).
d156. x < y x y & x ,= y
t157. 0 < 1
Proof. H 79;1 91 1;0 156
<
;0;1
t158. x < Sx
Proof. H:x 156
<
;x;Sx 81;x 143;x
t159. 2 x < 2 y x < y
Proof. H:x:y 156
>
;2x;2y 73
>
;2x;2y:z 102;x 102;y 122;2x;z 100
>
;z:z
69;2;x;z
92
1;S0 151;2;x+z
;y 73
<
;x;y;z
156
<
;x;y
t160. x 2 y 2 x y
Proof. H:x:y 72;x;2 72;y;2 93 150;2;x;y 80;x 156
<
;2x;2y 159;x;y 156
>
;x;y
t161. x < y z[x + z = y & z ,= 0]
Proof. H:x:y
A
156
>
;x;y 73
>
;x;y:z
A
;z 3;x
t162. x < Sy x y
Proof. H:x:y 161;x;Sy:z 8;z 4;x;Pz 2;x+Pz;y 73
<
;x;y;Pz
t163. x < y Sx y
Proof. H:x:y 161;x;y:z 8;z 4;x;Pz 77;x;Pz 73
<
;Sx;y;Pz
t164. x < 0
Proof. H:x 156
>
;x;0 82;x
t165. [1 < x & x < 2]
Proof. H:x 156
>
;1;x 156
>
;x;2 92 91 162;x;S0 131;x 164;1
t166. y < z x + y < x + z
Proof. H:y:z:x 86;y;z;x 156
>
;y;z 156
<
;x+y;x+z 139;y;x;z 71;x;y 71;x;z
d167.
167
(x) y[x y y x]
t168.
167
(0)
Proof. H 167
<
;0:y 79;y
t169.
167
(x)
167
(Sx)
Proof. H:x 167
<
;Sx:y 167
>
;x;y 81;x 84;y;x;Sx 130;x;y
t170.
167
(x)
Proof. H:x BI,167;x:x
168 169;x
t171. x y y x
Proof. H:x:y 170;x 167
>
;x;y
23. MISCELLANEOUS ARITHMETIC 55
t172. x y y < x
Proof. H:x:y 171;x;y 156
<
;y;x 7;x
t173. x y & y x x = y
Proof. H:x:y 73
>
;x;y:u 73
>
;y;x:v 68;x;u;v 141;x;u+v 9;u;v 3;x
t174. x ,= 0 & x y x z y z
Proof. H:x:y:z 171;y;z 88;z;y;x 173;xy;xz 151;x;y;z 80;y
t175. x ,= 0 & x y = x
& x x
y
Proof. H:x:y:x
:y
73
>
;x;x
:z 128;x;z;y
73
<
;xy
;xy;zy
174;x;y
;y
t176. x ,= 0 & x y = x
& x < x
& y ,= 0 y
< y
Proof. H:x:y:x
:y
156
>
;x;x
175;x;y;x
;y
156
<
;y
;y 150;y;x;x
184
>
;q;x;y
132;x;y
;q
72;x;y
132;y
;x;q
t187. q is a power of two & q ,= 1 q is even
Proof. H:q 184
>
;q;q;1 96;q 80;q 129;q
The bounded quantiers in d184 were necessary for is a power of two to be a bounded
predicate symbol, but now we show that the bounds hold automatically.
t188. q is a power of two & x y = q & x ,= 1 x is even
Proof. H:q:x:y 184
>
;q;x;y 132;x;y;q 72;x;y 132;y;x;q
t189. q is a power of two & q ,= 1 q
[q
= q]
Proof. H:q
A
187;q 100
>
;q:q
A
;q
184
<
;q
92 1;S0 5;2
d190.
190
(b) q
2
q
1
b[q
1
is a power of two & q
2
is a power of two q
1
q
2
is a power of two]
t191.
190
(0)
Proof. H 190
<
;0:q
2
:q
1
82;q
1
184
>
;q
1
t192.
190
(b)
190
(Sb)
Proof. H:b 190
<
;Sb:q
2
:q
1
97;q
2
189;q
1
:q
1
99;q
1
;b 190
>
;b;q
2
;q
1
186;q
1
q
2
70;2;q
1
;q
2
t193.
190
(b)
Proof. H:x BI,190;x:x
191 192;x
t194. q
1
is a power of two & q
2
is a power of two q
1
q
2
is a power of two
Proof. H:q
1
:q
2
193;q
1
190
>
;q
1
;q
2
;q
1
80;q
1
t195. q is a power of two & q < z z ,= 1
Proof. H:q:z 184
>
;q 156
>
;q;1 131;q
We shall prove that if q is a power of two then there is no power of two z such that
q < z < 2 q. The proof is by innite descent (applied to a bounded formula), the oldest
form of induction: if there are such q and z, divide them by 2 and obtain smaller ones.
d196.
196
(b) qbzb[q is a power of two & z is a power of two & q < z
& z < 2 q]
24. POWERS OF TWO 57
t197.
196
(0)
Proof. H 196
<
;0:q:z 82;q 82;z 184
>
;q 184
>
;z
t198.
196
(b)
196
(Sb)
It is surprising that so far proofs by cases have not been necessary, but now we need to
consider the case q = 1 and show that it leads to a contradiction. Whenever we introduce
a claim in a proof (indicated by ? followed by a formula), we assume that the claim does
not hold and derive a contradiction; then the steps based on the assumption are never
used again.
Proof. H:b 196
<
;Sb:q:z 165;z 96;2 189;q:q
189;z:z
196
>
;b;q
;z
99;q
;b 99;z
;b 195;q;z
159;q
;z
159;z
;2q
?q=1
t199.
196
(b)
Proof. H:x BI,196;x:x
197 198;x
t200. q is a power of two z[z is a power of two & q < z & z < 2 q]
Proof. H:q:z 199;q+z 74;q;z 71;q;z 74;z;q 196
>
;q+z;q;z
t201. q is a power of two & q
< 2 q q
q
Proof. H:q:q
200;q;q
172;q
;q
t202. q
1
is a power of two & q
2
is a power of two & q
1
< q
2
2 q
1
q
2
Proof. H:q
1
:q
2
172;2q
1
;q
2
200;q
1
;q
2
We shall prove that every non-zero number Sx can be written uniquely as Sx = q +r
where q is a power of two and r < q. We begin with uniqueness.
t203. q is a power of two & r < q & q
< q
& q+r = q
+r
q = q
& r = r
Proof. H:q:r:q
:r
74;q
;r
;q+r;2q 201;q;q
74;q;r 166;r
;q
;q
98;q
177;q;q
+r
;2q
201;q
;q 173;q;q
139;r;q;r
71;q;r 71;q;r
d204.
204
(x) qSxrSx[q is a power of two & r < q & Sx = q + r]
t205.
204
(0)
Proof. H 204
<
;0;1;0 91 185 157 3;1 80;1 79;1
t206.
204
(x)
204
(Sx)
Proof. H:x 204
>
;x:q:r 78;r;Sx 81;Sx 163;r;q 204
<
;Sx;q;Sr 4;q;r 98;q 186;q 3;2q 156
<
;0;2q 184
>
;2q
156
<
;Sr;q 84;q;Sx;SSx 79;SSx 204
<
;Sx;2q;0 80;2q
t207.
204
(x)
Proof. H:x BI,204;x:x
205 206;x
Sx
& q
Sx[r
< q
& Sx = q
+ r
] q = q
Proof. H:q:x:q
:r:r
203;q;r;q
;r
Sx
& q
Sx[q
< q
& Sx = q
+ r
] r = r
Proof. H:r:x:r
:q:q
203;q;r;q
;r
< q
r q
+ r
< q q
Proof. H:r:q:r
:q
161;r;q:u 161;r
;q
:u
69;r;r
;u
128;r;u;r
+u
69;r;r
;u
180;u;r
;q
166;r
;uq
;rr
+ru
t224. Rx Qy + Ry < Qx Qy
Proof. H:x:y 216;x 216;y 223;Rx;Qx;Ry;Qy
t225. Q(x y) = Qx Qy & R(x y) = Rx Qy + Ry
Proof. H:x:y 222;x;y 216;x 216;y 128;Qx;Rx;Qy 68;QxQy;RxQy;Ry 194;Qx;Qy 224;x;y
220;xy;QxQy;RxQy+Ry
t226. x (y z) = (x y) z
Proof. H:x:y:z 225;y;z 225;x;y 225;x;yz 225;xy;z 70;Qx;Qy;Qz 128;RxQy;Ry;Qz 70;Rx;Qy;Qz
68;Rx(QyQz);RyQz;Rz 216;x(yz) 216;(xy)z 2;(xy)z;x(yz)
t227. (a b c) (d e) = (a b) (c d e)
Proof. H:a:b:c:d:e 226;a;b;c 226;ab;c;de
We introduce stringier notation for the empty string and the bits.
d228. = 0
d229.
0 = 1
d230.
1 = 2
The arithmetic of strings has one zero element, , and two successor functions, namely
x x
0 and x x
1. Concatenation is the string analogue of addition. We do not
yet have a string analogue of multiplication, but that will come.
t231.
0 ,= &
1 ,= &
0 ,=
1
Proof. H 228 229 230 93
t232. Q = 1 & R = 0
Proof. H 228 91 3;1 157 185 220;0;1;0
t233. Qx = 1 x =
Proof. H:x 228 91 3;1 216;x 131;Rx 156
>
;Rx;1 2;x;0
60 CHAPTER 4. ARITHMETIC
t234. x y = x = & y =
Proof. H:x:y 225;x;y 232 134;Qx;Qy 233;x 233;y
t235. Q
0 = 2 & R
0 = 0
Proof. H 229 92 220;1;2;0 3;2 185 186;1 96;2 91 156
<
;0;2 79;2 1;1
t236. Q
1 = 2 & R
1 = 1
Proof. H 230 94;2 185 96;2 220;2;2;1 186;1 91 92 156
<
;1;2 158;1
t237. x
0 ,= & x
1 ,=
Proof. H:x 225;x;
0 225;y;
0;
1 244
<
;
1;
& y _ y
x y _ x
Proof. H:x:x
:y:y
256;x;x
;y 258;y;y
;x
254;xy;x
y;x
t264. x _ y x _ y z
Proof. H:x:y:z 261;y;z 254;x;y;yz
62 CHAPTER 4. ARITHMETIC
t265. x _ y x _ z y
Proof. H:x:y:z 262;y;z 254;x;y;zy
t266. x _ y x 2 Sy
Proof. H:x:y 81;x 216;x 156
>
;Rx;Qx 86;Rx;Qx;Qx 98;Qx 84;x;Sx;2Qx 244
>
;x;y 88;Qx;Qy;2
84;x;2Qx;2Qy 216;y 81;y 74;Qy;Ry 88;Qy;Sy;2 84;x;2Qy;2Sy
t267. x y x _ y
Proof. H:x:y 244
<
;x;y 216;x 216;y 172;Qx;Qy 202;Qy;Qx 166;Ry;Qy;Qy 98;Qy 178;Sy;2Qy;Qx
74;Qx;Rx 178;Sy;Qx;Sx 78;x;y 156
>
;Sy;Sx 173;Sx;Sy
t268. 0 _
Proof. H 228 80;0 253;0
t269. Px _ x
Proof. H:x 85;x 267;Px;x
t270. Sx _ x
0
Proof. H:x 216;x 216;Sx 225;x;
0
t271. x y _ (x
0) (y
0)
Proof. H:x:y 218;xy 145;x;y 84;Q(xy);S(xy);SxSy 218;x 218;y 90;Sx;Qx2;Sy;Qy2 84;Q(x
y);SxSy;(Qx2)(Qy2) 225;x;
0 225;y;
0 235 225;x
0;y
0 244
<
;xy;(x
0)(y
0)
t272. x y x + y _ (
1
0) (y
0)
Proof. H:x:y 87;x;y;y 98;y 267;x+y;2y 271;2;y 230 254;x+y;2y;(
0)(y
0)
t273. x + y _
1
0) (x
0)
1
0) (y
0)
0)(x
0):X 0;(
0)(y
0):Y 256;xy;Y ;X
258;xy;X;Y 254;x+y;X;XY 261;X;Y 265;x+y;Y ;X
27. The string predecessor
We construct a bounded function symbol Half for division by two without remainder.
d274.
274
(x) yx[x = 2 y x = S(2 y)]
t275.
274
(0)
Proof. H 274
<
;0;0 79;0 5;2
t276.
274
(x)
274
(Sx)
Proof. H:x 274
>
;x:y 274
<
;Sx;y 274
<
;Sx;Sy 78;y;x 6;2;y 92 81;x 84;y;x;Sx 94;2y 4;2y;1
91
t277.
274
(x)
Proof. H:x BI,274;x:x
275 276;x
x & [x = 2 y
x = S(2 y
)] y = y
Proof. H:y:x:y
102;y 102;y
107;2y 107;2y
121;x 93 151;2;y;y
2;2y;2y
?x is even
t279. (EC) yx[x = 2 y x = S(2 y)]
Proof. H:x
A
277;x 274
>
;x:y
A
;y
d280. Half x = y y x & [x = 2 y x = S(2 y)]
t281. x is even x = 2 Half x & x = Half x 2
Proof. H:x 280
>
;x;Half x 72;Half x;2 104;Half x 121;x 94;2Half x
t282. x is odd x = 2 Half x + 1 & x = Half x 2 + 1
Proof. H:x 280
>
;x;Half x 72;Half x;2 103;Half x 121;x 94;2Half x 100
<
;x;Half x
t283. Half (2 x) = x & Half (x 2) = x
Proof. H:x 102;x 281;2x 93 72;2;x 151;2;x;Half (2x)
t284. Half (2 x + 1) = x & Half (x 2 + 1) = x
Proof. H:x 104;x 282;2x+1 72;2;x 94;2x 94;2Half (2x+1) 2;2x;2Half (2x+1) 93 151;2;x;Half
(2x+1)
t285. q is even & r < q Half r < Half q
Proof. H:q:r 281;q 280
>
;r;Half r 159;Half r;Half q 158;2Half r 179;2Half r;r;q
t286. q is a power of two & q ,= 1 Half q is a power of two & q = 2 Half q
Proof. H:q 187;q 281;q 189;q:q
93 151;2;Half q;q
We dene the string predecessor Chop, which deletes the last bit (if any).
d287. Chop x = P(Half Qx + Half Rx)
t288. Chop =
Proof. H 228 287; 232 280
<
;1;0 79;1 5;2 91 280
<
;0;0 79;0 3;0 7
t289. x ,= S Chop x = Half Qx + Half Rx
Proof. H:x 287;x 0;Half Qx:q 0;Half Rx:r 8;q+r 9;q;r 5;2 91 233;x 280
>
;Qx;0 216;x
184
>
;Qx
t290. x ,= QChop x = Half Qx & RChop x = Half Rx
Proof. H:x 289;x 216;x 233;x 286;Qx 187;Qx 285;Qx;Rx 220;Chop x;Half Qx;Half Rx
t291. Chop (x
0) = x
Proof. H:x 237;x 290;x
0 225;x;
0)
t292. Chop (x
1) = x
Proof. H:x 237;x 290;x
1 225;x;
1)
t293. Chop
0 = & Chop
1 =
Proof. H 291; 292; 239;
0 239;
1
64 CHAPTER 4. ARITHMETIC
t294. x ,= x = Chop x
0 x = Chop x
1
Proof. H:x 290;x 225;Chop x;
0 225;Chop x;
0 217;x;Chop x
1
t295. x ,=
0 _ x &
1 _ x
Proof. H:x 294;x 262;
0;Chop x 262;
0;
1;x 254;
1;
0;x ?
0x
t296. y ,= Chop (x y) = x Chop y
Proof. H:y:x 294;y 226;x;Chop y;
0 226;x;Chop y;
1 291;xChop y 292;xChop y
t297. x ,= & y ,= & x _ y Chop x _ Chop y
Proof. H:x:y 244
>
;x;y 294;x 294;y 225;Chop x;
0 225;Chop x;
1 225;Chop y;
0 225;Chop y;
1
235 236 160;QChop x;QChop y 244
<
;Chop x;Chop y ?x=Chop x
1
t298. x _ y Chop x _ Chop y
Proof. H:x:y 297;x;y 288 251;Chop y 252;x ?x=
28. The second relativization schema
Introduce the denition schema
dBSI1. sind
() & x[(x) (x
0) & (x
1)]
We say that is string inductive in a theory T in case
T
sind
.
dBSI2.
(0)
(x) y[y _ x (y)]
Under the hypothesis that is string inductive (stated even when not necessary) we
show that
(0)
is stronger than and is not only string inductive but hereditary for _.
tBSI3. sind
[
(0)
(x) (x)]
Let y = x in dBSI2.
Proof. H:x BSI2
>
;x;x 253;x
tBSI4. sind
(0)
()
If y _ then y = , and we have () since is string inductive.
Proof. H BSI1
>
BSI2
<
;:y 252;y
tBSI5. sind
[
(0)
(x)
(0)
(x
0)]
Suppose
(0)
(x) and y _ x
0. We need to show that (y). But Chop y _ x, so
(Chop y) since
(0)
(x). If y = the result holds since is string inductive. Otherwise,
y = Chop y
0 or y = Chop y
1. In either case we have the result since is string
inductive.
Proof. H:x BSI2
<
;x
0:y BSI2
>
;x;Chop y 298;y;x
0 291;x BSI1
>
;Chop y 294;y
tBSI6. sind
[
(0)
(x)
(0)
(x
1)]
The proof is entirely similar.
Proof. H:x BSI2
<
;x
1:y BSI2
>
;x;Chop y 298;y;x
1 292;x BSI1
>
;Chop y 294;y
28. THE SECOND RELATIVIZATION SCHEMA 65
tBSI7. sind
[
(0)
(x) & u _ x
(0)
(u)]
Suppose
(0)
(x) and u _ x and y _ u. We need to show that (y). But y _ x, so the
result holds since
(0)
(x).
Proof. H:x:u BSI2
<
;u:y 254;y;u;x BSI2
>
;x;y
Dene
dBSI8.
(1)
(x) y[
(0)
(y)
(0)
(y x)]
Under the hypothesis that is string inductive, we show that
(1)
is stronger than
(0)
(and consequently stronger than ), is string inductive and hereditary for _, and re-
spects . The proof makes essential use of t226, the associativity of .
tBSI9. sind
[
(1)
(x)
(0)
(x)]
Let y = in dBSI8. (We have
(0)
() by tBSI4.)
Proof. H:x BSI8
>
;x; BSI4 239;x
tBSI10. sind
(1)
()
This is just the statement that
(0)
(y)
(0)
(y ).
Proof. H BSI8
<
;:y 239;y
tBSI11. sind
[
(1)
(x)
(1)
(x
0)]
Suppose
(1)
(x) and
(0)
(y). We need to show that
(0)
y (x
0)
; i.e.,
(0)
(y
x)
0
. We have
(0)
(y x) since
(1)
(x), so the result holds by tBSI5.
Proof. H:x BSI8
<
;x
0:y 226;y;x;
0 BSI8
>
;x;y BSI5;yx
tBSI12. sind
[
(1)
(x)
(1)
(x
1)]
The proof is entirely similar.
Proof. H:x BSI8
<
;x
1:y 226;y;x;
1 BSI8
>
;x;y BSI6;yx
tBSI13. sind
[
(1)
(x) & u _ x
(1)
(u)]
Suppose
(1)
(x) and u _ x and
(0)
(y). We need to show that
(0)
(y + u). But
y + u y + x and we have
(0)
(y + x) since
(1)
(x), so the result holds by tBSI7.
Proof. H:x:u BSI8
<
;u:y BSI8
>
;x;y 258;u;x;y BSI7;yx;yu
tBSI14. sind
[
(1)
(x
1
) &
(1)
(x
2
)
(1)
(x
1
x
2
)]
Suppose
(1)
(x
1
) and
(1)
(x
2
) and
(0)
(y). We need to show that
(0)
y (x
1
x
2
)
.
We have
(0)
(y x
1
) since
(1)
(x
1
), and so
(0)
(y x
1
) x
2
since
(1)
(x
2
). Thus the
result holds by the associativity of concatenation.
Proof. H:x
1
:x
2
BSI8
<
;x
1
x
2
:y 226;y;x
1
;x
2
BSI8
>
;x
1
;y BSI8
>
;x
2
;yx
1
Now we prove that () & x
[(x
) (x
0) & (x
1)] (x) is itself string
inductive.
66 CHAPTER 4. ARITHMETIC
tBSI23. () & x
[(x
) (x
0) & (x
1)] ()
Proof. H
tBSI24. () & y[(y) (y
0) & (y
1)] (x) ()
& z[(z) (z
0) & (z
1)] (x
0)
Proof. H:x:y
A A
;x
A
;y
tBSI25. () & x
[(x
) (x
0) & (x
1)] (x) ()
& x
[(x
) (x
0) & (x
1)] (x
1)
Proof. H:x:x
A A
;x
A
;x
are
the free variables of B other than x; call such a essentially bounded for _. Note that by
t266 and t267, being bounded for is the same as being bounded for _, and by t268t271
and t273, the function symbols of Q are bounded for _. Therefore is a relativizer over Q.
The same holds for a unary predicate symbol with dening axiom (x) x
1
. . . x
B
where B is as above.
Adjoin the axiom schema of linearly bounded string induction (LBSI):
aBSI. () & x
[(x
) (x
0) & (x
1)] (x)
where is essentially bounded for _. We call this LBSI because we do not yet have a
string multiplication; later it will be extended to polynomially bounded string induction
(PBSI). This theory schema is locally relativizable in Q
0
. Let Q
0
be this theory schema;
it is string theory.
29. Comparing strings
Now we discuss the notion of a string ending with another string.
d299. x ends with c ax[x = a c]
t300. x ends with
Proof. H:x 299
<
;x;;x 253;x 239;x
t301. ends with c c =
Proof. H:c 299
>
;;c:a 252;a 239;c
t302. x ends with c Chop x ends with Chop c
Proof. H:x:c 299
>
;x;c:a 296;c;a 299
<
;Chop x;Chop c;a 288 300;Chop x 261;a;Chop c ?c=
t303. x y ends with y
Proof. H:x:y 299
<
;xy;y;x 261;x;y
t304. x ends with c x y ends with c y
Proof. H:x:c:y 299
>
;x;c:a 299
<
;xy;cy;a 226;a;c;y 264;a;x;y
t305. x ends with y & y ends with z x ends with z
Proof. H:x:y:z 299
>
;x;y:a 299
>
;y;z:b 226;a;b;z 303;ab;z
29. COMPARING STRINGS 67
t306. [x ends with
0 c & x ends with
1 c]
Proof. H:x:c 299
>
;x;
0c:a 299
>
;x;
1c:a
226;a;
0;c 226;a
1;c 241;a
0;c;a
1 238;a;a
& y y
x y x
Proof. H:x:x
:y:y
307
>
;x;x
307
>
;y;y
307
<
;xy;x
263;x;x
;y;y
263;x
;x;y
;y
t317. x y y x
Proof. H:x:y 307
<
;xy;yx 257;x;y 257;y;x
t318. x
1
x
2
& x
1
y x
2
z y z
Proof. H:x
1
:x
2
:y:z 311;x
1
;x
2
311;x
1
y;x
2
z 311;y;z 225;x
1
;y 225;x
2
;z 211
>
;x
1
;Qx
1
184
>
;Qx
1
151;Qx
1
;Qy;Qz
t319. x = a y c & x y a = & c =
Proof. H:x:a:y:c 225;y;c 225;a;yc 212;x 311;x;y 154;Qx;Qa;Qc 233;a 233;c
t320. x y & y _ z x _ z
Proof. H:x:y:z 311;x;y 244
>
;y;z 244
<
;x;z
t321. x _ y & y z x _ z
Proof. H:x:y:z 244
>
;x;y 311;y;z 244
<
;x;z
68 CHAPTER 4. ARITHMETIC
t322. x y Chop x Chop y
Proof. H:x:y 307
>
;x;y 298;x;y 298;y;x 307
<
;Chop x;Chop y
t323. x y
0 x y
1 x ,=
Proof. H:x:y 309;;y
0 309;;y
1 313;y
0 313;y
1 234;y;
0 234;y;
1 243
t324.
0
1 &
1
0
Proof. H 307
<
;
0;
1 307
<
;
1;
0 255
t325. x ,= Chop x
0 x & Chop x
1 x
Proof. H:x 294;x 308;x 324 308;Chop x 316;Chop x;Chop x;
1;
0 316;Chop x;Chop x;
0;
1 ?x=Chop
x
0
Concatenation is associative by t226, respects equivalence classes by t316, and is
commutative on equivalence classes by t317. Thus there is no conceptual diculty in
proving that a concatenation of strings is equivalent to the concatenation of any re-ordering
of the strings, with any association. There are 24 ways of ordering 4 distinct variables,
and each concatenation can be associated in 4 dierent ways. Hence there are 9576 trivial
theorems asserting that each pair is equivalent under . Here is one that will be needed.
t326. (x y) (a b) (x a) (y b)
Proof. H:x:y:a:b 226;y;a;b 317;y;a 314;ya;ay;b 315;(ya)b;(ay)b;x 226;x;ay;b 226;x;a;y
226;xa;y;b 226;x;y;ab
d327.
327
(x) aby[a x = b y & x y a = b & x = y]
t328.
327
()
Proof. H 327
<
;:a:b:y 239;a 309;;y 313;y 239;b
t329.
327
(x)
327
(x
0)
Proof. H:x 327
<
;x
0:a:b:y 327
>
;x;a;b;Chop y 237;x 313;x
0;y 226;a;x;
0 226;b;Chop y;
1 238;ax;bChop y
t330.
327
(x)
327
(x
1)
Proof. H:x 327
<
;x
1:a:b:y 327
>
;x;a;b;Chop y 237;x 313;x
1;y 226;a;x;
1 226;b;Chop y;
0 238;bChop y;ax
t331.
327
(x)
Proof. H:x BSI,327;x:x
328 329;x
330;x
0;x;
1;y 243
d335.
335
(x) x ,= yx[x =
0 y x =
1 y]
t336.
335
()
Proof. H 335
<
;
t337.
335
(x)
335
(x
0)
Proof. H:x 335
<
;x
0
A
335
>
;x:y ?x=
A
; 251;
0 239;
0
A
;y
0 256;y;x;
0 226;
0;y;
0 226;
1;y;
0
t338.
335
(x)
335
(x
1)
Proof. H:x 335
<
;x
1
A
335
>
;x:y ?x=
A
; 251;
1 239;
1
A
;y
1 256;y;x;
1 226;
0;y;
1 226;
1;y;
1
t339.
335
(x)
Proof. H:x BSI,335;x:x
336 337;x
338;x
t340. x ,= yx[x =
0 y x =
1 y]
Proof. H:x
A
339;x 335
>
;x:y
A
;y
t341. (UC) y
1
_ x & [x = y
1
= ] & [x ,= x =
0 y
1
x =
1 y
1
]
& y
2
_ x & [x = y
2
= ] & [x ,= x =
0 y
2
x =
1 y
2
]
y
1
= y
2
Proof. H:y
1
:x:y
2
334;y
1
;y
2
334;y
2
;y
1
?x= 242;
0;y
1
;y
2
242;
1;y
1
;y
2
?x=
0y
1
t342. (EC) yx[x = y = ] & [x ,= x =
0 y x =
1 y]
Proof. H:x
A
?x=
A
; 251; 340;x:y
A
;y
d343. Chip x = y y _ x & [x = y = ] & [x ,= x =
0 y
x =
1 y]
t344. x ,= x =
0 Chip x x =
1 Chip x
Proof. H:x 343
>
;x;Chip x
t345. Chip =
Proof. H 343
>
;;Chip
t346. Chip (
0 x) = x & Chip (
1 x) = x
Proof. H:x 343
<
;
0x;x 343
<
;
1x;x 262;x;
0 234;
0;x 262;x;
1 234;
1;x 243
t347. x ,= Chip (x y) = Chip x y
Proof. H:x:y 344;x 226;
y x
Chip y
Proof. H:x
:y 313;
0x
234;
0;x
0;
0;x
;Chip y 318;
0;
1;x
;Chip y 308;
0 324
70 CHAPTER 4. ARITHMETIC
t350.
1 x
y x
Chip y
Proof. H:x
:y 313;
1x
234;
1;x
1;
1;x
;Chip y 318;
1;
0;x
;Chip y 308;
1 324
t351. x y Chip x Chip y
Proof. H:x:y 348;y 344;x 349;Chip x;y 350;Chip x;y
We shall construct bounded binary function symbols Tail and Head so that we have
x = Head(x, y) Tail(x, y) and if y _ x then Tail(x, y) y.
d352. tail(x, y, z) y z & x ends with z
t353. tail(x, y, z) & tail(x, y, w) z = w
Proof. H:x:y:z:w 352
>
;x;y;z 352
>
;x;y;w 299
>
;x;z:a 299
>
;x;w:b 309;y;z 310;z;y;w 332;a;z;b;w
d354.
354
(x) yxzx[tail(x, y, z)]
t355.
354
()
Proof. H 354
<
;:y; 252;y 308; 300; 352
<
;;y;
t356.
354
(x)
354
(x
0)
Proof. H:x 354
<
;x
0:y
A
291;x 298;y;x
0 354
>
;x;Chop y:z
A
;z
0 352
>
;x;Chop y;z
253;
0 263;z;x;
0;
0 304;x;z;
0 352
<
;x
0;y;z
0 314;Chop y;z;
0 325;y
A
; 308; 251;x
0 300;x
0
352
<
;x
0;; 309;Chop y
0;y 310;y;Chop y
0;z
0
t357.
354
(x)
354
(x
1)
Proof. H:x 354
<
;x
1:y
A
292;x 298;y;x
1 354
>
;x;Chop y:z
A
;z
1 352
>
;x;Chop y;z
253;
1 263;z;x;
1;
1 304;x;z;
1 352
<
;x
1;y;z
1 314;Chop y;z;
1 325;y
A
; 308; 251;x
1 300;x
1
352
<
;x
1;; 309;Chop y
1;y 310;y;Chop y
1;z
1
t358.
354
(x)
Proof. H:x BSI,354;x:x
355; 356;x
357;x
_ x
& [y _ x tail(x, y, z
)] & [ y _ x z
= x] z = z
Proof. H:z:x:y:z
?yx 353;x;y;z;z
_ x & x = a
Tail(x, y) a = a
Proof. H:a:x:y:a
241;a;Tail(x,y);a
1
1).
30. Substrings
We shall study various questions related to substrings.
d373. x is a substring of y aycy[a x c = y]
t374. x is a substring of a x c
Proof. H:x:a:c 373
<
;x;axc;a;c 261;a;xc 226;a;x;c 262;c;ax
t375. x is a substring of y z x is a substring of y & x is a substring of z
Proof. H:x:y:z 373
>
;x;y:a:c 374;x;a;cz 226;a;xc;z 226;x;c;z 373
>
;x;z:a
:c
374;x;ya
;c
226;y;a
;xc
t376. x is a substring of x =
Proof. H:x 373
>
;x;:a:c 234;a;xc 234;x;c
t377. x is a substring of Chop y x is a substring of y
Proof. H:x:y 294;y 375;x;Chop y;
0 375;x;Chop y;
1 288
72 CHAPTER 4. ARITHMETIC
t378. x is a substring of x
Proof. H:x 374;x;; 239;x 239;x
d379.
379
(x) y[
1 is a substring of x &
1 is a substring of y & x y
x = y]
t380.
379
()
Proof. H 379
<
;:y 309;;y 313;y
t381.
379
(x)
379
(x
0)
Proof. H:x 379
<
;x
0:y 322;x
1;x;
0 377;
1 375;
1;Chop
y;
1 313;x
0 237;x
t382.
379
(x)
379
(x
1)
Proof. H:x 379
<
;x
1 378;
1 375;
1;x;
1
t383.
379
(x)
Proof. H:x BSI,379;x:x
380 381;x
382;x
d384.
384
(x) yx[x y &
1 is a substring of y]
t385.
384
()
Proof. H 384
<
;; 251; 308; 376;
1 231
31. Quoting strings
The ability to quote strings is basic to combinatorics. We shall quote a string by
doubling all its bits. Thus 001111 quotes 011.
We want to say that X doubles x in case it is obtained from x by replacing each 0
by 00 and each 1 by 11. We do not yet have the means to express this directly in our
theory, so we characterize the notion indirectly.
d386. X doubles x X x x & cxCXC c c & [x ends with
0 c
X ends with
0
0 C] & [x ends with
1 c X ends with
1
1 C]
[ x [
[ [0[ c [
[ X [
[ [00[ C [
If x ends with 0c, we know the position of this bit in x, and since C is twice as long
as c it marks the corresponding position for doubling 0 in X, and similarly for 1c. We need
to prove that the X doubling x exists and is unique, and both of these will be accomplished
by bounded string induction.
31. QUOTING STRINGS 73
t387. doubles
Proof. H 239; 251; 308; 386
<
;;:c; 252;c 239;
0 239;
1 301;
0 301;
1 231
t388. X doubles X =
Proof. H:X 386
>
;X; 239; 313;X
t389. doubles x x =
Proof. H:x 386
>
;;x 309;;xx 313;xx 234;x;x
t390. X x x X b b (x b) (x b)
Proof. H:X:x:b 314;X;xx;bb 326;x;x;b;b 310;Xbb;(xx)(bb);(xb)(xb)
t391. c ,= Chop c
0 c
Proof. H:c 294;c 308;c 324 315;
1;
0;Chop c 309;c;Chop c
0
t392. c ,= Chop c
1 c
Proof. H:c 294;c 308;c 324 315;
0;
1;Chop c 309;c;Chop c
1
t393. c ,= & C Chop c Chop c C
0
0 c c
Proof. H:c:C 390;C;Chop c;
0 391;c 316;Chop c
0;c;Chop c
0;c 310;C
0;(Chop c
0)(Chop
c
0);cc
t394. c ,= & C Chop c Chop c C
1
1 c c
Proof. H:c:C 390;C;Chop c;
1 392;c 316;Chop c
1;c;Chop c
1;c 310;C
1;(Chop c
1)(Chop
c
1);cc
t395. X doubles x X
0
0 doubles x
0
Suppose not; then there is a c that gives a counterexample. Since X doubles x, there
is a C that works for X and Chop c. If c = , let the C for X00 be , and otherwise let it
be C00. Treat the case that x0 ends with 0c separately.
Proof. H:X:x 386
<
;X
0;x
0:c
A
386
>
;X;x;Chop c:C 390;X;x;
0
A
;
A
;C
0 261;X;
0
254;C;X;X
0 313;C 256;C;X;
0 303;x;
0 303;X;
0 306;x
0;
306;x
0;
0c 291;x 296;c;
0 304;X;
0C;
0 226;
0;
0;C
0 302;x
0;
1c
296;c;
1 304;X;
1C;
0 226;
1;
1;C 226;
1;C;
0 226;
1;
1;C
0 227;
0;
0;C;
0;
0 298;c;x
0 ?c=
? x
0 ends with
0c
t396. X doubles x X
1
1 doubles x
1
Proof. H:X:x 386
<
;X
1;x
1:c
A
386
>
;X;x;Chop c:C 390;X;x;
1
A
;
A
;C
1 261;X;
1
254;C;X;X
1 313;C 256;C;X;
1 303;x;
1 303;X;
1 306;x
1;
306;x
1;
1c 292;x 296;c;
1 304;X;
1C;
1 226;
1;
1;C
1 302;x
1;
0c
296;c;
0 304;X;
0C;
1 226;
0;
0;C 226;
0;C;
1 226;
0;
0;C
1 227;
1;
1;C;
1;
1 298;c;x
1 ?c=
? x
1 ends with
1c
t397. X (x
0) (x
0) Chop Chop X x x
Proof. H:X:x 326;x;x;
0;
0 309;(xx)(
0);(x
0)(x
0) 310;X;(x
0)(x
0);(xx)(
0) 226;x
x;
0;
0 322;X;((xx)
0)
0 291;((xx)
0) 322;Chop X;(xx)
0 291;(xx)
t398. X (x
1) (x
1) Chop Chop X x x
Proof. H:X:x 326;x;x;
1;
1 309;(xx)(
1);(x
1)(x
1) 310;X;(x
1)(x
1);(xx)(
1) 226;x
x;
1;
1 322;X;((xx)
1)
1 292;((xx)
1) 322;Chop X;(xx)
1 292;(xx)
74 CHAPTER 4. ARITHMETIC
t399. X doubles x
0 Chop Chop X doubles x
Proof. H:X:x 386
<
;Chop Chop X;x:c
A
386
>
;X;x
0;c
0:C
A
;Chop Chop C 253;
0 263;c;x;
0;
0 298;C;X
298;Chop C;Chop X 397;X;x 326;c;
0;c;
0 226;cc;
0;
0 291;(cc)
0 322;C;((cc)
0)
0 291;cc 322;Chop
C;(cc)
0 310;C;(c
0)(c
0);((cc)
0)
0 323;C;(cc)
0
c;
0 226;
0;c;
0 226;
0;
0;C 302;X;(
0)C 296;C;
0 296;Chop C;
0)Chop
C 226;
0;
1c;
0 226;
1;c;
0 226;
1;
1;C 302;X;(
1)C 296;C;
1 296;Chop
C;
1 302;Chop X;(
1)Chop C 226;
1;
1;Chop Chop C
t400. X doubles x
1 Chop Chop X doubles x
Proof. H:X:x 386
<
;Chop Chop X;x:c
A
386
>
;X;x
1;c
1:C
A
;Chop Chop C 253;
1 263;c;x;
1;
1 298;C;X
298;Chop C;Chop X 398;X;x 326;c;
1;c;
1 226;cc;
1;
1 292;(cc)
1 322;C;((cc)
1)
1 292;cc 322;Chop
C;(cc)
1 310;C;(c
1)(c
1);((cc)
1)
1 323;C;(cc)
1
c;
1 226;
1;c;
1 226;
1;
1;C 302;X;(
1)C 296;C;
1 296;Chop C;
1)Chop
C 226;
1;
0c;
1 226;
0;c;
1 226;
0;
0;C 302;X;(
0)C 296;C;
0 296;Chop
C;
0 302;Chop X;(
0)Chop C 226;
0;
0;Chop Chop C
t401. X doubles x
0 X = Chop Chop X
0
0
Proof. H:X:x 386
>
;X;x
0;:C 251;x
0 303;x;
0 299
>
;X;
0:a 226;a;
0;
0 291;a
0 291;a
t402. X doubles x
1 X = Chop Chop X
1
1
Proof. H:X:x 386
>
;X;x
1;:C 251;x
1 303;x;
1 299
>
;X;
1:a 226;a;
1;
1 292;a
1 292;a
t403. X doubles x Chop Chop X doubles Chop x
Proof. H:X:x 388;X 288 294;x 399;X;Chop x 400;X;Chop x
d404.
404
(x) Xy[X doubles x & X doubles y x = y]
t405.
404
()
Proof. H 404
<
;:X:y 388;X 389;y
t406.
404
(x)
404
(x
0)
Proof. H:x 404
<
;x
0 403;X;y 404
>
;x;Chop Chop X;Chop y 294;y 388;X 389;x
0;
0 226;Chop Chop X;
1;
1 238;Chop Chop X
0;Chop
Chop X
1
t407.
404
(x)
404
(x
1)
Proof. H:x 404
<
;x
1 403;X;y 404
>
;x;Chop Chop X;Chop y 294;y 388;X 389;x
1;
1 226;Chop Chop X;
0;
0 238;Chop Chop X
0;Chop
Chop X
1
t408.
404
(x)
Proof. H:x BSI,404;x:x
405; 406;x
407;x
410
<
;; 239; 387 251; 410
>
;x
:X
395;X
;x
410
<
;x
0;X
0 386
>
;X
0;x
0 307
>
;X
0;(x
0)(x
0) 396;X
;x
410
<
;x
1;X
1 386
>
;X
1;x
1 307
>
;X
1;(x
1)(x
1)
31. QUOTING STRINGS 75
d412.
412
(x) XY [X doubles x & Y doubles x X = Y ]
t413.
412
(x)
Proof. H:x BSI,412;x:x
?
412
() 412
<
;:X:Y 388;X 388;Y ?
412
(x
0) 412
<
;x
0:X
:Y
399;X
;x
399;Y
;x
412
>
;x
;Chop Chop X
;Chop Chop Y
401;X
;x
401;Y
;x
412
<
;x
1:X
:Y
400;X
;x
400;Y
;x
412
>
;x
;Chop Chop X
;Chop Chop Y
402;X
;x
402;Y
;x
0;
0 238;
0;
1 238;
1;
0 238;
1;
1 291;
0 291;
1 292;
0 292;
1 231
t425. Double = & Double (x
0) = Double x o & Double (x
1) = Double
x
Proof. H:x 387 417;; 416
>
;x;Double x 395;Double x;x 420 417;Double xo;x
0 396;Double
x;x 421 417;Double x;x
1
t426. Double x = Double y x = y
Proof. H:x:y 416
>
;x;Double x 416
>
;y;Double y 409;Double x;x;y
76 CHAPTER 4. ARITHMETIC
32. Strings of even length
Strings of even length are concatenations of the characters o , :.
d427. x has even length ax[x a a]
The bound holds automatically.
t428. x a a x has even length
Proof. H;x;a 427
<
;x;a 261;a;a 307
>
;x;aa 254;a;aa;x
t429. Double x has even length
Proof. H:x 416
>
;x;Double x 386
>
;Double x;x 428;Double x;x
t430. has even length
Proof. H 428;; 239; 308;
t431. x has even length & y x y has even length
Proof. H:x:y 427
>
;x:a 310;y;x;aa 428;y;a
t432. x has even length & y has even length x y has even length
Proof. H:x:y 427
>
;x:a 427
>
;y:b 326;a;a;b;b 427
<
;xy;ab 263;a;x;b;y 316;x;aa;y;bb 310;x
y;(aa)(bb);(ab)(ab)
d433. m has length two m = o m = m = , m = :
t434. m has length two m o
Proof. H:m 433
>
;m 420 421 422 423 324 308;
0 316;
0;
0;
0;
0 316;
0;
0;
1;
0 316;
1;
0;
0;
0 316;
1;
0;
1;
0
t435. has length two
Proof. H: 420 309;;o 313;o 434; 231 234;
0;
0
t436. m has length two & n has length two m n
Proof. H:m:n 434;m 434;n 309;n;o 310;m;o;n
t437. m has length two m has even length
Proof. H:m 434;m 420 428;m;
0
t438.
0 has even length
Proof. H 427
>
;
0 239;
1 438 439
32. STRINGS OF EVEN LENGTH 77
t441. x has even length & x ,= m[m has length two & x = Chop Chop
x m]
Proof. H:x
A
420 421 422 423 433
<
;o 433
<
; 433
<
;, 433
<
;: 440;x 294;x 294;Chop x 226;Chop
Chop x;
0;
0 226;Chop Chop x;
0;
1 226;Chop Chop x;
1;
0 226;Chop Chop x;
1;
1
A
;o
A
;
A
;,
A
;: ?x=Chop
x
0
t442. x has even length & x ,= & m has length two m _ x
Proof. H:x:m 441;x:n 262;n;Chop Chop x 436;m;n 320;m;n;x
t443. x has even length Chop Chop x has even length
Proof. H:x 427
>
;x:a ?a= 239; 313;x 288 428;; 322;x;aa 296;a;a 309;a;Chop a 310;Chop
x;aChop a;Chop aa 322;Chop x;Chop aa 296;a;Chop a 428;Chop Chop x;Chop a 317;a;Chop a
t444. x has even length Chip Chip x has even length
Proof. H:x 427
>
;x:a ?a= 239; 313;x 345 351;x;aa 347;a;a 310;Chip x;Chip aa;aChip
a 351;Chip x;aChip a 347;a;Chip a 428;Chip Chip x;Chip a 317;Chip a;a
t445. m has length two m ,= & Chop m ,= & Chop Chop m =
Proof. H:m 433
>
;m 420 421 422 423 ?m= 237;
0 237;
0 291;
1 292;
0 292;
1 293
t446. x has even length & x ,= Chip x ,=
Proof. H:x 344;x 239;
0 239;
1 438 439
t447. m has length two m ,= & Chip m ,= & Chip Chip m =
Proof. H:m 433
>
;m 420 421 422 423 445;m 437;m 446;m 346;
0 346;
1 346; 239;
0 239;
1
t448. x has even length & x y has even length y has even length
There exist a and b such that x a a and x y b b. Hence a a _ b b,
so a _ b by t372. By t368 there exists c such that a c = b. Therefore (a a) y
(a c) (a c) (a a) (c c). Cancel a a by t318 to conclude that y c c.
Proof. H:x:y 427
>
;x:a 427
>
;xy:b 309;x;aa 261;x;y 320;aa;x;xy 321;aa;xy;bb 372;a;b
368;a;b:c 317;a;c 310;ac;ca;b 310;xy;bb;(aa)(cc) 314;x;aa;y 309;xy;(aa)y 310;(aa)
y;xy;(aa)(cc) 309;ac;b 316;b;ac;b;ac 326;a;c;a;c 310;bb;(ac)(ac);(aa)(cc) 308;a
a 318;aa;aa;y;cc 428;y;c
t449. y has even length & x y has even length x has even length
Proof. H:y:x 317;x;y 431;xy;yx 309;xy;yx 448;y;x
t450. x has even length & y has even length & m has length two & x y
mx _ y
Proof. H:x:y:m 369;x;y:a 431;y;ax 449;x;a 442;a;m 256;m;a;x 307
>
;ax;y 254;mx;ax;y
t451. x has even length & a has even length & y has even length & b has even
length & xa = yb & b a j[j has even length & y = xj & a = j b
& j ,= & Chop j ,= & Chip j ,= ]
Note that by t247 the hypothesis b a can be replaced by x y.
Proof. H:x:a:y:b
A
371;x;a;y;b:j
A
;j 448;x;j 440;j 446;j
78 CHAPTER 4. ARITHMETIC
d452. even-appearance(a, x, c, y) a has even length & x has even length & c
has even length & y = a x c
d453. x appears evenly in y aycy[even-appearance(a, x, c, y)]
In the expanded alphabet of the four characters o , : a concatenation of them appears
evenly in another if and only if it is visible there when one forgets the denition of these
characters as concatenations of two bits. For example, , which is 11, appears evenly in
oo, which is 001100, but ,, which is 01, does not.
t454. even-appearance(a, x, c, y) x appears evenly in y & y has even length
Proof. H:a:x:c:y 453
<
;x;y;a;c 452
>
;a;x;c;y 261;a;xc 226;a;x;c 262;c;ax 432;x;c 432;a;xc
t455. x appears evenly in y x _ y & x has even length
Proof. H:x:y 453
>
;x;y:a:c 452
>
;a;x;c;y 261;x;c 262;xc;a 254;x;xc;y
t456. x appears evenly in y & z has even length x appears evenly in y z
Proof. H:x:y:z 453
>
;x;y:a:c 452
>
;a;x;c;y 261;y;z 254;a;y;yz 256;c;y;z 453
<
;x;yz;a;c
z 432;c;z 452
<
;a;x;cz;yz 226;x;c;z 226;a;xc;z
t457. x appears evenly in y & z has even length x appears evenly in z y
Proof. H:x:y:z 453
>
;x;y:a:c 452
>
;a;x;c;y 262;y;z 258;a;y;z 254;c;y;zy 453
<
;x;zy;za;c 432;z;a452
<
;z
a;x;c;zy 226;z;a;xc
Suppose that x has even length and z appears evenly in x y (so that z and y also
have even length). Then there are three cases: z appears evenly in x, or z appears evenly
in y, or z straddles x and y, meaning that it has non-empty even length overlap with the
end of x and with the beginning of y. The last case is impossible if z has length two.
t458. x has even length & even-appearance(a, z, c, x y) & y _ c z appears
evenly in x
[ x [ y [
[ a [ z [ c [
[ j [
Proof. H:x:a:z:c:y 452
>
;a;z;c;xy 454;a;z;c;xy 226;a;z;c 370;az;c;x;y:j 449;y;j 454;a;z;j;x 226;a;z;j
452
<
;a;z;j;x 448;x;y
t459. x has even length & even-appearance(a, z, c, x y) & x _ a z appears
evenly in y
[ x [ y [
[ a [ z [ c [
[ j [
Proof. H:x:a:z:c:y 452
>
;a;z;c;xy 432;z;c 432;a;zc 448;x;y 308;xy 246;x;y;a;zc 370;x;y;a;z
c:j 449;zc;j 452
<
;j;z;c;y 454;j;z;c;y
32. STRINGS OF EVEN LENGTH 79
t460. x has even length & even-appearance(a, z, c, x y) & c y & a x
jk[z = j k & j has even length & j ,= & k has even length & k ,=
& x = a j & y = k c]
[ x [ y [
[ a [ z [ c [
[ j [ k [
Proof. H:x:a:z:c:y
A
452
>
;a;z;c;xy 226;a;z;c 371;x;y;az;c:k 247;a;z;x;k 371;a;z;x;k:j
A
;j;k 448;a;j
432;a;z 448;x;k
t461. x has even length & z appears evenly in xy z appears evenly in x z
appears evenly in y jkac[even-appearance(a, z, c, xy) & z = j k & j has
even length & j ,= & k has even length & k ,= & x = a j & y = k c]
Proof. H:x:z:y
A
453
>
;z;xy:a:c 458;x;a;z;c;y 459;x;a;z;c;y 460;x;a;z;c;y:j:k
A
;j;k;a;c 249;y;c 249;x;a
t462. x has even length & m has length two & m appears evenly in x y m
appears evenly in x m appears evenly in y
Proof. H:x:m:y 461:x;m;y:j:k 440;k 445;m 296;k;j 296;Chop k;j 234;j;Chop Chop k
t463. m has length two & n has length two & m appears evenly in n m = n
Proof. H:m:n 453
>
:m;n:a:c 452
>
;a;m;c;n 436;n;m 319;n;a;m;c 239;m
t464. m has length two & n has length two & m appears evenly in x n m
appears evenly in x m = n
Proof. H:m:n:x 453
>
;m;xn:a:c 452
>
;a;m;c;xn 437;n 432;m;c 432;a;mc 449;n;x 462;x;m;n 463;m;n
d465.
465
(x) m[m has length two & m appears evenly in Double x m = o
m = ]
t466.
465
()
Proof. H 465
<
;:m 425 455;m; 252;m 435
t467.
465
(x)
465
(x
0)
Proof. H:x 465
<
;x
466; 467;x
468;x
1:a 226;a;
0;
1 292;a
0 291;a
t478. L
1
is a list & L
2
is a list & , appears evenly in x & even-appearance(a, ,
x ,, c, , L
1
L
2
) & L
1
_ a x is listed in L
2
Proof. H:L
1
:L
2
:x:a:c 472
>
;L
1
477;L
1
226;Chop Chop L
1
;,;L
2
226;,;Chop Chop L
1
;,L
2
317;,;Chop Chop L
1
431;L
1
;,Chop Chop L
1
320;,Chop Chop L
1
;L
1
;a 459;,Chop Chop L
1
;a;,
x,;c;,L
2
452
>
;a;,x,;c;,L
1
L
2
448;,;x, 449;,;x 433
<
;, 437;, 475
<
;x;L
2
t479. k has even length & k ,= Chop Chop (x k) = x Chop Chop k
Proof. H:k:x 440;k 296;k;x 296;Chop k;x
t480. j has even length & j ,= Chip Chip (j x) = Chip Chip j x
Proof. H:j:x 446;j 347;j;x 347;Chip j;x
t481. j has even length & j ,= & k has even length & k ,= Chip Chip
Chop Chop (j x k) = Chip Chip j x Chop Chop k
Proof. H:j:k:x 226;j;x;k 479;k;jx 226;j;x;Chop Chop k 480;j;xChop Chop k
t482. Chop Chop (x ,) = x
Proof. H:x 433
<
;, 445;, 296;,;x 296;Chop ,;x 239;x
t483. Chip Chip (, x) = x
Proof. H:x 433
<
;, 447;, 347;,;x 347;Chip ,;x 239;x
t484. Chip Chip Chop Chop (, x ,) = x
Proof. H:x 226;,;x;, 482;,x 483;x
33. LISTS 81
t485. j has even length & j ,= & k has even length & k ,= & j,k = ,x,
, appears evenly in x
Proof. H:j:k:x 481;j;k;, 484;x 443;k 444;j 433
<
;, 437;, 452
<
;Chip Chip j;,;Chop Chop
k;x 454;Chip Chip j;,;Chop Chop k;x
t486. L
1
is a list & L
2
is a list & even-appearance(a, , x ,, c, , L
1
L
2
)
& c L
2
k[k has even length & k ,= & L
2
= k c]
Proof. H:L
1
:L
2
:a:x:c
A
452
>
;a;,x,;c;,L
1
L
2
472
>
;L
1
433
<
;, 437;, 432;,;L
1
226;,;L
1
;L
2
226;a;,
x,;c 472
>
;L
2
432;a;,x, 451;,L
1
;L
2
;a,x,;c:k
A
;k
t487. L
1
is a list & L
2
is a list & even-appearance(a, , x ,, c, , L
1
L
2
)
& a L
1
j[j has even length & j ,= & , Chop Chop L
1
= a j]
Proof. H:L
1
:L
2
:a:x:c
A
451;a;(,x,)c;,Chop Chop L
1
;,L
2
:j
A
;j 452
>
;a;,x,;c;,L
1
L
2
432;,
x,;c 433
<
;, 437;, 472
>
;L
1
472
>
;L
2
432;,;L
2
477;L
1
443;L
1
432;,;Chop Chop L
1
226;Chop Chop
L
1
;,;L
2
226;,;Chop Chop L
1
;,L
2
250;a;Chop Chop L
1
;, 247;a;(,x,)c;,Chop Chop L
1
;,L
2
If , does not appears evenly in x, then x cannot straddle two lists.
t488. L
1
is a list & L
2
is a list & even-appearance(a, ,x,, c, ,L
1
L
2
) & ,
appears evenly in x L
1
_ a L
2
_ c
If not, we would have an impossible situation:
[ a [, x ,[ c [
[,[ Chop Chop L
1
[,[ L
2
[
[ j [,[ k [
Proof. H:L
1
:L
2
:a:x:c 249;L
1
;a 249;L
2
;c 452
>
;a;,x,;c;,L
1
L
2
486;L
1
;L
2
;a;x;c:k 487;L
1
;L
2
;a;x;c:j
472
>
;L
1
477;L
1
226;Chop Chop L
1
;,;L
2
226;,;Chop Chop L
1
;,L
2
226;,Chop Chop L
1
;,;L
2
226;(a
j),;k;c 226;a;,x,;c 241;a,x,;c;((aj),)k 226;a;j;, 226;a;j,;k 242;a;,x,;(j,)k
226;j;,;k 485;j;k;x
t489. L
1
is a list & L
2
is a list & x is listed in L
1
L
2
x is listed in L
1
x
is listed in L
2
Proof. H:L
1
:L
2
:x 475
>
;x;L
1
L
2
453
>
;,x,;,L
1
L
2
:a:c 452
>
;a;,x,;c;,L
1
L
2
488;L
1
;L
2
;a;x;c
476;L
1
;L
2
;x;a;c 478;L
1
;L
2
;x;a;c
t490. x is listed in L
1
& L
2
is a list x is listed in L
1
L
2
Proof. H:x:L
1
:L
2
474;L
1
;L
2
475
>
;x;L
1
472
>
;L
2
456;,x,;,L
1
;L
2
226;,;L
1
;L
2
475
<
;x;L
1
L
2
t491. L
1
is a list & x is listed in L
2
x is listed in L
1
L
2
Proof. H:L
1
;x;L
2
475
<
;x;L
1
L
2
475
>
;x;L
2
472
>
;L
1
474;L
1
;L
2
477;L
1
443;L
1
433
<
;, 437;, 0;Chop
Chop L
1
:C 432;,;C 457;,x,;,L
2
;,C 226;,;C;,L
2
226;C;,;L
2
t492. x is listed in L x _ L
Proof. H:x:L 475
>
;x;L 455;,x,;,L 259;,;x,;L 261;x;, 254;x;x,;L
Lists of a single element:
82 CHAPTER 4. ARITHMETIC
t493. x has even length & , appears evenly in x x is listed in x ,
Proof. H:x 475
<
;x;x, 432;x;, 433
<
;, 437;, 303;x;, 472
<
;x, 432;,;x, 430 452
<
;;,
x,;;,x, 454;;,x,;;,x, 239;,x,
t494. y has even length & x has even length & , y , appears evenly in , x
, appears evenly in x
Proof. H:y:x 453
>
;,y,;,x:a:c 452
>
;a;,y,;c;,x 433
<
;, 437;, 480;a;(,y,)c 226;,;y
,;c 454;Chip Chip a;,;(y,)c;x 452
<
;Chip Chip a;,;(y,)c;x 444;a 432;y;, 432;y,;c 239;(,
y,)c 483;x 242;,;x;(y,)c 226;y;,;c 452
<
;y;,;c;x 454;y;,;c;x
t495. x has even length & , appears evenly in x & y is listed in x, y = x
Proof. H:x:y 475
>
;y;x, 453
>
;,y,;,x,:a:c 452
>
;a;,y,;c;,x, 226;,;x;, 226;a;,
y,;c 479;c;a,y, 482;,x 443;c 226;a;,y,;Chop Chop c 452
<
;a;,y,;Chop Chop c;,
x 433
<
;, 437;, 454;a;,y,;Chop Chop c;,x 494;y;x 226;,;y;, 226;a;,y;, 241;,x;,;a,
y 480;a;,y 483;x 444;a 452
<
;Chip Chip a;,;y;x 454;Chip Chip a;,;y;x 239;,x, 242;,;x,;y
, 241;x;,;y 240;c;,y, 240;a;,y,
34. Functions
First we introduce ordered pairs.
d496. Pair(x, y) = Double x : Double y
t497. Pair(x, y) _ (x x) : (y y)
Proof. H:x:y 496;x;y 416
>
;x;Double x 416
>
;y;Double y 258;Double y;yy;: 258;:Double
y;:yy;Double x 254;Pair(x,y);Double x:yy;(xx):yy 256;Double x;xx;:yy
t498. Pair(x, y) = Pair(x
, y
) Double y
_ Double y
Proof. H:x:y:x
:y
496;x;y 496;x
;y
429;y
433
<
;: 437;: 452
<
;Double
x
;:;Double y
;Pair(x,y) 249;Double y
;: 458;Double x;Double x
;:;Double
y
;:Double y 471;x
t499. Pair(x, y) = Pair(x
, y
) x = x
& y = y
Proof. H:x:y:x
:y
498;x;y;x
;y
498;x
;y
;x;y 307
<
;Double y;Double y
496;x;y 496;x
;y
226;Double
x;:;Double y 226;Double x
;:;Double y
:;Double y
426;y;y
308;:
332;Double x;:;Double x
;: 426;x;x
& y _ y
Pair(x, y) _ Pair(x
, y
)
Proof. H:x:x
:y:y
496;x;y 496;x
;y
418;x;x
418;y;y
256;Double x;Double x
;: 263;Double
x:;Double x
:;Double y;Double y
;:;Double y
z[z = Pair(x
, y
)]
& z is an ordered pair x
= z x = x
Proof. H:x:z:x
:y:y
499;x;y;x
;y
?z is an ordered pair
t505. (EC) x
Proof. H:z
A A
;z 253;z 502
>
;z:x:y
A
;x;y
d506.
1
z = x x _ z & z is an ordered pair yz[z = Pair(x, y)]
& z is an ordered pair x = z
The construction of
2
is entirely similar.
t507. (UC) y _ z & z is an ordered pair xz[z = Pair(x, y)] & z is an
ordered pair y = z & y
z[z = Pair(x
, y
)]
& z is an ordered pair y
= z y = y
Proof. H:y:z:y
:x:x
499;x;y;x
;y
?z is an ordered pair
t508. (EC) y
Proof. H:z
A A
;z 253;z 502
>
;z:x:y
A
;y;x
d509.
2
z = y y _ z & z is an ordered pair xz[z = Pair(x, y)]
& z is an ordered pair y = z
t510.
1
Pair(x, y) = x &
2
Pair(x, y) = y
Proof. H:x:y 506
<
;Pair(x,y);x;y 500;x;y 509
<
;Pair(x,y);y;x
d511. L is a list of ordered pairs L is a list & zL[z is listed in L z is
an ordered pair]
t512. L is a list of ordered pairs & z is listed in L z is an ordered pair
Proof. H:L:z 511
>
;L;z 492;z;L
t513. L
1
is a list of ordered pairs & L
2
is a list of ordered pairs L
1
L
2
is a list
of ordered pairs
Proof. H:L
1
:L
2
511
<
;L
1
L
2
:z 511
>
;L
1
511
>
;L
2
474;L
1
;L
2
489;L
1
;L
2
;z 512;L
1
;z 512;L
2
;z
d514. f is a function list f is a list of ordered pairs & zfz
f[z is listed in
f & z
is listed in f &
1
z =
1
z
z = z
]
t515. f is a function list & z is listed in f & z
is listed in f &
1
z =
1
z
z = z
Proof. H:f:z:z
514
>
;f;z;z
492;z;f 492;z
;f
We call f a function list, rather than a function, since two function lists may have the
same ordered pairs listed, in a dierent order, without being equal. But function lists will
play the role of functions quite adequately.
84 CHAPTER 4. ARITHMETIC
d516. x is in the domain of f f is a function list & yf[Pair(x, y) is listed in f]
t517. x is in the domain of f x _ f
Proof. H:x:f 516
>
;x;f;y 492;Pair(x,y);f 496;x;y 419;x 261;Double x;:Double y 254;x;Double
x;Pair(x,y) 254;x;Pair(x,y);f
t518. x is in the domain of f & Pair(x, y) is listed in f & Pair(x, y
) is listed in f
y = y
Proof. H:x:f:y:y
516
>
;x;f 514
>
;f;Pair(x,y);Pair(x,y
) 510;x;y 510;x;y
492;Pair(x,y);f 492;Pair(x,y
);f
499;x;y;x;y
)
is listed in f] & [ x is in the domain of f y
= f] y = y
Proof. H:y:f:x:y
499;x;y;x;y
518;x;f;y;y
?x is in the domain of f
t520. (EC) yy _ f & [x is in the domain of f Pair(x, y) is listed in f] & [ x
is in the domain of f y = f]
Proof. H:f:x
A A
;f 253;f 516
>
;x;f:y
A
;y
d521. f x = y y _ f & [x is in the domain of f Pair(x, y) is listed in f]
& [ x is in the domain of f y = f]
The inx symbol is very tightly binding, so for example 2 f x 2 is parsed as
2
(f x) 2
.
t522. , appears evenly in Pair(x, y)
Proof. H:x:y 496;x;y 429;x 433
<
;, 462;Double x;,;:Double y 471;x 433
<
;: 437;: 462;:;,;Double
y 471;y 463;,;: 424
t523. Pair(x, y) has even length
Proof. H:x:y 496;x;y 429;x 429;y 433
<
;: 437;: 432;:;Double y 432;Double x;:Double y
t524. z is listed in Pair(x, y) , z = Pair(x, y)
Proof. H:z:x:y 523;x;y 522;x;y 495;Pair(x,y);z
t525. Pair(x, y) , is a list of ordered pairs
Proof. H:x:y 523;x;y 511
<
;Pair(x,y),:z 524;z;x;y 503;x;y 472
<
;Pair(x,y), 432;Pair(x,y);,
303;Pair(x,y);, 433
<
;, 437;,
t526. Pair(x, y) , is a function list
Proof. H:x:y 514
<
;Pair(x,y),:z:w 524;z;x;y 524;w;x;y 525;x;y
t527. x is in the domain of Pair(x, y) , & y _ Pair(x, y) , & Pair(x, y) is listed
in Pair(x, y) ,
Proof. H:x:y 526;x;y 516
<
;x;Pair(x,y),;y 523;x;y 493;Pair(x,y) 522;x;y 500;x;y 261;Pair(x,y);,
254;y;Pair(x,y);Pair(x,y),
t528.
Pair(x, y) ,
x = y
Proof. H:x:y 527;x;y 521
<
;Pair(x,y),;x;y
35. STRINGS OF ZEROS 85
t529. u is in the domain of Pair(x, y) , u = x
Proof. H:u:x:y 516
>
;u;Pair(x,y),:v 522;x;y 523;x;y 495;Pair(x,y);Pair(u,v) 510;x;y 510;u;v
t530. f is a function list & z is listed in f
1
z is in the domain of f
Proof. H:f:z 514
>
;f 512;f;z 502
>
;z:x:y 510;x;y 516
<
;x;f;y 492;z;f 254;y;z;f
Extensions of functions by one ordered pair:
t531. f is a function list & x is in the domain of f f Pair(x, y) , is a
function list
Proof. H:f:x:y 0;Pair(x,y),:g 514
<
;fg:z:z
514
>
;f;z;z
514
>
;g;z;z
? z is listed in f 515;f;z;z
524;z
f Pair(x, y),
u =
f u
Proof. H:u:f:x:y 0;Pair(x,y),:g 526;x;y 514
>
;g 511
>
;g 533;u;f;x;y 521
>
;f;u;f u 261;f;g 254;f u;f;f
g 490;Pair(u,f u);f;g 521
<
;fg;u;f u
t535. f is a function list & x is in the domain of f x is in the domain of
f Pair(x, y) ,
Proof. H:f:x:y 0;Pair(x,y),:g 531;f;x;y 527;x;y 514
>
;f 511
>
;f 491;f;Pair(x,y);g 516
<
;x;f
g;y 262;g;f 254;y;g;fg
t536. f is a function list & x is in the domain of f
f Pair(x, y) ,
x = y
Proof. H:f:x:y 0;Pair(x,y),:g 535;f;x;y 262;g;f 254;y;g;fg 521
<
;fg;x;y 527;x;y 514
>
;f
511
>
;f 491;f;Pair(x,y);g
35. Strings of zeros
Let x and y be strings all of whose bits are zero. Then so is x y, and x y = y x.
t537.
1 is a substring of x
1 is a substring of x
0
Proof. H:x 373
>
;
1;x
0:a:c 226;a;
1;c 239;a
1 238;x;a 296;c;a
1 291;x 226;a;
1;Chop c 374;
1;a;Chop
c
t538.
1 is a substring of
0
Proof. H 537; 376;
1 231 239;
0
d539.
539
(y) x[
1 is a substring of x &
1 is a substring of y
1 is a
substring of x y]
86 CHAPTER 4. ARITHMETIC
t540.
539
()
Proof. H 539
<
;:x 239;x
t541.
539
(y)
539
(y
0)
Proof. H:y 539
<
;y
0:x 226;x;y;
0 375;
1;y;
0 539
>
;y;x 537;xy
t542.
539
(y)
539
(y
1)
Proof. H:y 539
<
;y
1:x 374;
1;y; 239;
1
t543.
539
(y)
Proof. H:y BSI,539;y:y
540; 541;y
542;y
t544.
1 is a substring of x &
1 is a substring of y
1 is a substring of x y
Proof. H:x:y 543;y 539
>
;y;x
d545.
545
(x)
1 is a substring of x
0 x = x
0
t546.
545
()
Proof. H 545
<
; 239;
0
t547.
545
(x)
545
(x
0)
Proof. H:x 545
<
;x
0 375;
1;x;
0 545
>
;x 226;
0;x;
0
t548.
545
(x)
545
(x
1)
Proof. H:x 545
<
;x
1 374;
1;x; 239;
1
t549.
545
(x)
Proof. H:x BSI,545;x:x
546; 547;x
548;x
t550.
1 is a substring of x
0 x = x
0
Proof. H:x 549;x 545
>
;x
d551.
551
(x) y[
1 is a substring of x &
1 is a substring of y xy = yx]
t552.
551
()
Proof. H 551
<
;:y 239;y
t553.
551
(x)
551
(x
0)
Proof. H:x 551
<
;x
0:y 375;
1;x;
0 551
>
;x;y 226;y;x;
0 550;xy 226;
1 374;
1;x; 239;
1
t555.
551
(x)
Proof. H:x BSI,551;x:x
552 553;x
554;x
t556.
1 is a substring of x &
1 is a substring of y x y = y x
Proof. H:x:y 555;x 551
>
;x;y
35. STRINGS OF ZEROS 87
d557.
557
(x)
1 is a substring of x y
1 is a substring of y & x _ y
zy[
1 is a substring of z & x z = y]
t558.
557
()
Proof. H 557
<
;:y;y 253;y 239;y 376;
1 231
t559.
557
(x)
557
(x
0)
Proof. H:x 557
<
;x
0:y
A
291;x 298;x
0;y 377;
1;y 557
>
;x;Chop y:w
A
;w 252;x
0 234;x;
0 231 294;y
378;
1 375;
1;Chop y;
1 226;x;w;
0 538 556;w;
0 226;x;
0;w 375;
1;x;
0 262;w;x
0
t560.
557
(x)
557
(x
1)
Proof. H:x 557
<
;x
1 378;
1 375;
1;x;
1
t561.
557
(x)
Proof. H:x BSI,557;x:x
558 559;x
560;x
t562.
1 is a substring of x &
1 is a substring of y & x _ y zy[
1 is a
substring of z & x z = y]
Proof. H:x:y
A
561;x 557
>
;x;y;z
A
;z
Splitting strings of zeros:
If x is a string of zeros, there is a unique y such that x = yy or x = yy0, and we say
that x splits evenly or oddly accordingly.
d563.
563
(x)
1 is a substring of x yx[x = y y x = y y
0]
t564.
563
()
Proof. H 563
<
;; 239; 251;
t565.
563
(x)
563
(x
0)
Proof. H:x 563
<
;x
0
A
375;
1;x;
0 563
>
;x:y
A
;y 226;y;y;
0 261;x;
0 254;y;x;x
0
A
;y
0 256;y;x;
0 538 556;y;
0 226;y;
0;y 226;y
0;y;
0 375;
1;y;y
0
t566.
563
(x)
563
(x
1)
Proof. H:x 563
<
;x
1 374;
1;x; 239;
1
t567.
563
(x)
Proof. H:x BSI,563;x:x
564 565;x
566;x
t568.
1 is a substring of x yx[x = y y x = y y
0]
Proof. H:x
A
567;x 563
>
;x:y
A
;y
t569. x x is even x is even
Proof. H:x 113;x 126;x;x 121;xx
t570. x x 2 = y y y is even
Proof. H:x:y 70;x;x;2 103;xx 569;y
t571. x x 2 = y y x is even
Proof. H:x:y 570;x;y 100
>
;y:z 70;x;x;2 72;2;z 70;z2;z;2 93 150;2;xx;zz2 70;z;2;z 570;z;x
88 CHAPTER 4. ARITHMETIC
t572. z Sx & z ,= 0 & z = 2 w w x & w ,= 0
Proof. H:z:x:w 97;z 91 92 93 158;S0 176;1;z;2;w 178;w;z;Sx 162;w;x 5;2
d573.
573
(x) zy [z x & z ,= 0 & z z 2 = y y]
t574.
573
(0)
Proof. H 573
<
;0:z:y 82;z
t575.
573
(x)
573
(Sx)
Proof. H:x 573
<
;Sx:z:y 571;z;y 100
>
;z:w 570;z;y 100
>
;y:t 572;z;x;w 72;2;t 70;t2;t;2 70;2w;2
w;2 93 150;2;(2w)(2w);(t2)t 72;2;w 70;w2;w;2 70;t;2;t 70;t;t;2 150;2;(w2)w;tt 70;w;2;w 573
>
;x;w;t
t576.
573
(x)
Proof. H:x BI,573;x:x
574 575;x
t577. x ,= 0 x x 2 ,= y y
Proof. H:x:y 576;x 573
>
;x;x;y 80;x
We have just given the classical proof that
2 is irrational. This has the consequence
that a string of zeros cannot split both oddly and evenly.
t578. y y
0 ,= z z
Proof. H:y:z 225;y;y
0 225;y;
0 226;z;z;
0 241;yy;
0;zz 579;y;z
t581. (UC) y _ x &
1 is a substring of x [x = yy x = yy
0] &
1
is a substring of x y = & y
_ x &
1 is a substring of x [x = y
x = y
0] &
1 is a substring of x y
= y = y
Proof. H:y:x:y
580;x;y;y
?
1 is a substring of x ?x=yy
t582. (EC) y
y _ x &
1 is a substring of x [x = y y x = y y
0]
&
1 is a substring of x y =
Proof. H:x
A
568;x:y
A
;y
A
; 251;x
d583. Hx = y y _ x &
1 is a substring of x [x = yy x = yy
0]
&
1 is a substring of x y =
The notation H is for half, not to be confused with the Half of d280.
t584.
1 is a substring of x
1 is a substring of Hx
Proof. H:x 583
>
;x;Hx 375;
1;Hx;Hx 375;
1;Hx;Hx
0
t585. H =
Proof. H 583
<
;; 251; 239;
35. STRINGS OF ZEROS 89
t586. Hx _ x &
1 is a substring of Hx
Proof. H:x 583
>
;x;Hx 376;
1 231 375;
1;Hx;Hx 375;
1;Hx;Hx
0
t587. Hx Hx _ x
Proof. H:x 583
>
;x;Hx 239; 251;x 253;x 253;Hx 261;Hx;
0 263;Hx;Hx;Hx;Hx
0
t588. x ,= Hx
0 _ x
Proof. H:x 295;x 239;
0 295;Hx 258;
0;HxHx;x
t589. Hx _ x &
1 is a substring of Hx
Proof. H:x 583
>
;x;Hx 376;
1 231 375;
1;Hx;Hx 375;
1;Hx;Hx
0
t590. z _ x
0 Hz _ x
Proof. H:z:x 587;z 254;HzHz;z;x
0 295;Hz 258;
0;Hz;x 254;HzHz;x
1;
0;x 254;z;x
1;x
0
t592.
1 is a substring of x & x = Hx Hx H(x
0) = Hx & x
0 =
H(x
0) H(x
0)
0
Proof. H:x 537;x 583
>
;x
0;H(x
0) 226;Hx;Hx;
0 580;x
0;Hx;H(x
0) ?H(x
0)=Hx
In this proof we wrote x
0 = (HxHx)
0 = HxHx
0 and used the uniqueness
theorem t580 to obtain the result.
In the next proof, we write x
0 = (Hx Hx
0)
0 and then use t556, the
commutativity of concatenation on strings of zeros, to rewrite this as (Hx
0 Hx)
0.
After two re-associations we use t580 again to obtain the result.
t593.
1 is a substring of x & x = Hx Hx
0 H(x
0) = Hx
0
& x
0 = H(x
0) H(x
0)
Proof. H:x 537;x 583
>
;x
0;H(x
0 226;Hx;
0;Hx 226;Hx
0;Hx;
0 580;x
0;Hx
0;H(x
0) ?H(x
0)=Hx
0
Changing all bits to zero:
For every string x there is a unique string of zeros z = Zx such that x z.
t594.
1 is a substring of z &
1 is a substring of z
& z z
z = z
Proof. H:z:z
383;z 379
>
;z;z
d595.
595
(x) zx[
1 is a substring of z & x z]
t596.
595
()
Proof. H 595
<
;; 251; 376;
1 231 308;
t597.
595
(x)
595
(x
0)
Proof. H:x 595
>
;x:z 595
<
;x
0;z
0 256;z;x;
0 537;z 314;x;z;
0
t598.
595
(x)
595
(x
1)
Proof. H:x 595
>
;x:z 595
<
;x
1;z
0 255 263;z;x;
0;
1;
0
90 CHAPTER 4. ARITHMETIC
t599.
595
(x)
Proof. H:x BSI,595;x:x
596 597;x
598;x
_ x &
1 is a
substring of z
& x z
z = z
Proof. H:z:x:z
309;x;z 310;z;x;z
594;z;z
1 231 308;
t606.
1 is a substring of x Zx = x
Proof. H:x 602
<
;x;x 253;x 308;x
t607. H
0 =
Proof. H 538 583
<
;
0; 251;
0 239;
0
t608. Z
0 =
0
Proof. H 538 606;
0
t609. Z(x
0) = Zx
0
Proof. H:x 602
<
;x
0;Zx
0 602
>
;x;Zx 256;Zx;x;
0 537;Zx 314;x;Zx;
0
t610. ZHx = Hx
Proof. H:x 605 584;x 606;Hx 583
>
;x;Hx
36. Length
How should one count a heap of pebbles? By the following calculus. Split it as evenly
as possible; if it splits unevenly, write 1, and otherwise write 0. Repeat the process on the
smaller heap, writing the resulting bit to the left of the previous bit. Continue in this way.
When done, the result is the number of bits in binary. This method of counting has the
advantage over the usual way that the entire record of the procedure is linearly bounded,
whereas for the usual procedure it is only polynomially bounded. We do not yet have a
formalism allowing induction on polynomially bounded formulas. In fact, the chief goal of
this chapter is to develop such a formalism.
d611. length-step(u, f) u is in the domain of f & Hu is in the domain of f
& [u = HuHu f u = 2 f Hu] & [u = HuHu
0 f u = 2 f Hu+1]
36. LENGTH 91
d612. f is a length function for x
1 is a substring of x & x is in the domain
of f & f = 0 & uf[u is in the domain of f length-step(u, f)]
t613. f is a length function for x f is a function list & is in the domain of f
Proof. H:f:x 612
>
;f;x 516
>
;x;f 521
>
;f;;0 514
>
;f 511
>
;f 228 473;f
t614. f is a length function for x f is a length function for Hx
Proof. H:f:x 612
<
;f;Hx:u 612
>
;f;x;u 612
>
;f;x;x 611
>
;x;f 517;x;f 586;x
d615.
615
(x) zfg[z _ x & f is a length function for z & g is a length
function for z f z = g z]
t616.
615
()
Proof. H 615
<
;:z:f:g 252;z 612
>
;f; 612
>
;g;
t617.
615
(x)
615
(x
0)
Proof. H:x 615
<
;x
616; 617;x
618;x
u, f Pair(x, y) ,
0
We need to establish the existence of a length function g for x satisfying a linear bound
(72) [g[ + [x[
(which will be expressed by g _ bx x with occurrences of x and a variable-free
term b). Take = [Pair(, 0) ,[, so (72) holds when x = by t621. Let f be a length
function for Hx. Then there is a length function g for x satisfying
(73) [g[ [f[ +[Pair(x, 2 f Hx + 1) ,[
If f is a length function for t then the value f t will be exponentially shorter than t, but
it suces for our purposes to establish the crude bound
(74) [f t[ [t[
Applying this to t = Hx in (73) and using the fact that 2 t + 1 _ t
0, we nd
[g[ [f[ +[Pair(x, Hx
0) ,[
Since [Hx[
1
2
[x[, we obtain
[g[ [f[ + 3[x[ + 6
The 6 comes from 2 from the : in Pair, plus 2 more because the length of
0 gets doubled
in Pair, plus 2 from the nal ,. This gives
(75) [g[ [f[ + 9[x[
(which holds even when x = , for then we can choose g = f).
Now we prove (72) by linearly bounded string induction. As remarked, it holds when
x = . Again since [Hx[
1
2
[x[, by (75) and the induction hypothesis we have
[g[ +
2
[x[ + 9[x[
We want this to be + [x[, which holds provided we choose 18. The details
follow.
d627. Bd
627
(x, f) = Pair(x, 2 f Hx + 1) ,
t628. Pair(x, 2 f Hx) , _ Bd
627
(x, f)
Proof. H:x:f 627;x;f 74;2f Hx;1 267;2f Hx;2f Hx+1 253;x 501;x;x;2f Hx;2f Hx+1 256;Pair(x,2
f Hx);Pair(x,2f Hx+1);,
t629. f is a length function for Hx &
1 is a substring of x gf Bd
627
(x, f)[g
is a length function for x]
Proof. H:f:x
A A
;f
A
;fPair(x,2f Hx),
A
;fPair(x,2f Hx+1), 261;f;Bd
627
(x,f) 628;x;f
258;Pair(x,2f Hx),;Bd
627
(x,f);f 627;x;f 253;fBd
627
(x,f) 623;f;x 625;f;x 626;f;x 583
>
;x;Hx
This expresses (73).
36. LENGTH 93
The next theorem looks a bit strange, since t 2 t + 1 in binary appends a one
bit, not a zero bit. But a number n does not correspond to the string given by its binary
representation, but rather to the string following the initial 1 in the binary representation
of Sn.
t630. 2 t + 1 = t
0
Proof. H:t 221;t;
0;2t+1
d631.
631
(t) ft
[t
f t
_ t
]
t632.
631
()
Proof. H 631
<
;:f:t
252;t
622;f 268
t633.
631
(t)
631
(t
0)
Proof. H:t 631
<
;t
0:f:t
614;f;t
631
>
;t;f;Ht
612
>
;f;t
;t
517;t
;f 268 611
>
;t
;f 630;f Ht
256;f Ht
;Ht
0 254;Ht
0;t
;t
0 588;t
254;f t
;Ht
0;t
260;Ht
0;t ?t
= 583
>
;t
;Ht
74;2f Ht
;1
267;f t
;2f Ht
+1 254;f t
;f Ht
0;Ht
0
Reading this proof one will notice that the claim t
,= f t
_ t
1:f:t
614;f;t
631
>
;t;f;Ht
612
>
;f;t
;t
517;t
;f 268 611
>
;t
;f 630;f Ht
256;f Ht
;Ht
0 254;Ht
0;t
;t
0 588;t
254;f t
;Ht
0;t
260;Ht
1;
0;t 254;t
;t
1;t
0
?t
= 583
>
;t
;Ht
74;2f Ht
;1 267;f t
;2f Ht
+1 254;f t
;f Ht
0;Ht
0
t635.
631
(t)
Proof. H:t BSI,631;t:t
632; 633;t
634;t
0
t638. (Hx
0) (Hx
0) _ x o
Proof. H:x 0;(Hx
0)(Hx
0):T 326;Hx;
0;Hx;
0 307
>
;T;(HxHx)(
0)(Hx
0
497;x;Hx
0 254;P;Pair(x,Hx
such that M
t is the con-
catenation of copies of t. Then M
= M
and M
= M
+
. Here are the cases we need.
d642. M
2
t = t t
d643. M
3
t = t t t
d644. M
6
t = M
3
M
2
t
d645. M
9
t = M
3
M
3
t
d646. M
18
t = M
2
M
9
t
t647. u _ v M
3
u _ M
3
v
Proof. H:u:v 643;u 643;v 263;u;v;u;v 263;u;v;uu;vv
t648. u _ v M
9
u _ M
9
v
Proof. H:u:v 645;u 645;v 647;u;v 647;M
3
u;M
3
v
t649. M
6
t = M
2
M
3
t
Proof. H:t 642;t 643;t 643;M
2
t 642;M
3
t 644;t 226;t;t;t 226;tt;t;ttt 226;t;t;tt
t650. M
3
t M
6
t = M
9
t
Proof. H:t 645;t 649;t 643;M
3
t 642;M
3
t
t651. M
9
t M
9
t = M
18
t
Proof. H:t 646;t 642;M
9
t
t652. M
18
t = M
9
M
2
t
Proof. H:t 646;t 645;t 649;M
3
t 644;M
3
t 649;t 644;t 645;M
2
t
t653. M
18
Hx _ M
9
x
Proof. H:x 652;Hx 642;Hx 587;x 648;HxHx;x
t654. M
18
Hx M
9
x _ M
18
x
Proof. H:x 653;x 256;M
18
Hx;M
9
x;M
9
x 651;x
t655. x ,= M
3
o _ M
6
x
Proof. H:x 295;x 420 263;
0;x;
x
1 is a substring of x
g(Pair(, 0) ,) M
18
x
[g
is a length function for x
]
t659.
658
()
Proof. H 658
<
;:x
;Pair(,0), 252;x
621 261;Pair(,0),;M
18
t660.
658
(x)
658
(x
0)
Proof. H:x 0;Pair(,0),:P 658
<
;x
0:x
A
658
>
;x;Hx
:f 590;x
;x 657;f;x
:g
A
;g 226;P;M
18
Hx
;M
9
x
654;x
256;f;PM
18
Hx
;M
9
x
254;g;fM
9
x
;(PM
18
Hx
)M
9
x
258;M
18
Hx
M
9
x
;M
18
x
;P 254;g;(P
M
18
Hx
)M
9
x
;PM
18
x
589;x
t661.
658
(x)
658
(x
1)
Proof. H:x 0;Pair(,0),:P 658
<
;x
1:x
A
658
>
;x;Hx
:f 591;x
;x 657;f;x
:g
A
;g 226;P;M
18
Hx
;M
9
x
654;x
256;f;PM
18
Hx
;M
9
x
254;g;fM
9
x
;(PM
18
Hx
)M
9
x
258;M
18
Hx
M
9
x
;M
18
x
;P 254;g;(P
M
18
Hx
)M
9
x
;PM
18
x
589;x
t662.
658
(x)
Proof. H:x BSI,658;x:x
659; 660;x
661;x
d663. Bd
663
x = (Pair(, 0) ,) M
18
x
t664.
1 is a substring of x fBd
663
x[f is a length function for x]
Proof. H:x
A
662;x 658
>
;x;x:f 253;x 663;x
A
;f
This establishes (72).
t665. (UC) l _ x & fBd
663
Zx[f is a length function for Zx & f Zx = l] & l
1
_ x
& f
1
Bd
663
Zx[f
1
is a length function for Zx & f
1
Zx = l
1
] l = l
1
Proof. H:l:x:l
1
:f:f
1
620;f;Zx;f
1
t666. (EC) ll _ x & fBd
663
Zx[f is a length function for Zx & f Zx = l]
Proof. H:x
A
602
>
;x;Zx 664;Zx:f
A
;f Zx;f 636;f;Zx 307
>
;x;Zx 254;f Zx;Zx;x
d667. Length x = l l _ x & fBd
663
Zx[f is a length function for Zx
& f Zx = l]
Let us verify that Length has the characteristic properties of length: Length = 0 and
Length (x
0) = Length (x
1 231 664;:f
A
;f 622;f
t669. f is a length function for Zx f Zx = Length x
Proof. H:f:x 667
>
;x;Length x:g 620;f;Zx;g
96 CHAPTER 4. ARITHMETIC
t670. x y Length x = Length y
Proof. H:x:y 603;x;y 667
>
;x;Length x:f 669;f;y
t671. Zx = HZx HZx Length x = 2 Length HZx
Proof. H:x 667
>
;x;Length x:f 612
>
;f;Zx;Zx 517;Zx;f 611
>
;Zx;f 614;f;Zx 669;f;HZx 610;Zx
t672. Zx = HZx HZx
0 Length x = 2 Length HZx + 1
Proof. H:x 667
>
;x;Length x:f 612
>
;f;Zx;Zx 517;Zx;f 611
>
;Zx;f 614;f;Zx 669;f;HZx 610;Zx
t673. Length
0 = 1
Proof. H 607 608 672;
0; 239;
0 672;u
0 602
>
;u;Zu 592;Zu 593;Zu ?Zu=
HZuHZu 583
>
;Zu;HZu 590;Zu;x 254;Zu;u;x
0 674
>
;x;HZu 95 68;2Length HZu;1;1 69;2;Length
HZu;1 96;2
t677.
674
(x)
674
(x
1)
Proof. H:x 674
<
;x
1;
0;x 254;u;x
1;x
0 676;x 674
>
;x
0;u
t678.
674
(x)
Proof. H:x BSI,674;x:x
675; 676;x
677;x
t679. Length (x
0) = Length x + 1
Proof. H:x 678;x 674
>
;x;x 253;x
t680. Length (x
1) = Length x + 1
Proof. H:x 324 315;
1;
0;x 670;x
1;x
0 679;x
d681.
681
(y) x[Length (x y) = Length x + Length y]
t682.
681
()
Proof. H 681
<
;:x 239;x 668 3;Length x
t683.
681
(y)
681
(y
0)
Proof. H:y 681
<
;y
0 679;xy
t684.
681
(y)
681
(y
1)
Proof. H:y 681
<
;y
1 680;xy
t685.
681
(y)
Proof. H:y BSI,681;y:y
682; 683;y
684;y
0;
1 688;
1;
0 173;Length
0;Length
1 673
37. String multiplication
The zero product of two strings x and y, denoted by xy, is the string of length [x[ [y[
all of whose bits are zero. This clearly cannot be expressed by a linearly bounded function
symbol, but we shall express it by means of a relativization. First we establish a lemma.
d694.
694
(l) zl Length z wz[Length w = l]
t695.
694
(0)
Proof. H 694
<
;0:z; 668 251;z
t696.
694
(l)
694
(Sl)
Proof. H:l 694
<
;Sl:z
A
694
>
;l;z:w
A
;w
0 673 686;w;
0 690;w
695 696;l
0:y
A
699
>
;x;y:z
A
;zy 673 128;Length x;1;Length y 97;Length y 686;x;
0 686;z;y
t702.
699
(x)
699
(x
1)
Proof. H:x 699
<
;x
1:y
A
699
>
;x;y:z
A
;zy 693 128;Length x;1;Length y 97;Length y 686;x;
1 686;z;y
t703.
699
(x) & u _ x
699
(u)
Proof. H:x:u 699
<
;u:y
A
699
>
;x;y:z 688;u;x 89;Length u;Length x;Length y 698;Length uLength
y;z:w
A
;w
In other words,
699
(x) is equivalent to
(0)
699
(x).
t704.
699
(x
1
) &
699
(x
2
)
699
(x
1
x
2
)
Proof. H:x
1
:x
2
699
<
;x
1
x
2
:y
A
699
>
;x
1
;y:z
1
699
>
;x
2
;y:z
2
A
;z
1
z
2
686;x
1
;x
2
686;z
1
;z
2
128;Length
x
1
;Length x
2
;Length y
In other words,
699
(x) is equivalent to
(1)
699
and can be used as a relativizing predicate.
Next we prove that its relativization by itself is a theorem, so we can adjoin it as a
relativized axiom.
t705.
699
(x) &
699
(y) z[
699
(z) & Length z = Length x Length y]
Proof. H:x:y
A
699
>
;x;y:z
A
;z 699
<
;z:u
B
699
>
;y;u:v 699
>
;x;v:w
B
;w 70;Length x;Length
y;Length u
a706. z[Length z = Length x Length y]
t707. (UC) Length x Length y = Length z &
1 is a substring of z & Length
x Length y = Length z
&
1 is a substring of z
z = z
Proof. H:x:y:z:z
692;z;z
0;x;Zx
t715.
1 x = Zx
Proof. H:x 693 97;Length x 687;x 602
>
;x;Zx 709
<
;
1;x;Zx
t716. x _ y z x _ z y
Proof. H:x:y:z 690;zx;zy 688;x;y 709
>
;z;x;zx 709
>
;z;y;zy 88;Length x;Length y;Length z
38. The third relativization schema
We shall extend the relativization schema of 28 to include , allowing in bounds.
For convenience of reference, the theorem schemata for
(1)
are repeated here.
tBSI9. sind
[
(1)
(x)
(0)
(x)]
tBSI10. sind
(1)
()
tBSI11. sind
[
(1)
(x)
(1)
(x
0)]
tBSI12. sind
[
(1)
(x)
(1)
(x
1)]
tBSI13. sind
[
(1)
(x) & u _ x
(1)
(u)]
tBSI14. sind
[
(1)
(x
1
) &
(1)
(x
2
)
(1)
(x
1
x
2
)]
dBSI15.
(2)
(x) y[
(1)
(y)
(1)
(y x)]
tBSI16. sind
[
(2)
(x)
(1)
(x)]
Suppose
(2)
(x) and let y = . We have
(1)
() by tBSI10 and so
(1)
(
0) by tBSI11.
Hence
(1)
(
0 x) holds; i.e.,
(1)
(Zx). But x _ Zx, so
(1)
(x) follows from tBSI13.
Proof. H:x BSI15
>
;x;
0 714;x 602
>
;x;Zx BSI13;Zx;x 307
>
;x;Zx
tBSI17. sind
(2)
()
Suppose
(1)
(y). We need to show that
(1)
(y ). But y = , so this holds
by tBSI10.
Proof. H BSI15
<
;:y 710;y BSI10
tBSI18. sind
[
(2)
(x)
(2)
(x
0)]
Suppose
(2)
(x) and
(1)
(y). We need to show that
(1)
y (x
0)
; i.e., that
(1)
(y x) (y
0)
. Since
(2)
(x) we have
(1)
(y x). Now y
0 = Zy and Zy _ y,
so
(1)
(y
0) holds by tBSI13. Thus the result holds by tBSI14.
Proof. H:x BSI15
<
;x
0:y 711;y;x;
0 BSI15
>
;x;y 713;y;
0 714;y 602
>
;y;Zy BSI13;y;Zy BSI14;yx;y
0
tBSI19. sind
[
(2)
(x)
(2)
(x
1)]
Since y
1 is also equal to Zy, the proof is entirely similar.
Proof. H:x BSI15
<
;x
1:y 711;y;x;
1 BSI15
>
;x;y 713;y;
1 715;y 602
>
;y;Zy BSI13;y;Zy BSI14;yx;y
1
tBSI20. sind
[
(2)
(x) & u _ x
(2)
(u)]
Now construct a theory schema Q
0
, superstring theory, by adjoining BSI in which
is allowed in bounds. Q
0
is locally relativizable in Q
0
.
CHAPTER 5
Syntax
In this chapter we arithmetize syntactical notions.
39. Symbols
Symbols will be arithmetized as ordered triples followed by , (so they are lists of
a single element), where the rst component is the type (0 for variables, 1 for function
symbols, 2 for predicate symbols, 3 for logical operators), the second is the index, and the
third is a label.
d717. Triple(x, y, z) = Pair
x, Pair(y, z)
, y
, z
) x = x
& y = y
& z = z
Proof. H:x:y:z:x
:y
:z
717;x;y;z 717;x
;y
;z
499;x;Pair(y,z);x
;Pair(y
,z
) 499;y;z;y
;z
2
Triple(x, y, z) = y &
2
2
Triple(x, y, z) = z
Proof. H:x:y:z 717;x;y;z 510;x;Pair(y,z) 510;y;z
d723. x encodes a variable x
0
x[x = x
0
, & x
0
is an ordered triple &
1
x
0
= 0
&
1
2
x
0
= 0]
d724. f encodes a function symbol f
0
_ f[f = f
0
, & f
0
is an ordered triple
&
1
f
0
= 1]
d725. p encodes a predicate symbol p
0
_ p[p = p
0
, & p
0
is an ordered triple
&
1
p
0
= 2]
d726. = Triple(S2, 1, 0) ,
d727.
= Triple(S2, 2, 0) ,
d728.
= Triple(S2, 2, 1) ,
d729. s encodes a symbol s encodes a variable s encodes a function symbol
s encodes a predicate symbol s = s =
s =
100
40. EXPRESSIONS 101
t730. s encodes a symbol t[t is an ordered triple & s = t ,]
Proof. H:s
A
729
>
;s ? s encodes a variable 723
>
;s:x
0
A
;x
0
? s encodes a function symbol
724
>
;s:f
0
A
;f
0
725
>
;s:p
0
A
;p
0
726 721;S2;1;0
A
;Triple(S2,1,0) 727 721;S2;2;0
A
;Triple(S2,2,0) 728
721;S2;2;1
A
;Triple(S2,2,1)
d731.
0 = Triple(1, 0, 0) ,
d732. = = Triple(2, 2, 0) ,
40. Expressions
An expression is a concatenation of symbols, so it either empty or a list of symbols
shorn of the concluding ,.
d733. u encodes an expression u = u is a list & tu[t is listed in u
t , encodes a symbol]
to be continued
expression is the need of my soul
i was once a vers libre bard
but i died and my soul went into the body of a cockroach
it has given me a new outlook upon life
DON MARQUIS