content/incompleteness/introduction/introduction.tex
1% Part: incompleteness2% Chapter: first-incompleteness34\documentclass[../../../include/open-logic-chapter]{subfiles}56\begin{document}78\olchapter{inc}{int}{Introduction to Incompleteness}910\olimport{historical-background}1112\olimport{definitions}1314\olimport{overview}1516\olimport{undecidability}1718\OLEndChapterHook1920\end{document}
content/incompleteness/introduction/historical-background.tex
1% Part: incompleteness2% Chapter: introduction3% Section: historical-background45\documentclass[../../../include/open-logic-section]{subfiles}67\begin{document}89\olfileid{inc}{int}{bgr}1011\olsection{Historical Background}1213In this section, we will briefly discuss historical developments that14will help put the incompleteness theorems in context. In particular,15we will give a very sketchy overview of the history of mathematical16logic; and then say a few words about the history of the foundations17of mathematics.1819\begin{digress}20 The phrase ``mathematical logic'' is ambiguous. One can interpret the21word ``mathematical'' as describing the subject matter, as in, ``the22logic of mathematics,'' denoting the principles of mathematical23reasoning; or as describing the methods, as in ``the mathematics of24logic,'' denoting a mathematical study of the principles of reasoning.25The account that follows involves mathematical logic in both senses,26often at the same time.27\end{digress}2829The study of logic began, essentially, with Aristotle, who lived30approximately 384--322 \textsc{bce}. His \emph{Categories}, \emph{Prior31 analytics}, and \emph{Posterior analytics} include systematic32studies of the principles of scientific reasoning, including a33thorough and systematic study of the syllogism.3435Aristotle's logic dominated scholastic philosophy through the middle36ages; indeed, as late as the eighteenth century, Kant maintained that37Aristotle's logic was perfect and in no need of revision. But the38theory of the syllogism is far too limited to model anything but39the most superficial aspects of mathematical reasoning. A century40earlier, Leibniz, a contemporary of Newton's, imagined a complete41``calculus'' for logical reasoning, and made some rudimentary steps42towards designing such a calculus, essentially describing a version of43propositional logic.4445The nineteenth century was a watershed for logic. In 1854 George Boole46wrote \emph{The Laws of Thought}, with a thorough algebraic study of47propositional logic that is not far from modern presentations. In 187948Gottlob Frege published his \emph{Begriffsschrift} (Concept writing)49which extends propositional logic with quantifiers and relations, and50thus includes first-order logic. In fact, Frege's logical systems51included higher-order logic as well, and more. In his \emph{Basic Laws52 of Arithmetic}, Frege set out to show that all of arithmetic could53be derived in his Begriffsschrift from purely logical54assumption. Unfortunately, these assumptions turned out to be55inconsistent, as Russell showed in 1902. But setting aside the56inconsistent axiom, Frege more or less invented modern logic57singlehandedly, a startling achievement. Quantificational logic was58also developed independently by algebraically-minded thinkers after59Boole, including Peirce and Schr\"oder.6061Let us now turn to developments in the foundations of mathematics. Of62course, since logic plays an important role in mathematics, there is a63good deal of interaction with the developments just described. For64example, Frege developed his logic with the explicit purpose of65showing that all of mathematics could be based solely on his logical66framework; in particular, he wished to show that mathematics consists67of a priori \emph{analytic} truths instead of, as Kant had maintained,68a priori \emph{synthetic} ones.6970Many take the birth of mathematics proper to have occurred with the71Greeks. Euclid's \emph{Elements}, written around 300 B.C., is already72a mature representative of Greek mathematics, with its emphasis on73rigor and precision. The definitions and proofs in Euclid's74\emph{Elements} survive more or less intact in high school geometry75textbooks today (to the extent that geometry is still taught in high76schools). This model of mathematical reasoning has been held to be a77paradigm for rigorous argumentation not only in mathematics but in78branches of philosophy as well. (Spinoza even presented moral and79religious arguments in the Euclidean style, which is strange to see!)8081Calculus was invented by Newton and Leibniz in the seventeenth82century. (A fierce priority dispute raged for centuries, but most83scholars today hold that the two developments were for the most part84independent.) Calculus involves reasoning about, for example,85infinite sums of infinitely small quantities; these features fueled86criticism by Bishop Berkeley, who argued that belief in God was no87less rational than the mathematics of his time. The methods of88calculus were widely used in the eighteenth century, for example by89Leonhard Euler, who used calculations involving infinite sums with90dramatic results.9192In the nineteenth century, mathematicians tried to address Berkeley's93criticisms by putting calculus on a firmer foundation. Efforts by94Cauchy, Weierstrass, Bolzano, and others led to our contemporary95definitions of limits, continuity, differentiation, and integration in96terms of ``epsilons and deltas,'' in other words, devoid of any97reference to infinitesimals. Later in the century, mathematicians98tried to push further, and explain all aspects of calculus, including99the real numbers themselves, in terms of the natural numbers.100(Kronecker: ``God created the whole numbers, all else is the work of101man.'') In 1872, Dedekind wrote ``Continuity and the irrational102numbers,'' where he showed how to ``construct'' the real numbers as103sets of rational numbers (which, as you know, can be viewed as pairs104of natural numbers); in 1888 he wrote ``Was sind und was sollen die105Zahlen'' (roughly, ``What are the natural numbers, and what should106they be?'') which aimed to explain the natural numbers in purely107``logical'' terms. In 1887 Kronecker wrote ``\"Uber den Zahlbegriff''108(``On the concept of number'') where he spoke of representing all109mathematical object in terms of the integers; in 1889 Giuseppe Peano110gave formal, symbolic axioms for the natural numbers.111112The end of the nineteenth century also brought a new boldness in dealing113with the infinite. Before then, infinitary objects and structures114(like the set of natural numbers) were treated gingerly; ``infinitely115many'' was understood as ``as many as you want,'' and ``approaches in116the limit'' was understood as ``gets as close as you want.'' But Georg117Cantor showed that it was possible to take the infinite at face118value. Work by Cantor, Dedekind, and others help to introduce the119general set-theoretic understanding of mathematics that is now widely accepted.120121This brings us to twentieth century developments in logic and foundations.122In 1902 Russell discovered the paradox in Frege's logical system. In1231904 Zermelo proved Cantor's well-ordering principle, using the124so-called ``axiom of choice''; the legitimacy of this axiom prompted a125good deal of debate. Between 1910 and 1913 the three volumes of126Russell and Whitehead's \emph{Principia Mathematica} appeared,127extending the Fregean program of establishing mathematics on logical128grounds. Unfortunately, Russell and Whitehead were forced to adopt two129principles that seemed hard to justify as purely logical: an axiom of130infinity and an axiom of ``reducibility.'' In the 1900's Poincar\'e131criticized the use of ``impredicative definitions'' in mathematics,132and in the 1910's Brouwer began proposing to refound all of133mathematics in an ``intuitionistic'' basis, which avoided the use of134the law of the excluded middle ($!A \lor \lnot !A$).135136Strange days indeed!{} The program of reducing all of mathematics to137logic is now referred to as ``logicism,'' and is commonly viewed as138having failed, due to the difficulties mentioned above. The program of139developing mathematics in terms of intuitionistic mental constructions140is called ``intuitionism,'' and is viewed as posing overly severe141restrictions on everyday mathematics. Around the turn of the century,142David Hilbert, one of the most influential mathematicians of all time,143was a strong supporter of the new, abstract methods introduced by144Cantor and Dedekind: ``no one will drive us from the paradise that145Cantor has created for us.'' At the same time, he was sensitive to146foundational criticisms of these new methods (oddly enough, now called147``classical''). He proposed a way of having one's cake and eating it148too:149\begin{enumerate}150\item Represent classical methods with formal axioms and rules;151 represent mathematical questions as !!{formula}s in an axiomatic152 system.153\item Use safe, ``finitary'' methods to prove that these formal154 deductive systems are consistent.155\end{enumerate}156157Hilbert's work went a long way toward accomplishing the first goal.158In 1899, he had done this for geometry in his celebrated book159\emph{Foundations of geometry}. In subsequent years, he and a number160of his students and collaborators worked on other areas of mathematics161to do what Hilbert had done for geometry. Hilbert himself gave axiom162systems for arithmetic and analysis. Zermelo gave an axiomatization of163set theory, which was expanded on by Fraenkel, Skolem, von Neumann,164and others. By the mid-1920s, there were two approaches that laid165claim to the title of an axiomatization of ``all'' of mathematics, the166\emph{Principia mathematica} of Russell and Whitehead, and what came to167be known as Zermelo--Fraenkel set theory.168169In 1921, Hilbert set out on a research project to establish the goal170of proving these systems to be consistent. He was aided in this171project by several of his students, in particular Bernays, Ackermann,172and later Gentzen. The basic idea for accomplishing this goal was to173cast the question of the possibility of !!{derivation} of an174inconsistency in mathematics as a combinatorial problem about possible175sequences of symbols, namely possible sequences of sentences which176meet the criterion of being a correct !!{derivation} of, say, $!A \land177\lnot !A$ from the axioms of an axiom system for arithmetic, analysis,178or set theory. A proof of the impossibility of such a sequence of179symbols would---since it is itself a mathematical proof---be180formalizable in these axiomatic systems. In other words, there would181be some sentence $\OCon$ which states that, say, arithmetic is182consistent. Moreover, this sentence should be provable in the systems183in question, especially if its proof requires only very restricted,184``finitary'' means.185186The second aim, that the axiom systems developed would settle every187mathematical question, can be made precise in two ways. In one way, we188can formulate it as follows: For any sentence~$!A$ in the language of189an axiom system for mathematics, either $!A$ or $\lnot !A$ is provable190from the axioms. If this were true, then there would be no sentences191which can neither be proved nor refuted on the basis of the axioms, no192questions which the axioms do not settle. An axiom system with this193property is called \emph{complete}. Of course, for any given sentence194it might still be a difficult task to determine which of the two195alternatives holds. But in principle there should be a method to do196so. In fact, for the axiom and !!{derivation} systems considered by197Hilbert, completeness would imply that such a method exists---although198Hilbert did not realize this. The second way to interpret the199question would be this stronger requirement: that there be a200mechanical, computational method which would determine, for a given201sentence~$!A$, whether it is derivable from the axioms or not.202203In 1931, G\"odel proved the two ``incompleteness theorems,'' which204showed that this program could not succeed. There is no axiom system205for mathematics which is complete, specifically, the sentence that206expresses the consistency of the axioms is a sentence which can207neither be proved nor refuted.208209This struck a lethal blow to Hilbert's original program. However, as210is so often the case in mathematics, it also opened up exciting new211avenues for research. If there is no one, all-encompassing formal212system of mathematics, it makes sense to develop more circumscribed213systems and investigate what can be proved in them. It also makes214sense to develop less restricted methods of proof for establishing the215consistency of these systems, and to find ways to measure how hard it216is to prove their consistency. Since G\"odel showed that (almost)217every formal system has questions it cannot settle, it makes sense to218look for ``interesting'' questions a given formal system cannot219settle, and to figure out how strong a formal system has to be to220settle them. To the present day, logicians have been pursuing these221questions in a new mathematical discipline, the theory of proofs.222223\end{document}
content/incompleteness/introduction/definitions.tex
1% Part: incompleteness2% Chapter: introduction3% Section: definitions45\documentclass[../../../include/open-logic-section]{subfiles}67\begin{document}89\olfileid{inc}{int}{def}1011\olsection{Definitions}1213In order to carry out Hilbert's project of formalizing mathematics and14showing that such a formalization is consistent and complete, the15first order of business would be that of picking a language, logical16framework, and a system of axioms. For our purposes, let us suppose17that mathematics can be formalized in a first-order language, i.e.,18that there is some set of !!{constant}s, !!{function}s, and19!!{predicate}s which, together with the connectives and quantifiers of20first-order logic, allow us to express the claims of mathematics.21Most people agree that such a language exists: the language of set22theory, in which $\in$ is the only non-logical symbol. That such a23simple language is so expressive is of course a very implausible claim24at first sight, and it took a lot of work to establish that25practically all of mathematics can be expressed in this very austere26vocabulary. To keep things simple, for now, let's restrict our27discussion to arithmetic, so the part of mathematics that just deals28with the natural numbers~$\Nat$. The natural language in which to29express facts of arithmetic is~$\Lang L_A$. $\Lang L_A$ contains a30single two-place !!{predicate}~$<$, a single !!{constant}~$\Obj 0$,31one one-place !!{function}~$\prime$, and two two-place32!!{function}s~$+$ and~$\times$.3334\begin{defn}35A set of !!{sentence}s~$\Gamma$ is a \emph{theory} if it is closed36under entailment, i.e., if $\Gamma = \Setabs{!A}{\Gamma \Entails37!A}$.38\end{defn}3940There are two easy ways to specify theories. One is as the set of41!!{sentence}s true in some !!{structure}. For instance, consider the42!!{structure} for $\Lang L_A$ in which the !!{domain} is~$\Nat$ and43all non-logical symbols are interpreted as you would expect.4445\begin{defn}\ollabel{def:standard-model}46The \emph{standard model of arithmetic} is the !!{structure}~$\Struct47N$ defined as follows:48\begin{enumerate}49\item $\Domain N = \Nat$50\item $\Assign{\Obj 0}{N} = 0$51\item $\Assign{\Obj \prime}{N}(n) = n + 1$ for all $n \in \Nat$52\item $\Assign{\Obj +}{N}(n, m) = n + m$ for all $n, m \in \Nat$53\item $\Assign{\Obj \times}{N}(n, m) = n\cdot m$ for all $n, m \in \Nat$54\item $\Assign{\Obj <}{N} = \Setabs{\tuple{n, m}}{n \in \Nat, m \in55 \Nat, n < m}$56\end{enumerate}57\end{defn}5859Note the difference between `$\times$' and `$\cdot$': $\times$ is a60symbol in the language of arithmetic. Of course, we've chosen it to61remind us of multiplication, but $\times$ is not the multiplication62operation but a two-place function symbol (officially, $\Obj f^2_1$).63By contrast, $\cdot$~\emph{is} the ordinary multiplication function.64When you see something like $n \cdot m$, we mean the product of the65numbers $n$ and~$m$; when you see something like $x \times y$ we are66talking about a term in the language of arithmetic. In the standard67model, the function symbol~$\times$ is interpreted as the function68$\cdot$ on the natural numbers. For addition, we use $+$ as both the69function symbol of the language of arithmetic, and the addition70function on the natural numbers. Here you have to use the context to71determine what is meant.7273\begin{defn}74The theory of \emph{true arithmetic} is the set of !!{sentence}s75satisfied in the standard model of arithmetic, i.e.,76\[77\Th{TA} = \Setabs{!A}{\Sat{N}{!A}}.78\]79\end{defn}8081$\Th{TA}$ is a theory, for whenever $\Th{TA} \Entails !A$, $!A$ is82satisfied in every !!{structure} which satisfies~$\Th{TA}$. Since83$\Sat{N}{\Th{TA}}$, we have that~$\Sat{N}{!A}$, and so $!A \in \Th{TA}$.8485The other way to specify a theory~$\Gamma$ is as the set of86!!{sentence}s entailed by some set of sentences~$\Gamma_0$. In that87case, $\Gamma$ is the ``closure'' of $\Gamma_0$ under entailment.88Specifying a theory this way is only interesting if $\Gamma_0$ is89explicitly specified, e.g., if the !!{element}s of~$\Gamma_0$ are90listed. At the very least, $\Gamma_0$ has to be decidable, i.e., there91has to be a computable test for when !!a{sentence} counts as an92element of~$\Gamma_0$ or not. We call the !!{sentence}s93in~$\Gamma_0$ \emph{axioms} for~$\Gamma$, and $\Gamma$94\emph{axiomatized} by~$\Gamma_0$.9596\begin{defn}97A theory~$\Gamma$ is \emph{axiomatized} by~$\Gamma_0$ iff98\[99\Gamma = \Setabs{!A}{\Gamma_0 \Entails !A}100\]101\end{defn}102103\begin{defn}104The theory $\Th{Q}$ axiomatized by the following sentences is known105as ``Robinson's $\Th{Q}$'' and is a very simple theory of arithmetic.106\begin{align*}107& \lforall[x][\lforall[y][(\eq[x'][y'] \lif \eq[x][y])]] \tag{$!Q_1$}\\108& \lforall[x][\eq/[\Obj 0][x']] \tag{$!Q_2$}\\109& \lforall[x][(\eq[x][\Obj 0] \lor \lexists[y][\eq[x][y']])] \tag{$!Q_3$}\\110& \lforall[x][\eq[(x + \Obj 0)][x]] \tag{$!Q_4$}\\111& \lforall[x][\lforall[y][\eq[(x + y')][(x + y)']]] \tag{$!Q_5$}\\112& \lforall[x][\eq[(x \times \Obj 0)][\Obj 0]] \tag{$!Q_6$}\\113& \lforall[x][\lforall[y][\eq[(x \times y')][((x \times y) + x)]]] \tag{$!Q_7$}\\114& \lforall[x][\lforall[y][(x < y \liff \lexists[z][\eq[(z' + x)][y]])]] \tag{$!Q_8$}115\end{align*}116The set of !!{sentence}s $\{!Q_1, \dots, !Q_8\}$ are the axioms of117$\Th{Q}$, so $\Th{Q}$ consists of all !!{sentence}s entailed by them:118\[119\Th{Q} = \Setabs{!A}{\{!Q_1, \dots, !Q_8\} \Entails !A}.120\]121\end{defn}122123\begin{defn}124Suppose $!A(x)$ is !!a{formula} in $\Lang L_A$ with free variables~$x$125and $y_1$, \dots, $y_n$. Then any !!{sentence} of the form126\[127\lforall[y_1][\dots\lforall[y_n][((!A(\Obj 0) \land \lforall[x][(!A(x)128\lif !A(x'))]) \lif \lforall[x][!A(x)])]]129\]130is an instance of the \emph{induction schema}.131132\emph{Peano arithmetic}~$\Th{PA}$ is the theory axiomatized by the133axioms of $\Th{Q}$ together with all instances of the induction134schema.135\end{defn}136137\begin{explain}138Every instance of the induction schema is true in~$\Struct{N}$. This139is easiest to see if the !!{formula}~$!A$ only has one free140!!{variable}~$x$. Then $!A(x)$ defines a subset~$X_{!A}$ of~$\Nat$141in~$\Struct{N}$. $X_{!A}$ is the set of all~$n \in \Nat$ such that142$\Sat{N}{!A(x)}[s]$ when $s(x) = n$. The corresponding instance of143the induction schema is144\[145((!A(\Obj 0) \land \lforall[x][(!A(x) \lif !A(x'))]) \lif 146 \lforall[x][!A(x)]).147\]148If its antecedent is true in~$\Struct{N}$, then $0 \in X_{!A}$ and,149whenever $n \in X_{!A}$, so is $n+1$. Since $0 \in X_{!A}$, we get150$1 \in X_{!A}$. With $1 \in X_{!A}$ we get $2 \in X_{!A}$. And so on.151So for every $n \in \Nat$, $n \in X_{!A}$. But this means that152$\lforall[x][!A(x)]$ is satisfied in~$\Struct{N}$.153\end{explain}154155Both $\Th{Q}$ and $\Th{PA}$ are axiomatized theories. The big156question is, how strong are they? For instance, can $\Th{PA}$ prove157all the truths about~$\Nat$ that can be expressed in~$\Lang L_A$?158Specifically, do the axioms of $\Th{PA}$ settle all the questions159that can be formulated in~$\Lang L_A$?160161Another way to put this is to ask: Is $\Th{PA} = \Th{TA}$?162$\Th{TA}$ obviously does prove (i.e., it includes) all the truths163about~$\Nat$, and it settles all the questions that can be formulated164in~$\Lang L_A$, since if $!A$ is !!a{sentence} in $\Lang L_A$, then165either $\Sat{N}{!A}$ or $\Sat{N}{\lnot !A}$, and so either $\Th{TA}166\Entails !A$ or $\Th{TA} \Entails \lnot !A$. Call such a theory167\emph{!!{complete}}.168169\begin{defn}170A theory $\Gamma$ is \emph{!!{complete}} iff for every171!!{sentence}~$!A$ in its language, either $\Gamma \Entails !A$ or172$\Gamma \Entails \lnot !A$.173\end{defn}174175\begin{explain}176By the Completeness Theorem, $\Gamma \Entails !A$ iff $\Gamma \Proves177!A$, so $\Gamma$ is complete iff for every !!{sentence}~$!A$ in its178language, either $\Gamma \Proves !A$ or $\Gamma \Proves \lnot !A$.179\end{explain}180181Another question we are led to ask is this: Is there a computational182procedure we can use to test if !!a{sentence} is in~$\Th{TA}$, in183$\Th{PA}$, or even just in~$\Th{Q}$? We can make this more precise184by defining when a set (e.g., a set of !!{sentence}s) is185!!{decidable}.186187\begin{defn}188A set $X$ is \emph{!!{decidable}} iff there is a computational procedure189which on input~$x$ returns~$1$ if $x \in X$ and $0$ otherwise.190\end{defn}191192So our question becomes: Is $\Th{TA}$ ($\Th{PA}$, $\Th{Q}$) !!{decidable}?193194The answer to all these questions will be: no. None of these theories195are decidable. However, this phenomenon is not specific to these196particular theories. In fact, \emph{any} theory that satisfies certain197conditions is subject to the same results. One of these conditions,198which $\Th{Q}$ and $\Th{PA}$ satisfy, is that they are axiomatized by199!!a{decidable} set of axioms.200201\begin{defn}202A theory is \emph{!!{axiomatizable}} if it is axiomatized203by !!a{decidable} set of axioms.204\end{defn}205206\begin{ex}207Any theory axiomatized by a finite set of !!{sentence}s is208!!{axiomatizable}, since any finite set is !!{decidable}.209Thus, $\Th{Q}$, for instance, is !!{axiomatizable}.210211Schematically axiomatized theories like~$\Th{PA}$ are also212!!{axiomatizable}. For to test if $!B$ is among the axioms213of~$\Th{PA}$, i.e., to compute the function $\Char{X}$ where214$\Char{X}(!B) = 1$ if $!B$ is an axiom of~$\Th{PA}$ and $= 0$215otherwise, we can do the following: First, check if $!B$ is one of the216axioms of~$\Th{Q}$. If it is, the answer is ``yes'' and the value of217$\Char{X}(!B) = 1$. If not, test if it is an instance of the induction218schema. This can be done systematically; in this case, perhaps it's219easiest to see that it can be done as follows: Any instance of the220induction schema begins with a number of universal quantifiers, and221then a sub-!!{formula} that is a conditional. The consequent of that222conditional is $\lforall[x][!A(x, y_1, \dots, y_n)]$ where $x$ and223$y_1$, \dots, $y_n$ are all the free variables of~$!A$ and the initial224quantifiers of~$!B$ bind the variables~$y_1$, \dots,~$y_n$. Once we225have extracted this~$!A$ and checked that its free variables match the226variables bound by the universal quantifiers at the front227and~$\lforall[x]$, we go on to check that the antecedent of the228conditional matches229\[230!A(\Obj 0, y_1, \dots, y_n) \land \lforall[x][(!A(x, y_1, \dots, y_n)231\lif !A(x', y_1, \dots, y_n))]232\]233Again, if it does, $!B$ is an instance of the induction schema, and if234it doesn't, $!B$ isn't.235\end{ex}236237In answering this question---and the more general question of which238theories are complete or decidable---it will be useful to consider239also the following definition. Recall that a set $X$ is !!{enumerable}240iff it is empty or if there is !!a{surjective} function~$f \colon \Nat241\to X$. Such a function is called an enumeration of~$X$.242243\begin{defn}244A set $X$ is called \emph{!!{computably enumerable}} (!!{c.e.} for245short) iff it is empty or it has a computable enumeration.246\end{defn}247248In addition to !!{axiomatizability}, another condition on theories to249which the incompleteness theorems apply will be that they are strong250enough to prove basic facts about computable functions and251!!{decidable} relations. By ``basic facts,'' we mean !!{sentence}s252which express what the values of computable functions are for each of253their arguments. And by ``strong enough'' we mean that the theories254in question count these sentences among its theorems. For instance,255consider a prototypical computable function: addition. The value of256$+$ for arguments $2$ and $3$ is~$5$, i.e., $2+3 = 5$. A sentence in257the language of arithmetic that expresses that the value of $+$ for258arguments $2$ and $3$ is~$5$ is: $(\num{2} + \num{3}) = \num{5}$.259And, e.g., $\Th{Q}$ proves this sentence. More generally, we would260like there to be, for each computable function $f(x_1, x_2)$261!!a{formula}~$!A_f(x_1, x_2, y)$ in~$\Lang{L_A}$ such that $\Th{Q}262\Proves !A_f(\num{n_1}, \num{n_2}, \num{m})$ whenever $f(n_1, n_2) =263m$. In this way, $\Th{Q}$ proves that the value of~$f$ for arguments264$n_1$, $n_2$ is~$m$. In fact, we require that it proves a bit more,265namely that no other number is the value of~$f$ for arguments266$n_1$,~$n_2$. And the same goes for !!{decidable} relations. This is267made precise in the following two definitions.268269\begin{defn}270A !!{formula}~$!A(x_1, \dots, x_k, y)$ \emph{!!{represents}} the271function $f\colon \Nat^k \to \Nat$ in~$\Gamma$ iff whenever $f(n_1,272\dots, n_k) = m$, then273\begin{enumerate}274\item $\Gamma \Proves !A(\num{n_1}, \dots, \num{n_k}, \num{m})$, and275\item $\Gamma \Proves \lforall[y](!A(\num{n_1}, \dots, \num{n_k},276y) \lif y = \num{m})$.277\end{enumerate}278\end{defn}279280\begin{defn}281A !!{formula}~$!A(x_1, \dots, x_k)$ \emph{!!{represents}} the282relation $R \subseteq \Nat^k$ iff,283\begin{enumerate}284\item whenever $R(n_1, \dots, n_k)$, $\Gamma \Proves !A(\num{n_1},285\dots, \num{n_k})$, and286\item whenever not $R(n_1, \dots, n_k)$, $\Gamma \Proves \lnot287!A(\num{n_1}, \dots, \num{n_k})$.288\end{enumerate}289\end{defn}290291A theory is ``strong enough'' for the incompleteness theorems to292apply if it !!{represents} all computable functions and all293!!{decidable} relations. $\Th{Q}$~and its extensions satisfy this294condition, but it will take us a while to establish this---it's a295non-trivial fact about the kinds of things $\Th{Q}$ can prove, and296it's hard to show because $\Th{Q}$ has only a few axioms from which297we'll have to prove all these facts. However, $\Th{Q}$ is a very weak298theory. So although it's hard to prove that $\Th{Q}$ represents all299computable functions, most interesting theories are stronger300than~$\Th{Q}$, i.e., prove more than $\Th{Q}$ does. And if $\Th{Q}$301proves something, any stronger theory does; since $\Th{Q}$ represents302all computable functions, every stronger theory does. This means that303many interesting theories meet this condition of the incompleteness304theorems. So our hard work will pay off, since it shows that the305incompleteness theorems apply to a wide range of theories. Certainly,306any theory aiming to formalize ``all of mathematics'' must prove307everything that $\Th{Q}$ proves, since it should at the very least be308able to capture the results of elementary computations. So any theory309that is a candidate for a theory of ``all of mathematics'' will be one310to which the incompleteness theorems apply.311312313\end{document}
content/incompleteness/introduction/overview.tex
1% Part: incompleteness2% Chapter: introduction3% Section: overview45\documentclass[../../../include/open-logic-section]{subfiles}67\begin{document}89\olfileid{inc}{int}{ovr}1011\olsection{Overview of Incompleteness Results}1213Hilbert expected that mathematics could be formalized in an14!!{axiomatizable} theory which it would be possible to prove15!!{complete} and !!{decidable}. Moreover, he aimed to prove the16consistency of this theory with very weak, ``finitary,'' means, which17would defend classical mathematics against the challenges of18intuitionism. G\"odel's incompleteness theorems showed that these19goals cannot be achieved.2021G\"odel's first incompleteness theorem showed that a version of22Russell and Whitehead's \emph{Principia Mathematica} is not23!!{complete}. But the proof was actually very general and applies to24a wide variety of theories. This means that it wasn't just that25\emph{Principia Mathematica} did not manage to completely capture26mathematics, but that \emph{no} acceptable theory does. It took a27while to isolate the features of theories that suffice for the28incompleteness theorems to apply, and to generalize G\"odel's proof to29apply make it depend only on these features. But we are now in a30position to state a very general version of the first incompleteness31theorem for theories in the language $\Lang L_A$ of arithmetic.3233\begin{thm}34If $\Gamma$ is a consistent and !!{axiomatizable} theory in~$\Lang35L_A$ which !!{represents} all computable functions and !!{decidable}36relations, then $\Gamma$ is not !!{complete}.37\end{thm}3839To say that $\Gamma$ is not !!{complete} is to say that for at least40one !!{sentence}~$!A$, $\Gamma \Proves/ !A$ and $\Gamma \Proves/ \lnot41!A$. Such !!a{sentence} is called \emph{independent} (of~$\Gamma)$.42We can in fact relatively quickly prove that there must be independent43sentences. But the power of G\"odel's proof of the theorem lies in the44fact that it exhibits a \emph{specific example} of such an independent45!!{sentence}. The intriguing construction produces46!!a{sentence}~$!G_\Gamma$, called a \emph{G\"odel sentence}47for~$\Gamma$, which is unprovable because in $\Gamma$, $!G_\Gamma$ is48equivalent to the claim that $!G_\Gamma$ is unprovable in~$\Gamma$. It49does so \emph{constructively}, i.e., given an axiomatization50of~$\Gamma$ and a description of the !!{derivation} system, the proof gives a51method for actually writing down~$!G_\Gamma$.5253The construction in G\"odel's proof requires that we find a way to54express in $\Lang L_A$ the properties of and operations on terms and55!!{formula}s of $\Lang L_A$ itself. These include properties such as56``$!A$ is !!a{sentence},'' ``$\delta$ is !!a{derivation} of~$!A$,''57and operations such as $\Subst{!A}{t}{x}$. This way must (a) express58these properties and relations via a ``coding'' of symbols and59sequences thereof (which is what terms, !!{formula}s, !!{derivation}s,60etc. are) as natural numbers (which is what $\Lang L_A$ can talk61about). It must (b) do this in such a way that $\Gamma$ will prove the62relevant facts, so we must show that these properties are coded by63!!{decidable} properties of natural numbers and the operations64correspond to computable functions on natural numbers. This is called65``arithmetization of syntax.''6667Before we investigate how syntax can be arithmetized, however, we will68consider the condition that~$\Gamma$ is ``strong enough,'' i.e.,69!!{represents} all computable functions and !!{decidable} relations.70This requires that we give a precise definition of ``computable.''71This can be done in a number of ways, e.g., via the model of Turing72machines, or as those functions computable by programs in some73general-purpose programming language. Since our aim is to74!!{represents}s these functions and relations in a theory in the75language~$\Lang L_A$, however, it is best to pick a simple definition76of computability of just numerical functions. This is the notion of77\emph{recursive function}. So we will first discuss the recursive78functions. We will then show that $\Th{Q}$ already !!{represents} all79recursive functions and relations. This will allow us to apply the80incompleteness theorem to specific theories such as $\Th{Q}$ and81$\Th{PA}$, since we will have established that these are examples of82theories that are ``strong enough.''8384The end result of the arithmetization of syntax is85!!a{formula} $\OProv[\Gamma](x)$ which, via the coding of !!{formula}s86as numbers, expresses provability from the axioms of~$\Gamma$.87Specifically, if $!A$ is coded by the number~$n$, and $\Gamma \Proves88!A$, then $\Gamma \Proves \Prov[\Gamma](\num{n})$. This ``provability89predicate'' for $\Gamma$ allows us also to express, in a certain90sense, the consistency of $\Gamma$ as !!a{sentence} of~$\Lang L_A$:91let the ``consistency statement'' for~$\Gamma$ be the !!{sentence}92$\lnot \Prov[\Gamma](\num{n})$, where we take $n$ to be the code of a93contradiction, e.g., of~$\lfalse$. The second incompleteness theorem94states that consistent !!{axiomatizable} theories also do not prove95their own consistency statements. The conditions required for this96theorem to apply are a bit more stringent than just that the theory97represents all computable functions and !!{decidable} relations, but98we will show that $\Th{PA}$ satisfies them.99100\end{document}
content/incompleteness/introduction/undecidability.tex
1% Part: incompleteness2% Chapter: introduction3% Section: decidability45\documentclass[../../../include/open-logic-section]{subfiles}67\begin{document}89\olfileid{inc}{int}{dec}1011\olsection{Undecidability and Incompleteness}1213G\"odel's proof of the incompleteness theorems require arithmetization14of syntax. But even without that we can obtain some nice results just15on the assumption that a theory !!{represents} all !!{decidable}16relations. The proof is a diagonal argument similar to the proof of17the undecidability of the halting problem.1819\begin{thm}20If $\Gamma$ is a consistent theory that !!{represents} every21!!{decidable} relation, then $\Gamma$ is not !!{decidable}.22\end{thm}2324\begin{proof}25Suppose $\Gamma$ were !!{decidable}. We show that if $\Gamma$26!!{represents} every !!{decidable} relation, it must be inconsistent.2728!!^{decidable} properties (one-place relations) are represented by29!!{formula}s with one free variable. Let $!A_0(x)$, $!A_1(x)$, \dots,30be a computable enumeration of all such !!{formula}s. Now consider31the following set $D \subseteq \Nat$:32\[33D = \Setabs{n}{\Gamma \Proves \lnot !A_n(\num{n})}34\]35The set $D$ is !!{decidable}, since we can test if $n \in D$ by first36computing $!A_n(x)$, and from this $\lnot !A_n(\num{n})$. Obviously,37substituting the term $\num{n}$ for every free occurrence of $x$ in38$!A_n(x)$ and prefixing $!A(\num{n})$ by $\lnot$ is a mechanical39matter. By assumption, $\Gamma$ is !!{decidable}, so we can test if40$\lnot !A(\num{n}) \in \Gamma$. If it is, $n \in D$, and if it isn't,41$n \notin D$. So $D$ is likewise !!{decidable}.4243Since $\Gamma$ !!{represents} all !!{decidable} properties, it44!!{represents}~$D$. And the !!{formula}s which !!{represents}s $D$45in~$\Gamma$ are all among $!A_0(x)$, $!A_1(x)$, \dots. So let $d$ be a46number such that $!A_d(x)$ !!{represents} $D$ in~$\Gamma$. If $d47\notin D$, then, since $!A_d(x)$ !!{represents}~$D$, $\Gamma \Proves48\lnot !A_d(\num{d})$. But that means that $d$ meets the defining49condition of~$D$, and so $d \in D$. This contradicts $d \notin D$. So50by indirect proof, $d \in D$.5152Since $d \in D$, by the definition of~$D$, $\Gamma \Proves \lnot53!A_d(\num{d})$. On the other hand, since $!A_d(x)$ !!{represents}~$D$54in $\Gamma$, $\Gamma \Proves !A_d(\num{d})$. Hence, $\Gamma$ is55inconsistent.56\end{proof}5758\begin{explain}59The preceding theorem shows that no consistent theory that60!!{represents} all !!{decidable} relations can be !!{decidable}. We61will show that $\Th{Q}$ does !!{represents}s all !!{decidable}62relations; this means that all theories that include $\Th{Q}$, such as63$\Th{PA}$ and $\Th{TA}$, also do, and hence also are not64!!{decidable}. (Since all these theories are true in the standard65model, they are all consistent.)6667We can also use this result to obtain a weak version of the first68incompleteness theorem. Any theory that is !!{axiomatizable} and69!!{complete} is !!{decidable}. Consistent theories that are70!!{axiomatizable} and !!{represents}s all !!{decidable} properties71then cannot be !!{complete}.72\end{explain}7374\begin{thm}75If $\Gamma$ is !!{axiomatizable} and !!{complete} it is !!{decidable}.76\end{thm}7778\begin{proof}79Any inconsistent theory is !!{decidable}, since inconsistent theories80contain all !!{sentence}s, so the answer to the question ``is $!A \in81\Gamma$'' is always ``yes,'' i.e., can be decided.8283So suppose $\Gamma$ is consistent, and furthermore is84!!{axiomatizable}, and !!{complete}. Since $\Gamma$ is85!!{axiomatizable}, it is !!{computably enumerable}. For we can86enumerate all the correct !!{derivation}s from the axioms of~$\Gamma$87by a computable function. From a correct !!{derivation} we can compute88the !!{sentence} it !!{derive}s, and so together there is a computable89function that enumerates all theorems of~$\Gamma$. A !!{sentence} is90a theorem of~$\Gamma$ iff $\lnot !A$ is not a theorem, since $\Gamma$91is consistent and !!{complete}. We can therefore decide if $!A \in92\Gamma$ as follows. Enumerate all theorems of $\Gamma$. When $!A$93appears on this list, we know that $\Gamma \Proves !A$. When $\lnot94!A$ appears on this list, we know that $\Gamma \Proves/ !A$. Since95$\Gamma$ is !!{complete}, one of these cases eventually obtains, so96the procedure eventually produces an answer.97\end{proof}9899\begin{cor}100\ollabel{cor:incompleteness}101If $\Gamma$ is consistent, !!{axiomatizable}, and !!{represents} every102!!{decidable} property, it is not !!{complete}.103\end{cor}104105\begin{proof}106If $\Gamma$ were !!{complete}, it would be !!{decidable} by the107previous theorem (since it is !!{axiomatizable} and consistent). But108since $\Gamma$ !!{represents} every !!{decidable} property, it is not109!!{decidable}, by the first theorem.110\end{proof}111112\begin{prob}113Show that $\Th{TA} = \Setabs{!A}{\Sat{N}{!A}}$ is not114!!{axiomatizable}. You may assume that $\Th{TA}$ represents all115decidable properties.116\end{prob}117118Once we have established that, e.g., $\Th{Q}$, !!{represents} all119!!{decidable} properties, the corollary tells us that $\Th{Q}$ must be120incomplete. However, its proof does not provide an example of an121independent !!{sentence}; it merely shows that such !!a{sentence}122must exist. For this, we have to arithmetize syntax and follow123G\"odel's original proof idea. And of course, we still have to show124the first claim, namely that $\Th{Q}$ does, in fact, !!{represents}s125all !!{decidable} properties.126127It should be noted that not every \emph{interesting} theory is128incomplete or undecidable. There are many theories that are129sufficiently strong to describe interesting mathematical facts that do130not satisify the conditions of G\"odel's result. For instance,131$\Th{Pres} = \Setabs{!A \in \Lang{L_{A^+}}}{\Sat{N}{!A}}$, the set of132!!{sentence}s of the language of arithmetic without~$\times$ true in133the standard model, is both complete and decidable. This theory is134called Presburger arithmetic, and proves all the truths about natural135numbers that can be formulated just with $\Obj{0}$, $\prime$, and~$+$.136137\end{document}
Source and provenance notes
- Route this source under the canonical Introduction to Incompleteness chapter; retain the older first-incompleteness comment only in provenance.