Incompleteness

Representability in Q\Th{Q}source

Reading preferences

Optional display controls need JavaScript. All reading content and navigation work without it.

Source file content/incompleteness/representability-in-q/representability-in-q.tex

Source file content/incompleteness/representability-in-q/introduction.tex

Introduction

The incompleteness theorems apply to theories in which basic facts about computable functions can be expressed and proved. We will describe a very minimal such theory called “Q\Th{Q}source” (or, sometimes, “Robinson's QQsource,” after Raphael Robinson). We will say what it means for a function to be representable in Q\Th{Q}source, and then we will prove the following:

A function is representable in Q\Th{Q}source if and only if it is computable.

For one thing, this provides us with another model of computability. But we will also use it to show that the set {A:QA}\Setabs{!A}{\Th{Q} \Proves !A}source is not decidable, by reducing the halting problem to it. By the time we are done, we will have proved much stronger things than this.

The language of Q\Th{Q}source is the language of arithmetic; Q\Th{Q}source consists of the following axioms (to be used in conjunction with the other axioms and rules of first-order logic with identity predicate):

xy(x=yx=y)row label Q1x0xrow label Q2x(x=0yx=y)row label Q3x(x+0)=xrow label Q4xy(x+y)=(x+y)row label Q5x(x×0)=0row label Q6xy(x×y)=((x×y)+x)row label Q7xy(x<yz(z+x)=y)row label Q8& \lforall[x][\lforall[y][(\eq[x'][y'] \lif \eq[x][y])]] \tag{$!Q_1$}\\ & \lforall[x][\eq/[\Obj 0][x']] \tag{$!Q_2$}\\ & \lforall[x][(\eq[x][\Obj 0] \lor \lexists[y][\eq[x][y']])] \tag{$!Q_3$}\\ & \lforall[x][\eq[(x + \Obj 0)][x]] \tag{$!Q_4$}\\ & \lforall[x][\lforall[y][\eq[(x + y')][(x + y)']]] \tag{$!Q_5$}\\ & \lforall[x][\eq[(x \times \Obj 0)][\Obj 0]] \tag{$!Q_6$}\\ & \lforall[x][\lforall[y][\eq[(x \times y')][((x \times y) + x)]]] \tag{$!Q_7$}\\ & \lforall[x][\lforall[y][(x < y \liff \lexists[z][\eq[(z' + x)][y]])]] \tag{$!Q_8$}source

For each natural number nnsource, define the numeral n¯\num{n}source to be the term 0\Obj{0}^{\prime\prime\ldots\prime}source where there are nnsource tick marks in all. So, 0¯\num{0}source is the constant symbol 0\Obj{0}source by itself, 1¯\num{1}source is 0\Obj{0}'source, 2¯\num{2}source is 0\Obj{0}''source, etc.

As a theory of arithmetic, Q\Th{Q}source is extremely weak; for example, you can't even prove very simple facts like xxx\lforall[x][\eq/[x][x']]source or xy(x+y)=(y+x)\lforall[x][\lforall[y][(x + y) = (y + x)]]source. But we will see that much of the reason that Q\Th{Q}source is so interesting is because it is so weak. In fact, it is just barely strong enough for the incompleteness theorem to hold. Another reason Q\Th{Q}source is interesting is because it has a finite set of axioms.

A stronger theory than Q\Th{Q}source (called Peano arithmetic PA\Th{PA}source) is obtained by adding a schema of induction to Q\Th{Q}source:

(A(0)x(A(x)A(x)))xA(x)(!A(\Obj 0) \land \lforall[x][(!A(x) \lif !A(x'))]) \lif \lforall[x][!A(x)]source

where A(x)!A(x)source is any formula. If A(x)!A(x)source contains free variables other than xxsource, we add universal quantifiers to the front to bind all of them (so that the corresponding instance of the induction schema is a sentence). For instance, if A(x,y)!A(x, y)source also contains the variable yysource free, the corresponding instance is

y((A(0)x(A(x)A(x)))xA(x))\lforall[y][((!A(\Obj 0) \land \lforall[x][(!A(x) \lif !A(x'))]) \lif \lforall[x][!A(x)])]source

Using instances of the induction schema, one can prove much more from the axioms of PA\Th{PA}source than from those of Q\Th{Q}source. In fact, it takes a good deal of work to find “natural” statements about the natural numbers that can't be proved in Peano arithmetic!

Representability of a numerical function in Q

A function f(x0,,xk)f(x_0,\ldots,x_k)source from the natural numbers to the natural numbers is said to be em representable in Q\Th{Q}source if there is a formula Af(x0,,xk,y)!A_f(x_0,\dots,x_k,y)source such that whenever f(n0,,nk)=mf(n_0,\dots,n_k) = msource, Q\Th{Q}source proves

  1. Af(n0¯,,nk¯,m¯)!A_f(\num{n_0}, \dots, \num{n_k}, \num{m})source

  2. y(Af(n0¯,,nk¯,y)m¯=y)\lforall[y][(!A_f(\num{n_0}, \dots, \num{n_k}, y) \lif \num{m} = y)]source.

There are other ways of stating the definition; for example, we could equivalently require that Q\Th{Q}source proves y(Af(n0¯,,nk¯,y)y=m¯)\lforall[y][(!A_f(\num{n_0}, \dots, \num{n_k}, y) \liff \eq[y][\num{m}])]source.

Functions representable in Q are exactly the computable functions

A function is representable in Q\Th{Q}source if and only if it is computable.

There are two directions to proving the theorem. The left-to-right direction is fairly straightforward once arithmetization of syntax is in place. The other direction requires more work. Here is the basic idea: we pick “general recursive” as a way of making “computable” precise, and show that every general recursive function is representable in Q\Th{Q}source. Recall that a function is general recursive if it can be defined from zero\Zerosource, the successor function succ\Succsource, and the projection functions Pin\Proj{n}{i}source, using composition, primitive recursion, and regular minimization. So one way of showing that every general recursive function is representable in Q\Th{Q}source is to show that the basic functions are representable, and whenever some functions are representable, then so are the functions defined from them using composition, primitive recursion, and regular minimization. In other words, we might show that the basic functions are representable, and that the representable functions are “closed under” composition, primitive recursion, and regular minimization. This guarantees that every general recursive function is representable.

It turns out that the step where we would show that representable functions are closed under primitive recursion is hard. In order to avoid this step, we show first that in fact we can do without primitive recursion. That is, we show that every general recursive function can be defined from basic functions using composition and regular minimization alone. To do this, we show that primitive recursion can actually be done by a specific regular minimization. However, for this to work, we have to add some additional basic functions: addition, multiplication, and the characteristic function of the identity relation χ=\Char{=}source. Then, we can prove the theorem by showing that all of these basic functions are representable in Q\Th{Q}source, and the representable functions are closed under composition and regular minimization.

Source file content/incompleteness/representability-in-q/representable-comp.tex

Functions Representable in Q\Th{Q}source are Computable

We'll prove that every function that is representable in Q\Th{Q}source is computable. We first have to establish a lemma about functions representable in Q\Th{Q}source.

Provable instances of a representing formula identify the correct value

If f(x0,,xk)f(x_0, \dots, x_k)source is representable in Q\Th{Q}source, there is a formula A(x0,,xk,y)!A(x_0, \dots, x_k, y)source such that

QAf(n0¯,,nk¯,m¯)iffm=f(n0,,nk).\Th{Q} \Proves !A_f(\num{n_0}, \dots, \num{n_k}, \num{m}) \quad\text{iff}\quad m = f(n_0, \dots, n_k).source

Proof

The “if” part is the definition of function representability in Qits first clause, proving the correct numeral instance. The “only if” part is seen as follows: Suppose QAf(n0¯,,nk¯,m¯)\Th{Q} \Proves !A_f(\num{n_0}, \dots, \num{n_k}, \num{m})source but mf(n0,,nk)m \neq f(n_0, \dots, n_k)source. Let l=f(n0,,nk)l = f(n_0, \dots, n_k)source. By the definition of function representability in Qits first clause, proving the correct numeral instance, QAf(n0¯,,nk¯,l¯)\Th{Q} \Proves !A_f(\num{n_0}, \dots, \num{n_k}, \num{l})source. By the definition of function representability in Qits second clause, proving uniqueness of the output, y(Af(n0¯,,nk¯,y)l¯=y)\lforall[y][(!A_f(\num{n_0}, \dots, \num{n_k}, y) \lif \num{l} = y)]source. Using logic and the assumption that QAf(n0¯,,nk¯,m¯)\Th{Q} \Proves !A_f(\num{n_0}, \dots, \num{n_k}, \num{m})source, we get that Ql¯=m¯\Th{Q} \Proves \eq[\num{l}][\num{m}]source. On the other hand, by the lemma that Q proves distinct numerals unequal, Ql¯m¯\Th{Q} \Proves \eq/[\num{l}][\num{m}]source. So Q\Th{Q}source is inconsistent. But that is impossible, since Q\Th{Q}source is satisfied by the standard model (see the definition of the standard model of arithmetic), NQ\Sat{N}{\Th{Q}}source, and satisfiable theories are always consistent by the Soundness Theorem (references the soundness corollary that satisfiable theories are consistent, for axiomatic derivations, the soundness corollary that satisfiable theories are consistent, for sequent calculus, the soundness corollary that satisfiable theories are consistent, for natural deduction, and the soundness corollary that satisfiable theories are consistent, for tableaux).

Every function representable in Q is computable

Every function that is representable in Q\Th{Q}source is computable.

Proof

Let's first give the intuitive idea for why this is true. To compute ffsource, we do the following. List all the possible derivations δ\deltasource in the language of arithmetic. This is possible to do mechanically. For each one, check if it is a derivation of a formula of the form Af(n0¯,,nk¯,m¯)!A_f(\num{n_0}, \dots, \num{n_k}, \num{m})source (the formula representing ffsource in Q\Th{Q}source from the lemma equating provable representing instances with correct function values). If it is, m=f(n0,,nk)m = f(n_0, \dots, n_k)source by the lemma equating provable representing instances with correct function values, and we've found the value of ffsource. The search terminates because QAf(n0¯,,nk¯,f(n0,,nk)¯)\Th{Q} \Proves !A_f(\num{n_0}, \dots, \num{n_k}, \num{f(n_0, \dots, n_k)})source, so eventually we find a δ\deltasource of the right sort.

This is not quite precise because our procedure operates on derivations and formulas instead of just on numbers, and we haven't explained exactly why “listing all possible derivations” is mechanically possible. But as we've seen, it is possible to code terms, formulas, and derivations by Gödel numbers. We've also introduced a precise model of computation, the general recursive functions. And we've seen that the relation PrfQ(d,y)\Prf[\Th{Q}](d,y)source, which holds iff ddsource is the Gödel number of a derivation of the formula with Gödel number yysource from the axioms of Q\Th{Q}source, is (primitive) recursive. Other primitive recursive functions we'll need are num\fn{num}source (the proposition that numeral coding is primitive recursive) and Subst\fn{Subst}source (the proposition that substitution coding is primitive recursive). From these, it is possible to define ffsource by minimization; thus, ffsource is recursive.

First, define

A(n0,,nk,m)=Subst(Subst(Subst(#Af#,num(n0),#x0#),),num(nk),#xk#),num(m),#y#)A(n_0, \dots, n_k, m) = \\ \fn{Subst}(\fn{Subst}(\dots\fn{Subst}(\Gn{!A_f}, \fn{num}(n_0), \Gn{x_0}),\\ \dots), \fn{num}(n_k), \Gn{x_k}), \fn{num}(m), \Gn{y})source

This looks complicated, but it's just the function A(n0,,nk,m)=#Af(n0¯,,nk¯,m¯)#A(n_0, \dots, n_k, m) = \Gn{!A_f(\num{n_0}, \dots, \num{n_k}, \num{m})}source.

Now, consider the relation R(n0,,nk,s)R(n_0, \dots, n_k, s)source which holds if (s)0(s)_0source is the Gödel number of a derivation from Q\Th{Q}source of Af(n0¯,,nk¯,(s)1¯)!A_f(\num{n_0}, \dots, \num{n_k}, \num{(s)_1})source:

R(n0,,nk,s)iffPrfQ((s)0,A(n0,,nk,(s)1))R(n_0, \dots, n_k, s) \quad\text{iff}\quad \Prf[\Th{Q}]((s)_0, A(n_0, \dots, n_k, (s)_1))source

If we can find an sssource such that R(n0,,nk,s)R(n_0, \dots, n_k, s)source holds, we have found a pair of numbers---(s)0(s)_0source and (s)1(s)_1source---such that (s)0(s)_0source is the Gödel number of a derivation of Af(n0¯,,nk¯,(s)1)A_f(\num{n_0}, \dots, \num{n_k}, (s)_1)source. So looking for sssource is like looking for the pair ddsource and mmsource in the informal proof. And a computable function that “looks for” such an sssource can be defined by regular minimization. Note that RRsource is regular: for every n0n_0source, dots, nkn_ksource, there is a derivation δ\deltasource of QAf(n0¯,,nk¯,f(n0,,nk)¯)\Th{Q} \Proves !A_f(\num{n_0}, \dots, \num{n_k}, \num{f(n_0, \dots, n_k)})source, so R(n0,,nk,s)R(n_0, \dots, n_k, s)source holds for s=#δ#,f(n0,,nk)s = \tuple{\Gn{\delta}, f(n_0, \dots, n_k)}source. So, we can write ffsource as

f(n0,,nk)=(μsR(n0,,nk,s))1.f(n_0,\dots,n_{k}) = (\umin{s}{R(n_0, \dots, n_k, s)})_1.source

Source file content/incompleteness/representability-in-q/beta-function.tex

The Beta Function Lemma

In order to show that we can carry out primitive recursion if addition, multiplication, and χ=\Char{=}source are available, we need to develop functions that handle sequences. (If we had exponentiation as well, our task would be easier.) When we had primitive recursion, we could define things like the “nnsource-th prime,” and pick a fairly straightforward coding. But here we do not have primitive recursion---in fact we want to show that we can do primitive recursion using minimization---so we need to be more clever.

The beta function lemma

There is a function β(d,i)\beta(d,i)source such that for every sequence a0a_0source, dots, ana_nsource there is a number ddsource, such that for every ini \le nsource, β(d,i)=ai\beta(d,i) = a_isource. Moreover, β\betasource can be defined from the basic functions using just composition and regular minimization.

Think of ddsource as coding the sequence a0,,an\tuple{a_0, \dots, a_n}source, and β(d,i)\beta(d,i)source returning the iisource-th element. (Note that this “coding” does not use the power-of-primes coding we're already familiar with!). The lemma is fairly minimal; it doesn't say we can concatenate sequences or append elements, or even that we can compute ddsource from a0a_0source, dots, ana_nsource using functions definable by composition and regular minimization. All it says is that there is a “decoding” function such that every sequence is “coded.”

The use of the notation β\betasource is Gödel's. To repeat, the hard part of proving the lemma is defining a suitable β\betasource using the seemingly restricted resources, i.e., using just composition and minimization---however, we're allowed to use addition, multiplication, and χ=\Char{=}source. There are various ways to prove this lemma, but one of the cleanest is still Gödel's original method, which used a number-theoretic fact called Sunzi's Theorem (traditionally, the “Chinese Remainder Theorem”).

Relatively prime natural numbers

Two natural numbers aasource and bbsource are relatively prime iff their greatest common divisor is 11source; in other words, they have no other divisors in common.

Congruence modulo a natural number

Natural numbers aasource and bbsource are congruent modulo ccsource, abmodca \equiv b \mod csource, iff c(ab)c \mid (a-b)source, i.e., aasource and bbsource have the same remainder when divided by ccsource.

Here is Sunzi's Theorem:

Sunzi theorem on simultaneous congruences

Suppose x0x_0source, dots, xnx_nsource are (pairwise) relatively prime. Let y0y_0source, dots, yny_nsource be any numbers. Then there is a number zzsource such that

zy0modx0zy1modx1zynmodxn.z & \equiv y_0 \mod x_0 \\ z & \equiv y_1 \mod x_1 \\ & \vdots \\ z & \equiv y_n \mod x_n.source

Here is how we will use Sunzi's Theorem: if x0x_0source, dots, xnx_nsource are bigger than y0y_0source, dots, yny_nsource respectively, then we can take zzsource to code the sequence y0,,yn\tuple{y_0, \dots,y_n}source. To recover yiy_isource, we need only divide zzsource by xix_isource and take the remainder. To use this coding, we will need to find suitable values for x0x_0source, dots, xnx_nsource.

A couple of observations will help us in this regard. Given y0y_0source, dots, yny_nsource, let

j=max(n,y0+1,,yn+1),m=lcm(1,,j),j &= \max(n, y_0 + 1, \dots, y_n + 1), \\ m &= \lcm(1,\dots,j),source

and let

x0=1+mx1=1+2·mx2=1+3·mxn=1+(n+1)·mx_0 & = 1 + m \\ x_1 & = 1 + 2 \cdot m \\ x_2 & = 1 + 3 \cdot m \\ & \vdots \\ x_n & = 1 + (n+1) \cdot msource

Then two things are true:

  1. x0,,xnx_0,\dots,x_nsource are relatively prime.

  2. For each iisource, yi<xiy_i < x_isource.

To see that the first observation, that the chosen moduli are relatively prime is true, note that if ppsource is a prime number and pxip \mid x_isource and pxkp \mid x_ksource, then p1+(i+1)mp \mid 1 + (i+1) msource and p1+(k+1)mp \mid 1 + (k+1) msource. But then ppsource divides their difference,

(1+(i+1)m)(1+(k+1)m)=(ik)m.(1 + (i+1)m) - (1+ (k+1)m) = (i-k) m.source

Since ppsource divides 1+(i+1)m1 + (i+1)msource, it can't divide mmsource as well (otherwise, the first division would leave a remainder of 11source). So ppsource divides iki-ksource, since ppsource divides (ik)m(i-k)msource. But |ik|\left|i-k\right|source is at most nnsource, and we have chosen jnj \geq nsource, so this implies that pmp \mid msource, again a contradiction. So there is no prime number dividing both xix_isource and xkx_ksource. Clause the second observation, that each residue is smaller than its modulus is easy: we have yi<jm<xiy_i < j \leq m < x_isource.

Now let us prove the β\betasource function lemma. Remember that we can use 00source, successor, plus, times, χ=\Char{=}source, projections, and any function defined from them using composition and minimization applied to regular functions. We can also use a relation if its characteristic function is so definable. As before we can show that these relations are closed under Boolean combinations and bounded quantification; for example:

not(x)=χ=(x,0)(minxz)R(x,y)=μx(R(x,y)x=z)(xz)R(x,y)R((minxz)R(x,y),y)\fn{not}(x) & \defis \Char{=}(x,0)\\ \bmin{x \leq z}{R(x,y)} & \defis \umin{x}{(R(x,y) \lor x = z)}\\ \bexists{x \leq z}{R(x,y)} & \defiff R(\bmin{x \leq z}{R(x,y)}, y)source

We can then show that all of the following are also definable without primitive recursion:

  1. The pairing function, J(x,y)=12[(x+y)(x+y+1)]+xJ(x,y) = \frac{1}{2}[(x+y)(x+y+1)] + xsource;

  2. the projection functions

    K(z)=(minxz)(yz)z=J(x,y),L(z)=(minyz)(xz)z=J(x,y);K(z) & = \bmin{x \leq z}{\bexists{y \leq z}{z = J(x,y)}},\\ L(z) & = \bmin{y \leq z}{\bexists{x \leq z}{z = J(x,y)}};source
  3. the less-than relation x<yx < ysource;

  4. the divisibility relation xyx \mid ysource;

  5. the function rem(x,y)\fn{rem}(x,y)source which returns the remainder when yysource is divided by xxsource.

Now define

β*(d0,d1,i)=rem(1+(i+1)d1,d0) andβ(d,i)=β*(K(d),L(d),i).\beta^*(d_0,d_1,i) & = \fn{rem}(1+(i+1) d_1,d_0) \text{ and}\\ \beta(d,i) & = \beta^*(K(d),L(d),i).source

This is the function we want. Given a0,,ana_0,\dots,a_nsource as above, let

j=max(n,a0+1,,an+1),j = \max(n,a_0+1,\dots,a_n+1),source

and let d1=lcm(1,,j)d_1 = \lcm(1,\dots,j)source. By the first observation, that the chosen moduli are relatively prime above, we know that 1+d11+d_1source, 1+2d11+2 d_1source, dots, 1+(n+1)d11+(n+1) d_1source are relatively prime, and by the second observation, that each residue is smaller than its modulus that all are greater than a0,,ana_0,\dots,a_nsource. By Sunzi's Theorem there is a value d0d_0source such that for each iisource,

d0aimod(1+(i+1)d1)d_0 \equiv a_i \mod (1+(i+1)d_1)source

and so (because d1d_1source is greater than aia_isource),

ai=rem(1+(i+1)d1,d0).a_i = \fn{rem}(1+(i+1)d_1,d_0).source

Let d=J(d0,d1)d = J(d_0,d_1)source. Then for each ini \le nsource, we have

β(d,i)=β*(d0,d1,i)=rem(1+(i+1)d1,d0)=ai\beta(d,i) & = \beta^*(d_0,d_1,i) \\ & = \fn{rem}(1+(i+1) d_1,d_0) \\ & = a_isource

which is what we need. This completes the proof of the β\betasource-function lemma.

Exercise defining order divisibility and remainder without primitive recursion

Show that the relations x<yx < ysource, xyx \mid ysource, and the function rem(x,y)\fn{rem}(x,y)source can be defined without primitive recursion. You may use 00source, successor, plus, times, χ=\Char{=}source, projections, and bounded minimization and quantification.

Source file content/incompleteness/representability-in-q/prim-rec.tex

Simulating Primitive Recursion

Now we can show that definition by primitive recursion can be “simulated” by regular minimization using the beta function. Suppose we have f(x)f(\vec x)source and g(x,y,z)g(\vec x, y, z)source. Then the function h(x,z)h(x,\vec z)source defined from ffsource and ggsource by primitive recursion is

h(x,0)=f(x)h(x,y+1)=g(x,y,h(x,y)).h(\vec x, 0) & = f(\vec x) \\ h(\vec x, y+1) & = g(\vec x, y, h(\vec x, y)).source

We need to show that hhsource can be defined from ffsource and ggsource using just composition and regular minimization, using the basic functions and functions defined from them using composition and regular minimization (such as β\betasource).

Simulation of primitive recursion by regular minimization

If hhsource can be defined from ffsource and ggsource using primitive recursion, it can be defined from ffsource, ggsource, the functions zero\Zerosource, succ\Succsource, Pin\Proj{n}{i}source, add\Addsource, mult\Multsource, χ=\Char{=}source, using composition and regular minimization.

Proof

First, define an auxiliary function h^(x,y)\hat h(\vec x, y)source which returns the least number ddsource such that ddsource codes a sequence which satisfies

  1. (d)0=f(x)(d)_0 = f(\vec x)source, and

  2. for each i<yi < ysource, (d)i+1=g(x,i,(d)i)(d)_{i+1} = g(\vec x, i, (d)_i)source,

where now (d)i(d)_isource is short for β(d,i)\beta(d,i)source. In other words, h^\hat hsource returns the sequence h(x,0),h(x,1),,h(x,y)\tuple{h(\vec x, 0), h(\vec x, 1), \dots, h(\vec x, y)}source. We can write h^\hat hsource as

h^(x,y)=μd(β(d,0)=f(x)(i<y)β(d,i+1)=g(x,i,β(d,i)).\hat h(\vec x, y) = \umin{d}{(\beta(d,0) = f(\vec x) \land \bforall{i < y}{\beta(d,i+1) = g(\vec x, i,\beta(d,i)})}.source

Note: no primitive recursion is needed here, just minimization. The function we minimize is regular because of the beta function lemma the beta function lemma.

But now we have

h(x,y)=β(h^(x,y),y),h(\vec x, y) = \beta(\hat h(\vec x, y), y),source

so hhsource can be defined from the basic functions using just composition and regular minimization.

Source file content/incompleteness/representability-in-q/basic-representable.tex

Basic Functions are Representable in Q\Th{Q}source

First we have to show that all the basic functions are representable in Q\Th{Q}source. In the end, we need to show how to assign to each kksource-ary basic function f(x0,,xk1)f(x_0,\dots,x_{k-1})source a formula Af(x0,,xk1,y)!A_f(x_0,\dots,x_{k-1},y)source that represents it.

We will be able to represent zero, successor, plus, times, the characteristic function for equality, and projections. In each case, the appropriate representing function is entirely straightforward; for example, zero is represented by the formula y=0y = \Obj 0source, successor is represented by the formula x0=yx_0' = ysource, and addition is represented by the formula (x0+x1)=y(x_0 + x_1) = ysource. The work involves showing that Q\Th{Q}source can prove the relevant sentences; for example, saying that addition is represented by the formula above involves showing that for every pair of natural numbers mmsource and nnsource, Q\Th{Q}source proves

n¯+m¯=n+m¯ andy((n¯+m¯)=yy=n+m¯).& \eq[\num n + \num m][\num {n+m}] \text{ and}\\ & \lforall[y][(\eq[(\num n + \num m)][y] \lif \eq[y][\num{n+m}])].source

Representability of the zero function

The zero function zero(x)=0\Zero(x) = 0source is represented in Q\Th{Q}source by Azero(x,y)y=0!A_{\Zero}(x,y) \ident \eq[y][\Obj 0]source.

Representability of the successor function

The successor function succ(x)=x+1\Succ(x) = x+1source is represented in Q\Th{Q}source by Asucc(x,y)y=x!A_{\Succ}(x,y) \ident \eq[y][x']source.

Representability of projection functions

The projection function Pin(x0,,xn1)=xi\Proj{n}{i}(x_0, \dots, x_{n-1}) = x_isource is represented in Q\Th{Q}source by

APin(x0,,xn1,y)y=xi.!A_{\Proj{n}{i}}(x_0, \dots, x_{n-1}, y) \ident \eq[y][x_i].source

Exercise proving representability of the three initial functions

Prove that y=0\eq[y][\Obj 0]source, y=x\eq[y][x']source, and y=xi\eq[y][x_i]source represent zero\Zerosource, succ\Succsource, and Pin\Proj{n}{i}source, respectively.

Representability of the characteristic function of equality

The characteristic function of ==source,

χ=(x0,x1)={1if x0=x10otherwise\Char{=}(x_0, x_1) = \begin{cases} 1 & \text{if } x_0 =x_1\\ 0 & otherwise \end{cases}source

is represented in Q\Th{Q}source by

Aχ=(x0,x1,y)(x0=x1y=1¯)(x0x1y=0¯).!A_{\Char{=}}(x_0, x_1, y) \ident (\eq[x_0][x_1] \land \eq[y][\num{1}]) \lor (\eq/[x_0][x_1] \land \eq[y][\num{0}]).source

The proof requires the following lemma.

Q proves inequality of distinct numerals

Given natural numbers nnsource and mmsource, if nmn \neq msource, then Qn¯m¯\Th{Q} \Proves \eq/[\num n][\num m]source.

Proof

Use induction on nnsource to show that for every mmsource, if nmn \neq msource, then Qn¯m¯Q \Proves \eq/[\num n][\num m]source.

In the base case, n=0n = 0source. If mmsource is not equal to 00source, then m=k+1m = k + 1source for some natural number kksource. We have an axiom that says x0x\lforall[x][\eq/[0][x']]source. By a quantifier axiom, replacing xxsource by k¯\num ksource, we can conclude 0k¯\eq/[0][\num k']source. But k¯\num k'source is just m¯\num msource.

In the induction step, we can assume the claim is true for nnsource, and consider n+1n+1source. Let mmsource be any natural number. There are two possibilities: either m=0m = 0source or for some kksource we have m=k+1m = k+1source. The first case is handled as above. In the second case, suppose n+1k+1n+1 \neq k+1source. Then nkn \neq ksource. By the induction hypothesis for nnsource we have Qn¯k¯\Th{Q} \Proves \eq/[\num n][\num k]source. We have an axiom that says xyx=yx=y\lforall[x][\lforall[y][\eq[x'][y'] \lif \eq[x][y]]]source. Using a quantifier axiom, we have n¯=k¯n¯=k¯\eq[\num n'][\num k'] \lif \eq[\num n][\num k]source. Using propositional logic, we can conclude, in Q\Th{Q}source, n¯k¯n¯k¯\eq/[\num n][\num k] \lif \eq/[\num n'][\num k']source. Using modus ponens, we can conclude n¯k¯\eq/[\num n'][\num k']source, which is what we want, since k¯\num k'source is m¯\num msource.

Explain

Note that the lemma does not say much: in essence it says that Q\Th{Q}source can prove that different numerals denote different objects. For example, Q\Th{Q}source proves 000'' \neq 0'''source. But showing that this holds in general requires some care. Note also that although we are using induction, it is induction outside of Q\Th{Q}source.

Proof

[Proof of the proposition representing the characteristic function of equality] If n=mn = msource, then n¯\num{n}source and m¯\num{m}source are the same term, and χ=(n,m)=1\Char{=}(n, m) = 1source. But Q(n¯=m¯1¯=1¯)\Th{Q} \Proves (\eq[\num{n}][\num{m}] \land \eq[\num{1}][\num{1}])source, so it proves A=(n¯,m¯,1¯)!A_=(\num{n}, \num{m}, \num{1})source. If nmn \neq msource, then χ=(n,m)=0\Char=(n, m) = 0source. By the lemma that Q proves distinct numerals unequal, Qn¯m¯\Th{Q} \Proves \eq/[\num{n}][\num{m}]source and so also (n¯m¯0=0)(\eq/[\num{n}][\num{m}] \land \Obj 0 = \Obj 0)source. Thus QA=(n¯,m¯,0¯)\Th{Q} \Proves !A_=(\num{n}, \num{m}, \num{0})source.

For the second part, we also have two cases. If n=mn = msource, we have to show that Qy(A=(n¯,m¯,y)y=1¯)\Th{Q} \Proves \lforall[y][(!A_=(\num{n}, \num{m}, y) \lif \eq[y][\num{1}])]source. Arguing informally, suppose A=(n¯,m¯,y)!A_=(\num{n}, \num{m}, y)source, i.e.,

(n¯=n¯y=1¯)(n¯n¯y=0¯)(\eq[\num{n}][\num{n}] \land \eq[y][\num{1}]) \lor (\eq/[\num{n}][\num{n}] \land \eq[y][\num{0}])source

The left disjunct implies y=1¯\eq[y][\num{1}]source by logic; the right contradicts n¯=n¯\eq[\num{n}][\num{n}]source which is provable by logic.

Suppose, on the other hand, that nmn \neq msource. Then A=(n¯,m¯,y)!A_=(\num{n}, \num{m}, y)source is

(n¯=m¯y=1¯)(n¯m¯y=0¯)(\eq[\num{n}][\num{m}] \land \eq[y][\num{1}]) \lor (\eq/[\num{n}][\num{m}] \land \eq[y][\num{0}])source

Here, the left disjunct contradicts n¯m¯\eq/[\num{n}][\num{m}]source, which is provable in Q\Th{Q}source by the lemma that Q proves distinct numerals unequal; the right disjunct entails y=0¯\eq[y][\num{0}]source.

Representability of addition

The addition function add(x0,x1)=x0+x1\Add(x_0, x_1) = x_0+x_1source is represented in Q\Th{Q}source by

Aadd(x0,x1,y)y=(x0+x1).!A_{\Add}(x_0, x_1, y) \ident \eq[y][(x_0 + x_1)].source

Q computes each sum of numerals

Q(n¯+m¯)=n+m¯\Th{Q} \Proves \eq[(\num{n} + \num{m})][\num{n+m}]source

Proof

We prove this by induction on mmsource. If m=0m = 0source, the claim is that Q(n¯+0)=n¯\Th{Q} \Proves \eq[(\num{n} + \Obj 0)][\num{n}]source. This follows by axiom Q4!Q_4source. Now suppose the claim for mmsource; let's prove the claim for m+1m+1source, i.e., prove that Q(n¯+m+1¯)=n+m+1¯\Th{Q} \Proves \eq[(\num{n} + \num{m+1})][\num{n+m+1}]source. Note that m+1¯\num{m+1}source is just m¯\num{m}'source, and n+m+1¯\num{n+m+1}source is just n+m¯\num{n+m}'source. By axiom Q5!Q_5source, Q(n¯+m¯)=(n¯+m¯)\Th{Q} \Proves \eq[(\num{n} + \num{m}')][(\num{n}+\num{m})']source. By induction hypothesis, Q(n¯+m¯)=n+m¯\Th{Q} \Proves \eq[(\num{n} + \num{m})][\num{n+m}]source. So Q(n¯+m¯)=n+m¯\Th{Q} \Proves \eq[(\num{n} + \num{m}')][\num{n+m}']source.

Proof

[Proof of the proposition representing addition] The formula Aadd(x0,x1,y)!A_\Add(x_0, x_1, y)source representing add\Addsource is y=(x0+x1)\eq[y][(x_0 + x_1)]source. First we show that if add(n,m)=k\Add(n, m) = ksource, then QAadd(n¯,m¯,k¯)\Th{Q} \Proves !A_\Add(\num{n}, \num{m}, \num{k})source, i.e., Qk¯=(n¯+m¯)\Th{Q} \Proves \eq[\num{k}][(\num{n} + \num{m})]source. But since k=n+mk = n + msource, k¯\num{k}source just is n+m¯\num{n+m}source, and we've shown in the lemma that Q computes sums of numerals that Q(n¯+m¯)=n+m¯\Th{Q} \Proves \eq[(\num{n} + \num{m})][\num{n+m}]source.

We also have to show that if add(n,m)=k\Add(n, m) = ksource, then

Qy(Aadd(n¯,m¯,y)y=k¯).\Th{Q} \Proves \lforall[y][(!A_\Add(\num{n}, \num{m}, y) \lif \eq[y][\num{k}])].source

Suppose we have (n¯+m¯)=y\eq[(\num{n} + \num{m})][y]source. Since

Q(n¯+m¯)=n+m¯,\Th{Q} \Proves \eq[(\num{n}+\num{m})][\num{n+m}],source

we can replace the left side with n+m¯\num{n+m}source and get n+m¯=y\eq[\num{n+m}][y]source, for arbitrary yysource.

Representability of multiplication

The multiplication function mult(x0,x1)=x0·x1\Mult(x_0, x_1) = x_0 \cdot x_1source is represented in Q\Th{Q}source by

Amult(x0,x1,y)y=(x0×x1).!A_{\Mult}(x_0, x_1, y) \ident y = (x_0 \times x_1).source

Proof

Exercise.

Q computes each product of numerals

Q(n¯×m¯)=n·m¯\Th{Q} \Proves \eq[(\num{n} \times \num{m})][\num{n \cdot m}]source

Proof

Exercise.

Exercise proving the numeral multiplication lemma

Prove the lemma that Q computes products of numerals.

Exercise proving representability of multiplication

Use the lemma that Q computes products of numerals to prove the proposition representing multiplication.

Explain

Recall that we use ×\timessource for the function symbol of the language of arithmetic, and ·\cdotsource for the ordinary multiplication operation on numbers. So ·\cdotsource can appear between expressions for numbers (such as in m·nm \cdot nsource) while ×\timessource appears only between terms of the language of arithmetic (such as in (m¯×n¯)(\num{m} \times \num{n})source). Even more confusingly, ++source is used for both the function symbol and the addition operation. When it appears between terms---e.g., in (n¯+m¯)(\num{n} + \num{m})source---it is the 22source-place function symbol of the language of arithmetic, and when it appears between numbers---e.g., in n+mn+msource---it is the addition operation. This includes the case n+m¯\num{n+m}source: this is the standard numeral corresponding to the number n+mn+msource.

Source file content/incompleteness/representability-in-q/composition-representable.tex

Composition is Representable in Q\Th{Q}source

Suppose hhsource is defined by

h(x0,,xl1)=f(g0(x0,,xl1),,gk1(x0,,xl1)).h(x_0,\dots,x_{l-1}) = f(g_0(x_0,\dots,x_{l-1}), \dots, g_{k-1}(x_0,\dots,x_{l-1})).source

where we have already found formulas Af,Ag0,,Agk1!A_f, !A_{g_0}, \dots, !A_{g_{k-1}}source representing the functions ffsource, and g0g_0source, dots, gk1g_{k-1}source, respectively. We have to find a formula Ah!A_hsource representing hhsource.

Let's start with a simple case, where all functions are 11source-place, i.e., consider h(x)=f(g(x))h(x) = f(g(x))source. If Af(y,z)!A_f(y, z)source represents ffsource, and Ag(x,y)!A_g(x, y)source represents ggsource, we need a formula Ah(x,z)!A_h(x, z)source that represents hhsource. Note that h(x)=zh(x) = zsource iff there is a yysource such that both z=f(y)z = f(y)source and y=g(x)y = g(x)source. (If h(x)=zh(x) = zsource, then g(x)g(x)source is such a yysource; if such a yysource exists, then since y=g(x)y = g(x)source and z=f(y)z = f(y)source, z=f(g(x))z = f(g(x))source.) This suggests that y(Ag(x,y)Af(y,z))\lexists[y][(!A_g(x, y) \land !A_f(y, z))]source is a good candidate for Ah(x,z)!A_h(x, z)source. We just have to verify that Q\Th{Q}source proves the relevant formulas.

Composition satisfies the value clause of representability

If h(n)=mh(n) = msource, then QAh(n¯,m¯)\Th{Q} \Proves !A_h(\num{n}, \num{m})source.

Proof

Suppose h(n)=mh(n) = msource, i.e., f(g(n))=mf(g(n)) = msource. Let k=g(n)k = g(n)source. Then

QAg(n¯,k¯)since Ag represents g, andQAf(k¯,m¯)since Af represents f. Thus,QAg(n¯,k¯)Af(k¯,m¯)and consequently alsoQy(Ag(n¯,y)Af(y,m¯)),\Th{Q} & \Proves !A_g(\num{n}, \num{k}) \intertext{since $!A_g$ represents~$g$, and} \Th{Q} & \Proves !A_f(\num{k}, \num{m}) \intertext{since $!A_f$ represents~$f$. Thus,} \Th{Q} & \Proves !A_g(\num{n}, \num{k}) \land !A_f(\num{k}, \num{m}) \intertext{and consequently also} \Th{Q} & \Proves \lexists[y][(!A_g(\num{n}, y) \land !A_f(y, \num{m}))],source

i.e., QAh(n¯,m¯)\Th{Q} \Proves !A_h(\num{n}, \num{m})source.

Composition satisfies the uniqueness clause of representability

If h(n)=mh(n) = msource, then Qz(Ah(n¯,z)z=m¯)\Th{Q} \Proves \lforall[z][(!A_h(\num{n}, z) \lif z = \num{m})]source.

Proof

Suppose h(n)=mh(n) = msource, i.e., f(g(n))=mf(g(n)) = msource. Let k=g(n)k = g(n)source. Then

Qy(Ag(n¯,y)y=k¯)since Ag represents g, andQz(Af(k¯,z)z=m¯)since Af represents f. Using just a little bit of logic, we can show that alsoQz(y(Ag(n¯,y)Af(y,z))z=m¯).\Th{Q} & \Proves \lforall[y][(!A_g(\num{n}, y) \lif \eq[y][\num{k}])] \intertext{since $!A_g$ represents~$g$, and} \Th{Q} & \Proves \lforall[z][(!A_f(\num{k}, z) \lif \eq[z][\num{m}])] \intertext{since $!A_f$ represents~$f$. Using just a little bit of logic, we can show that also} \Th{Q} & \Proves \lforall[z][(\lexists[y][(!A_g(\num{n}, y) \land !A_f(y, z))] \lif \eq[z][\num{m}])].source

i.e., Qy(Ah(n¯,y)y=m¯)\Th{Q} \Proves \lforall[y][(!A_h(\num n, y) \lif \eq[y][\num m])]source.

The same idea works in the more complex case where ffsource and gig_isource have arity greater than 11source.

Representability is preserved under general composition

If Af(y0,,yk1,z)!A_f(y_0, \dots, y_{k-1}, z)source represents f(y0,,yk1)f(y_0, \dots, y_{k-1})source in Q\Th{Q}source, and Agi(x0,,xl1,y)!A_{g_i}(x_0, \dots, x_{l-1}, y)source represents gi(x0,,xl1)g_i(x_0, \dots, x_{l-1})source in Q\Th{Q}source, then

y0yk1(Ag0(x0,,xl1,y0)Agk1(x0,,xl1,yk1)Af(y0,,yk1,z))\lexists[y_0\dots][\lexists[y_{k-1}][(!A_{g_0}(x_0,\dots,x_{l-1},y_0) \land \dots \land {}]]\\ !A_{g_{k-1}}(x_0,\dots,x_{l-1},y_{k-1}) \land !A_f(y_0,\dots,y_{k-1},z))source

represents

h(x0,,xl1)=f(g0(x0,,xl1),,gk1(x0,,xl1)).h(x_0, \dots, x_{l-1}) = f(g_0(x_0, \dots, x_{l-1}), \dots, g_{k-1}(x_0, \dots, x_{l-1})).source

Proof

Exercise.

Exercise proving representability under general composition

Using the proofs of the proposition giving the uniqueness clause for unary composition and the proposition giving the uniqueness clause for unary composition as a guide, carry out the proof of the proposition representing general composition in detail.

Source file content/incompleteness/representability-in-q/minimization-representable.tex

Regular Minimization is Representable in Q\Th{Q}source

Let's consider unbounded search. Suppose g(x,z)g(x, z)source is regular and representable in Q\Th{Q}source, say by the formula Ag(x,z,y)!A_g(x, z, y)source. Let ffsource be defined by f(z)=μx[g(x,z)=0]f(z) = \umin{x}{[g(x, z) = 0]}source. We would like to find a formula Af(z,y)!A_f(z, y)source representing ffsource. The value of f(z)f(z)source is that number xxsource which (a) satisfies g(x,z)=0g(x, z) = 0source and (b) is the least such, i.e., for any w<xw < xsource, g(w,z)0g(w, z) \neq 0source. So the following is a natural choice:

Af(z,y)Ag(y,z,0)w(w<y¬Ag(w,z,0)).!A_f(z,y) \ident !A_g(y, z, \Obj 0) \land \lforall[w][(w < y \lif \lnot !A_g(w, z, \Obj 0))].source

In the general case, of course, we would have to replace zzsource with z0z_0source, dots, zkz_ksource.

The proof, again, will involve some lemmas about things Q\Th{Q}source is strong enough to prove.

Moving successor past addition by a fixed numeral

For every constant symbol aasource and every natural number nnsource,

Q(a+n¯)=(a+n¯).\Th{Q} \Proves \eq[(a' + \num n)][(a + \num n)'].source

Proof

The proof is, as usual, by induction on nnsource. In the base case, n=0n = 0source, we need to show that Q\Th{Q}source proves (a+0)=(a+0)\eq[(a' + \Obj 0)][(a + \Obj 0)']source. But we have:

Q(a+0)=aby axiom Q4Q(a+0)=aby axiom Q4Q(a+0)=aby step two of the successor and fixed numeral addition derivationQ(a+0)=(a+0)by step one of the successor and fixed numeral addition derivation and step three of the successor and fixed numeral addition derivation\Th{Q} & \Proves \eq[(a' + \Obj 0)][a'] \quad \text{by axiom $Q_4$} \ollabel{step1}\\ \Th{Q} & \Proves \eq[(a + \Obj 0)][a] \quad \text{by axiom $Q_4$} \ollabel{step2} \\ \Th{Q} & \Proves \eq[(a + \Obj 0)'][a'] \quad \text{by \olref{step2}} \ollabel{step3} \\ \Th{Q} & \Proves \eq[(a' + \Obj 0)][(a + \Obj 0)'] \quad \text{by \olref{step1} and \olref{step3}}\notagsource

In the induction step, we can assume that we have shown that Q(a+n¯)=(a+n¯)\Th{Q} \Proves \eq[(a' + \num n)][(a + \num n)']source. Since n+1¯\num{n+1}source is n¯\num{n}'source, we need to show that Q\Th{Q}source proves (a+n¯)=(a+n¯)\eq[(a' + \num{n}')][(a + \num{n}')']source. We have:

Q(a+n¯)=(a+n¯)by axiom Q5Q(a+n¯)=(a+n¯)inductive hypothesisQ(a+n¯)=(a+n¯)by step five of the successor and fixed numeral addition derivation and step six of the successor and fixed numeral addition derivation.\Th{Q} & \Proves \eq[(a' + \num n')][(a' + \num n)'] \quad \text{by axiom $!Q_5$} \ollabel{step5}\\ \Th{Q} & \Proves \eq[(a' + \num n')][(a + \num n')'] \quad \text{inductive hypothesis} \ollabel{step6}\\ \Th{Q} & \Proves \eq[(a' + \num n)'][(a + \num n')'] \quad \text{by \olref{step5} and \olref{step6}.} \notagsource

It is again worth mentioning that this is weaker than saying that Q\Th{Q}source proves xy(x+y)=(x+y)\lforall[x][\lforall[y][(x' + y) = (x + y)']]source. Although this sentence is true in N\Struct{N}source, Q\Th{Q}source does not prove it.

Q proves that nothing is less than zero

Qx¬x<0\Th{Q} \Proves \lforall[x][\lnot x < \Obj 0]source.

Proof

We give the proof informally (i.e., only giving hints as to how to construct the formal derivation).

We have to prove ¬a<0\lnot a < \Obj 0source for an arbitrary aasource. By the definition of <<source, we need to prove ¬y(y+a)=0\lnot \lexists[y][\eq[(y'+a)][\Obj 0]]source in Q\Th{Q}source. We'll assume y(y+a)=0\lexists[y][\eq[(y'+a)][\Obj 0]]source and prove a contradiction. Suppose (b+a)=0\eq[(b'+a)][\Obj 0]source. Using Q3!Q_3source, we have that a=0ya=y\eq[a][\Obj 0] \lor \lexists[y][\eq[a][y']]source. We distinguish cases.

Case 1: a=0\eq[a][\Obj 0]source holds. From (b+a)=0\eq[(b'+a)][\Obj 0]source, we have (b+0)=0\eq[(b' + \Obj 0)][\Obj 0]source. By axiom Q4!Q_4source of Q\Th{Q}source, we have (b+0)=b\eq[(b' + \Obj 0)][b']source, and hence b=0\eq[b'][\Obj 0]source. But by axiom Q2!Q_2source we also have b0\eq/[b'][\Obj 0]source, a contradiction.

Case 2: For some ccsource, a=c\eq[a][c']source. But then we have (b+c)=0\eq[(b' + c')][\Obj 0]source. By axiom Q5!Q_5source, we have (b+c)=0\eq[(b' + c)'][\Obj 0]source, again contradicting axiom Q2Q_2source.

Every object below a numeral is one of finitely many numerals

For every natural number nnsource,

Qx(x<n+1¯(x=0x=n¯)).\Th{Q} \Proves \lforall[x][(x < \num {n+1} \lif (\eq[x][\Obj 0] \lor \dots \lor \eq[x][\num n]))].source

Proof

We use induction on nnsource. Let us consider the base case, when n=0n = 0source. In that case, we need to show a<1¯a=0a < \num 1 \lif \eq[a][\Obj 0]source, for arbitrary aasource. Suppose a<1¯a < \num 1source. Then by the defining axiom for <<source, we have y(y+a)=0\lexists[y][\eq[(y'+a)][\Obj 0']]source (since 1¯0\num 1 \ident \Obj 0'source).

Suppose bbsource has that property, i.e., we have (b+a)=0\eq[(b'+a)][\Obj 0']source. We need to show a=0\eq[a][\Obj 0]source. By axiom Q3!Q_3source, we have either a=0\eq[a][\Obj 0]source or that there is a ccsource such that a=c\eq[a][c']source. In the former case, there is nothing to show. So suppose a=c\eq[a][c']source. Then we have (b+c)=0\eq[(b' + c')][\Obj 0']source. By axiom Q5!Q_5source of Q\Th{Q}source, we have (b+c)=0\eq[(b'+c)'][\Obj 0']source. By axiom Q1!Q_1source, we have (b+c)=0\eq[(b' + c)][\Obj 0]source. But this means, by axiom Q8!Q_8source, that c<0c < \Obj 0source, contradicting the lemma that Q proves nothing is less than zero.

Now for the inductive step. We prove the case for n+1n+1source, assuming the case for nnsource. So suppose a<n+2¯a < \num {n+2}source. Again using Q3!Q_3source we can distinguish two cases: a=0\eq[a][\Obj 0]source and for some bbsource, a=b\eq[a][b']source. In the first case, a=0a=n+1¯\eq[a][\Obj 0] \lor \dots \lor \eq[a][\num{n+1}]source follows trivially. In the second case, we have b<n+2¯b' < \num {n+2}source, i.e., b<n+1¯b' < \num{n+1}'source. By axiom Q8!Q_8source, for some ccsource, (c+b)=n+1¯\eq[(c'+b')][\num{n+1}']source. By axiom Q5!Q_5source, (c+b)=n+1¯\eq[(c'+b)'][\num{n+1}']source. By axiom Q1!Q_1source, (c+b)=n+1¯\eq[(c'+b)][\num{n+1}]source, and so b<n+1¯b < \num{n+1}source by axiom Q8!Q_8source. By inductive hypothesis, b=0b=n¯\eq[b][\Obj 0] \lor \dots \lor \eq[b][\num{n}]source. From this, we get b=0b=n¯\eq[b'][\Obj 0'] \lor \dots \lor \eq[b'][\num{n}']source by logic, and so a=1¯a=n+1¯\eq[a][\num{1}] \lor \dots \lor \eq[a][\num{n+1}]source since a=b\eq[a][b']source.

Trichotomy against each fixed numeral

For every natural number mmsource,

Qy((y<m¯m¯<y)y=m¯).\Th{Q} \Proves \lforall[y][((y < \num{m} \lor \num{m} < y) \lor \eq[y][\num{m}])].source

Proof

By induction on mmsource. First, consider the case m=0m=0source. Qy(y=0zy=z)\Th{Q} \Proves \lforall[y][(\eq[y][\Obj 0] \lor \lexists[z][\eq[y][z']])]source by Q3!Q_3source. Let aasource be arbitrary. Then either a=0\eq[a][\Obj 0]source or for some bbsource, a=b\eq[a][b']source. In the former case, we also have (a<00<a)a=0(a < \Obj 0 \lor \Obj 0 < a) \lor \eq[a][\Obj 0]source. But if a=b\eq[a][b']source, then (b+0)=(a+0)\eq[(b' + \Obj 0)][(a + \Obj 0)]source by the logic of =\eqsource. By Q4!Q_4source, (a+0)=a\eq[(a + \Obj 0)][a]source, so we have (b+0)=a\eq[(b' + \Obj 0)][a]source, and hence z(z+0)=a\lexists[z][\eq[(z' + \Obj 0)][a]]source. By the definition of <<source in Q8!Q_8source, 0<a\Obj 0 < asource. If 0<a\Obj 0 < asource, then also (0<aa<0)a=0(\Obj 0 < a \lor a < \Obj 0) \lor \eq[a][\Obj 0]source.

Now suppose we have

Qy((y<m¯m¯<y)y=m¯)and we want to showQy((y<m+1¯m+1¯<y)y=m+1¯)\Th{Q} & \Proves \lforall[y][((y < \num{m} \lor \num{m} < y) \lor \eq[y][\num{m}])] \intertext{and we want to show} \Th{Q} & \Proves \lforall[y][((y < \num{m+1} \lor \num{m+1} < y) \lor \eq[y][\num{m+1}])]source

Let aasource be arbitrary. By Q3!Q_3source, either a=0\eq[a][\Obj 0]source or for some bbsource, a=b\eq[a][b']source. In the first case, we have m¯+a=m+1¯\eq[\num{m}' + a][\num{m+1}]source by Q4!Q_4source, and so a<m+1¯a < \num{m+1}source by Q8!Q_8source.

Now consider the second case, a=b\eq[a][b']source. By the induction hypothesis, (b<m¯m¯<b)b=m¯(b < \num{m} \lor \num{m} < b) \lor \eq[b][\num{m}]source.

The first disjunct b<m¯b < \num{m}source is equivalent (by Q8!Q_8source) to z(z+b)=m¯\lexists[z][\eq[(z' + b)][\num{m}]]source. Suppose ccsource has this property. If (c+b)=m¯\eq[(c' + b)][\num{m}]source, then also (c+b)=m¯\eq[(c' + b)'][\num{m}']source. By Q5!Q_5source, (c+b)=(c+b)\eq[(c' + b)'][(c' + b')]source. Hence, (c+b)=m¯\eq[(c' + b')][\num{m}']source. We get u(u+b)=m+1¯\lexists[u][\eq[(u' + b')][\num{m+1}]]source by existentially generalizing on cc'source and keeping in mind that m¯m+1¯\num{m}' \ident \num{m+1}source. Hence, if b<m¯b < \num{m}source then b<m+1¯b' < \num{m+1}source and so a<m+1¯a < \num{m+1}source.

Now suppose m¯<b\num{m} < bsource, i.e., z(z+m¯)=b\lexists[z][\eq[(z' + \num{m})][b]]source. Suppose ccsource is such a zzsource, i.e., (c+m¯)=b\eq[(c' + \num{m})][b]source. By logic, (c+m¯)=b\eq[(c' + \num{m})'][b']source. By Q5!Q_5source, (c+m¯)=b\eq[(c' + \num{m}')][b']source. Since a=b\eq[a][b']source and m¯m+1¯\num{m}' \ident \num{m+1}source, (c+m+1¯)=a\eq[(c' + \num{m+1})][a]source. By Q8!Q_8source, m+1¯<a\num{m+1} < asource.

Finally, assume b=m¯\eq[b][\num{m}]source. Then, by logic, b=m¯\eq[b'][\num{m}']source, and so a=m+1¯\eq[a][\num{m+1}]source.

Hence, from each disjunct of the case for mmsource and bbsource, we can obtain the corresponding disjunct for m+1m+1source and aasource.

Representability is preserved under regular minimization

If Ag(x,z,y)!A_g(x, z, y)source represents g(x,z)g(x, z)source in Q\Th{Q}source, then

Af(z,y)Ag(y,z,0)w(w<y¬Ag(w,z,0))!A_f(z,y) \ident !A_g(y, z, \Obj 0) \land \lforall[w][(w < y \lif \lnot !A_g(w, z, \Obj 0))]source

represents f(z)=μx[g(x,z)=0]f(z) = \umin{x}{[g(x, z) = 0]}source.

Proof

First we show that if f(n)=mf(n) = msource, then QAf(n¯,m¯)\Th{Q} \Proves !A_f(\num n, \num m)source, i.e.,

QAg(m¯,n¯,0)w(w<m¯¬Ag(w,n¯,0)).Since Ag(x,z,y) represents g(x,z) and g(m,n)=0 if f(n)=m, we haveQAg(m¯,n¯,0).If f(n)=m, then for every k<m, g(k,n)0. SoQ¬Ag(k¯,n¯,0).We get thatQw(w<m¯¬Ag(w,n¯,0)).\Th{Q} & \Proves !A_g(\num{m}, \num{n}, \Obj 0) \land \lforall[w][(w < \num{m} \lif \lnot !A_g(w, \num{n}, \Obj 0))]. \notag \intertext{Since $!A_g(x, z, y)$ represents $g(x, z)$ and $g(m, n) = 0$ if $f(n) = m$, we have} \Th{Q} & \Proves !A_g(\num{m}, \num{n}, \Obj 0). \notag \intertext{If $f(n) = m$, then for every $k < m$, $g(k, n) \neq 0$. So} \Th{Q} & \Proves \lnot !A_g(\num{k}, \num{n}, \Obj 0). \notag \intertext{We get that} \Th{Q} & \Proves \lforall[w][(w < \num{m} \lif \lnot !A_g(w, \num{n}, \Obj 0))]. \ollabel{rep-less}source

by the lemma that Q proves nothing is less than zero in case m=0m = 0source and by the lemma enumerating the objects less than a fixed numeral otherwise.

Now let's show that if f(n)=mf(n) = msource, then Qy(Af(n¯,y)y=m¯)\Th{Q} \Proves \lforall[y][(!A_f(\num{n}, y) \lif \eq[y][\num{m}])]source. We again sketch the argument informally, leaving the formalization to the reader.

Suppose Af(n¯,b)!A_f(\num{n}, b)source. From this we get (a) Ag(b,n¯,0)!A_g(b, \num{n}, \Obj 0)source and (b) w(w<b¬Ag(w,n¯,0))\lforall[w][(w < b \lif \lnot !A_g(w, \num{n}, \Obj 0))]source. By the lemma on trichotomy against each fixed numeral, (b<m¯m¯<b)b=m¯(b < \num{m} \lor \num{m} < b) \lor \eq[b][\num{m}]source. We'll show that both b<m¯b < \num{m}source and m¯<b\num{m} < bsource leads to a contradiction.

If m¯<b\num{m} < bsource, then ¬Ag(m¯,n¯,0)\lnot !A_g(\num{m}, \num{n}, \Obj 0)source from (b). But m=f(n)m = f(n)source, so g(m,n)=0g(m, n) = 0source, and so QAg(m¯,n¯,0)\Th{Q} \Proves !A_g(\num{m}, \num{n}, \Obj 0)source since Ag!A_gsource represents ggsource. So we have a contradiction.

Now suppose b<m¯b < \num{m}source. Then since Qw(w<m¯¬Ag(w,n¯,0))\Th{Q} \Proves \lforall[w][(w < \num{m} \lif \lnot !A_g(w, \num{n}, \Obj 0))]source by the displayed proof excluding all values below the minimum, we get ¬Ag(b,n¯,0)\lnot !A_g(b, \num{n}, \Obj 0)source. This again contradicts (a).

Source file content/incompleteness/representability-in-q/comp-representable.tex

Computable Functions are Representable in Q\Th{Q}source

Every computable function is representable in Q

Every computable function is representable in Q\Th{Q}source.

Proof

For definiteness, and using the Church--Turing Thesis, let's say that a function is computable iff it is general recursive. The general recursive functions are those which can be defined from the zero function zero\Zerosource, the successor function succ\Succsource, and the projection function Pin\Proj{n}{i}source using composition, primitive recursion, and regular minimization. By the lemma simulating primitive recursion by regular minimization, any function hhsource that can be defined from ffsource and ggsource can also be defined using composition and regular minimization from ffsource, ggsource, and zero\Zerosource, succ\Succsource, Pin\Proj{n}{i}source, add\Addsource, mult\Multsource, χ=\Char{=}source. Consequently, a function is general recursive iff it can be defined from zero\Zerosource, succ\Succsource, Pin\Proj{n}{i}source, add\Addsource, mult\Multsource, χ=\Char{=}source using composition and regular minimization.

We've furthermore shown that the basic functions in question are representable in Q\Th{Q}source (references the proposition representing the zero function, the proposition representing the successor function, the proposition representing projection functions, the proposition representing the characteristic function of equality, the proposition representing addition, and the proposition representing multiplication), and that any function defined from representable functions by composition or regular minimization (the proposition representing general composition, the proposition representing regular minimization) is also representable. Thus every general recursive function is representable in Q\Th{Q}source.

Explain

We have shown that the set of computable functions can be characterized as the set of functions representable in Q\Th{Q}source. In fact, the proof is more general. From the definition of representability, it is not hard to see that any theory extending Q\Th{Q}source (or in which one can interpret Q\Th{Q}source) can represent the computable functions. But, conversely, in any derivation system in which the notion of derivation is computable, every representable function is computable. So, for example, the set of computable functions can be characterized as the set of functions representable in Peano arithmetic, or even Zermelo--Fraenkel set theory. As Gödel noted, this is somewhat surprising. We will see that when it comes to provability, questions are very sensitive to which theory you consider; roughly, the stronger the axioms, the more you can prove. But across a wide range of axiomatic theories, the representable functions are exactly the computable ones; stronger theories do not represent more functions as long as they are axiomatizable.

Source file content/incompleteness/representability-in-q/representing-relations.tex

Representing Relations

Let us say what it means for a relation to be representable.

Representability of relations in Q

A relation R(x0,,xk)R(x_0,\dots,x_k)source on the natural numbers is em representable in Q\Th{Q}source if there is a formula AR(x0,,xk)!A_R(x_0,\dots,x_k)source such that whenever R(n0,,nk)R(n_0,\dots,n_k)source is true, Q\Th{Q}source proves AR(n0¯,,nk¯)!A_R(\num{n_0},\dots,\num{n_k})source, and whenever R(n0,,nk)R(n_0,\dots,n_k)source is false, Q\Th{Q}source proves ¬AR(n0¯,,nk¯)\lnot !A_R(\num{n_0}, \dots, \num{n_k})source.

Relations representable in Q are exactly the computable relations

A relation is representable in Q\Th{Q}source if and only if it is computable.

Proof

For the forwards direction, suppose R(x0,,xk)R(x_0,\dots,x_k)source is represented by the formula AR(x0,,xk)!A_R(x_0,\dots,x_k)source. Here is an algorithm for computing RRsource: on input n0n_0source, dots, nkn_ksource, simultaneously search for a proof of AR(n0¯,,nk¯)!A_R(\num{n_0}, \dots, \num{n_k})source and a proof of ¬AR(n0¯,,nk¯)\lnot !A_R(\num{n_0}, \dots, \num{n_k})source. By our hypothesis, the search is bound to find one or the other; if it is the first, report “yes,” and otherwise, report “no.”

In the other direction, suppose R(x0,,xk)R(x_0, \dots, x_k)source is computable. By definition, this means that the function χR(x0,,xk)\Char{R}(x_0, \dots, x_k)source is computable. By the theorem that function representability in Q is equivalent to computability, χR\Char{R}source is represented by a formula, say AχR(x0,,xk,y)!A_{\Char{R}}(x_0, \dots, x_k, y)source. Let AR(x0,,xk)!A_R(x_0, \dots, x_k)source be the formula AχR(x0,,xk,1¯)!A_{\Char{R}}(x_0, \dots, x_k, \num{1})source. Then for any n0n_0source, dots, nkn_ksource, if R(n0,,nk)R(n_0, \dots, n_k)source is true, then χR(n0,,nk)=1\Char{R}(n_0, \dots, n_k) = 1source, in which case Q\Th{Q}source proves AχR(n0¯,,nk¯,1¯)!A_{\Char{R}}(\num{n_0}, \dots, \num{n_k}, \num{1})source, and so Q\Th{Q}source proves AR(n0¯,,nk¯)!A_R(\num{n_0}, \dots, \num{n_k})source. On the other hand, if R(n0,,nk)R(n_0, \dots, n_k)source is false, then χR(n0,,nk)=0\Char{R}(n_0, \dots, n_k) = 0source. This means that Q\Th{Q}source proves

y(AχR(n0¯,,nk¯,y)y=0¯).\lforall[y][(!A_{\Char{R}}(\num{n_0}, \dots, \num{n_k}, y) \lif y = \num{0})].source

Since Q\Th{Q}source proves 0¯1¯\eq/[\num{0}][\num{1}]source, Q\Th{Q}source proves ¬AχR(n0¯,,nk¯,1¯)\lnot !A_{\Char{R}}(\num{n_0}, \dots, \num{n_k}, \num{1})source, and so it proves ¬AR(n0¯,,nk¯)\lnot !A_R(\num{n_0}, \dots, \num{n_k})source.

Exercise relating representability of a relation and its characteristic function

Show that if RRsource is representable in Q\Th{Q}source, so is χR\Char{R}source.

Source file content/incompleteness/representability-in-q/undecidability.tex

Undecidability

We call a theory T\Th{T}source undecidable if there is no computational procedure which, after finitely many steps and unfailingly, provides a correct answer to the question “does T\Th{T}source prove A!Asource?” for any sentence A!Asource in the language of T\Th{T}source. So Q\Th{Q}source would be decidable iff there were a computational procedure which decides, given a sentence A!Asource in the language of arithmetic, whether QA\Th{Q} \Proves !Asource or not. We can make this more precise by asking: Is the relation ProvQ(y)\Prov[\Th{Q}](y)source, which holds of yysource iff yysource is the Gödel number of a sentence provable in Q\Th{Q}source, recursive? The answer is: no.

Undecidability of Q

Q\Th{Q}source is undecidable, i.e., the relation

ProvQ(y)Sent(y)xPrfQ(x,y)\Prov[\Th{Q}](y) \defiff \fn{Sent}(y) \land \lexists[x][\Prf[\Th{Q}](x, y)]source

is not recursive.

Proof

Suppose it were. Then we could solve the halting problem as follows: Given eesource and nnsource, we know that φe(n)\cfind{e}(n) \fdefinedsource iff there is an sssource such that T(e,n,s)T(e, n, s)source, where TTsource is Kleene's predicate from Kleene normal form theorem. Since TTsource is primitive recursive it is representable in Q\Th{Q}source by a formula BT!B_Tsource, that is, QBT(e¯,n¯,s¯)\Th{Q} \Proves !B_T(\num{e}, \num{n}, \num{s})source iff T(e,n,s)T(e, n, s)source. If QBT(e¯,n¯,s¯)\Th{Q} \Proves !B_T(\num{e}, \num{n}, \num{s})source then also QyBT(e¯,n¯,y)\Th{Q} \Proves \lexists[y][!B_T(\num{e}, \num{n}, y)]source. If no such sssource exists, then Q¬BT(e¯,n¯,s¯)\Th{Q} \Proves \lnot !B_T(\num{e}, \num{n}, \num{s})source for every sssource. But Q\Th{Q}source is ω\omegasource-consistent, i.e., if Q¬A(n¯)\Th{Q} \Proves \lnot !A(\num{n})source for every nn \in \Natsource, then QyA(y)\Th{Q} \Proves/ \lexists[y][!A(y)]source. We know this because the axioms of Q\Th{Q}source are true in the standard model N\Struct{N}source. So, QyBT(e¯,n¯,y)\Th{Q} \Proves/ \lexists[y][!B_T(\num{e}, \num{n}, y)]source. In other words, QyBT(e¯,n¯,y)\Th{Q} \Proves \lexists[y][!B_T(\num{e}, \num{n}, y)]source iff there is an sssource such that T(e,n,s)T(e, n, s)source, i.e., iff φe(n)\cfind{e}(n) \fdefinedsource. From eesource and nnsource we can compute #yBT(e¯,n¯,y)#\Gn{\lexists[y][!B_T(\num{e}, \num{n}, y)]}source, let g(e,n)g(e, n)source be the primitive recursive function which does that. So

h(e,n)={1if ProvQ(g(e,n))0otherwise.h(e, n) = \begin{cases} 1 & \text{if $\Prov[\Th{Q}](g(e, n))$}\\ 0 & \text{otherwise}. \end{cases}source

This would show that hhsource is recursive if ProvQ\Prov[\Th{Q}]source is. But hhsource is not recursive, by the theorem that the halting problem is not computable, so ProvQ\Prov[\Th{Q}]source cannot be either.

Undecidability of first order logic

First-order logic is undecidable.

Proof

If first-order logic were decidable, provability in Q\Th{Q}source would be as well, since QA\Th{Q} \Proves !Asource iff TA\Proves !T \lif !Asource, where T!Tsource is the conjunction of the axioms of Q\Th{Q}source.

Source file content/incompleteness/representability-in-q/sigma1-completeness.tex

texorpdfstringΣ1\Sigma_1sourceSigma-1 completeness

Despite the incompleteness of Q\Th{Q}source and its consistent, axiomatizable extensions, we have seen that Q\Th{Q}source does prove many basic facts about numerals. In fact, this can be extended quite considerably. To understand the scope of what can be proved in Q\Th{Q}source, we introduce the notions of Δ0\Delta_0source, Σ1\Sigma_1source, and Π1\Pi_1source formulas. Roughly speaking, a Σ1\Sigma_1source formula is one of the form xB(x)\lexists[x][!B(x)]source, where B!Bsource is constructed using only propositional connectives and bounded quantifiers. We shall show that if A!Asource is a Σ1\Sigma_1source sentence which is true in N\Struct{N}source, then QA\Th{Q} \Proves !Asource (the theorem on Sigma one completeness of Q).

Bounded existential and universal formulas

A bounded existential formula is one of the form x(x<tA(x))\lexists[x][(x < t \land !A(x))]source where ttsource is any term, which we conventionally write as (x<t)A(x)\bexists{x < t}{!A(x)}source.

A bounded universal formula is one of the form x(x<tA(x))\lforall[x][(x < t \lif !A(x))]source where ttsource is any term, which we conventionally write as (x<t)A(x)\bforall{x < t}{!A(x)}source.

Delta zero Sigma one and Pi one formulas

A formula B!Bsource is Δ0\Delta_0source if it is built up from atomic formulas using only propositional connectives and bounded quantification.

A formula A!Asource is Σ1\Sigma_1source if AxB(x)!A \ident \lexists[x][!B(x)]source where B!Bsource is Δ0\Delta_0source.

A formula A!Asource is Π1\Pi_1source if AxB(x)!A \ident \lforall[x][!B(x)]source where B!Bsource is Δ0\Delta_0source.

Q proves each closed term equal to its standard numeral

Suppose ttsource is a closed term such that ValN(t)=n\Value{t}{N} = nsource. Then Qt=n¯\Th{Q} \Proves \eq[t][\num n]source.

Proof

We prove this by induction on the complexity of ttsource. For the base case, ValN(0)=0\Value{\Obj 0}{N} = 0source, and Q0=0¯\Th{Q} \Proves \eq[\Obj 0][\num 0]source since 0¯0\num 0 \ident \Obj 0source.

For the inductive case, let t1t_1source and t2t_2source be terms such that ValN(t1)=n1\Value{t_1}{N} = n_1source, ValN(t2)=n2\Value{t_2}{N} = n_2source, Qt1=n¯1\Th{Q} \Proves \eq[t_1][\num n_1]source, and Qt2=n¯2\Th{Q} \Proves \eq[t_2][\num n_2]source.

Then ValN((t1))=n1+1\Value{(t_1')}{N} = n_1 + 1source, and we have that Qt1=n¯1\Th{Q} \Proves \eq[t_1'][{\num n_1}']source by the first-order rules for identity applied to the induction hypothesis and the formula n1¯=n1¯\eq[\num{n_1}'][\num{n_1}']source, so we have Qt1=n1+1¯\Th{Q} \Proves \eq[t_1'][\num{n_1 + 1}]source by the definition of numerals.

For sums we have

ValN((t1+t2))=ValN(t1)+ValN(t2)=n1+n2.\Value{(t_1 + t_2)}{N} = \Value{t_1}{N} + \Value{t_2}{N} = n_1 + n_2.source

By the induction hypothesis and the rules for identity, Qt1+t2=n1¯+t2\Th{Q} \Proves \eq[t_1 + t_2][\num{n_1} + t_2]source, and then Qt1+t2=n1¯+n2¯\Th{Q} \Proves \eq[t_1 + t_2][\num{n_1} + \num{n_2}]source by a second application of the rules for identity. By the lemma that Q computes sums of numerals, Qn1¯+n2¯=n1+n2¯\Th{Q} \Proves \eq[\num{n_1} + \num{n_2}][\num{n_1 + n_2}]source, so Qt1+t2=n1+n2¯\Th{Q} \Proves \eq[t_1 + t_2][\num{n_1 + n_2}]source.

Similar reasoning also works for ×\timessource, using the lemma that Q computes products of numerals.

Since this exhausts the closed terms of arithmetic, we have that Qt=n¯\Th{Q} \Proves \eq[t][\num n]source for all closed terms ttsource such that ValN(t)=n\Value{t}{N} = nsource.

Exercise for the multiplication case of closed term evaluation

Prove in detail the part of the closed term evaluation lemma involving ×\timessource.

Atomic completeness for closed arithmetic terms

Suppose t1t_1source and t2t_2source are closed terms. Then

  1. If ValN(t1)=ValN(t2)\Value{t_1}{N} = \Value{t_2}{N}source, then Qt1=t2\Th{Q} \Proves \eq[t_1][t_2]source.

  2. If ValN(t1)ValN(t2)\Value{t_1}{N} \neq \Value{t_2}{N}source, then Qt1t2\Th{Q} \Proves \eq/[t_1][t_2]source.

  3. If ValN(t1)<ValN(t2)\Value{t_1}{N} < \Value{t_2}{N}source, then Qt1<t2\Th{Q} \Proves t_1 < t_2source.

  4. If ValN(t2)ValN(t1)\Value{t_2}{N} \leq \Value{t_1}{N}source, then Q¬(t1<t2)\Th{Q} \Proves \lnot(t_1 < t_2)source.

Proof

Given terms t1t_1source and t2t_2source, we fix n=ValN(t1)n = \Value{t_1}{N}source and m=ValN(t2)m = \Value{t_2}{N}source.

Suppose At1=t2!A \ident t_1 = t_2source. By the closed term evaluation lemma, Qt1=n¯\Th{Q} \Proves \eq[t_1][\num n]source and Qt2=n¯\Th{Q} \Proves \eq[t_2][\num n]source. If n=mn = msource, then Qn¯=m¯\Th{Q} \Proves \eq[\num n][\num m]source and hence Qt1=t2\Th{Q} \Proves \eq[t_1][t_2]source by the transitivity of identity. If nmn \neq msource then Qn¯m¯\Th{Q} \Proves \eq/[\num n][\num m]source, and by the transitivity of identity again, Qt1t2\Th{Q} \Proves \eq/[t_1][t_2]source.

Now let At1<t2!A \ident t_1 < t_2source. For both cases, we rely on axiom Q8!Q_8source, which states that x<yzz+x=yx < y \liff \lexists[z][\eq[z' + x][y]]source for all x,yx,ysource.

Suppose Nt1<t2\Sat{N}{t_1 < t_2}source. Then there exists some kk \in \Natsource such that n+k+1=mn + k + 1 = msource. By the closed term evaluation lemma, Qt1=n¯\Th{Q} \Proves \eq[t_1][\num n]source and Qt2=m¯\Th{Q} \Proves \eq[t_2][\num m]source, and by the first part of this lemma, Qn¯+k¯=m¯\Th{Q} \Proves \eq[\num n + {\num k}'][\num m]source. By the transitivity of identity it follows that Qk¯+t1=t2\Th{Q} \Proves \eq[{\num k}' + t_1][t_2]source, so Qzz+t1=t2\Th{Q} \Proves \lexists[z][\eq[z' + t_1][t_2]]source. By the right-to-left direction of Q8!Q_8source, Qt1<t2\Th{Q} \Proves t_1 < t_2source.

Suppose instead that Nt1<t2\Sat/{N}{t_1 < t_2}source, i.e., mnm \leq nsource.

We work in Q\Th{Q}source and assume that t1<t2t_1 < t_2source. By the left-to-right direction of Q8!Q_8source, there is some zzsource such that z+t1=t2\eq[z' + t_1][t_2]source. Since Qt1=n¯\Th{Q} \Proves \eq[t_1][\num n]source and Qt2=m¯\Th{Q} \Proves \eq[t_2][\num m]source, z+n¯=m¯\eq[z' + \num n][\num m]source.

By an external induction on mmsource using Q5!Q_5source, z+nm¯=0\eq[z' + \num{n - m}][\Obj 0]source. If m=nm = nsource then z0\eq/[z'][\Obj 0]source, giving a contradiction via Q3!Q_3source. If m<nm < nsource then (z+nm1¯)=0\eq[(z' + \num{n - m - 1})'][\Obj 0]source by Q5!Q_5source again, giving a contradiction via Q3!Q_3source. So Q¬(t1<t2)\Th{Q} \Proves \lnot(t_1 < t_2)source.

Bounded quantification over a closed term reduces to a finite combination

Suppose A!Asource is a formula, ttsource a closed term, and k=ValN(t)k=\Value{t}{N}source. Then

  1. Q(x<t)A(x)\Th{Q} \Proves \bforall{x<t}{!A(x)}source iff QA(0¯)A(k1¯)\Th{Q} \Proves !A(\num 0) \land \dots \land !A(\num{k-1})source.

  2. Q(x<t)A(x)\Th{Q} \Proves \bexists{x<t}{!A(x)}source iff QA(0¯)A(k1¯)\Th{Q} \Proves !A(\num 0) \lor \dots \lor !A(\num{k-1})source.

Proof

We prove the case for the bounded universal quantifier. If ValN(t)=0\Value{t}{N} = 0source then the left-hand side of the equivalence is provable in Q\Th{Q}source, because there is no x<0¯x<\num 0source by the lemma that Q proves nothing is less than zero. Similarly, we can take an empty disjunction to be simply \ltruesource, which is also provable in Q\Th{Q}source.

We therefore suppose that ValN(t)=k+1\Value{t}{N} = k+1source for some natural number kksource. By the closed term evaluation lemma we can assume that we are working with a formula of the form (x<k+1¯)A(x)\bforall{x<\num{k+1}}{!A(x)}source.

Suppose that Q(x<k+1¯)A(x)\Th{Q} \Proves \bforall{x<\num{k+1}}{!A(x)}source, and let nkn \leq ksource. Since Qn¯<k+1¯\Th{Q} \Proves \num n < \num{k+1}source by the atomic completeness lemma, it follows by logic that QA(n¯)\Th{Q} \Proves !A(\num n)source. Applying this fact k+1k+1source times for each nkn \leq ksource, we get that QA(0¯)A(k¯)\Th{Q} \Proves !A(\num 0) \land \dots \land !A(\num k)source as desired.

For the other direction, suppose that QA(0¯)A(k¯)\Th{Q} \Proves !A(\num 0) \land \dots \land !A(\num k)source. Working in Q\Th{Q}source, suppose that x<k+1¯x < \num{k+1}source. By the lemma enumerating the objects less than a fixed numeral we have that x=0¯x=k¯x = \num 0 \lor \dots \lor x = \num ksource, so by logic it follows that A(x)!A(x)source, and hence the universal claim (x<k+1¯)A(x)\bforall{x<\num{k+1}}{!A(x)}source follows.

The proof of the equivalence for bounded existentially quantified formulas is similar.

Exercise proving the bounded existential equivalence

Give a detailed proof of the existential case in the bounded quantifier equivalence lemma.

Delta zero completeness of Q

If A!Asource is a Δ0\Delta_0source sentence which is true in N\Struct{N}source, then QA\Th{Q} \Proves !Asource.

Proof

We prove this by induction on formula complexity.

The base case is given by the atomic completeness lemma, so we move to the induction step. For simplicity we split the case of negation into subcases depending on the structure of the formula to which the negation is applied.

  1. Suppose (AB)(!A \land !B)source is true in N\Struct{N}source, so A!Asource and B!Bsource are true in N\Struct{N}source. By the induction hypothesis, QA\Th{Q} \Proves !Asource and QB\Th{Q} \Proves !Bsource, so Q(AB)\Th{Q} \Proves (!A \land !B)source by logic.

  2. Suppose ¬(AB)\lnot (!A \land !B)source is true in N\Struct{N}source, so either ¬A\lnot !Asource or ¬B\lnot !Bsource is true in N\Struct{N}source. Without loss of generality, suppose the former. By the induction hypothesis Q¬A\Th{Q} \Proves \lnot !Asource, and hence Q¬(AB)\Th{Q} \Proves \lnot (!A \land !B)source by logic.

  3. Suppose (AB)(!A \lor !B)source is true in N\Struct{N}source, so either A!Asource is true in N\Struct{N}source or B!Bsource is true in N\Struct{N}source. Without loss of generality, suppose the former holds. By the induction hypothesis QA\Th{Q} \Proves !Asource, and hence Q(AB)\Th{Q} \Proves (!A \lor !B)source by logic.

  4. Suppose ¬(AB)\lnot(!A \lor !B)source is true in N\Struct{N}source, so ¬A\lnot !Asource and ¬B\lnot !Bsource are true in N\Struct{N}source. Then Q¬A\Th{Q} \Proves \lnot !Asource and Q¬B\Th{Q} \Proves \lnot !Bsource by the induction hypothesis. Consequently, Q¬(AB)\Th{Q} \Proves \lnot(!A \lor !B)source by logic.

  5. Suppose that (x<t)A(x)\bforall{x<t}{!A(x)}source is true in N\Struct{N}source, where ttsource is a closed term and k=ValN(t)k=\Value{t}{N}source. By the induction hypothesis and logic, if A(n¯)!A(\num n)source is true in N\Struct{N}source for all n<ValN(t)n < \Value{t}{N}source then QA(0¯)A(k1¯)\Th{Q} \Proves !A(\num 0) \land \dots \land !A(\num{k-1})source. By the bounded quantifier equivalence lemma it follows that Q(x<t)A(x)\Th{Q} \Proves \bforall{x<t}{!A(x)}source.

  6. The case for the bounded existential quantifier, where we have a sentence of the form (x<t)A(x)\bexists{x < t}{!A(x)}source, is similar to that for the bounded universal quantifier.

  7. Suppose that ¬(x<t)A(x)\lnot \bforall{x<t}{!A(x)}source is true in N\Struct{N}source, where ttsource is a closed term. This sentence is equivalent to the sentence (x<t)¬A(x)\bexists{x<t}{\lnot !A(x)}source, with the equivalence derivable in Q\Th{Q}source, so we may apply the reasoning for bounded existential quantifiers.

  8. Similarly, suppose that ¬(x<t)A(x)\lnot \bexists{x<t}!A(x)source is true in N\Struct{N}source, where ttsource is a closed term. This sentence is equivalent in Q\Th{Q}source to (x<t)¬A(x)\bforall{x<t}{\lnot!A(x)}source, and so we may apply the reasoning for bounded universal quantifiers.

  9. Finally, suppose ¬A\lnot !Asource is true in N\Struct{N}source. The only cases remaining are when A!Asource is atomic and when ¬A¬¬B\lnot !A \ident \lnot\lnot !Bsource for some Δ0\Delta_0source sentence B!Bsource. If A!Asource is atomic then by the atomic completeness lemma, Q¬A\Th{Q} \Proves \lnot !Asource. If ¬A¬¬B\lnot !A \ident \lnot\lnot !Bsource, then by logic it is provably equivalent in Q\Th{Q}source to B!Bsource, which is true in N\Struct{N}source since ¬A\lnot !Asource is true in N\Struct{N}source. By the induction hypothesis we therefore have that Q¬A\Th{Q} \Proves \lnot !Asource.

Exercise proving the existential case of Delta zero completeness

Give a detailed proof of the existential case in the Delta zero completeness lemma.

Sigma one completeness of Q

If A!Asource is a Σ1\Sigma_1source sentence which is true in N\Struct{N}source, then QA\Th{Q} \Proves !Asource.

Proof

If xA(x)\lexists{x}!A(x)source is a Σ1\Sigma_1source sentence which is true in N\Struct{N}source, then there exists a natural number nnsource and a variable assignment sssource such that s(x)=ns(x) = nsource and N,sA(x)\Sat{N}{!A(x)}[s]source. By standard facts about the satisfaction relation it follows that NA(n¯)\Sat{N}{!A(\num n)}source. But A(n¯)!A(\num n)source is a Δ0\Delta_0source formula, so by the Delta zero completeness lemma we have that QA(n¯)\Th{Q} \Proves !A(\num n)source, and hence by logic we also have that QxA(x)\Th{Q} \Proves \lexists[x][!A(x)]source.

Source disclosures