Hilbert’s Tenth Problem - An Introduction to Logic, Number Theory, and Computability [1 ed.] 2018061472, 9781470443993

Hilbert's tenth problem is one of 23 problems proposed by David Hilbert in 1900 at the International Congress of Ma

292 90 4MB

English Pages 239 [256] Year 2019

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Cover
Title page
Contents
Preface
Acknowledgments
Introduction
Chapter 1. Cantor and Infinity
1.1. Countable Sets
1.2. Uncountable Sets
1.3. The Schröder–Bernstein Theorem
Exercises
Chapter 2. Axiomatic Set Theory
2.1. The Axioms
2.2. Ordinal Numbers and Well Orderings
2.3. Cardinal Numbers and Cardinal Arithmetic
Further Reading
Exercises
Chapter 3. Elementary Number Theory
3.1. Divisibility
3.2. The Sum of Two Squares
3.3. The Sum of Four Squares
3.4. The Brahmagupta–Pell Equation
Further Reading
Exercises
Chapter 4. Computability and Provability
4.1. Turing Machines
4.2. Recursive Functions
4.3. Gödel’s Completeness Theorems
4.4. Gödel’s Incompleteness Theorems
4.5. Goodstein’s Theorem
Further Reading
Exercises
Chapter 5. Hilbert’s Tenth Problem
5.1. Diophantine Sets and Functions
5.2. The Brahmagupta–Pell Equation Revisited
5.3. The Exponential Function Is Diophantine
5.4. More Diophantine Functions
5.5. The Bounded Universal Quantifier
5.6. Recursive Functions Revisited
5.7. Solution of Hilbert’s Tenth Problem
Further Reading
Exercises
Chapter 6. Applications of Hilbert’s Tenth Problem
6.1. Related Problems
6.2. A Prime Representing Polynomial
6.3. Goldbach’s Conjecture and the Riemann Hypothesis
6.4. The Consistency of Axiomatized Theories
Exercises
Chapter 7. Hilbert’s Tenth Problem over Number Fields
7.1. Background on Algebraic Number Theory
7.2. Introduction to Zeta Functions and ?-functions
7.3. A Brief Overview of Elliptic Curves and Their ?-functions
7.4. Nonvanishing of ?-functions and Hilbert’s Problem
Exercises
Appendix A. Background Material
Bibliography
Index
Back Cover
Recommend Papers

Hilbert’s Tenth Problem - An Introduction to Logic, Number Theory, and Computability [1 ed.]
 2018061472, 9781470443993

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

S T U D E N T M AT H E M AT I C A L L I B R A RY Volume 88

Hilbert’s Tenth Problem An Introduction to Logic, Number Theory, and Computability M. Ram Murty Brandon Fodden

Hilbert’s Tenth Problem An Introduction to Logic, Number Theory, and Computability

S T U D E N T M AT H E M AT I C A L L I B R A RY Volume 88

Hilbert’s Tenth Problem An Introduction to Logic, Number Theory, and Computability M. Ram Murty Brandon Fodden

Editorial Board Satyan L. Devadoss Rosa Orellana

John Stillwell (Chair) Serge Tabachnikov

2010 Mathematics Subject Classification. Primary 11U05, 12L05. For additional information and updates on this book, visit www.ams.org/bookpages/stml-88 Library of Congress Cataloging-in-Publication Data Names: Murty, Maruti Ram, author. | Fodden, Brandon, 1979– author. Title: Hilbert’s tenth problem : an introduction to logic, number theory, and computability / M. Ram Murty, Brandon Fodden. Description: Providence, Rhode Island : American Mathematical Society, [2019] | Series: Student mathematical library ; volume 88 | Includes bibliographical references and index. Identifiers: LCCN 2018061472 | ISBN 9781470443993 (alk. paper) Subjects: LCSH: Hilbert’s tenth problem. | Number theory–Problems, exercises, etc. | Mathematical recreations–Problems, exercises, etc. | Hilbert, David, 1862–1943. | AMS: Number theory – Connections with logic – Decidability. msc | Field theory and polynomials – Connections with logic – Decidability. msc Classification: LCC QA242 .M8945 2019 | DDC 512.7/4–dc23 LC record available at https://lccn.loc.gov/2018061472 Copying and reprinting. Individual readers of this publication, and nonprofit libraries acting for them, are permitted to make fair use of the material, such as to copy select pages for use in teaching or research. Permission is granted to quote brief passages from this publication in reviews, provided the customary acknowledgment of the source is given. Republication, systematic copying, or multiple reproduction of any material in this publication is permitted only under license from the American Mathematical Society. Requests for permission to reuse portions of AMS publication content are handled by the Copyright Clearance Center. For more information, please visit www.ams.org/ publications/pubpermissions. Send requests for translation rights and licensed reprints to reprint-permission @ams.org.

c 2019 by the American Mathematical Society. All rights reserved.  The American Mathematical Society retains all rights except those granted to the United States Government. Printed in the United States of America. ∞ The paper used in this book is acid-free and falls within the guidelines 

established to ensure permanence and durability. Visit the AMS home page at https://www.ams.org/ 10 9 8 7 6 5 4 3 2 1

24 23 22 21 20 19

An algebra of mind, a scheme of sense, A symbol language without depth or wings, A power to handle deftly outward things Are our scant earnings of intelligence. The Truth is greater and asks deeper ways.

- Sri Aurobindo, “Discoveries of Science II” in Collected Poems

Contents

Preface Acknowledgments

xi xiii

Introduction

1

Chapter 1. Cantor and Infinity

5

§1.1. Countable Sets

5

§1.2. Uncountable Sets

10

§1.3. The Schr¨ oder–Bernstein Theorem

14

Exercises

18

Chapter 2. Axiomatic Set Theory

23

§2.1. The Axioms

23

§2.2. Ordinal Numbers and Well Orderings

28

§2.3. Cardinal Numbers and Cardinal Arithmetic

33

Further Reading

37

Exercises

37

Chapter 3. Elementary Number Theory

41

§3.1. Divisibility

41

§3.2. The Sum of Two Squares

50 vii

viii

Contents

§3.3. The Sum of Four Squares

53

§3.4. The Brahmagupta–Pell Equation

55

Further Reading

67

Exercises

67

Chapter 4. Computability and Provability

71

§4.1. Turing Machines

71

§4.2. Recursive Functions

82

§4.3. G¨odel’s Completeness Theorems

90

§4.4. G¨odel’s Incompleteness Theorems

104

§4.5. Goodstein’s Theorem

114

Further Reading

119

Exercises

120

Chapter 5. Hilbert’s Tenth Problem

123

§5.1. Diophantine Sets and Functions

123

§5.2. The Brahmagupta–Pell Equation Revisited

131

§5.3. The Exponential Function Is Diophantine

137

§5.4. More Diophantine Functions

144

§5.5. The Bounded Universal Quantifier

149

§5.6. Recursive Functions Revisited

155

§5.7. Solution of Hilbert’s Tenth Problem

159

Further Reading

164

Exercises

165

Chapter 6. Applications of Hilbert’s Tenth Problem

167

§6.1. Related Problems

167

§6.2. A Prime Representing Polynomial

171

§6.3. Goldbach’s Conjecture and the Riemann Hypothesis

180

§6.4. The Consistency of Axiomatized Theories

194

Exercises

198

Contents Chapter 7. Hilbert’s Tenth Problem over Number Fields

ix 201

§7.1. Background on Algebraic Number Theory

201

§7.2. Introduction to Zeta Functions and L-functions

212

§7.3. A Brief Overview of Elliptic Curves and Their Lfunctions

215

§7.4. Nonvanishing of L-functions and Hilbert’s Problem

218

Exercises

220

Appendix A. Background Material

223

Bibliography

229

Index

233

Preface

In 1980, the senior author (MRM) had the grand privilege of meeting Sarvadaman Chowla at the Institute for Advanced Study in Princeton, New Jersey. Chowla had written a small book titled The Riemann Hypothesis and Hilbert’s Tenth Problem in 1965 and so this was an opportunity to ask him about the seemingly strange title and how it came to be. Was there a connection between the two? Chowla replied, “I don’t know. These two problems have always fascinated me and so I chose that as the title.” He went on to say that the book was largely an inspired work, written in a single night, and it represents his selection of beautiful pearls from number theory. It was not meant to be a textbook but more of an invitation for further study and “to stimulate the reader”. But the fact of the matter is that the two problems are related as we discovered only much later in the work of Martin Davis, Hilary Putnam, Julia Robinson and Yuri Matiyasevi˘c. In fact, many of the famous Hilbert problems are interconnected. This interconnectedness can be used as the focus for mathematical instruction. And it can be done with very few prerequisites. This is the raison d’ˆetre of this book. Some of the Hilbert problems such as the Riemann hypothesis (the eighth problem) are still open. The others that have been solved required formidable background and preparation. Hilbert’s tenth

xi

xii

Preface

problem is different in that a basic introduction to elementary number theory and mathematical logic suffices to understand the proof, and this can be done in a relatively short time. In addition to the grand arrangement of mathematical ideas, Hilbert’s tenth problem has a colourful cast of characters, many of them tragic heroes, who pondered deeply regarding the enigma of the human being and the nature of mathematical truth. Hilbert’s tenth problem and its solution represent in microcosm the riddle of human life itself and its meaning. This m´elange of philosophical and mathematical conundrums are the mysteries that confront us. In many ways, this book is not meant to be a textbook, but rather an invitation to explore further. As Chowla would say, we hope “to stimulate the reader”.

M. Ram Murty and Brandon Fodden Kingston and Ottawa, Ontario July 2018

Acknowledgments

This book is based on an upper-level undergraduate course given at Queen’s University in Ontario in the winter semester of 2007 by the senior author (MRM). The class consisted of primarily undergraduates, several graduate students, and a few post-doctoral fellows. There were also students from the philosophy department. Given the diverse backgrounds of the students, the mathematical prerequisites were kept to a bare minimum requiring only familiarity with basic calculus and linear algebra. The course covered the contents of the first five chapters by first introducing students to logical notation, then elementary number theory, and gradually to notions of computability and decidability and, finally, the proof of Hilbert’s tenth problem. The last two chapters were added later and were culled from graduate seminars conducted since the time the course was first given. They require more advanced background, especially the last chapter. If the student is willing to take some of the background material in those chapters on faith, they will acquire a panoramic view of some recent discoveries and new directions. We feel that this assemblage of subject matter can make an excellent introduction to this fascinating topic and can take the student to the frontiers of current research. We thank Kumar Murty, Hector Pasten, and the referees for their comments on an earlier version of this book. We are grateful to Ina Mette and the American Mathematical Society for taking interest in publishing this book, and to Marcia Almeida at the AMS for much help with preparing the manuscript. xiii

Introduction

In 1900, at the second International Congress of Mathematicians (ICM), taking place in Paris, David Hilbert (1862–1943) presented a list of twenty-three problems that he felt were fundamentally important, and would influence the direction of mathematics in the 20th century.1 In his own words (in translation):2 The supply of problems in mathematics is inexhaustible, and as soon as one problem is solved numerous others come forth in its place. Permit me in the following, tentatively as it were, to mention particular definite problems, drawn from various branches of mathematics, from the discussion of which an advancement of science may be expected. In his tenth problem, Hilbert asked for an algorithm that, when given an arbitrary Diophantine equation, will determine whether the equation has integer solutions or not. The solution to this problem, that there is no such algorithm, is one of the remarkable achievements of 20th-century mathematics. When such dramatic advances in a 1 The address was given in German, and he presented ten of the problems. In a paper written in French appearing in the proceedings of the congress, he included the full list of twenty-three problems. 2 Hilbert’s address was translated and published in the Bulletin of the American Mathematical Society; see [Hil02].

1

2

Introduction

David Hilbert (Photo courtesy the Archives of the Mathematisches Forschungsinstitut Oberwolfach)

discipline are made, it is rare that one can explain the solution in simple terms to the nonexpert. Fortunately, this is not the case with Hilbert’s tenth problem. All that is needed to understand how the solution has been put together is an elementary knowledge of the rudiments of logic and elementary number theory, both topics being at a level accessible to an undergraduate student of mathematics. It is the purpose of this monograph to explain this work in as simple a language as possible. In fact, we feel it is a splendid way to introduce the student to both logic and number theory through such a motivated introduction with Hilbert’s tenth problem as the focus. That Hilbert’s tenth problem has a negative solution, in that the algorithm that Hilbert sought does not exist, might have surprised Hilbert. Still, he expected that such things may occur. In his 1900 address, he commented: Occasionally it happens that we seek the solution under insufficient hypotheses or in an incorrect sense, and for this reason do not succeed. The problem then arises: to show the impossibility of

Introduction

3

the solution under the given hypotheses, or in the sense contemplated. Such proofs of impossibility were effected by the ancients, for instance when they showed that the ratio of the hypotenuse to the side of an isosceles right triangle is irrational. In later mathematics, the question as to the impossibility of certain solutions plays a pre-eminent part, and we perceive in this way that old and difficult problems, such as the proof of the axiom of parallels, the squaring of the circle, or the solution of equations of the fifth degree by radicals, have finally found fully satisfactory and rigorous solutions, although in another sense than that originally intended. It is probably this important fact along with other philosophical reasons that gives rise to the conviction (which every mathematician shares, but which no one has as yet supported by a proof) that every definite mathematical problem must necessarily be susceptible of an exact settlement, either in the form of an actual answer to the question asked or by the proof of the impossibility of its solution and therewith the necessary failure of all attempts. In this book, we touch on several of Hilbert’s problems. His first problem, the continuum hypothesis, is discussed in Sections 2.3 and 4.3. In his second problem, Hilbert asked for a proof of the consistency of the axioms of arithmetic. We discuss Kurt G¨odel’s momentous result on this problem in Section 4.4. We briefly mention Hilbert’s seventh problem, on the transcendence of ab when a = 0, 1 is algebraic and b is irrational and algebraic, in Section 1.2. Hilbert’s eighth problem includes the Riemann hypothesis, Goldbach’s conjecture, and the twin prime conjecture, which are discussed in Section 6.3. The scope of this book is broad. A self-contained rigorous treatment of all the topics covered by this book would more than triple its length. Our hope is to introduce the reader to numerous topics in

4

Introduction

logic, number theory, and computability. The interested reader can then undertake further study in these areas. To that end, a list of references for further reading is presented at the end of most chapters. The first four chapters develop the rudimentary notions of set theory, elementary number theory, and logic needed for a complete self-contained proof of Hilbert’s tenth problem in Chapter 5. Some applications of the solution to Hilbert’s tenth problem are covered in Chapter 6. This material is accessible to the undergraduate student and can be covered in a semester course.3 The final chapter aims to introduce the aspiring student to current research on this topic, namely Hilbert’s tenth problem over number fields. This chapter requires more mathematical maturity and is intended for the advanced student. Undoubtedly, there is more research to be done and it is our hope that the reader is thus taken to the frontier of the existing knowledge on this topic so that he or she may survey what is known and what is unknown. If one is just looking to understand the solution to Hilbert’s tenth problem, which is given in Chapter 5, then Sections 3.4 and 4.2 are necessary, provided one is comfortable using an informal definition of an algorithm. A more careful discussion of algorithms and computability is given in Section 4.1. In Chapter 6, some applications of the solution to Hilbert’s tenth problem are given. These use the material developed in Chapter 2 and Sections 4.3 and 4.4. However, we feel that by reading through the entire book, one will get a better sense of the interplay between the topics covered by this book and an understanding of some of the most important problems in logic and number theory of the past 150 years.

3

An appendix containing preliminary material is included.

Chapter 1

Cantor and Infinity

1.1. Countable Sets There are some philosophers that deny the existence of infinity. These are the “finitists”. They argue that since we have never seen an infinite collection of things, infinity does not exist. When presented with notions of mathematics that lead one to the idea of infinity, they argue that it may be that the universe is working modulo p for some large prime p! Georg Cantor (1845–1918) can be said to be the founder of set theory and, more generally, the mathematical theory of infinite numbers. He was born in St. Petersburg into a merchant family that settled in Germany in 1856. He studied in Z¨ urich and then Berlin where he obtained his degree in 1867. In 1869 he became a lecturer at the University of Halle in Germany and served there as a professor from 1879 to 1913. He put forth the continuum hypothesis (which will be described at the end of this chapter) and attempted to solve it. Perhaps under the strain of these efforts as well as initial opposition to his new ideas concerning infinity, he suffered from depression which may have eventually contributed to his death. The celebrated physicist, Stephen Hawking [Haw] wrote, “Georg Cantor scaled the

5

6

1. Cantor and Infinity

peaks of infinity and then plunged into the deepest abysses of the mind: mental depression.”1 Cantor’s doctoral thesis was in number theory. Later, he introduced the concepts of ordinal numbers and cardinal numbers, which we discuss in Chapter 2. Using this theory, he proved a number of results that compare the sizes of infinite sets, many of which are given here.

Georg Cantor

(Photo source: Wikipedia)

A set S is said to be countably infinite if it can be put in oneto-one correspondence with the natural numbers (that is, if there is a bijection between N = {0, 1, 2, . . .} and S). A countable set is either finite or countably infinite. If a set is not countable, it is called uncountable. Since the function that sends n to 2n is a 1 Hawking edited the book God Created the Integers in which he penned short essays on about two dozen mathematical giants, with Cantor being one of them. Unfortunately, these essays were not copy edited properly and there is a serious error on page 1132. Responding to a question of Dedekind as to whether an infinite set can be defined without referring to the natural numbers, Hawking tries to give Cantor’s reply. Thus, the first sentence of the last paragraph on page 1132 should be: “Cantor answered his first question by defining a set as being infinite if it could be put into a one to one correspondence with a proper subset of itself.”

1.1. Countable Sets

7

bijection between N and the set of even natural numbers, the set of even natural numbers is countably infinite. The set of integers, denoted by Z, is also countably infinite since we may define a map f : N → Z by setting f (0) = 0, f (1) = 1, f (2) = −1, f (3) = 2, f (4) = −2, f (5) = 3, f (6) = −3, and so on. n f (n)

0 1 2 3 4 0 1 −1 2 −2

5 6 7 8 9 10 · · · 3 −3 4 −4 5 −5 · · ·

More generally, we set  f (n) = (−1)

n+1

 n+1 , 2

where x is the floor function, which returns the greatest integer less than or equal to x. This function is easily verified to be injective and surjective. What about Q, the set of rational numbers? Could it be that Q is countably infinite? Since any positive rational number can be written as a/b for some natural numbers a and b, we are led to consider the problem of determining if the set N × N of ordered pairs of natural numbers is countably infinite. That is, is there a one-to-one correspondence between N × N and N? Cantor discovered an explicit function, given by P (x, y) =

(x + y)(x + y + 1) + x, 2

that sets up a one-to-one correspondence between N × N and N. This function is called Cantor’s pairing function. A table for the first few values of P (x, y) is given below. y 0

x

0 1 2 3 4 5

1

2

3

4

5

0 1 3 6 2 4 7 11 5 8 12 17 9 13 18 24 14 19 25 32 20 26 33 41

10 16 23 31 40 50

15 22 30 39 49 60

8

1. Cantor and Infinity

Cantor found the pairing function via a diagonal method of enumeration. That is, he began his list of pairs as (0, 0), (0, 1), (1, 0), (0, 2), (1, 1), (2, 0), (0, 3), (1, 2), (2, 1), (3, 0), . . . . Let us note that we can group the pairs (a, b) according to the sum a + b. There are only finitely many such pairs in any group. Corresponding to the sum k, we see that there are k + 1 such pairs. Now given an ordered pair (x, y), the group it lies in is determined by k = x + y. Before we reach this group, the number of ordered pairs we encounter is k(k + 1) . 1 + 2 + ···+ k = 2 Having reached the group with sum k, to reach (x, y) we have to proceed through (0, k), (1, k − 1), . . . , (x, y), which encompass x + 1 additional pairs. Thus the pair (x, y) is in the k(k + 1) (x + y)(x + y + 1) +x+1= +x+1 2 2 position in the listing. Since we want the first listed pair to be mapped to 0, the second to be mapped to 1, and so on, subtracting 1 yields the pairing function P (x, y).2 Using the above functions f and P , it follows that Z × Z is also countably infinite, for one may show that h : Z × Z → N given by h(x, y) = P (f −1 (x), f −1 (y)) is bijective. By a similar argument, A × B is also countably infinite for countably infinite A and B. By iteration, it follows that Zn , the set of all ordered n-tuples of elements of Z, is countably infinite for any positive natural number n, as is Nn . Since Cantor’s pairing function P (x, y) is bijective, F = P −1 is a bijective map from N to N × N. To the ordered pair (a, b) we may associate the positive rational number (a + 1)/(b + 1), and thus use F to list the positive rational numbers, agreeing to skip any previously 2 In this context, we mention a result of Rudolf Fueter (1880–1950) and George P´ olya (1887–1985). It is an open question to determine all bijective polynomial maps between N × N and N. Fueter and P´ olya showed that if we restrict our attention to quadratic polynomials, then essentially Cantor’s pairing function (up to permutation) is the only one. Their proof uses the transcendence of π, as proved by Ferdinand von Lindemann (1852–1939), as well as nontrivial analytic number theory regarding error terms in lattice point enumerations.

1.1. Countable Sets

9

listed numbers. This listing yields a bijection between N and the positive rational numbers. In particular, since F (0) = (0, 0), F (1) = (0, 1), F (2) = (1, 0), F (3) = (0, 2), F (4) = (1, 1), F (5) = (2, 0), . . . , our bijection g between N and the positive rational numbers begins as g(0) = 1/1 = 1, g(1) = 1/2, g(2) = 2/1 = 2, g(3) = 1/3,

g(4) = 3/1 = 3, . . .

(2/2 = 1 was skipped since it was previously listed). Now that we have a bijection g from N to the positive rational numbers, we can define a bijection q : N → Q as follows. We define q(0) = 0, q(2n + 1) = g(n), and q(2n + 2) = −g(n). Thus Q is a countably infinite set. To summarize, we have shown the following theorem. Theorem 1.1. The following sets are countably infinite: N, Z, and Q. Note that any infinite subset of a countably infinite set is also countably infinite. The elements of a countably infinite set may be listed as a1 , a2 , a3 , . . . . Then the elements of an infinite subset may be listed as an1 , an2 , an3 , . . . for n1 , n2 , n3 , . . ., an infinite subsequence of 1, 2, 3, . . . . Thus, for example, any infinite set of rational numbers is countably infinite. If A and B are countably infinite, then A ∪ B is also countably infinite. This is seen as follows. For simplicity, we assume the sets are disjoint. Let f : N → A and g : N → B be bijective maps. Define h : N → A ∪ B by h(2n) = f (n) and h(2n + 1) = g(n). It is easy to show that h is a bijective map. There are numbers that are not rational √ numbers. These are called irrational numbers. For instance, 2 is irrational. To see this, suppose we have a rational number a/b, with the property that (a/b)2 = 2. We may suppose that a/b is in lowest terms; that is, there is no common factor between a and b except 1. Then we get a2 = 2b2 ,

10

1. Cantor and Infinity

showing us that the left-hand side is even. Thus a is even, and we can write a = 2c for some integer c. We now get 4c2 = 2b2 , and cancelling the common factor of 2 on both sides of the equation yields 2c2 = b2 . This implies that the right-hand side is even, so that b is even. Thus we have both a and b are even, a contradiction. √ 2 is an example of an algebraic number. A number α is said to be algebraic if α satisfies an equation of the form αn + an−1 αn−1 + · · · + a1 α + a0 = 0, with ai rational numbers. That is, the algebraic √ numbers are roots of polynomials with rational coefficients. Since 2 is a root of x2 − 2, it is an algebraic number. One may show that the set of algebraic numbers is a countably infinite set, as is done in the exercises at the end of the chapter.

1.2. Uncountable Sets From his musings on countable sets, Cantor went on to ask if R, the set of real numbers, is countable. His first proof that the reals are uncountable, published in 1874, used nested intervals. His more famous proof, involving the diagonal argument, was published in 1891 and is given below. Every real number x in the interval (0, 1) = {x ∈ R : 0 < x < 1} can be written as an infinite decimal: x = 0.x1 x2 x3 · · · . Note that a decimal expansion ending in an infinite sequence of 0’s 0.x1 x2 x3 · · · xm−1 xm 000 · · · with xm = 0 (called a terminating expansion) also has the expansion 0.x1 x2 x3 · · · xm−1 ym 999 · · · , where ym = xm − 1. If we agree never to allow an infinite sequence of 9’s as the tail of the expansion, then the decimal expansion is unique. We can establish these assertions as follows. Take a real number 0 < x < 1. Then 0 < 10x < 10, so we may write 10x = x1 + y1 ,

1.2. Uncountable Sets

11

where 0 ≤ x1 ≤ 9, 0 ≤ y1 < 1, and x1 is an integer. Then  x1  y1 1  < . x −  = 10 10 10 Iterate this procedure with y1 . Thus 10y1 = x2 + y2 , where 0 ≤ x2 ≤ 9, 0 ≤ y2 < 1, and x2 is an integer. Thus x=

x2 y2 x1 + 2 + 2. 10 10 10

Proceeding in this manner, we get x−

x2 xn yn x1 − − ··· − n = n, 10 102 10 10

where 0 ≤ yn < 1. We see immediately that the decimal expansion converges to x. To establish uniqueness, let us suppose that ∞ ∞   xn yn = n 10 10n n=1 n=1

with 0 ≤ xn , yn ≤ 9. Let m be the smallest number for which xm = ym . Without loss of generality, suppose that xm > ym . Then we have ∞ ∞   xj yj ym xm + = + . 10m j=m+1 10j 10m j=m+1 10j Thus 0
m. Thus uniqueness can fail only if one of our decimal expansions eventually ends in an infinite sequence of 9’s. We may now prove Cantor’s theorem on the uncountability of R. Theorem 1.2. The set R of real numbers is uncountable.

12

1. Cantor and Infinity

Proof. Suppose that the real interval (0, 1) were countable. We may then list them: r1 = 0.x11 x12 x13 · · · r2 = 0.x21 x22 x23 · · · .. . Now consider the number r = 0.y1 y2 y3 · · · , where

 yn =

1

if xnn = 1,

2

if xnn = 1.

In this way, we avoid getting a 9 or 0 as a digit, thereby avoiding repeating 9’s and ensuring r = 0. Then r is in (0, 1) but cannot appear in our listing above since it differs from each rn in the nth digit. This is a contradiction, and hence the real interval (0, 1) is uncountable. If a set A is uncountable and A ⊆ B, then B is also uncountable. To see this, suppose B were countable. Since A is infinite, B too is infinite, and hence countably infinite. Since A is an infinite subset of the countably infinite set B, it must be countably infinite, a contradiction. Thus, since (0, 1) is an uncountable subset of the real numbers, the set of all real numbers is uncountable.  Suppose the set of irrational numbers were countable. Since Q is countably infinite, we would then have R as the union of two countable sets and hence countable, a contradiction. Thus there are uncountably many irrational numbers. A real number that is not algebraic is called a transcendental number. Recall that the set of algebraic numbers is countably infinite. Suppose the set of transcendental numbers were countable. We would then have R as the union of two countable sets and hence countable, a contradiction. Thus there are uncountably many transcendental numbers.

1.2. Uncountable Sets

13

In this sense, “most” real numbers are irrational, and in fact transcendental. Cantor showed the uncountability of the transcendental numbers in 1874. Before this, the only numbers known to be transcendental were numbers specifically constructed to be so (called Liouville numbers, named after Joseph Liouville (1809–1882)), and e, which was shown by Charles Hermite (1822–1901) to be transcendental just one year earlier. Thus Cantor proved that most real numbers are transcendental at a time when only a few examples were known! The transcendence of π was shown in 1882 by Lindemann. In his address to the ICM in 1900, Hilbert gave his list of twenty-three important unsolved problems in mathematics. In his seventh problem, he asked if a and b are algebraic numbers with a = 0, 1 and b irrational, does it follow that ab is transcendental? The answer is yes, as was proved independently in 1934 by Alexander Gelfond (1906–1968) and Theodor Schneider (1911–1988). There are still many open questions regarding transcendental numbers. For example, we do not know if the numbers π + e or πe are transcendental, although both are expected to be. It can be proved that at least one of them must be transcendental. This is an exercise in Chapter 7. Instead of merely classifying sets as finite, countably infinite, and uncountable, we may refine this by saying that two sets A and B have the same cardinality, written |A| = |B|, if there is a bijective map between them. One may show that this is an equivalence relation. We say that A has cardinality less than or equal to that of B, written |A| ≤ |B|, if there is an injective map from A to B. If there is an injective map from A to B but no bijective map between the sets is possible, we say A has smaller cardinality than B and write |A| < |B|. With Theorem 1.1 we showed that that |N| = |Z| = |Q|. Since the inclusion map from N to R is injective, Theorem 1.2 shows that |N| < |R|. Given a set A, consider its power set P (A) defined as the set of all subsets of A. It is clear that the function f : A → P (A) defined by f (a) = {a} is injective, and hence |A| ≤ |P (A)|. Cantor proved the following theorem. Theorem 1.3. Let A be a set. There is no bijective map between A and P (A), and hence |A| < |P (A)|.

14

1. Cantor and Infinity

Proof. The proof is again by contradiction. Suppose there were a bijective map from A to P (A). To each a ∈ A, we can then assign a unique set Ta ∈ P (A). Consider S = {a ∈ A : a ∈ / Ta }. Clearly, S is a subset of A. Thus it must correspond to some Tw with w ∈ A. But this leads to a contradiction: /S w ∈ S =⇒ w ∈ / Tw =⇒ w ∈ and w∈ / S =⇒ w ∈ Tw =⇒ w ∈ S.



In this way, Cantor showed that there is an infinite ladder of infinite sets: |N| < |P (N)| < |P (P (N))| < |P (P (P (N)))| < · · · .

1.3. The Schr¨ oder–Bernstein Theorem Instead of seeking a bijective correspondence between two sets A and B, it is sufficient to establish injective maps f : A → B and g : B → A. In other words, if |A| ≤ |B| and |B| ≤ |A|, then |A| = |B|. This oder is known as the Schr¨oder–Bernstein3 theorem after Ernst Schr¨ (1841–1902) and Felix Bernstein (1878–1956). Before proving this in general, we first prove a special case. If B ⊆ A, then the inclusion map from B to A is an injection. Thus B ⊆ A implies |B| ≤ |A|. The following lemma is the Schr¨oder–Bernstein theorem in the special case where one set is a subset of the other. Lemma 1.4. Let A, B be sets such that B ⊆ A, and suppose that we have an injection f : A → B. Then there is a bijection g : A → B. 3 There is some controversy on the name of this theorem. It was first stated by Cantor without proof in 1887. It seems Richard Dedekind proved it in 1887 but didn’t tell anyone about it. It was discovered in his notes in 1908. In 1895 Cantor published the first proof, but his proof uses the axiom of choice, which is discussed in the next chapter. Dedekind’s unpublished proof did not use the axiom of choice. In 1896 Schr¨ oder published a proof sketch that was shown to be incorrect a few years later. In 1897, Bernstein proved the theorem—at age 19! Afterwards, Bernstein visited Dedekind, who apparently then independently proved the theorem yet again.

1.3. The Schr¨ oder–Bernstein Theorem

15

Proof. To prove this, we define sets D0 , D1 , . . . recursively as follows. D0 = A\B, D1 = f (D0 ), D2 = f (D1 ), and generally Dn+1 = f (Dn ). Now define the map g : A → B by setting g(x) = f (x) if x is in some Dn and g(x) = x otherwise. If x is not in any Dn , then in particular it is not in D0 , and so x is in B so that g(x) = x ∈ B. We claim that g is a bijection. To see this, we have to show that g is injective and surjective. Suppose g(x) = g(y). If both x and y are in some Dn , then we get f (x) = f (y). Since f is injective, we deduce x = y. If both x and y are not in any Dn , then we have x = g(x) = g(y) = y, so again g is injective. Now consider the possibility that x is in some Dn and y is not. Then g(x) = g(y) implies f (x) = y. Since x is in some Dn , it follows that y is in Dn+1 , a contradiction. Thus g is injective. To see that g is surjective, let b ∈ B. If b is not in any Dn , then g(b) = b. If b is in some Dn , with n ≥ 1, then b ∈ f (Dn−1 ) and / B.  so b is in the range of g. If b ∈ D0 , then b ∈ Theorem 1.5 (Schr¨oder–Bernstein theorem). If f : A → B and g : B → A are injective, then there is a bijection between A and B. Proof. The composition g ◦ f : A → g(B) is also injective since g(f (x)) = g(f (y)) =⇒ f (x) = f (y) =⇒ x = y. g(B) is a subset of A and so, by the previous lemma, there is a bijection h : A → g(B). Since g is injective, g −1 exists, and we have a map g −1 : g(B) → B. Define F : A → B by F (z) = g −1 (h(z)). We show that F is both injective and surjective. If F (z1 ) = F (z2 ), then g −1 (h(z1 )) = g −1 (h(z2 )), and applying g to both sides gives h(z1 ) = h(z2 ). Since h is injective, we deduce z1 = z2 . Let b ∈ B. There is an a ∈ A such that h(a) = g(b). Then F (a) = g −1 (h(a)) =  g −1 (g(b)) = b. We have seen that |N| < |R| and |N| < |P (N)|. How do the cardinalities of R and P (N) compare? We will use the Schr¨oder– Bernstein theorem to prove that they are in fact the same. Theorem 1.6. |R| = |P (N)|. Proof. Consider the function f : P (N) → R defined by f (S) = 0.x1 x2 x3 · · · , where xi = 0 if i − 1 ∈ S and xi = 1 if i − 1 ∈ / S.

16

1. Cantor and Infinity

Let S, T ∈ P (N) with f (S) = 0.x1 x2 x3 · · · and f (T ) = 0.y1 y2 y3 · · · . Suppose f (S) = f (T ). Since we have avoided using the digit 9, the decimal expansions of f (S) and f (T ) are unique. Thus xi = yi for all i ≥ 1, and in particular xi = 0 if and only if yi = 0. Thus i − 1 ∈ S if and only if i − 1 ∈ T for all i ≥ 1, and so S = T . Thus f is injective, and hence |P (N)| ≤ |R|. We now give an injective function mapping from R to P (N). We may uniquely represent a real number x as x = (−1)n y + z, where n ∈ {0, 1}, y ∈ N, and 0 ≤ z < 1 (if y = 0, we agree to take n = 0). Furthermore, we may write z = 0.d1 d2 d3 · · · and agree to avoid the use of repeating 9’s if the decimal expansion terminates. Let pi be the ith prime number. We define g : R → P (N) by g(x) = i : i ∈ N}. For x1 , x2 ∈ R, we write x1 = (−1)n1 y1 + z1 {2n , 3y } ∪ {pdi+2 and x2 = (−1)n2 y2 + z2 as described above. Suppose g(x1 ) = g(x2 ). By the uniqueness of prime factorization, we have n1 = n2 , y1 = y2 , and all digits of z1 and z2 equal, and therefore x1 = x2 . Thus g is injective, and hence |R| ≤ |P (N)|. By the Schr¨oder–Bernstein theorem, |R| = |P (N)|.  Cantor’s continuum hypothesis is the assertion that for any N ⊆ A ⊆ R, we either have |A| = |N| or |A| = |R|. Cantor believed the hypothesis to be true and attempted, unsuccessfully, to prove it for many years. The problem was the first of Hilbert’s aforementioned 1900 list of twenty-three unsolved problems. Through the work of Kurt G¨ odel in 1938 and Paul Cohen in 1963, the continuum hypothesis was shown to be independent of the usual axioms of set theory, which are discussed in the next chapter. The work of G¨ odel and Cohen is discussed in Section 4.3. In 1884, the logician Gottlob Frege (1848–1925) defined an equivalence relation on the collection of sets by saying that two sets are equivalent if they have the same cardinality. The equivalence classes were to be thought of as cardinal numbers. Thus 0 represents the set of all sets with no elements, 1 represents the set of all sets with one element, and so forth. However, it was quickly pointed out that the existence of certain large sets, such as the set of all sets with the same cardinality, may

1.3. The Schr¨ oder–Bernstein Theorem

17

lead to some fundamental difficulties. For example, consider the set of all sets that do not contain themselves. Does this set contain itself as an element? Either case yields a contradiction. This is the famous Russell’s paradox which was brought to Frege’s attention by Bertrand Russell (1872–1970). It may be rephrased as the barber paradox : a barber (who is male) shaves all men in his town who do not shave themselves. Does the barber shave himself? This self-reference is the fundamental obstacle. These paradoxes led mathematicians to reexamine the definition of a set and what the rules (or axioms) should be for constructing them. Thus it would be hoped that the creation of the set of all sets that do not contain themselves would not be allowed in such an axiomatic system. The most commonly used collection of axioms are discussed in the next chapter. We end this section with a fun thought experiment, due to Hilbert. We describe an amazing hotel that we name Hilbert’s hotel in honour of its creator. In this hotel, the number of rooms is countably infinite. There is a room for each positive natural number. Being a popular tourist destination, the hotel is full. On a rainy night, a poor wet soul stumbles into the lobby and pleads for a room. The attendant at the desk, feeling bad for the soaked patron, decides to make room even though the hotel is full. She gets on the hotel intercom and asks each guest to switch to the next room. If a guest is in room n, they are to move to room n + 1. The hotel’s guests are all very accommodating and happily oblige. Everyone still has a room, but now room 1 is free for the new guest! Unfortunately, the desk attendant’s work is not done for the night. A busload of new guests arrives and all need a separate room. However, this is a rather large bus, as it seats a countably infinite number of people! There is a seat for each positive natural number. Still, the crafty desk attendant is able to make room. On the hotel intercom, she asks all guests to move to the room that is twice their current room number. If a guest is in room n, they are to move to room 2n. Doing this, all guests still have a room, but now all odd-numbered rooms are empty. The desk attendant then sends the person from bus seat n to room 2n − 1, which gives everyone a room and leaves the hotel full again.

18

1. Cantor and Infinity

Things can get even more difficult for our poor desk attendant. A fleet of busses arrives. There are a countably infinite number of busses in the fleet, one for each positive natural number, and each bus has a countably infinite number of seats! Our enterprising desk attendant again sends all current guests to the room twice their number, so that all even-numbered rooms are occupied. The occupant of the nth seat on the first bus is sent to room 3n . The occupant of the nth seat on the second bus is sent to room 5n . Similarly, the occupants of the third bus are sent to rooms that are powers of 7. The occupants of the next bus are sent to room that are powers of 11 (room 9 = 32 is already occupied). In general, the nth occupant of bus m is sent to room number pnm+1 , where pm is the mth prime number (we skip powers of 2 since even-numbered rooms are occupied). The desk attendant is able to give everyone a room. Note that, unlike the previous strategies, this one leaves rooms unoccupied. For example, rooms 1 and 15 are left empty. The example of Hilbert’s hotel shows how counterintuitive infinite sets can be, especially if we are basing our expectations on the behaviour of finite sets.

Exercises 1.1. Show that the function f : N → Z given by   n+1 n + 1 f (n) = (−1) 2 is a bijection. 1.2. Give bijections f : N → Z and P : N × N → N, show that the function h : Z × Z → N defined by h(x, y) = P (f −1 (x), f −1 (y)) is bijective. 1.3. If A and B are countably infinite, show that A × B is countably infinite. 1.4. If A and B are countably infinite, show that A ∪ B is countably infinite.

Exercises

19

1.5. If A1 , A2 , . . . , is an infinite sequence of disjoint finite sets, show that the union ∞ n=1 An is countably infinite. 1.6. If A1 , A2 , . . . is an infinite sequence of disjoint countably infinite sets, show that the union ∞ n=1 An is countably infinite. (In case you are aware of the axiom of choice, you may (and in fact will need to) use it here. The axiom will be discussed in the next chapter). 1.7. Construct an explicit polynomial bijection between N × N × N and N. 1.8. Fix a natural number b ≥ 2. Show that every positive real number x in [0, 1] has a b-adic expansion of the form x=

∞  xn bn n=1

with each 0 ≤ xn ≤ b − 1 an integer. 1.9. Suppose

∞ ∞   xn yn = n b bn n=1 n=1

with each 0 ≤ xn ≤ b − 1 and 0 ≤ yn ≤ b − 1 integers. Show that either xn = yn for all n, or there is an m such that one of the following two cases occurs: • xm = ym + 1 and for n ≥ m + 1, yn = b − 1 and xn = 0; • ym = xm + 1 and for n ≥ m + 1, xn = b − 1 and yn = 0. 1.10. Show that a number x ∈ [0, 1] is rational if and only if its decimal expansion is eventually periodic. Deduce that irrational numbers have unique decimal expansions. 1.11. Show that the collection of polynomials with rational coefficients is a countably infinite set. Deduce that the set of algebraic numbers is countably infinite. 1.12. Show that the collection of infinite sequences made up of the elements 0 and 1 is uncountable. (Hint: Think about the proof that the set of real numbers between 0 and 1 is uncountable, and try something similar.) 1.13. Show that the number of functions mapping from N to N is uncountable. (Hint: Think about the proof that the number of

20

1. Cantor and Infinity real numbers between 0 and 1 is uncountable, and try something similar.)

1.14. Define a relation on the collection of sets as follows. A is related to B if there is a bijection f mapping from A to B. Show that this is an equivalence relation. That is, show that the following hold. • Any set A is related to itself. • If A is related to B, then B is related to A. • If A is related to B and B is related to C, then A is related to C. 1.15. Define f : N×N → N by f (a, b) = 2a 3b . Show that f is injective. Use the Schr¨oder–Bernstein theorem to deduce that N × N is countably infinite. 1.16. Let A be the set of all finite subsets of N. Find injective functions from N to A and from A to N. (Hint: For the second function, try to use the uniqueness of prime factorization.) Use the Schr¨oder–Bernstein theorem to deduce that A is countably infinite. Then prove that the number of infinite subsets of N is uncountable. oder–Bernstein theo1.17. Let R× = {x ∈ R : x = 0}. Use the Schr¨ rem to deduce that |R× | = |R|. Now try to explicitly define a bijection between the sets. 1.18. Let A = {x ∈ R | 0 < x < 1} and B = {x ∈ R | 0 ≤ x ≤ 1}. Find injective functions f : A → B and g : B → A. Use the Schr¨oder–Bernstein theorem to deduce that |A| = |B|. Now try to explicitly define a bijection between the sets (this is a bit tricky). 1.19. Let S = {s1 , . . . , sn } be a nonempty set of finitely many symbols. Show that the number of finite strings consisting of elements of S is countably infinite. What happens if S is countably infinite? 1.20. The two questions below refer to Hilbert’s hotel, discussed at the end of this chapter. (a) As in the final scenario, a fleet of a countably infinite number of busses arrives, each with a countably infinite number

Exercises

21

of seats. Describe a way to assign rooms to everyone, including those currently in the hotel, so that no rooms are left empty. (b) Multiple fleets of busses arrive at the hotel. There are a countably infinite number of fleets, one for each positive natural number. As before, each fleet contains a countably infinite number of busses, and each bus contains a countably infinite number of people. Find a way for the desk attendant to accommodate all guests.

Chapter 2

Axiomatic Set Theory

2.1. The Axioms At the end of the previous chapter, we saw that the existence of certain sets leads to a mathematical contradiction. Thus we must be precise about the definition of a set, and we must have precise rules for constructing them. It is natural to think that if there is a property that applies to sets, then we should be able to construct a set of all sets with this property. Russell’s paradox, mentioned earlier, concerns the set R = {s : s ∈ / s}. It is not difficult to see that R ∈ R if and only if R ∈ / R, a contradiction. This leads us to formalize the definition of a set carefully so that sets such as R (we hope) cannot be constructed. We do this by giving a list of axioms. These are statements that we will accept without proof, from which we hope to derive most, if not all, of mathematics. This chapter is intended to serve as an informal introduction to axiomatic set theory. Additional care must be taken when giving a rigorous description of formal set theory. Our first axiom guarantees a nonempty universe. It is usually implied by the underlying formal logic. Since we have omitted discussing this here, we give it as an axiom. 23

24

2. Axiomatic Set Theory

Axiom 2.1 (Axiom of existence). ∃a(a = a). We would like to know when two sets are equal. This leads to: Axiom 2.2 (Axiom of extensionality). If two sets share the same members, then they are equal. That is, ∀x(x ∈ a ⇐⇒ x ∈ b) =⇒ a = b. A formula ψ(x) in which x is a free variable is a logical statement whose truth depends on the value of x. In the next axiom, we try to give a rule for constructing a new set consisting of x that satisfy a formula ψ(x). However, an axiom asserting the existence of a set b such that x ∈ b ⇐⇒ ψ(x) will lead us to Russell’s paradox (just take ψ(x) to be x ∈ / x). We avoid this by only allowing such a construction when all elements of b come from a previously constructed set. Axiom 2.3 (Comprehension schema). Given any set a and any formula ψ(x) in which x is a free variable, there is a set b such that the members of b are precisely the members of a for which ψ holds. That is, ∃b ∀x(x ∈ b ⇐⇒ x ∈ a ∧ ψ(x)). By extensionality, this set is unique. We will write {x ∈ a : ψ(x)} to designate the set b. This axiom is actually a collection of infinitely many axioms, one for each formula ψ. This is why it is referred to as a schema. We may now deduce the existence of a set with no elements. By Axiom 2.1, a set a exists. By comprehension, we may form the set {x ∈ a : x = x}, which contains no elements. By extensionality, this set is unique. We designate it by ∅ and call it the empty set. We may also now show that no universal set exists. Suppose u is a set containing all sets. By comprehension, we may form the set {x ∈ u : x ∈ / x}, which yields Russell’s paradox, a contradiction. Thus, not every collection of sets is itself a set. It is still useful to be

2.1. The Axioms

25

able to discuss these collections of sets, and so we refer to them as classes. Informally, a class is “too big” to be a set. Comprehension may be used to define the intersection of two sets: we define a ∩ b = {x ∈ a : x ∈ b}. However, note that comprehension is not strong enough to allow us to define the union of two sets, as the union may not be a subset of a previously given set. We require some additional axioms to provide us with more methods for constructing sets. Axiom 2.4 (Pairing axiom). Given any two sets a and b, we can form a set that has exactly a and b as members. We write this as {a, b}. We say a set a is a subset of b if ∀x(x ∈ a =⇒ x ∈ b). When this happens, we write a ⊆ b. Axiom 2.5 (Power set axiom). Given a set a, there exists the power set of a, which is the collection of all of its subsets. Axiom 2.6 (Union set axiom). For any set a, there is a set, denoted a, consisting of the elements of all elements of a. That is,

a). ∀x ∀y((x ∈ y ∧ y ∈ a) =⇒ x ∈ We may now define the union of two sets a and b. By the pairing axiom, {a, b} is a set. We use the union set axiom to define a ∪ b = {a, b}. We can construct the natural numbers from these axioms as follows. Since the empty set ∅ exists, we may use the pairing axiom to construct {∅}, the set containing the empty set. We will call the empty set 0 and the set containing the empty set 1. By the pairing axiom, we can form {0, 1}. We will call this 2. We now have 2 = {0, 1} and, using the pairing axiom, we may form {2}. By the union set axiom, we have the set 2 ∪ {2} = {0, 1, 2}. We will call this 3. Proceeding recursively, we define the number n + 1 to be the set n ∪ {n}. This allows us to construct the natural numbers from sets (in fact, from the empty set). We note that the usual < ordering on the natural numbers is given by ∈. That is, m < n if and only if m ∈ n. Also, if m is an element of a natural number n, then m is

26

2. Axiomatic Set Theory

itself a smaller natural number, and hence all members of m are also members of n. That is, m ∈ n implies m ⊆ n. Although it is clear that there are infinitely many natural numbers, the previous axioms do not actually allow us to construct the set of all natural numbers. To do this, we require another axiom. Axiom 2.7 (Axiom of infinity). There is an infinite set. In particular, there is a set that contains 0 = ∅, and for each natural number n in the set, n + 1 is in the set. Using this axiom we may form ω, the set of all natural numbers. These axioms are formalizing our intuitive notion that sets are built up out of smaller sets. Each set is composed of sets. Since sets are the building blocks, we do not want to have an infinite chain of sets within sets. We avoid this situation with the following axiom. Axiom 2.8 (Axiom of regularity). Any descending membership chain is finite. Using this axiom, we can show that a set is never a member of itself. Indeed, if there is an a such that a ∈ a, then the infinite string of sets a, a, . . . violates the axiom of regularity. This axiom actually has no application in ordinary mathematics, in that ordinary mathematics may be done without using it. Removing it would present no real problems, although we keep it to prevent the possibility that a ∈ a, as this is not how we would typically imagine sets to work. We say the formula ψ(u, v) is a function-like formula if ψ(u, v) ∧ ψ(u, w) =⇒ v = w. Given a set a, we could like to form the set b containing all v for which there is a u ∈ a such that ψ(u, v) holds. It seems reasonable that such a set b would exist. We want to avoid constructing sets that are too big since they may lead to Russell’s paradox. However, since ψ(u, v) is a function-like formula, there are at most as many elements in b as there are in a. Note that we cannot use the comprehension schema to assert the existence of b since we are not requiring that the elements of b come from a previously constructed set. None of our previous axioms allow us to construct the set b, and so something new is required.

2.1. The Axioms

27

Axiom 2.9 (Replacement schema).1 Given a function-like formula ψ(u, v) and a set a, there is a set b such that the members of b are exactly those sets v which correspond under ψ to some set u belonging to a. That is, ∃b ∀v(v ∈ b ⇐⇒ ∃u(u ∈ a ∧ ψ(u, v))). We can define an ordered pair (a, b) to be the set {{a}, {a, b}}. One may show that (a, b) = (c, d) if and only if a = c and b = d (see the Exercises). Our intuitive idea of a function can now be formalized. A function mapping from a set A to a set B is a set f of ordered pairs such that for each a ∈ A, there is a unique b ∈ B such that (a, b) ∈ f . Writing b = f (a), we have f = {(a, f (a)) : a ∈ A}. The above list of axioms is the basis of Zermelo–Fraenkel set theory, denoted ZF. Ernst Zermelo (1871–1953) first gave a list of axioms for set theory in 1908. Abraham Fraenkel (1891–1965) proposed some modifications to these axioms, including the addition of the replacement schema. We will require one more axiom, originally proposed by Zermelo, called the axiom of choice. Axiom 2.10 (Axiom of choice). For any set a consisting of nonempty disjoint sets, there exists a set b such that for all x ∈ a, the intersection of b and x contains exactly one element. In other words, given a set of nonempty sets, we can select a member from each set in this collection and put the selected elements together into a set. When we have a way to distinguish an element of each set in the collection, the axiom of choice is not needed to make this selection. However, the axiom allows us to make such a selection even when the elements of the sets are indistinguishable from each other. Initially, the axiom of choice was controversial among mathematicians. Some were concerned that it implies the existence of a set in a nonconstructive sense. Others felt that some of its implications, 1 This axiom schema can be used to deduce the pairing axiom and the comprehension schema. This is shown in the Exercises. We leave pairing and comprehension as separate axioms in this text in an effort to improve clarity.

28

2. Axiomatic Set Theory

such as the Banach–Tarski paradox,2 were counterintuitive. However, criticism lessened when it was seen that the axiom had been subtly used in many previous results, including those by some of the axiom’s harshest critics. Even though it is generally accepted today, it is still noted when it is included as an axiom of set theory. When the axiom of choice is included along with the axioms of ZF, they are denoted ZFC. In this book, we will be working in ZFC unless explicitly stated otherwise. In 1938, Kurt G¨ odel (1906–1978) proved that the axiom of choice is consistent with ZF. That is, the negation of choice cannot be proved from the axioms of ZF. In 1963, Paul Cohen (1934–2007) proved that the negation of the axiom of choice is consistent with ZF. Thus the axiom of choice can neither be proved nor refuted from the axioms of ZF. When this happens, we say the axiom is independent of ZF. We discuss this in more detail near the end of Section 4.3.

2.2. Ordinal Numbers and Well Orderings In the previous section, we have shown how the natural numbers can be constructed using the axioms of set theory. Once we have the natural numbers, the integers can be constructed. In particular, we define a relation on the set of ordered pairs of natural numbers so that (a, b) is related to (c, d) if a + d = b + c. One can show that this is an equivalence relation and define its equivalence classes to be the integers. The usual operations of arithmetic can then be extended to the integers, and their usual properties can be shown to hold. One can then define a relation on the set of ordered pairs of integers with nonzero second component so that (a, b) is related to (c, d) if ad = bc. Again, this is an equivalence relation, and one can define the rational numbers to be its equivalence classes. The usual operations of arithmetic can be extended to the rationals, and their usual properties can be shown to hold. It is a bit trickier to define the 2 The Banach–Tarski paradox, named for Stefan Banach (1892–1945) and Alfred Tarski (1901–1983), is a theorem that says that a solid ball may be decomposed into finitely many pieces and then recomposed to form two identical copies of the original ball! In fact, it has been shown that only five pieces are needed. But don’t go running for your saws and gold bars just yet; the fractal-like cuts required would be impossible to make in the physical universe.

2.2. Ordinal Numbers and Well Orderings

29

set of real numbers. Typically, this is done with either Dedekind cuts or Cauchy sequences. Dedekind cuts are described in Section 7.1. In this section, we would like to extend the natural numbers to somehow include infinite numbers. If we examine how we use the natural numbers, we see that we use them to both order things (for example, a house number in a postal address) and to count things. When we try to extend the natural numbers to include infinite numbers, these two notions no longer coincide. It is natural to first define ordinal numbers, and then to define cardinal numbers as certain ordinal numbers. We have already seen that the notion of an ordered pair can be formulated in terms of sets. We define a relation R on a set S to be a set of ordered pairs of elements of S. We will say R is a total ordering of S if, writing x < y to denote (x, y) ∈ R, the following hold: (1) for any x, y ∈ S, we have x = y or x < y or y < x; (2) for any x ∈ S, it is not the case that x < x (R is irreflexive); and (3) for any x, y, z ∈ S, x < y and y < z implies x < z (R is transitive). We say R well-orders S if R is a total ordering of S and if for every nonempty subset A of S, we have a least element in A with respect to R. For instance, the set of real numbers in (0, 1) with respect to the usual definition of < for real numbers is a total ordering but is not well-ordered. The set ω of all natural numbers is well-ordered under ∈ (which, as noted above, corresponds to the usual < ordering on the natural numbers). Each element of ω is also well-ordered under ∈. One may ask if every set admits a well-ordering. It turns out that this statement is equivalent to the axiom of choice. The axiom of choice has many equivalent forms. In fact, an entire book [HR] has been written on various statements equivalent to choice. We say a set c is transitive if ∀b(b ∈ c =⇒ b ⊆ c). Note that this is equivalent to ∀a ∀b((a ∈ b ∧ b ∈ c) =⇒ a ∈ c),

30

2. Axiomatic Set Theory

which is the usual transitive property on the ∈ relation. ω is a transitive set, as is each element of ω. Thus each natural number and ω itself are examples of transitive sets that are well-ordered by ∈. We define a set α to be an ordinal if α is transitive and well-ordered by ∈. This definition of ordinals is due to John von Neumann (1903–1957), who developed it at age 19. Let α be an ordinal. The fact that we cannot have α ∈ α follows from the axiom of regularity.3 Suppose X = {α : α is an ordinal} were a set. In the Exercises, you will show that X is transitive and well-ordered by ∈, and hence an ordinal itself. Thus X ∈ X, a contradiction. Therefore, the class of all ordinals is not a set. Given sets S1 and S2 well-ordered by 1 is prime if and only if (n − 1)! ≡ −1

(mod n).

Proof. Suppose n is composite. Then there is a prime q dividing n with 1 < q < n. Hence q | (n − 1)! and so (n − 1)! ≡ 0 (mod q). Then (n−1)! ≡ −1 (mod n) with q | n would imply (n−1)! ≡ −1 (mod q), a contradiction. Conversely, suppose n = p is prime. The case p = 2 is easily verified, and so we may assume p ≥ 3. By Lemma 3.9, for each a with 1 ≤ a < p, there exists a unique b with 1 ≤ b < p such that ab ≡ 1 (mod p). Are there a that serve as their own inverse? Suppose a2 ≡ 1 (mod p). Then p | (a − 1)(a + 1), and so Lemma 3.5 implies p | (a − 1) or p | (a + 1). That is, a ≡ 1 (mod p) or a ≡ −1 ≡ p − 1 (mod p). Thus each of the numbers 1, 2, . . . , p − 1 can be paired up with their distinct inverse, except for 1 and p − 1. Hence (p − 1)! ≡ (1)(p − 1) ≡ −1 (mod p).  To end this section, we discuss the Chinese remainder theorem, which will be very useful to us in Chapter 5. Let m1 and m2 be relatively prime and greater than 1. Given any two integers a and b, we show that we can always find a number x with x ≡ a (mod m1 ) and x ≡ b (mod m2 ). To satisfy the first requirement, write x = qm1 +a for some q to be determined. We want qm1 +a ≡ b (mod m2 ). Since gcd(m1 , m2 ) = 1, by Lemma 3.9 there is some u with m1 u ≡ 1 (mod m2 ). Multiplying by u gives the equivalent condition q + au ≡ bu (mod m2 ). Thus setting q = (b − a)u + tm2 will give us a solution x for each integer t. More generally, we have the following. Theorem 3.12 (Chinese remainder theorem). Let m1 , m2 , . . . , mk be pairwise relatively prime numbers, each greater than 1. For any integers b1 , b2 , . . . , bk there is an integer x satisfying x ≡ bi (mod mi ) for each 1 ≤ i ≤ k. Proof. Let N = m1 m2 · · · mk , and put ni = N/mi . Then we have gcd(ni , mi ) = 1, and so by Theorem 3.2 there are integers xi and yi with ni xi + mi yi = 1. Set ei = ni xi . Then ei ≡ 1 (mod mi ) and ei ≡ 0 (mod mj ) for j = i since ni is divisible by mj for j = i.

50

3. Elementary Number Theory

Putting x = b1 e1 + b2 e2 + · · · + bk ek then satisfies the system of congruences. 

3.2. The Sum of Two Squares We examine the equation (3.1)

x2 ≡ −1 (mod p),

when p is of the form 4k + 3. Clearly, 0 is not a solution to the congruence. If there is a nonzero solution, we can raise both sides to the power (p − 1)/2 = 2k + 1, which is an odd number. The left-hand side becomes xp−1 , which is congruent to 1 modulo p by Fermat’s little theorem (Theorem 3.10). Since 1 ≡ −1 (mod p) only for p = 2, which is not of the form 4k + 3, this is a contradiction. Thus the congruence has no solutions. What about primes of the form 4k + 1? Does (3.1) have a solution for these primes? We will answer this using Wilson’s theorem (Theorem 3.11). We pair 1 with p − 1, 2 with p − 2, and so on, up to (p − 1)/2 with p − (p − 1)/2 = (p + 1)/2. Since p − k ≡ −k (mod p), we see that (p − 1)! ≡ (−1)(p−1)/2 [(p − 1)/2]!2

(mod p).

Wilson’s theorem yields (p − 1)! ≡ −1 (mod p). Since (p − 1)/2 = 2k is even, we have [(p − 1)/2]!2 ≡ −1 (mod p). Thus x = [(p − 1)/2]! is a solution to (3.1). We have proved the following theorem. Theorem 3.13. Let p be an odd prime. The congruence x2 ≡ −1 (mod p) has solutions if and only if p ≡ 1 (mod 4). In the remainder of this section, we will determine which numbers can be written as the sum of two squares. To begin, we note the matrix product      a b c d ac − bd ad + bc = . −b a −d c −(ad + bc) ac − bd

3.2. The Sum of Two Squares

51

Taking determinants yields the identity (3.2)

(a2 + b2 )(c2 + d2 ) = (ac − bd)2 + (ad + bc)2 .

Thus if two numbers can both be written as a sum of two squares, then their product can also be written as a sum of two squares. To determine which numbers can be written as the sum of two squares, we must determine which prime numbers can be written as the sum of two squares. Identity (3.2) above is a special case of Brahmagupta’s identity, which we will encounter in our study of the Brahmagupta– Pell equation in Section 3.4. Let us observe the matrix identity used above is really an identity √ for the multiplication of two complex numbers. Indeed, if i = −1 and we have z = a + bi, then z = a − bi. We define |z|2 = zz. We see that |z|2 = zz = a2 +b2 . If w = c+di, then zw = (ac−bd)+(ad+bc)i so that |zw|2 = zwzw = |z|2 |w|2 , and this is really the identity used above. Now let us consider which primes can be written as a sum of two squares. Clearly, 2 can be written as such. If p is of the form 4k + 3 and p = x2 + y 2 , then reducing modulo 4 gives us a solution to x2 + y 2 ≡ 3 (mod 4), which is impossible since squares are congruent to either 0 or 1 modulo 4. Thus primes of this form cannot be written as a sum of two squares. We will prove that every prime p ≡ 1 (mod 4) can be written as a sum of two squares. Fix such a p, and consider the set {m : x2 + y 2 = mp for some x, y}. This set consists of those m for which mp can be written as a sum of two squares. By virtue of Theorem 3.13, x2 + 1 ≡ 0 (mod p) has a solution and so this set is not empty. Choose a minimal element m0 . We want to show that m0 = 1. Suppose that m0 ≥ 2. Then we have x2 + y 2 = m0 p,

52

3. Elementary Number Theory

for some x, y. Choose x0 and y0 satisfying x ≡ x0 (mod m0 ) and y ≡ y0 (mod m0 ), with |x0 |, |y0 | ≤ m0 /2. Then x20 + y02 ≡ x2 + y 2 ≡ m0 p ≡ 0 (mod m0 ). Thus x20 + y02 = m0 m1 for some m1 . Moreover, |m0 m1 | = |x20 + y02 | ≤ |x0 |2 + |y0 |2 ≤ m20 /2, so that |m1 | ≤ m0 /2. Applying Brahmagupta’s identity (3.2) with (a, b) = (x, y) and (c, d) = (x0 , −y0 ), we obtain (xx0 + yy0 )2 + (−xy0 + yx0 )2 = m20 m1 p. We have xx0 + yy0 ≡ x20 + y02 ≡ 0 (mod m0 ) and consequently xx0 + yy0 is divisible by m0 . The second term −xy0 + yx0 satisfies −xy0 + yx0 ≡ −x0 y0 +y0 x0 ≡ 0 (mod m0 ), so it too is divisible by m0 . Thus, we have 2  2  −xy0 + yx0 xx0 + yy0 + = m1 p. m0 m0 That is, m1 p can also be written as a sum of two integral squares. This is a contradiction since m1 ≤ m0 /2 < m0 . Thus m0 = 1 and p can be so written as a sum of two squares. We can now determine which natural numbers can be written as the sum of two squares. The above discussion shows which primes can be so represented. If n can be represented as a sum of two squares and p is a prime dividing n with p ≡ 3 (mod 4), then we claim that it must appear to an even power. For suppose for such a p we have p | n. Reducing x2 + y 2 = n modulo p yields x2 ≡ −y 2

(mod p).

Suppose p divides neither x nor y. Then the left-hand side is a square, but Theorem 3.13 implies the right-hand side cannot be. This is a contradiction. Thus one of x or y is divisible by p, and hence both must be. This yields (x/p)2 + (y/p)2 = n/p2 for integers x/p, y/p, and n/p2 . By induction, we may deduce that the greatest power of p that divides n is even. Conversely, suppose n = 2α



p ≡ 1 (mod 4)

pβp

q ≡ 3 (mod 4)

q 2γp ,

3.3. The Sum of Four Squares

53

where the products run over primes p and q. Since 2 and primes congruent to 1 modulo 4 can be written as a sum of two squares, so can their products. Observe that the product over primes congruent to 3 modulo 4 is a square. Since m2 (x2 + y 2 ) = (mx)2 + (my)2 , it follows that n can be written as the sum of two squares. To summarize, we have proved the following theorem. Theorem 3.14. A number may be written as the sum of two squares if and only if it has the form pβp q 2γp , 2α p ≡ 1 (mod 4)

q ≡ 3 (mod 4)

where the products run over primes p and q.

3.3. The Sum of Four Squares In the following theorem, we use a method similar to the previous section to determine which numbers may be written as the sum of four squares. Theorem 3.15. Every natural number can be written as a sum of four squares. This is a theorem of Joseph-Louis Lagrange (1736–1813), who proved it in 1770. We prove it in four steps. Consider the following matrix identity for complex numbers:      u v uz − wv zv + wu z w = . −wu − vz uz − wv −v u −w z Taking determinants, we obtain the identity (|z|2 + |w|2 )(|u|2 + |v|2 ) = |uz − vw|2 + |wu + zv|2 . This is also easy to verify directly for all complex numbers u, v, w, z. We deduce from it, by putting z = x1 +ix2 , w = x3 +ix4 , u = y1 +iy2 , and v = y3 + iy4 , that (x21 + x22 + x23 + x24 )(y12 + y22 + y32 + y42 ) = z12 + z22 + z32 + z42 , where z1 = x1 y1 − x2 y2 − x3 y3 − x4 y4 , z2 = x1 y2 + x2 y1 + x3 y4 − x4 y3 ,

54

3. Elementary Number Theory z3 = x1 y3 − x2 y4 + x3 y1 + x4 y2 , z4 = x1 y4 + x2 y3 − x3 y2 + x4 y1 .

Thus, if two numbers can both be written as a sum of four squares, then their product also can be written in this way. Furthermore, we have an explicit recipe for determining the squares to sum for the product, given the squares summing to each factor. As every number is a product of prime numbers, it therefore suffices to prove Lagrange’s theorem for prime numbers. Since 2 = 12 + 12 + 02 + 02 , we need only focus on odd primes. The next step is to see that for any odd prime p, we can solve the congruence x2 + y 2 + 1 ≡ 0 (mod p). To see this, we consider the set of squares modulo p, which has size7 (p + 1)/2. The same is true of the set of elements of the form −1 − y 2 . If these sets were disjoint, we would have at least p + 1 residue classes modulo p, a contradiction. Hence there is a common element, which gives a solution to the congruence. Since the integers −(p − 1)/2,. . . ,(p − 1)/2 form a complete set of residue classes modulo p, we may take |x| < p/2 and |y| < p/2. We deduce that there are integers x and y so that x2 + y 2 + 1 = mp with m < p. The third step is to consider the smallest positive integer m such that mp can be written as a sum of four squares. By the previous paragraph, the set of all such m is nonempty. Let m0 be the smallest such m. Then m0 < p, again by the previous paragraph. If m0 = 1, we are done, so let us suppose that 1 < m0 < p. Hence we can write (3.3)

m0 p = x21 + x22 + x23 + x24 .

Suppose m0 is even. Considering (3.3) modulo 2, we see that there are three possibilities: that each xi is even; that each is odd; or that 7 2 Since (p − k)2 ≡ k2 (mod p), all squares can be found in S = {02 , . . . , ( p−1 2 ) }. Suppose i2 ≡ j 2 (mod p) for 0 ≤ i < j ≤ p−1 2 . Then p | (j − i)(j + i), and so p | (j − i) and 0 < j + i < p − 1, and or p | (j + i). Our bounds on i and j yield 0 < j − i ≤ p−1 2 so neither i − j nor i + j can be divisible by p. Thus S contains all squares modulo p exactly once.

3.4. The Brahmagupta–Pell Equation

55

precisely two of them, without loss of generality, say x1 and x2 , are even. In any of these cases, x1 + x2 , x1 − x2 , x3 + x4 , and x3 − x4 are even. The identity  2  2 a+b a−b a2 + b2 = + 2 2 2 then yields  2  2  2  2 x1 + x2 x1 − x2 x3 + x4 x3 − x4 m0 p= + + + . 2 2 2 2 2 Thus (m0 /2)p can be written as a sum of four squares, which contradicts the minimality of m0 . Hence we may suppose m0 is odd. The final step involves choosing y1 , y2 , y3 , and y4 so that y1 ≡ x1 (mod m0 ) and yi ≡ −xi (mod m0 ) for 2 ≤ i ≤ 4, with each |yi | ≤ (m0 − 1)/2. Then (3.3) yields m0 m1 = y12 + y22 + y32 + y42 with 0 < m1 < m0 . Since both m0 p and m0 m1 can be written as a sum of four squares, so can their product: (m0 p)(m0 m1 ) = z12 + z22 + z32 + z42 , with each zi given explicitly in terms of the xi and yi . From this explicit description, we see directly that each zi ≡ 0 (mod m0 ). For example, we have z1 = x1 y1 − x2 y2 − x3 y3 − x4 y4 ≡ x21 + x22 + x23 + x24

(mod m0 )

≡ 0 (mod m0 ). Thus we may divide out by m20 and deduce that m1 p can be written as a sum of four squares. But this contradicts the minimality of m0 as m1 < m0 . Hence, we must have m0 = 1 in (3.3), completing the proof of Lagrange’s theorem.

3.4. The Brahmagupta–Pell Equation We will discuss the equation x2 − dy 2 = 1

56

3. Elementary Number Theory

for d ∈ Z. This equation was first studied in 6th century CE by the Indian mathematician Brahmagupta. He discovered the chakravala method of generating many solutions from one solution. The word chakra in Sanskrit means “wheel” indicating that Brahmagupta was aware of the cyclic nature of the set of all solutions. Indeed, in modern parlance, the set of solutions can be given the structure of an infinite cyclic group. Over the centuries, several Indian mathematicians refined the techniques of Brahmagupta, notably Jayadeva and Bhaskaracharya in the 12th century. They essentially discovered the continued fraction algorithm for finding the minimal solution of the equation from which all the solutions can be generated by the chakravala method. The equation was rediscovered by Pierre de Fermat (1607–1665), but Leonhard Euler (1707–1783) incorrectly attributed it to John Pell (1611–1685), and since then the name has stuck. Even though the Indian mathematicians of antiquity had the algorithm for finding all the solutions, they had not written down the proof that their method gives all the solutions. Perhaps such a refined notion of proof was not extant at that time. Nevertheless, the completion of this finer detail was given by Lagrange. We refer the read to Weil’s excellent historical account [We]. When discussing solutions to the equation x2 − dy 2 = 1, we can confine ourselves to natural number solutions, since (x, y) is a solution implies that (±x, ±y) is also a solution. We note the trivial solution (1, 0). For d ≤ −2, both x2 and −dy 2 are positive. We must take y = 0 if they are to sum to 1, leaving us with only the trivial solution. For d = −1, we have (0, 1) in addition to the trivial solution. For d = 0, (±1, y) is a solution for any y. If d = n2 is a perfect square, then 1 = x2 − dy 2 = (x − ny)(x + ny). This implies that x − ny and x + ny are either both 1 or both −1, from which it is easily deduced that the only solution is the trivial solution. Thus in what follows, we will be taking d ≥ 2 not a square. Following our earlier approach using matrices, one can write



x0 dy0

y0 x0



x1 dy1

y1 x1



 =

 x0 y1 + y0 x1 x0 x1 + dy0 y1 . d(x0 y1 + y0 x1 ) x0 x1 + dy0 y1

3.4. The Brahmagupta–Pell Equation

57

Taking determinants yields Brahmagupta’s identity (x20 − dy02 )(x21 − dy12 ) = (x0 x1 + dy0 y1 )2 − d(x0 y1 + y0 x1 )2 . Thus if (x0 , y0 ) and (x1 , y1 ) satisfy x2 − dy 2 = 1, then so does (x0 x1 + dy0 y1 , x0 y1 + y0 x1 ). In other words, we can make new solutions from old solutions. As an example, consider the equation x2 − 2y 2 = 1. We can start looking for a solution by running through values of y and testing if 2y 2 + 1 is a square. Doing this, we see that (3, 2) is a nontrivial solution. Using the above identity on (3, 2) with itself yields (17, 12) as another solution. In fact, it turns out there are no solutions with a y-value between 2 and 12. Using the identity again on solutions (3, 2) and (17, 12) yields another solution (99, 70). We can repeat this process as much as we desire. Thus we see that if we can find a nontrivial solution to the Brahmagupta–Pell equation, we can then use the above identity to generate infinitely many solutions. In this section we will show that a nontrivial solution always exists, and that all solutions to the equation are generated using this method. 2 2 To each integer √ solution (x, y) of x − dy = 1, we attach the real number r = x + y d√and say r represents the solution (x, y). In our above example, 3 + 2 2 represents the solution (3, 2). For an integer solution (x, y) we have √ √ √ x−y d x−y d 1 √ = √ √ = 2 = x − y d. 2 x − dy x+y d (x + y d)(x − y d)

Thus if r represents an integer solution, then so does 1/r. For integer solutions (x0 , y0 ) and (x1 , y1 ) we have √ √ √ (x0 + y0 d)(x1 + y1 d) = (x0 x1 + dy0 y1 ) + (x0 y1 + y0 x1 ) d. Since Brahmagupta’s identity above implies (x0 x1 + dy0 y1 , x0 y1 + y0 x1 ) is a solution, it follows that if r and s represent solutions, then so does rs. We are now ready to prove the following lemma. Lemma 3.16. If r represents an integer solution of the Brahmagupta– Pell equation, then r k will also represent an integer solution for any integer k.

58

3. Elementary Number Theory

Proof. Setting k = 0 yields the trivial solution. We may use induction to show that the result holds for positive k, since if r and r k represent solutions, then so does the product rr k = r k+1 . If k is negative, then −k is positive, and hence r −k represents a solution. It follows that the reciprocal 1/r −k = r k also represents a solution.  The solutions found in our above example with√d = 2 can now√ be 2 more compactly described√by the equalities (3 + 2 2) = 17 + 12 2 √ and (3 + 2 2)3 = 99 + 70 2. We may order the natural number solutions of the Brahmagupta– Pell equation according to their representatives. Lemma 3.17. Let (x, y) and (w, z) be natural number solutions to the Brahmagupta–Pell equation with representatives r and s, respectively. Then r < s if and only if y < z. Proof. To prove the forward direction, suppose y ≥ z. Then x2 = this√implies 1 + dy 2 ≥ 1 + dz 2 = w2 . Since x and w are nonnegative, √ x ≥ w. Since y ≥ z and x ≥ w, we have r = x + y d ≥ w + z d = s. The proof of the reverse direction is almost identical, only with < replacing ≥.  At the end of this section, we will show that the Brahmagupta– Pell equation (with d ≥ 2 not a square) always has a nontrivial solution. For now, we will assume this result. Theorem 3.18. Let α be the least representative of a nontrivial natural number solution (x, y) to the Brahmagupta–Pell equation. Then all nontrivial natural number solutions of x2 − dy 2 = 1 are given by αk for some k ≥ 1. We call α the generator for x2 − dy 2 = 1. Proof. The representatives for natural number solutions are not integers, but by Lemma 3.17, they are ordered by the second coordinates of their corresponding solutions, which are nonnegative integers. Hence this minimum α will always exist. Since the representative of a nontrivial natural number solution must be greater than 1, we have α > 1. By Lemma 3.16, αk represents an integer solution, but since α > 1, it will in fact be a natural number solution. Now let (x, y) be a nontrivial natural number solution with representative r, so that

3.4. The Brahmagupta–Pell Equation

59

r ≥ α > 1. This implies the existence of k ∈ N with αk ≤ r < αk+1 , and so 1 ≤ rα−k < α. By Lemma 3.16, α−k represents a solution. Since α is the smallest representative greater than 1 that yields a nontrivial solution, we must have rα−k = 1. Hence r = αk , as required.  We can use the solutions of the Brahmagupta–Pell equation to √ d. Rearranging give quickly converging rational approximations to √ √ 2 x2 − dy 2 = 1, we have d = xy −1 , which is very close to xy . For √ example, when d = 2, we have generator 3 + 2 2. By successively squaring, we can easily compute (by hand, even) √ √ (3 + 2 2)2 = 17 + 12 2, √ √ √ (3 + 2 2)4 = (17 + 12 2)2 = 577 + 408 2, and √ √ √ (3 + 2 2)8 = (577 + 408 2)2 = 665857 + 470832 2. √ Thus 665857/470832 should be close to 2, and indeed it is accurate to 11 decimal places. One further squaring yields 886731088897/627013566048, accurate to 23 decimal places! Letting (x1 , y1 ) be the solution represented by generator α, we define natural numbers xk and yk by √ √ k (3.4) xk + yk d = x1 + y1 d . By our work above, {(xk , yk ) : k ∈ N} contains all the natural number solutions of x2 − dy 2 = 1. Note that √ √ √ (xk − yk d)(xk + yk d) √ xk − yk d = xk + yk d 1 √ = (x1 + y1 d)k (3.5)  k √ x1 − y1 d √ √ = (x1 + y1 d)(x1 − y1 d) √ = (x1 − y1 d)k .

60

3. Elementary Number Theory

Adding this to (3.4) and dividing by 2 yields √ √ 1 (x1 + y1 d)k + (x1 − y1 d)k . 2 √ Subtracting (3.5) from (3.4) and dividing by 2 d yields xk =

√ √ 1 yk = √ (x1 + y1 d)k − (x1 − y1 d)k . 2 d √ √ We note that x1 − y1 d = x +y1 √d , and hence 0 < x1 − y1 d < 1. 1 1 √ Thus 0 < 12 (x1 − y1 d)k < 12 , and so xk is the integer closest to √ √ k 1 1 k √ 2 (x1 +y1 d) . Similarly, yk is the closest integer to 2 d (x1 +y1 d) . Thus the solutions to the Brahmagupta–Pell equation are growing exponentially. We now give some results on the xk and yk . Theorem 3.19. The following addition and subtraction formulas hold: xk+ = xk x + dyk y , yk+ = xk y + x yk , xk− = xk x − dyk y , yk− = x yk − xk y . √ √ k Proof. Using defining relation xk + yk d = x1 + y1 d , we have √ √ k+

xk+ + yk+ d = x1 + y1 d √ k √

x1 + y1 d = x1 + y1 d √ √ = xk + yk d x + y d = (xk x + dyk y ) + (xk y + x yk ) This yields the addition formulas. Similarly, we have √ √ √ xk− + yk− d x + y d = xk + yk d.

√ d.

3.4. The Brahmagupta–Pell Equation √ Multiplying both sides by x − y d yields √ √ √ xk− + yk− d = xk + yk d x − y d = (xk x − dyk y ) + (x yk − xk y ) which yields the subtraction formulas.

61



d, 

Theorem 3.20. Let (x0 , y0 ) = (1, 0) be the trivial solution, and let (x1 , y1 ) be the generator solution. Then the natural number solutions xk and yk are given by the recursive equations xk+1 = 2x1 xk − xk−1 , yk+1 = 2x1 yk − yk−1 . Proof. To get the first equation, let = 1 and add the formulas for xk+1 and xk−1 of Theorem 3.19. Adding the formulas for yk+1 and yk−1 from the same theorem yields the second recursive equation.  The recursive equations of Theorem 3.20 allow us to use induction to prove results on the sequences xk and yk . Lemma 3.21. The sequences xk and yk are increasing. Proof. First off, we note that x1 ≥ 2, since x1 = 0 is impossible and x1 = 1 yields the trivial solution. Thus x1 > 1 = x0 . Suppose xk − xk−1 > 0. Then xk+1 − xk = 2x1 xk − xk−1 − xk ≥ 3xk − xk−1 > xk − xk−1 > 0. Thus by induction, the xk are increasing. The proof that the yk are increasing is similar.  We now give some bounds on xk and yk . Lemma 3.22. We have xk1 ≤ xk ≤ (2x1 )k and k ≤ yk ≤ (2x1 )k .

62

3. Elementary Number Theory

Proof. We use induction to show the first bound. Since x0 = 1, the case k = 0 is clear. Suppose the result holds for k. The addition formula of Theorem 3.19 with = 1 yields xk+1 = xk x1 + dyk y1 ≥ xk x1 ≥ xk+1 . 1 The recursive formula of Theorem 3.20 yields xk+1 = 2x1 xk − xk−1 ≤ 2x1 xk ≤ (2x1 )k+1 . We now show the second bound, again with induction. Since y0 = 0, the case k = 0 is clear. Suppose the result holds for k. Since by Theorem 3.21 the yk are increasing, it follows that yk+1 > yk ≥ k. Thus yk+1 ≥ k + 1, as required. The recursive formula of Theorem 3.20 with = 1 yields yk+1 = 2x1 yk − yk−1 ≤ 2x1 yk < (2x1 )k+1 . This completes the proof.



We prove a divisibility result for the yk . Theorem 3.23. yk | y if and only if k | . Proof. First, we note that gcd(xk , yk ) = 1. To see this, suppose p | xk and p | yk . This implies p | (x2k − dyk2 ), and hence p | 1. We now show that yk | y if and only if k | . We begin with the reverse direction. Suppose k | , so that = nk for n ∈ N. We show that yk | ynk with induction on n. The result is clear when n = 1. By the addition formula of Theorem 3.19, we have y(n+1)k = xnk yk + xk ynk .

3.4. The Brahmagupta–Pell Equation

63

Thus if yk | ynk , then yk | y(n+1)k . We now show the forward direction. Suppose yk | y , and write = qk + r for q, r ∈ N, 0 ≤ r < k. By the addition formula of Theorem 3.19, we have y = xqk yr + xr yqk . By our work in the reverse direction above, yk | yqk and hence yk | xr yqk . Since we also have yk | y , it follows that yk | xqk yr . We claim that gcd(yk , xqk ) = 1, for suppose p | yk and p | xqk . Again by our work in the reverse direction, it follows that yk | yqk . Since p | yk , we have p | yqk . Since gcd(xqk , yqk ) = 1, it follows that p = 1. Hence we must have yk | yr with 0 ≤ r < k. Since the yk are an increasing sequence of natural numbers, it must be that yr = 0, and hence r = 0. Thus = qk, and so k | .  In the remainder of this section, we prove the existence of a nontrivial solution to the Brahmagupta–Pell equation for d ≥ 2 not a square. To begin with, we prove the Dirichlet approximation theorem. This theorem was proved by Peter Gustav Lejeune Dirichlet (1805–1859). Theorem 3.24 (Dirichlet approximation theorem). Given a real number α and any positive integer N , we can find integers p and q with 1 ≤ q ≤ N such that |p − qα| < N1 . Proof. First, we note that we need only prove the theorem for positive α, since |p − q(−α)| = | − p − qα|. Let {x} denote the fractional part of x, so that {x} = x − x, where x is the greatest integer less than or equal to x. Thus, for example, {2.997} = 0.997 and {5} = 0. Then 0, {α}, {2α}, . . . , {N α} are N + 1 nonnegative numbers each less than 1. The N sets   m+1 m ≤x< x: N N for m = 0, . . . , N − 1 form a partition of the interval {x : 0 ≤ x < 1}. Since we have N + 1 numbers falling in N subintervals, it must be the case that there is some subinterval containing at least two of

64

3. Elementary Number Theory

the numbers.8 Since the distance between any two members of a subinterval is less than N1 , there exist 0 ≤ i < j ≤ N with 0 ≤ |{iα} − {jα}|
0. x2 > y2 d − y2 8 We have made use of the pigeonhole principle here. The pigeonhole principle states that if n + 1 or more objects are placed in n boxes, then at least one box will contain two or more objects. Although this principle sounds fairly obvious at first encounter, it has many surprisingly deep consequences!

3.4. The Brahmagupta–Pell Equation

65

Thus x2 and y2 are positive solutions to (3.7). In this way, we may create an√infinite sequence of positive solutions (xn , yn ) to (3.7). Since  |xn − yn d| is decreasing, the solutions are distinct. We are now ready to prove the existence of a nontrivial solution to the Brahmagupta–Pell equation. Theorem 3.26. When d ≥ 2 is not a square, the Brahmagupta–Pell equation x2 − dy 2 = 1 has a nontrivial solution. Proof. Consider a solution to  √  1  x − y d < , y the inequality of Lemma 3.25. For such a solution, we have  √  √ √    x + y d ≤ x − y d + 2y d √ 1 < + 2y d y √ ≤ y + 2y d √ = 1 + 2 d y. Thus

√  √   2   x − dy 2  = x + y d x − y d √ 1 < 1+2 d y y √ = 1 + 2 d.

√ Note that since d is irrational, |x2 −dy 2 | > 0. Since the inequality of Lemma 3.25 has infinitely many solutions and √ there are only finitely many natural numbers√between 0 and 1 + 2 d, there is some integer k with 0 < |k| < 1 + 2 d for which x2 − dy 2 = k has infinitely many positive solutions.9 9 We have used an infinite version of the pigeonhole principle here: if infinitely many objects are placed in a finite number of boxes, then at least one box will contain infinitely many objects.

66

3. Elementary Number Theory

Now let k be such that x2 − dy 2 = k has infinitely many positive solutions. For a solution (x, y), x is congruent to one of 0, 1, . . . , |k|−1 modulo |k|, as is y. There are k2 possible pairs of residue classes for x and y. Since there are infinitely many solutions, at least one pair of residue classes contains infinitely many and, hence, two solutions. Let us name these positive solutions (x1 , y1 ) and (x2 , y2 ). Then (x1 , y1 ) = (x2 , y2 ) with x1 ≡ x2 (mod |k|) and y1 ≡ y2 (mod |k|). We set x=

x1 x2 − dy1 y2 k

and y =

x1 y2 − x2 y1 . k

Since x1 x2 − dy1 y2 ≡ x21 − dy12 ≡ k ≡ 0 (mod |k|) and x1 y2 − x2 y1 ≡ x1 y1 − x1 y1 ≡ 0 (mod |k|), x and y are integers. We have   2 2 x1 x2 − dy1 y2 x1 y2 − x2 y1 x2 − dy 2 = −d k k  1  2 2 = 2 x1 x2 + d2 y12 y22 − dx21 y22 − dx22 y12 k 1 = 2 (x21 − dy12 )(x22 − dy22 ) k = 1, and so (x, y) is a solution to the Brahmagupta–Pell equation. It remains to show that this is not the trivial solution. Suppose y = 0 and x = ±1. Then x1 y2 = x2 y1 and x1 x2 − dy1 y2 = ±k. Multiplying the second equation by y2 and then using the first equation yields   ±ky2 = y1 x22 − dy22 = ky1 . Thus y1 = ±y2 . Since y1 and y2 are positive, we have y1 = y2 . The first equation then implies x1 = x2 , which contradicts the fact that (x1 , y1 ) = (x2 , y2 ). Thus (|x|, |y|) is a nontrivial natural number solution to the Brahmagupta–Pell equation.  We note that although the argument above shows that a nontrivial solution of the Brahmagupta–Pell equation must exist, it does not give us a simple method to find the generator. The generator can get quite large. For example, the smallest nontrivial solution to

Exercises

67

x2 − 61y 2 √ = 1 is x = 1766319049, y = 226153980. The continued fraction of d can be used to find the generator. The reader can find a readable exposition in [ME, section 8.2].

Further Reading There are many books that introduce the reader to elementary number theory. Alan Baker’s aptly named book A Concise Introduction to the Theory of Numbers [Ba1] manages to cover a lot of ground in just over 100 pages. The book has been redeveloped into the larger A Comprehensive Course in Number Theory [Ba2]. Hardy and Wright’s An Introduction to the Theory of Numbers [HW] is a classic introduction to the subject and has been updated to contain more recent material.

Exercises 3.1. Prove the following basic properties of division. (a) If c | a and c | b, then c | (a + b). (b) If b | a and k is an integer, then b | ka. (c) If b | a and a | b, then a = ±b. 3.2. Use the Euclidean algorithm to find the greatest common divisor of 42823 and 6409. 3.3. Find all integers x and y such that 42823x + 6409y = 17. 3.4. (a) Use the Euclidean algorithm to find gcd(78787, 11111). (b) Find integers s and t such that 11111s + 78787t = gcd(78787, 11111). (c) Find all x such that 11111x ≡ 10 (mod 78787). 3.5. Let Fn be the nth Fibonacci number given by the initial values F1 = F2 = 1 and the recursion Fn+1 = Fn + Fn−1 for n ≥ 2.

68

3. Elementary Number Theory (a) Show that is 1. (b) Show that is 1. (c) Prove that (d) Prove that

the greatest common divisor of Fn and Fn+1 the greatest common divisor of Fn and Fn+2 F1 + F2 + · · · + Fn−1 = Fn+1 − 1. gcd(Fn , Fm ) = Fgcd(n,m) .

3.6. Let Sn = {m : 1 ≤ m < n and gcd(m, n) = 1}, and define φ(n) = |Sn |. This is Euler’s totient function. Let a ∈ Z with gcd(a, n) = 1. Let T consist of natural numbers m with 1 ≤ m < n and m ≡ am1 (mod n) for m1 ∈ Sn . Show T = Sn . Since this implies that the product of all the elements of each set are congruent modulo n, deduce Euler’s theorem: aφ(n) ≡ 1 (mod n). 3.7. Show that if n is a natural number dividing 2n − 1, then n = 1. 3.8. Let d = gcd(m, n). Show that for any natural number a > 1, we have gcd(am − 1, an − 1) = ad − 1. 3.9. Find all ways in which 1000 be expressed as the sum of two positive integers, one of which is divisible by 11 and the other by 17. 3.10. Show that n is prime if and only if (n − 2)! ≡ 1 (mod n). 3.11. The earliest known use of the Chinese remainder theorem is from a problem in the Sunzi Suanjing, a Chinese work dating from the 3rd to 5th centuries CE. In it, the following problem is proposed and solved: “There are an unknown number of things. When counting by threes, two are left behind. When counting by fives, three are left. When counting by sevens, two are left. How many things are there?” Solve this problem. 3.12. Show that squares are congruent to 0, 1, or 4 modulo 8. Use this to deduce that if n ≡ 7 (mod 8), then n is not the sum of three squares. √ to the Brahmagupta–Pell equation 3.13. Find the generator x1 +y1 5√ x2 − 5y 2 = 1. Find (x1 + y1 5)4 by squaring twice, and use it

Exercises

69

√ to give a rational approximation to 5 that is accurate to nine decimal digits. Squaring one more time will yield a rational approximation accurate to 19 decimal digits. 3.14. Complete the proof of Lemma 3.21 by using the recursive formula of Theorem 3.20 to show that yk is an increasing sequence. 3.15. Suppose n is an integer. A set of natural numbers {a1 , . . . , am } is called a Diophantine m-tuple10 with property D(n) if ai aj + n is a perfect square for 1 ≤ i < j ≤ m. If n ≡ 2 (mod 4), show that m ≤ 3. (It is conjectured that m is bounded for any n by an absolute constant, but this conjecture is still open.)

10 Our use of the term “Diophantine m-tuple” here is different from the use of the term elsewhere in the text, particularly in Chapter 5.

Chapter 4

Computability and Provability

4.1. Turing Machines We have now seen several examples of algorithms, which are, informally, effective computable procedures for solving a specific problem. They consist of an unambiguous set of instructions that can be carried out by a person with no innovation or originality required on their part. We will assume that this person has unlimited time and writing space for carrying out this procedure (which, in practice, is not often the case). We consider functions mapping from N to N or from ntuples of N to N, and call such a function effectively computable when we have an algorithm to calculate the value of the function when given any element of its domain. This is an informal definition but is typically sufficient when showing a function is computable; given a clear description of an algorithm, we can agree that it is indeed computing what is being claimed. Any set of instructions consists of a finite string of letters and punctuation. In the exercises to Chapter 1, we saw that the number of finite strings of finitely many symbols is countably infinite, and hence there must be countably many effectively computable functions. We also saw that there are uncountably many functions from

71

72

4. Computability and Provability

N to N, and so this implies that there are functions that are not effectively computable. In fact, in this sense, most functions are not effectively computable. However, many functions that are of mathematical interest are effectively computable. A Diophantine equation is a polynomial equation with integral coefficients and any number of variables for which we are interested in finding integer solutions. The Brahmagupta–Pell equation of Section 3.4 is an example of a Diophantine equation. Here is a question. Does the following system of Diophantine equations have any integer solutions? 6w + 2x2 − y 3 = 0, 5xy − z 2 + 6 = 0, w2 − w + 2x − y + z − 4 = 0. One can verify that w = 1, x = 1, y = 2, z = 4 is a solution. But now consider 6w + 2x2 − y 3 = 0, 5xy − z 2 + 6 = 0, w2 − w + 2x − y + z − 3 = 0. For this system, there is no solution. To see this, note that the first equation implies that y is even. The second implies that z is even. The third equation implies a contradiction since w2 − w = w(w − 1) is always even. These are special cases of the following problem: Is there an algorithm for deciding when a given polynomial equation with integer coefficients has a solution in the integers? This is Hilbert’s tenth problem, to be discussed in Chapter 5. The answer, provided by the work of Martin Davis (born 1928), Yuri Matiyasevi˘c (born 1947), Hilary Putnam (1926–2016), and Julia Robinson (1919–1985), is that there is no such algorithm. Our informal approach to computability is typically fine when describing an algorithm. However, as soon as we set out to show that an algorithm for completing some task cannot exist, a formal definition of an algorithm is required. To this end, we

4.1. Turing Machines

73

must inquire into what we mean by an algorithm. Our focus in this chapter will be on algorithms that can be used to compute a function. Given the ancient origins of many algorithms, it is remarkable that a precise definition of a computable function was not given until the 1930s. As often happens in mathematics, numerous people were attempting to resolve this problem independently at around the same time. G¨ odel discussed recursive functions in 1934, and Alonzo Church (1903–1995) discussed the lambda calculus in 1936 (although soon after he too began to focus on recursive functions). In 1936 Alan Turing (1912–1954) discussed what are now called Turing machines. Eventually, it was shown that all three of these described the same class of functions, henceforth called the computable functions. These definitions were proposed to capture the effectively computable functions. Church’s assertion that the recursive functions did just that is called Church’s thesis. Turing’s assertion that the functions computable by Turing machines are the effectively computable functions is called Turing’s thesis. Since these two theses are essentially one in the same, we will call it the Church–Turing thesis: a function is computable if and only it is effectively computable. Once we describe Turing machines, it will be clear that computable functions are effectively computable. However, the converse is not a statement that can be proven, given the informal definition of the effectively computable functions. There is, however, much evidence that the two are equivalent. In the end, effectively computable procedures all involve writing and erasing (or disregarding) symbols in various places based on the given problem and on previously written symbols, which is essentially the activity that Turing machines are designed to capture. In this text, we will generally be assuming the Church–Turing thesis.1 Alan Turing had a short life of only 41 years. As part of his undergraduate thesis, at the age of 22, he independently discovered Lindeberg’s condition for the sufficiency of the central limit theorem (the necessity being proved later by Feller), a result of great importance in probability and statistics. His solution of the halting problem, which 1 In a slightly more advanced or specialized text, much can be done from the formal definition of computability alone, without having to appeal to the informal notion of effectively computable functions.

74

4. Computability and Provability

Alan Turing (Photo courtesy of the University Archives, Princeton University Library.)

we discuss in this chapter, settled a question posed by Hilbert.2 Turing’s result came as a shock to Hilbert. During the Second World War, Turing was instrumental in breaking the Nazi Enigma code, which helped lead to an Allied victory. His innovation was to use statistical analysis which was a new technique in code-breaking. Sadly, he had a turbulent personal life and apparently committed suicide in 1954, although there is some debate as to the exact cause of his death [Hod]. Today, he is regarded as the founder of computer science, and much of the emerging theory of artificial intelligence depends on his ideas. We now give a description of Turing machines. The machine consists of a movable device that can read and print symbols on an infinitely long strip of tape.3 The tape, which extends infinitely in both directions, has been divided into a sequence of boxes:

2 This question, posed by Hilbert in 1928, is called the Entscheidungsproblem. Essentially, it asked for an algorithm that would determine if a given statement is a theorem of a first order theory (which is discussed later in this chapter). Turing and Church independently answered this question in the negative in 1936. The negative solution to Hilbert’s tenth problem, given in Chapter 5, provides another means to answer this question. 3 Only a finite amount of tape will be used at any time, so one could instead imagine a finite strip of tape with the ability to increase the length of the tape at any time, if needed.

4.1. Turing Machines

75

At any point in time, the machine is in one of finitely many internal states, denoted by q1 , q2 , . . . , qm . Each square on the tape contains one symbol from a previously specified alphabet: s0 , s1 , . . . , sn . We agree that the symbol s0 will represent a blank square. To simplify the notation, we will write b for s0 and 1 for s1 . Thus a blank tape is a tape with a b in each box. At any point, only finitely many boxes on the tape will not be blank. We let R and L denote a move by the machine to one box to the right and one box to the left, respectively. A Turing machine is a finite and nonempty set of quadruples of the form qi sj sk q , qi sj Rq , or qi sj Lq . No two quadruples in a Turing machine may contain the same first two symbols. The quadruples in a Turing machine are instructions on what action the machine is to take when it is in internal state qi and has just read symbol sj . This is why we require no two quadruples to begin with the same first two symbols; otherwise, the machine would attempt to give two conflicting instructions in some situations. The quadruple qi sj sk q tells the machine to replace the symbol sj with sk and then enter internal state q . The quadruples qi sj Rq and qi sj Lq

tell the machine to move right and left, respectively, and then enter internal state q . Say our machine is acting on the tape ···

s j1

s j2

s j3

s j4

s j5

···

and is currently reading the symbol sj3 . If the current state of the machine is qi , we can denote this situation by · · · sj1 sj2 qi sj3 sj4 sj5 · · · , which is called an instantaneous description of the machine. The current state is written immediately preceding the symbol currently being read. We agree that an instantaneous description shall never end with a qi , and we can always avoid this by appending an extra b to the end of the description if needed. If after an application of one instruction in the Turing machine, we move from instantaneous description α to instantaneous description β, we denote this by α → β.

76

4. Computability and Provability

For example, consider a Turing machine that consists of the two instructions q1 1bq2 and q2 bLq1 . Say the nonblank section of the tape consists of 111, so that the tape reads · · · b111b · · · , where the ellipses denote an infinite string of b’s. We can always add more b’s to the beginning and end of the instantaneous description, as required. Furthermore, suppose the machine is reading the second 1. Then our instantaneous description is 1q1 11. Since we are in state q1 and have just read the symbol 1, we must replace the 1 with a b and move into state q2 . Thus our new instantaneous description is 1q2 b1. Continuing in this manner, we have 1q1 11 → 1q2 b1 → q1 1b1 → q2 bb1 → q1 bbb1 (to get to the last line from the line above, remember that there are infinitely many b’s before the first nonblank symbol on the tape). This machine stops, or halts, at this point as there is no instruction that begins q1 b. When given the tape · · · b111b · · · and started at the second 1, the machine halted on the tape · · · bbb1b · · · . We can see that this machine replaces a string of consecutive 1’s with b’s, starting at the initial position of the machine and then moving left, stopping when it runs out of consecutive 1’s to replace. Consider now a Turing machine that consists of the two instructions q1 1bq1 and q1 bLq1 . How does this machine differ from the machine above? Let’s see. 1q1 11 → 1q1 b1 → q1 1b1 → q1 bb1 → q1 bbb1 → q1 bbbb1 → ··· This machine also replaces 1’s with b’s (starting at the initial position of the machine) but this time does not halt. It will remove all 1’s to

4.1. Turing Machines

77

the left of the starting position, even those appearing after some blank boxes. Once it has replaced the leftmost 1 with a b, it will continue to move left forever. Thus, we see that there are two possible outcomes when a Turing machine is applied to a tape. It may halt, or it may run forever, never halting. If the machine halts, then the resulting tape will be considered the output of the machine. We would like to use Turing machines to compute functions defined on the natural numbers, and thus we need a way to represent these numbers on the tape. We use a block of n + 1 consecutive 1’s to represent the number n (we need to use one mark for 0 so that the machine can recognize that something is there!). We represent an ntuple of natural numbers by inserting a blank between each number. For example, the 3-tuple (3, 0, 1) is represented by 1111b1b11. Given a Turing machine and an n-tuple (m1 , . . . , mn ), we agree to start the machine in state q1 with initial position immediately preceding the first 1. If the machine halts, we can count the number of 1’s on the resulting tape and call this the result of the computation. In this way we can define a partial function φ from Nn to N: if the machine halts, φ(m1 , . . . , mn ) is the result of the computation; otherwise, we leave φ(m1 , . . . , mn ) undefined. φ is called a partial function because it may not be defined for all elements of Nn . Given a function f mapping from Nn to N, we say f is computable if there is a Turing machine with associated function φ defined for all n-tuples (that is, φ is total ) and φ = f . If f maps from a subset of Nn to N and there is a Turing machine with associated partial function φ with φ = f , we say f is partially computable. As an example, we construct a Turing machine for the successor function f (n) = n + 1. Since the number n is represented on the tape with n + 1 consecutive 1’s, we really want this machine to do nothing. However, there must be at least one instruction, as a Turing machine is nonempty. We can take the machine to consist of the single instruction q1 bbq1 . Then the machine begins with instantaneous description q1 1 · · · 1. Since there is no instruction that begins with q1 1, the machine halts, leaving n + 1 1’s on the tape, and so φ(n) = n + 1, as required.

78

4. Computability and Provability

We now construct a Turing machine for the addition function A(m, n) = m + n. The 2-tuple (m, n) will be represented by two strings of m + 1 and n + 1 consecutive 1’s with a b in between, and we want to be left with m+n 1’s on the tape, not necessarily consecutive. Thus, we must construct a machine that removes two 1’s. However, it must remove a 1 from each of the two strings of 1’s, since in the case when m or n is 0 there will not be two consecutive 1’s in a string. Let our Turing machine consist of the following instructions: q1 1bq1 , q1 bRq2 , q2 1Rq2 , q2 bRq3 , q3 1bq3 . Writing 1k to represent k consecutive 1’s, we have q1 11m b11n → q1 b1m b11n → bq2 1m b11n → ··· → b1m q2 b11n → b1m bq3 11n → b1m bq3 b1n , at which point the machine halts, leaving m + n 1’s on the tape. This shows that the addition function is computable. We give one more example. We will construct a doubling Turing machine that accepts a string of consecutive 1’s as input and prints a second string consisting of the same number of 1’s, with a b in between the two strings. This will show that the function f (n) = 2(n + 1) is computable. Furthermore, the output is our representation of the 2tuple (n, n), on which we could apply another Turing machine. In our construction, we will use a third symbol, which we will write as 2. It will serve as a place marker. Our machine will change a 1 to a 2, add this 1 to the second string, and then return to the 2 and move it to the next 1. The instructions q1 12q1 and q1 2Rq2 will change the first 1 to a 2 and move one space to the right. Then q2 1Rq2 and q2 bRq3 will move through any additional 1’s and past one b. The instructions q3 1Rq3 and q3 b1q4 will move past any consecutive 1’s (initially there will not be any) and then print a 1. Then instructions q4 1Lq4 , q4 bLq5 , q5 1Lq5 , and q5 21q6 will return us to the 2 and change it to a 1. A final instruction q6 1Rq1 moves us one place to the right and returns

4.1. Turing Machines

79

us to our original state. If there is an additional 1 here, the process begins again. If there are no more 1’s to copy, then we will be in state q1 reading a b. As there is no instruction for this situation, the machine halts. In summary, our machine consists of instructions q1 12q1 , q1 2Rq2 , q2 1Rq2 , q2 bRq3 , q3 1Rq3 , q3 b1q4 , q4 1Lq4 , q4 bLq5 , q5 1Lq5 , q5 21q6 , q6 1Rq1 . We leave it as an exercise to verify that it takes instantaneous description q1 1n+1 to 1n+1 q1 b1n+1 . If we would like to next apply a Turing machine to this representation of (n, n) on the tape, then we should leave the machine reading the first 1 and in an unused state. Adding the instructions q1 bLq7 , q7 1Lq7 , and q7 bRq8 will do this. If we now wish to apply an additional Turing machine, say addition, we may do so by changing all q1 for that machine to q8 , all q2 to q9 , and so on. In general, this is how we may apply one Turing machine after another. Doing this to our doubling machine with the machine for addition shows that the function g(n) = n + n = 2n is computable. We have shown that the successor function, the addition function, and the multiplication by 2 function are all computable functions. Many other common functions may be shown to be computable in this manner, such as the identity function and the multiplication function, although actually writing down the Turing machines may be cumbersome, as they may require many instructions. The subtraction function is defined to be m − n when m ≥ n and is left undefined when m < n. Thus this is a partial function. It can be shown to be partially computable. Similarly, the truncated subtraction function, defined by sub(m, n) = m − n for m ≥ n and sub(m, n) = 0 otherwise, can be shown to be computable, as can the difference function |m − n|. Is it possible to create a Turing machine that accepts Turing machines as input? Turing machines take natural numbers as their input. To this end, we will assign a natural number to each Turing machine. Since the order of the quadruples in the Turing machine does not have any significance, we arbitrarily order them. Let’s call them I1 , I2 , . . . , In . Each Im is of the form qi sj Aq where A is one of R, L, or sk , and i, j, k, and are natural numbers with i, ≥ 1. To

80

4. Computability and Provability

this (ordered) Turing machine we assign the natural number n

m pi4m−3 pj4m−2 pλ4m−1 p 4m ,

m=1

where pr is the rth prime number, ⎧ ⎪ ⎪ ⎨0 λm = 1 ⎪ ⎪ ⎩k + 2

and if A is R, if A is L, and if A is sk .

Our first example of a Turing machine consisted of instructions q1 s1 s0 q2 and q2 s0 Lq1 (recall that we are writing b for s0 and 1 for s1 ). If we take the quadruples in the above written order, this machine is associated with the number 21 31 52 72 112 130 171 191 . If we take the instructions in the opposite order, the associated number is instead 22 30 51 71 111 131 172 192 . Thus this process does not assign a unique number to a Turing machine. However, once we assign an order to the quadruples (for example, lexicographical ordering), the number assigned is unique. Note that since no two quadruples in a Turing machine may contain the same first two symbols, not every natural number represents a Turing machine. For example, 49742 = 21 30 50 71 111 130 171 191 yields quadruples q1 s0 Rq1 and q1 s0 Lq1 , which is not a valid Turing machine. Furthermore, exponents on primes of the form p4m−3 and p4m for m ≤ n must be at least 1. For example, 35 = 20 30 51 71 would yield quadruple q0 s0 Lq1 , which is not a valid Turing machine since q0 is not a valid internal state. Given a natural number, we may find its prime factorization, write down the associated Turing machine quadruples, and determine if it is a valid Turing machine by checking that no q0 appears and no two quadruples begin with the same two symbols. Using this, we may now create a Turing machine that acts on Turing machines. For example, one may construct a machine that, when given a natural number associated to a Turing machine, determines whether or not the machine contains an instruction that writes the symbol s1 . This is equivalent to determining if the given number is divisible by p34m−1 for some m, but not any higher power of p4m−1 .

4.1. Turing Machines

81

As we have seen, when a Turing machine is applied to some input, it may halt or may run forever. Is there a Turing machine that determines whether a given Turing machine halts on a given input? This is called the halting problem. In the same paper where he introduced Turing machines, Turing showed that no such machine exists. Theorem 4.1 (Halting problem). There does not exist a Turing machine that can determine whether a given Turing machine halts on a given input. Proof. The first step is to enumerate the Turing machines. As we have already assigned a unique number to each Turing machine (assuming we list the instructions in lexicographical order), we may use this numbering to list the Turing machines, skipping any numbers that yield invalid Turing machines or previously listed machines (with the same instructions out of lexicographical order). Thus, we may list the Turing machines as T1 , T2 , and so on. We write Tn (m) to designate the nth Turing machine applied to input m. Now suppose we were to possess a Turing machine V (m, n) that determines whether Tn (m) halts. We use this to construct a Turing machine U as follows. If V tells us that Tn (n) does not halt, then U (n) halts (on some output; it will not matter what it is). If V tells us that Tn (n) halts, then U (n) does not halt. This can be done by including a loop that runs forever. Thus, U (n) halts if and only if Tn (n) does not halt. We must have U (n) = Tk (n) for some k. By the definition of U , U (k) halts if and only if Tk (k) does not halt. Since U (k) = Tk (k), this is a contradiction. The Turing machine V cannot exist, and thus there is no Turing machine to determine if a given Turing machine halts on a given input.  Note that the above theorem yields the nonexistence of a Turing machine that will correctly determine if any given Turing machine will halt on any given input. There may be Turing machines that can determine if Turing machines of a certain type will halt on certain inputs. However, as we have seen above, a single Turing machine that can determine the halting behaviour of all Turing machines on any input can be made to contradict itself. It is interesting to note

82

4. Computability and Provability

the similarities in the above argument with Cantor’s diagonalization arguments from Chapter 1.

4.2. Recursive Functions The Turing machines in the previous section can be thought of as an attempt to capture all functions that are calculated via mechanical means. In this section, we describe a class of functions that ought to be computable. This will be done inductively: we describe a few “basic” functions that are intuitively computable, and some “operations” used to create new functions from old that ought to pass on computability. This process can then be shown to yield the same computable functions of the previous section. This alternative description of the computable functions can be useful when proving results about computable functions; we shall be using it in Chapter 5 on Hilbert’s tenth problem. We define the primitive recursive functions. The constant function C0 (x) = 0, the successor function S(x) = x + 1, and the projection functions Pin (x1 , . . . , xn ) = xi (for n ≥ 1 and 1 ≤ i ≤ n) are defined to be primitive recursive. Additional primitive recursive functions may be obtained by repeatedly applying to these functions the operations of composition and primitive recursion, which we will describe now. The composition of given function f (t1 , . . . , tm ) with given functions g1 (x1 , . . . , xn ), . . . , gm (x1 , . . . , xn ) is the function h(x1 , . . . , xn ) = f (g1 (x1 , . . . , xn ), . . . , gm (x1 , . . . , xn )). Given functions f (x1 , . . . , xn ) and g(t1 , . . . , tn+2 ), primitive recursion yields the function h(x1 , . . . , xn , z) satisfying h(x1 , . . . , xn , 0) = f (x1 , . . . , xn )

and

h(x1 , . . . , xn , t + 1) = g(t, h(x1 , . . . , xn , t), x1 , . . . , xn ). We may have n = 0 here, in which case we take f to be a constant. Then h is a function of one variable satisfying h(0) = f and h(t+1) = g(t, h(t)). These basic functions and function building operations yield a surprisingly large class of functions. For any given k ∈ N, the function

4.2. Recursive Functions

83

Ck (x) = k is primitive recursive, as it can be obtained from C0 (x) by composing it with the successor function S(x) k times. For example, C3 (x) = S(S(S(C(x)))). The addition function A(x, y) can be obtained with primitive recursion on f (x) = P11 (x) and g(t1 , t2 , t3 ) = S(P23 (t1 , t2 , t3 )). This yields A(x, 0) = f (x) = x and A(x, y + 1) = g(y, A(x, y), x) = S(A(x, y)) = (x + y) + 1. We can obtain the multiplication function M (x, y) with primitive recursion on f (x) = C0 (x)

and g(t1 , t2 , t3 ) = A(P23 (t1 , t2 , t3 ), P33 (t1 , t2 , t3 )).

This yields M (x, 0) = C0 (x) = 0 and M (x, y + 1) = g(y, M (x, y), x) = M (x, y) + x. When showing a function is primitive recursive, it is easiest to observe some sort of recursive behaviour and then find the functions f and g to fit this. For example, we know that M (x, 0) = x · 0 = 0, which determines f , and M (x, y + 1) = x(y + 1) = xy + x = M (x, y) + x, which determines g. For example, let’s show that the factorial function F (x) = x! is primitive recursive. We want F (0) = 1, so we take f = 1 (since F is a function of one variable, we take n = 0 in the primitive recursion, and hence f is a constant). We also want F (x + 1) = (x + 1)F (x) = M (S(x), F (x)). This is to be equal to g(x, F (x)), and so we take g(t1 , t2 ) = M (S(t1 ), t2 ) = M (S(P12 (t1 , t2 )), P22 (t1 , t2 )). Let Q(x1 , . . . , xn ) be a polynomial with natural number coefficients. Since Q is obtained with finitely many applications of addition

84

4. Computability and Provability

and multiplication on constants and the variables, it too is primitive recursive. For example, we have 3x2 y 2 + 2 = M (3, M (x2 , y 2 )) + 2 = M (C3 (x), M (M (x, x), M (y, y))) + C2 (x) = A(M (C3 (x), M (M (x, x), M (y, y))), C2(x)). The fact that polynomials with natural number coefficients are primitive recursive will be important to us in Chapter 5. We would like to show that the truncated subtraction function, defined by sub(x, y) = x − y for x ≥ y and sub(x, y) = 0 otherwise, is primitive recursive. To begin with, we look at the predecessor function defined by pred(x) = 0 if x = 0 and pred(x) = x − 1 if x ≥ 1. This function is primitive recursive with f = 0 (f is a constant since pred is a function of one variable) and g(t1 , t2 ) = P12 (t1 , t2 ). This yields pred(0) = 0 and pred(x + 1) = g(x, pred(x)) = x, as required. We may now show truncated subtraction is primitive recursive by taking f (x) = P11 (x) and g(t1 , t2 , t3 ) = pred(P23 (t1 , t2 , t3 )). This yields sub(x, 0) = P11 (x) = x and sub(x, y + 1) = g(y, sub(x, y), x) = pred(sub(x, y)), as required. Note that since |x − y| = A(sub(x, y), sub(y, x)), it too is primitive recursive. The function Z(x) defined by Z(0) = 1 and Z(x) = 0 for x ≥ 1 is primitive recursive, since Z(x) = sub(1, x). Now consider the primitive recursive function defined by E(x, y) = Z(A(sub(x, y), sub(y, x))). Using a result of the previous paragraph, this can be written as Z(|x − y|). If x = y, then E(x, y) = Z(|x − y|) = 0 since |x − y| ≥ 1. If x = y, then E(x, y) = Z(|x − x|) = Z(0) = 1. Thus, E(x, y) is 1 if x = y and is 0 if x = y. E is the characteristic function (or indicator function) for the equality relation. In this way we can extend the

4.2. Recursive Functions

85

definition of primitive recursion to relations: a relation is primitive recursive if its characteristic function is primitive recursive. One may go on to show that many commonly encountered functions are primitive recursive, such as the greatest common divisor function and the nth prime function. However, showing this directly is beyond the scope of this text. The goal of this section is to give an alternative description of the computable functions. While it can be shown that all primitive recursive functions are computable, it turns out that there are computable functions that are not primitive recursive. The simplest such example is the Ackermann function, given in 1928 by Wilhelm Ackermann (1896–1962), a student of Hilbert.4 Let ⎧ ⎪ if m = 0, ⎪ ⎨n + 1 Ack(m, n) = Ack(m − 1, 1) if m > 0 and n = 0, ⎪ ⎪ ⎩Ack(m − 1, Ack(m, n − 1)) if m > 0 and n > 0. It is not difficult to use induction to show that Ack(1, n) = n + 2 = 2 + (n + 3) − 3, Ack(2, n) = 2(n + 3) − 3, and Ack(3, n) = 2n+3 − 3. In each example above, the input is shifted by 3, an operation is performed, and then the output is shifted back by 3. In the first example, the operation is addition of 2. In the second, it is multiplication by 2. In the third, it is exponentiation with base 2. This pattern continues. Letting  .2 ..

EX(n) = 22

n 2’s,

we have Ack(4, n) = EX(n + 3) − 3 and Ack(5, n) = EXn+3 (1) − 3, where EXn represents the function EX composed with itself n times. 4 We actually give a variant of Ackermann’s original function. R´ ozsa P´ eter (1905– 1977) gave a modification of Ackermann’s function in 1935, and in 1948 Raphael Robinson (1911–1995) further modified this function to the function we use here. Raphael Robinson was the husband of Julia Robinson, whose work was crucial to the solution of Hilbert’s tenth problem.

86

4. Computability and Provability

The Ackermann function grows to be very large. For example, 22

Ack(4, 3) = 22

22

65536

− 3 = 22

− 3,

an extremely large number! Although this function gets very large, it is computable, provided we ignore time and space constraints, as usual. To find Ack(m, n), we must compute Ack(m, n − 1), Ack(m, n − 2), . . . , Ack(m, 0) = Ack(m−1, 1), along with numerous Ack(p, q) for p < m. Now we may be required to compute Ack(m−1, q) for some q quite large, but there are still only finitely many Ack(m − 1, q) to compute. The computation of Ack(m, n) is of finite length. It turns out, however, that the Ackermann function grows too fast to be primitive recursive! It can be proved that for any primitive recursive function g(x1 , . . . , xn ), there is a natural number m such that g(x1 , . . . , xn ) < Ack(m, max{xi }) for all xi .5 If Ack(m, n) were primitive recursive, then there would exist some m1 with Ack(m, n) < Ack(m1 , max{m, n}) for all m, n. Taking m = n = m1 , we have Ack(m1 , m1 ) < Ack(m1 , m1 ), a contradiction. Although many functions are primitive recursive, the collection of primitive recursive functions comes up short and is missing some computable functions. G¨odel, on a suggestion from Herbrand, added another operation to composition and primitive recursion. The functions produced with these operations are called the general recursive functions. Instead of using G¨odel’s formulation, we will discuss an equivalent formulation due to Stephen Cole Kleene (1909–1994), often called the μ-recursive functions. We will simply call these the recursive functions. Given a function f (z, x1 , . . . , xn ), our new operation minimalization yields the partial function h(x1 , . . . , xn ) = min{f (z, x1 , . . . , xn ) = 0}. z

If no such z exists, then h is undefined. Adding minimalization to composition and primitive recursion and applying these to the constant function, successor function, and projection functions yields the partial recursive functions. If in addition we require the h produced 5

An outline of the proof may be found in the exercises for Section 8.4 of [Ho].

4.2. Recursive Functions

87

by minimalization to be a total function, the resulting functions are called the recursive functions. For example, let h(x) = minz {|x − (2z)| = 0}. If x is even, then h(x) = x/2, but if x is odd, then h(x) is undefined. This is an example of minimalization yielding a partial function. This h is a partial recursive function but not a recursive function since it is not total. We define functions Quo(a, b) and Rem(a, b) to be the quotient and remainder, respectively, when a is divided by b + 1 (we add 1 to b to avoid division by 0). Writing a = q(b + 1) + r with 0 ≤ r < b + 1, Quo(a, b) = q is the unique integer satisfying q(b + 1) ≤ a < (q + 1)(b + 1). Thus we can define Quo(a, b) = q to be the minimum q satisfying a < (q + 1)(b + 1). Now, Z(sub(n, m)) is equal to 0 when m < n and is 1 otherwise, and hence Quo(a, b) = min{Z(sub((q + 1)(b + 1), a)) = 0} q

= min{Z(sub(M (S(q), S(b)), a)) = 0}. q

Hence Quo(a, b) is recursive. Since r = a − q(b + 1), it follows that Rem(a, b) = sub(a, q(b + 1)) = sub(a, M (Quo(a, b), S(b))) is also recursive. It is possible to construct Turing machines to compute the constant function C0 (x), successor function S(x), and projection functions Pin . Furthermore, one may show that the operations of composition, primitive recursion, and minimalization preserve computability. That is, if g1 , . . . , gm , and f are computable by a Turing machine, then their composition h = f (g1 , . . . , gm ) is also computable by a Turing machine, and similarly for primitive recursion and minimalization. Hence if a function is recursive, then it is computable. Intuitively, this may not be too surprising. The computable functions are those for which we have means to calculate mechanically; the basic constant, successor, and projection functions are trivial to calculate, and it seems intuitively clear that our function building operations preserve mechanical calculation (remember that recursive functions

88

4. Computability and Provability

produced with minimalization are required to be total). What may be more surprising is that the converse to this statement also holds: if a function is computable, then it must be recursive. Unfortunately, a proof of this fact is outside of the scope of this book. These two results show that the recursive functions are one and the same as the computable functions. We previously saw that the Ackermann function is not primitive recursive. Since it is computable, it is a recursive function. Finally, we note that the partial recursive functions may be identified with the partially computable functions. A function produced via minimalization that is not total is akin to a Turing machine that does not halt on certain input. We say a set S of natural numbers is computably enumerable if it is either empty or equal to the range of a computable function f . There are many other commonly used names for these sets, including recursively enumerable, semidecidable, and listable. We have an algorithm to list the elements of a computably enumerable set: S = {f (0), f (1), f (2), . . .} for f a computable function. Conversely, if we possess an algorithm to list the elements of a set S, we can use it to give a computable function f with range S simply by setting the first listed element to be f (0), the next to be f (1), and so on. If both S and its complement are computably enumerable, then we say that S is decidable. Other commonly used names for decidable sets include recursive and computable. Suppose S is decidable. Then given some natural number n, we have an algorithm to decide if n is a member of S or not: we alternately list the members of S and its complement. Since n is in one of these sets, it will appear after finitely many steps. Conversely, if we possess an algorithm to decide if an arbitrary natural number is a member of a set S, we can use it to list the members of S and its complement. Many commonly discussed sets of natural numbers are decidable. For example, the set of prime numbers is decidable: given an arbitrary natural number n, we may decide in finitely many steps whether or not n is prime (for example, we may use brute force trial division).

4.2. Recursive Functions

89

Clearly, every decidable set is also computably enumerable, but is the converse true? We have an algorithm to list the members of a computably enumerable set, but may not have an algorithm to determine whether or not an arbitrary natural number belongs to the set. Consider the following sequence of primes: p0 = 2, and for n > 0, pn is the least prime dividing p0 · · · pn−1 + 1. Since p0 · · · pn−1 + 1 has a remainder of 1 when divided by any pi with i ≤ n − 1, this sequence, called the Euclid–Mullin sequence, consists of distinct primes. Since we have an algorithm to list the members of the sequence, the set S = {pn : n ∈ N} is computably enumerable. However, we do not know if S is decidable. There is no known algorithm that will determine if a given prime is a member of S. Say we wish to determine if 41 is a member of this set. All we can do right now is start listing the members of S and look for 41. If 41 is indeed a member of S, this process will end after finitely many steps. However, if 41 is not a member of S, then this process will never end. We do not currently have a way to decide if 41 will eventually appear on our list. To compute the members of the Euclid–Mullin sequence, we must multiply all previous elements, some of which are rather large. It is so computationally intensive that, at the time of this writing, only the first 51 elements of the sequence have been listed, and 41 is not among them. It is an open question as to whether S contains all prime numbers. Now, if someone were to prove this one day, then S would indeed be decidable. Thus S is an example of a computably enumerable set that may or may not be decidable. Is there a computably enumerable set that is provably not decidable? Our next theorem shows that such a set exists. Theorem 4.2. There exists a set of natural numbers that is computably enumerable but not decidable. Also, there exists a set of natural numbers that is not computably enumerable. Proof. In Chapter 1, we constructed a bijective function F from N to N × N. One may now show that F is a computable function (in fact, this is Theorem 5.22 of Section 5.6). Applying F twice, we may traverse all ordered triples (m, n, x) of natural numbers. In particular, if we write F (z) = (L(z), R(z)), then (L(z), L(R(z)), R(R(z)))

90

4. Computability and Provability

will range over all ordered triples of natural numbers as z ranges over the natural numbers. For each triple (m, n, x), run Tn (m), the nth Turing machine on input m, for exactly x steps (if possible; it may halt at an earlier step). If the Turing machine has just halted on step x, then list (m, n). Thus the set S = {(m, n) ∈ N × N : Tn (m) halts} is computably enumerable. Suppose S were decidable. Then there is an algorithm, or Turing machine, that determines if Tn (m) halts. By the halting problem (Theorem 4.1), this is a contradiction. Thus S is a computably enumerable set that is not decidable. It follows that U = {2m 3n : (m, n) ∈ S} is a set of natural numbers that is computably enumerable but not decidable. Note that the complement of U is not computably enumerable. To see this, suppose the complement of U were computably enumerable. Then both U and its complement would be computably enumerable, and hence U would be decidable, which is not the case. 

4.3. G¨ odel’s Completeness Theorems In Chapters 1 and 2, we discussed Russell’s paradox, which concerns the set R = {s : s ∈ / s}. The existence of such a set leads to a contradiction. This means we must set things up carefully in the hope that such a set cannot be constructed. We did this in Chapter 2, setting up set theory axiomatically with the ZFC axioms. If we have chosen our axioms correctly, it would be reasonable to hope that any statement of set theory may be proved or disproved with them. However, we have already mentioned that this is not the case. The continuum hypothesis cannot be proved or disproved using the axioms of ZFC set theory. How do we reach conclusions about what can and cannot be proved? Another desired consequence of the correct choice of axioms is consistency. It would be reasonable to expect that if our axioms are chosen correctly, then we will never be able to prove a statement of the form “P and not P ”. For if we could prove such a statement, it

4.3. G¨ odel’s Completeness Theorems

91

would follow that every statement is a theorem! To see this, let us prove a statement Q. Here Q can be any statement you please, provided it can be formalized in ZFC set theory, or whatever axiomatic system you are using. To prove Q, we use a proof by contradiction. Suppose Q does not hold. Then we have P and its negation, which is a contradiction. Thus Q holds. If every statement Q (and its negation!) were true, set theory would be trivial and useless. So, are the axioms of set theory consistent? Can we prove this? In order to investigate these questions, we will separate the notions of proof (called a syntactic concept) and truth (called a semantic concept). It is natural to conflate these two notions, but some very interesting and important results can be deduced once we separate them and examine the interplay between them. We are especially interested in whether one of these notions implies the other, and when they overlap. To begin, we discuss first order logic and first order theories. We will eventually work with two theories. One, called Peano arithmetic and abbreviated PA, is designed to capture arithmetic on the natural numbers. The other is ZFC set theory. First order theories are typically introduced with an interpretation in mind. For example, the intended interpretation of PA is arithmetic on the natural numbers. However, there may be other interpretations of the theory in addition to the intended interpretation. In a first order theory, we can quantify over the variables, but not over sets of the variables. Since in ZFC the variables will be thought of as sets, this will present no real limitations. However, in PA the variables will be thought of as numbers. This will prevent us from quantifying over sets of numbers. Since, for example, functions and relations on the natural numbers are defined as sets, we are prevented from quantifying over all functions or over all relations, for example. We would like to deduce some results about PA and ZFC, rather than merely prove theorems within them. Results of this type are called metamathematical, and they are part of a metatheory. To begin, we discuss the language of a first order logic. A first order language consists of symbols, which we split into two types. The logical symbols are common to all first order languages. They

92

4. Computability and Provability

include variables x1 , x2 , and so on. The usual logical connectives of ¬ (negation), ∨ (disjunction), ∧ (conjunction), =⇒ (implication), and ⇐⇒ (the biconditional) are logical symbols, as are the universal quantifier ∀ and existential quantifier ∃.6 The parentheses ( and ) are included for punctuation. Our final logical symbol is = (equality). The second type of symbols in a first order language are called the nonlogical symbols. These may include constant symbols c1 , c2 , . . . , n-ary function symbols F , and n-ary relation symbols R. The nonlogical symbols will differ between different first order languages. For example, in the language LZFC that we will use for ZFC set theory, we use just one 2-ary relation symbol: ∈. We use no constant or function symbols in this language. In the language LPA that we will use for PA, we use one constant symbol: 0. We use three function symbols and no relations. The successor function S is a 1-ary function, and + and × are 2-ary functions. We define the terms of our first order language inductively. Variables xi and any constants are terms. If ti are terms and F is an n-ary function symbol, then F (t1 , . . . , tn ) is a term. Thus in LZFC , our only terms are the variables xi , which are to be thought of as sets. In LPA , our terms include the variables, to be thought of as natural numbers. Also included are 0, S(0), S(S(0)), and so on. Finally, if s and t are terms, then so are s + t, s × t, and S(s). For example, S(S(x1 ) + S(S(0))) is a term of LPA . Finally, we define the formulas of a first order language inductively. If s and t are terms, then s = t is a formula. If ti are terms and R is an n-ary relation, then R(t1 , . . . , tn ) is a formula. These first two types of formulas are called the atomic formulas. Finally, if P and Q are formulas, then ¬P , P ∨ Q, P ∧ Q, P =⇒ Q, P ⇐⇒ Q, ∀xn P , and ∃xn P are formulas. Thus the atomic formulas of LZFC are of the form xi = xj and xi ∈ xj for variables xi and xj . The atomic formulas of LPA are all of the form s = t for terms s and t. If a formula has no free variables, it is called a sentence. We note that due to the way we have constructed the formulas of a language 6 Note that a smaller set of logical connectives and quantifiers may be used, and the others may be defined in terms of these. For example, we might include only ¬, ∨ and ∀ as logical symbols. We may then define P ∧ Q to mean ¬(¬P ∨ ¬Q), P =⇒ Q to mean ¬P ∨ Q, P ⇐⇒ Q to mean (P =⇒ Q) ∧ (Q =⇒ P ), and ∃xn P to mean ¬∀xn ¬P .

4.3. G¨ odel’s Completeness Theorems

93

L, there is an algorithm that will determine if a string of symbols of L is a formula. We now give an overview of first order logic for a first order language L. This will allow us to discuss the syntactic notion of proof. We begin with a list of logical axioms. These may include formulas such as ¬P ∨ P (where P is a formula of L), ∀x1 (x1 = x1 ), and (∀xn P ) =⇒ Q where Q is obtained from P by replacing all instances of xn with a term t (provided P and t meet a technical condition7 ). Once we give a list of axioms, we describe our rules of inference, which will let us deduce new formulas from old. An example of a rule of inference is one that allows us to deduce P ∨ Q when we are given P . Once we have set these up, we can use the axioms and rules of inference to deduce a whole host of “derived” rules of inference, which are additional useful rules of inference that follow from the others. Different sources may use different axioms and rules of inference, but they end up with the same first order logic. As a rigorous treatment of first order logic is not the focus of this text, we do not attempt to list all axioms and rules of inference here. Suffice it to say, they include all the usual rules that you are used to using, such as modus ponens (from P =⇒ Q and P , we may deduce Q), rules on substitution, rules on generalization (from P we may deduce ∀xn P ), and so on. A proof of a formula P consists of a finite list of formulas, the last of which is P , and where each formula in the list is either an axiom or the result of applying a rule of inference on formulas that appear previously in the list. If there is a proof of P , we write  P , and call P a theorem. For example, the following is a theorem of first order logic in any language that includes a 2-ary relation symbol R:   ¬∃x ∀y R(y, x) ⇐⇒ ¬R(y, y) . Note that if we take R(x, y) to be x ∈ y in LZFC , this is the negation of Russell’s paradox. Now, since we have not explicitly listed the 7 Namely, if y is a variable that appears in t, then no free occurrence of xn in P can be quantified over with respect to y. Otherwise, this occurrence of y will become bound when it should not be. For example, take P to be ∃y(xn ∈ y) in LZFC . Intuitively, this says that xn is an element of some set, which is the case for ZFC by the pairing axiom. Substituting ∅, say, for xn yields ∃y(∅ ∈ y), which does not present any problems. However, substituting y for xn yields ∃y(y ∈ y), which contradicts the axiom of regularity.

94

4. Computability and Provability

axioms and rules of inference of first order logic, we cannot write out a formal proof of the above sentence. However, we outline the steps here. First, we use the substitution axiom that we gave as an example of an axiom, which yields     ∀y R(y, x) ⇐⇒ ¬R(y, y) =⇒ R(x, x) ⇐⇒ ¬R(x, x) . Taking the contrapositive yields     ¬ R(x, x) ⇐⇒ ¬R(x, x) =⇒ ¬∀y R(y, x) ⇐⇒ ¬R(y, y) . Now, the premise in the above implication is always true. In particular, ¬(P ⇐⇒ ¬P ) is a tautology. Thus we may use modus ponens to deduce   ¬∀y R(y, x) ⇐⇒ ¬R(y, y) . Using a generalization rule of inference, we may deduce   ∀x¬∀y R(y, x) ⇐⇒ ¬R(y, y) . Finally, taking the double negation and using the fact that ¬∀x¬P is the same as ∃xP yields the result. Now, we may wish to consider adding additional axioms to the usual axioms of first order logic. We will be doing this to obtain the theories of ZFC and PA. Let Γ be a set of sentences. A proof of P using Γ consists of a finite list of formulas, the last of which is P , and where each formula in the list is either an axiom of first order logic, an element of Γ, or the result of applying a rule of inference on formulas that appear previously in the list. If P has a proof using Γ, we write Γ  P . Note that so far we have only dealt with the syntactic side of first order logic. We have discussed proving theorems with first order logic but have not yet discussed truth. We now discuss the semantic side of first order logic. The following definition of truth is due to Alfred Tarski. To begin, we define an interpretation I of a first order language. It consists of a nonempty set UI . To each constant symbol c we associate an element cI of UI . To each function symbol F we associate a function FI on UI , and to each relation symbol R we associate a relation RI on UI . For example, for LPA we may take UI to be N, 0I to be the element 0 of N, SI to be the usual successor function on

4.3. G¨ odel’s Completeness Theorems

95

N, and +I and ×I to be the usual operations of addition and multiplication on N. This is one possible interpretation of the language (and indeed it is the intended interpretation), but we are not limited to this interpretation. Suppose we were to assign an element φ(xi ) ∈ UI to each variable xi . We may use this to assign truth values to the formulas. First, we may extend φ to the terms: φ(c) = cI and φ(F (t1 , . . . , tn )) = FI (φ(t1 ), . . . , φ(tn )) for terms ti . We can now use φ to assign a truth value T or F (but not both) to each formula. In what follows, we describe when to assign the truth value T . Otherwise, we assign the truth value F . If s and t are terms, we set φ(s = t) = T if and only if φ(s) and φ(t) are the same elements of UI . For terms ti , we set φ(R(t1 , . . . , tn )) = T if and only if (φ(t1 ), . . . , φ(tn )) is in the relation RI . We set the truth values for formulas built out of logical connectives as one would expect: φ(¬P ) = T if and only if φ(P ) = F. φ(P ∨ Q) = T if and only if φ(P ) = T or φ(Q) = T. φ(P ∧ Q) = T if and only if φ(P ) = T and φ(Q) = T. φ(P =⇒ Q) = T if and only if φ(P ) = F or φ(Q) = T. φ(P ⇐⇒ Q) = T if and only if φ(P ) = φ(Q). Finally, we set φ(∀xn P ) = T if and only if ψ(P ) = T for any assignment ψ that may only differ from φ on xn . That is, ∀xn P is true if P is true no matter how we assign xn . We set φ(∃xn P ) = T if and only if ψ(P ) = T for at least one assignment ψ that may only differ from φ on xn . In this way, assigning elements in UI to the variables yields a truth value for each formula. A different assignment may change the truth values of some formulas. We say a formula P is true in the interpretation I if for every assignment φ in I we have φ(P ) = T , and we say P is false in the interpretation I if for every assignment φ in I we have φ(A) = F . Note that it is possible that a formula with free variables may be neither true nor false in an interpretation. For example, take the formula x1 = x2 , and say we use an interpretation with a set UI that contains at least two elements. One possible assignment assigns all variables to the same element of UI . In this

96

4. Computability and Provability

assignment, x1 = x2 is true. In a different assignment, x1 and x2 may be assigned to distinct elements of UI , in which case x1 = x2 is false. Thus x1 = x2 is neither true nor false in our interpretation. On the other hand, if we used a single element set UI in our interpretation, it would follow that x1 = x2 is true in this interpretation. Although it is possible that a formula may be neither true nor false in an interpretation, it cannot be both true and false. We also note that it can be proved that a sentence, which by definition has no free variables, is either true or false in an interpretation. If Γ is a set of formulas, then we say an interpretation is a model of Γ if every formula of Γ is true in the interpretation. For example, although we have not yet given the axioms of PA, they will be chosen so that N is a model of PA. So far, our notion of truth is tied to an interpretation. Perhaps a formula is true in some interpretations but not in others. If a formula P is true in every interpretation of the first order language, then we say that it is logically valid. As a simple example, the formula x1 = x1 is logically valid, as is the sentence ∀x1 (x1 = x1 ). A less obvious example is that the following is logically valid:   ¬∃x ∀y R(y, x) ⇐⇒ ¬R(y, y) . This is the negation of Russell’s paradox, which we previously saw is a theorem of first order logic. To see that it is logically valid, suppose χ is an assignment that when applied to the above formula yields F . Then   χ ∃x ∀y R(y, x) ⇐⇒ ¬R(y, y) = T. Thus there is an assignment φ (that may only differ from χ on x) with   φ ∀y R(y, x) ⇐⇒ ¬R(y, y) = T. Hence, we have   ψ R(y, x) ⇐⇒ ¬R(y, y) = T, where ψ is any truth assignment that can differ from φ only on y. In particular, we have ψ(x) = φ(x). Since we are free to choose the value of ψ(y), let us take ψ(y) = φ(x) so that ψ(x) = ψ(y). Now, by

4.3. G¨ odel’s Completeness Theorems

97

our definition of assignments on logical connectives, we have ψ(R(y, x)) = ψ(R(y, y)). We break into two cases. Suppose ψ(R(y, x)) = T and ψ(R(y, y)) = F . The latter implies that the relation RI does not contain (ψ(y), ψ(y)), but the former implies that RI contains (ψ(y), ψ(x)) = (ψ(y), ψ(y)). This is a contradiction. On the other hand, suppose ψ(R(y, x)) = F and ψ(R(y, y)) = T . The former implies that the relation RI does not contain (ψ(y), ψ(x)) = (ψ(y), ψ(y)), while the latter implies that RI contains (ψ(y), ψ(y)), another contradiction. Thus the negation of Russell’s paradox is both a theorem of first order logic and is logically valid. We are now ready to explore the connections between the syntactic and semantic sides of theories of first order logic. Our first result is that we can prove only logically valid formulas. That is, a theorem of first order logic is true in every interpretation of the language. Theorem 4.3 (Soundness theorem). If Γ  P , then P is true in every model of Γ. Outline of proof. Recall that a model of Γ is an interpretation of the first order language in which every formula of Γ is true. The first step is to show that all of our logical axioms are logically valid. The next step is to show that each rule of inference preserves truth. That is, if the premises of the rule of inference are true in an interpretation, then so is the conclusion. Since we have not explicitly listed the axioms and rules of inference of first order logic in this text, we must skip the details for these first two steps. Now suppose we have a proof of P using Γ. This consists of a finite list of formulas Pi where each Pi is an axiom, an element of Γ, or the result of applying a rule of inference on previously listed formulas. Consider an arbitrary model of Γ. We give an inductive argument to show that each Pk is true in the model provided the Pi with i < k are true in the model. If Pk is an axiom, then it is logically valid and, hence, true in the model. If Pk is an element of Γ, then it is true in the model by definition. If Pk is the result of applying a rule of inference to formulas Pi with i < k and each Pi true in the model, then since the rules of inference preserve truth, Pk is true in the model. Thus each line of the proof

98

4. Computability and Provability

is true in the model. Since P is the last line of the proof of P , P is true in the model.  Note that a model of the empty set is an interpretation of the first order language. Thus taking Γ = ∅ in the soundness theorem yields the following corollary. Theorem 4.4. Every theorem of first order logic is logically valid. We can use the soundness theorem to deduce results about consistency. Let Γ be a set of formulas. We say Γ is consistent if there is no formula P such that Γ  P and Γ  ¬P . Theorem 4.5 (Consistency theorem). If Γ has a model, then Γ is consistent. Proof. Suppose Γ has a model, but there is a formula P with Γ  P and Γ  ¬P . The soundness theorem implies that P and ¬P are true in the model. That is, P is both true and false in the model, a contradiction.  Again, taking Γ = ∅ yields an important corollary. Theorem 4.6. First order logic is consistent. That is, there is no formula P such that both P and ¬P are theorems of first order logic. We emphasize that for PA and ZFC, we will be adding to first order logic a list of additional axioms, which will make up the set Γ. Thus it is Theorem 4.5 that will apply to PA and ZFC; they are consistent if they have a model. We have not yet given the axioms of PA, but they will be chosen so that N is a model. Thus it follows that PA is consistent. However, some care must be taken here, as this is really giving us a result about relative consistency. Where can this model of PA be constructed? We have defined N in ZFC set theory. Thus, it is a theorem of ZFC that PA is consistent since PA has a model in ZFC. Now, ZFC has methods of proof that will be unavailable to us in PA. Do we need something as strong as ZFC to prove that PA is consistent? Is it possible that we can give a proof in PA of the consistency of PA? That is, can PA prove its own consistency? We will return to these questions in the next section.

4.3. G¨ odel’s Completeness Theorems

99

We now discuss the converses to the consistency and soundness theorems, which were originally proved by G¨ odel. His original proof for the converse to the consistency theorem was greatly simplified by Leon Henkin (1921–2006). It is this method that we outline below. Theorem 4.7 (Model existence theorem). If Γ is consistent, then Γ has a model. A rigorous proof of this theorem is outside of the scope of this text. Instead, we outline the main ideas. We wish to find a model of a consistent set Γ of formulas of a first order language L. An interpretation of Γ called the canonical interpretation is constructed, essentially out of the symbols of L, provided L has at least one constant symbol. However, it turns out that this interpretation is not necessarily a model of Γ. We say Γ is complete if for each sentence P , Γ  P or Γ  ¬P . Henkin proved that if, in addition to being consistent, Γ is also complete and satisfies a technical condition called the Henkin property,8 then the canonical interpretation of Γ is a model of Γ. Henkin then showed how to start with a consistent set Γ, add constants to L, and use these to extend Γ to a set Γ1 that is consistent, complete, and Henkin. Then the canonical interpretation is a model of Γ1 . Discarding the newly added constant symbols leaves us with a model of Γ, completing the proof of the theorem. We may now use the model existence theorem to prove the converse of the soundness theorem. We call this the adequacy theorem because it shows that the axioms and rules of inference of first order logic are adequate to prove all logically valid formulas. Theorem 4.8 (Adequacy theorem). If P is true in every model of Γ, then Γ  P . Proof. We prove the result for P a sentence. The result also holds when P has free variables, but proving this is just outside the scope of this text. We also assume the following result without proof, called the extension theorem: if P is not a theorem of Γ, then Γ ∪ {¬P } is consistent. Now, suppose P is a sentence that is true in every model 8 Γ is Henkin if the following is satisfied for each formula P with precisely one free variable x: if Γ  ¬∀xP , then there is a term t that contains no variables for which Γ  ¬Q, where Q is obtained from P by replacing each instance of x with t.

100

4. Computability and Provability

of Γ, but Γ does not prove P . By the extension theorem, Γ ∪ {¬P } is consistent. The model existence theorem then implies that Γ ∪ {¬P } has a model. In this model, ¬P is true and so P is false. On the other hand, this model is also a model of Γ. By our assumption, P is true in this model. This is a contradiction.  Taking Γ = ∅ yields the converse of Theorem 4.4. Theorem 4.9. Every logically valid formula is a theorem of first order logic. Combining the consistency theorem with the model existence theorem and the soundness theorem with the adequacy theorem yields the two results known as G¨odel’s completeness theorems. Theorem 4.10 (G¨ odel’s completeness theorems). Γ is consistent if and only if Γ has a model. Furthermore, Γ  P if and only if P is true in every model of Γ. G¨odel proved the model existence theorem in 1929 as part of his PhD dissertation. The completeness theorems were in response to questions raised by Hilbert earlier in the decade. Hilbert asked if every logically valid formula of first order logic has a formal proof. G¨ odel’s completeness theorems answer this question in the affirmative. First order logic is complete in the sense that it can prove all of its logically valid formulas.9 In Chapter 2, it was mentioned that the axiom of choice is independent of the other axioms of set theory. It was also mentioned that the continuum hypothesis is independent of ZFC. We may now shed a little more light on these results. Let ZF denote all the axioms of ZFC set theory except for the axiom of choice, and let AC denote the axiom of choice. Suppose ZF is consistent. Then by the model existence theorem, it has a model. In 1938, G¨odel used this to describe 9 Note that the meaning of the word “complete” here is different from the way we used the word in our discussion of the model existence theorem. There, we defined a set Γ of sentences to be complete if for every sentence P , Γ  P or Γ  ¬P . First order logic is not complete in this sense since, for example, ∀x∀y(x = y) is a sentence for which neither it nor its negation is a theorem of first order logic. This is because neither it nor its negation are logically valid: there are interpretations where it is true and interpretations where it is false. First order logic is complete in the sense that every formula that ought to be a theorem (that is, the logically valid formulas) is a theorem.

4.3. G¨ odel’s Completeness Theorems

101

the constructible universe, a model of ZF in which both the axiom of choice and continuum hypothesis hold. Let us consider the axiom of choice. Since we now have a model of ZFC, it is consistent by the consistency theorem. Now suppose ¬AC were a theorem of ZF. Since adding an axiom to ZF will not change the proof of this theorem, it follows that ¬AC would be a theorem of ZFC. Trivially, AC is a theorem of ZFC. This contradicts the consistency of ZFC. In this way, G¨ odel showed that if ZF is consistent, then ZFC is also consistent, and hence ¬AC is not a theorem of ZF. In 1963, Cohen devised a new method of model building, called forcing, that he used to build models of ZF in which the negation of the axiom of choice and the negation of the continuum hypothesis hold. Thus, if ZF is consistent, it will remain consistent if we add to it ¬AC, and hence AC is not a theorem of ZF. Putting this together with G¨odel’s result, the axiom of choice is independent of ZF set theory. A similar argument may be made for the continuum hypothesis. In the remainder of this section, we give two important results on models. Theorem 4.11 (L¨owenheim–Skolem theorem). If Γ has a model, then there is a countable model of Γ. By a countable model, we mean that the set UI used in the interpretation is countable. The L¨owenheim–Skolem theorem can be proved by using the proof of the model existence theorem, a proof that we have only summarized.10 Here is the basic idea. Suppose Γ has a model. By the consistency theorem, Γ is consistent. In the proof of the model existence theorem, a model is constructed for a consistent set Γ. By the method of construction for this model (on which we omitted the details), the resulting model is countable. Suppose ZFC is consistent. Then, by the model existence theorem, it has a model. We can apply the L¨owenheim–Skolem theorem to obtain a countable model of ZFC. This consists of a countable set UI and a relation ∈I on this set. The axioms of ZFC set theory hold 10 The theorem was originally proved in 1915 by Leopold L¨ owenheim (1878–1957). His proof was simplified by Thoralf Skolem (1887–1963) in the early 1920s. As this predates G¨ odel’s completeness theorems, it is possible to prove the L¨ owenheim–Skolem theorem without the model existence theorem.

102

4. Computability and Provability

for the elements of UI , and so all theorems of ZFC hold for the elements of this set. This includes Cantor’s diagonalization argument that there is an uncountable set S. It seems that we have an uncountable set and yet only countably many elements that could possibly be in this set! This is called Skolem’s paradox, although it is not really a paradox as it can be resolved. What does it mean to say that S is uncountable in our model? It means that there does not exist a bijective function f between the natural numbers and S. Recall that a function is, by definition, a set. Thus S really is a countable set, and the fact that S is uncountable in the model merely means that the set f is not an element of UI . Theorem 4.12 (Compactness theorem). Suppose every finite subset of Γ has a model. Then Γ has a model. Proof. Suppose that every finite subset of Γ has a model but that Γ does not. By the model existence theorem, it follows that Γ is inconsistent. Thus there is a formula P with Γ  P and Γ  ¬P . Now, a proof has only finitely many lines, and so only finitely many formulas of Γ may be used in these two proofs. Let Γ1 consist of these sentences. Then Γ1 is not consistent. By the consistency theorem, Γ1 does not have a model. Since we assumed that every finite subset of Γ has a model, this is a contradiction.  We previously mentioned that although a theory is given with an intended interpretation in mind, there may be additional interpretations of the theory. That is, a theory Γ may have models other than the intended model. For example, consider PA. We will give the axioms of PA in the next section, but we have already discussed its language. The intended model of PA is N with the usual successor function and the usual operations of + and ×. However, we can use the compactness theorem to give a very different model of PA, an example of what is called a nonstandard model. We introduce a new constant symbol c. To the axioms of PA, we adjoin infinitely many additional axioms: c > 0, c > S(0), c > S(S(0)), and so on. Let us denote the set containing both the axioms of PA and these additional axioms by Γ. We write S n (0) as an abbreviation for n successive applications of the successor function to 0. In any finite subset of Γ,

4.3. G¨ odel’s Completeness Theorems

103

only finitely many of the additional axioms may appear. Thus there is a largest n for which the axiom c > S n (0) is in the subset. If we interpret c as n + 1, then N is a model of this subset of Γ. Thus any finite subset of Γ has a model. By the compactness theorem, it follows that Γ has a model. Since the axioms of PA are a subset of Γ, this model is also a model of PA. However, this model contains an element that is larger than every successor of 0! Thus it is clear that this model is not the intended model N.

¨ del Kurt Go

(Photo courtesy Notre Dame Archives.)

We end this section with some words on the life of G¨odel. G¨ odel’s remarkable contribution was to make a mathematical distinction between truth and provability. This is the essence of his completeness theorem contained in his doctoral thesis. G¨odel’s incompleteness theorem, proved two years later and discussed in the next section, shattered the idyllic and romantic dream of mathematicians and philosophers from time immemorial (culminating in the lofty undertaking by

104

4. Computability and Provability

Whitehead and Russell in their three volume tome, Principia Mathematica) that once we properly formulate the rules for symbolic logic and choose the correct axioms, all universal truths will unfold. G¨odel is now regarded as the greatest logician of all time. Sadly, genius came at a price. Apparently, he was a hypochondriac all of his life and this ultimately lead to his death. In 1940, fleeing Nazi rule, he moved to the Institute for Advanced Study in Princeton along with his wife Adele, who was a nightclub dancer when they met. He was good friends with Einstein and in 1947, he became an American citizen. Studying the American Constitution, he found a logical inconsistency that could allow it to become a dictatorship! In 1977, his wife, who would take meticulous care of G¨odel’s dietary needs, fell ill and had to be hospitalized. G¨odel suffered mental depression and died of starvation in January 1978. Regarding his legacy, Manin [AMS, p. 36] writes “G¨ odel made clear that it takes an infinity of new ideas to understand all about integers only. Hence we need a creative approach to creative thinking, not just a critical one.” We refer the reader to [Daw] for a readable biography of G¨odel.

4.4. G¨ odel’s Incompleteness Theorems We now give the axioms of Peano arithmetic. Recall that the language for PA contains a constant symbol 0, a 1-ary function symbol S, and two 2-ary function symbols + and ×. PA1. ∀x¬(S(x) = 0).   PA2. ∀x∀y (S(x) = S(y)) =⇒ (x = y) .   PA3. P (0) ∧ ∀x P (x) =⇒ P (S(x)) =⇒ ∀xP (x). PA4. ∀x(x + 0 = x).   PA5. ∀x∀y x + S(y) = S(x + y) . PA6. ∀x(x × 0 = 0).   PA7. ∀x∀y x × S(y) = (x × y) + x . PA3 is an axiom schema, as we have one axiom for each formula P (x) in the language for PA. Here, P (0) is obtained from P (x) by

4.4. G¨ odel’s Incompleteness Theorems

105

replacing each instance of x with 0. Similarly, P (S(x)) is obtained from P (x) by replacing each x with S(x).11 These axioms are given in the hope of capturing arithmetic on N. The first axiom states that 0 is not the successor of any element. The second axiom states that if two elements have the same successor, then they are equal. Note that the converse of PA2 is a theorem of first order logic, and so it holds as well. The third axiom is giving us mathematical induction. Note that since in first order logic we cannot quantify over sets of the variable, we are forced to include a separate axiom for each formula of LPA . The fourth and fifth axioms give the basic properties of addition, while the sixth and seventh give the basic properties of multiplication. As we saw in the comments following the compactness theorem of the previous section, these axioms have nonstandard models. However, N with the usual successor function and the usual operations of + and × is a model of these axioms, and formal proofs of the important theorems of number theory on N may be given in PA. We give an example of a proof in PA of a simple theorem. We show that ∀x(0 + x = x). Note that commutativity of addition is not an axiom of PA, and so we cannot deduce this theorem immediately from PA4. Commutativity of addition is a theorem of PA, but it must be proved from the axioms, and the theorem we are proving here is a step toward this. To prove this theorem, we will make use of PA3. Showing that 0 + 0 = 0 and (0 + x = x) =⇒ (0 + S(x) = S(x)) (and then using a generalization rule of inference to apply the universal quantifier on x) will allow us to use PA3 to deduce the theorem. To show 0 + 0 = 0, we use PA4 with 0 substituted for x. We now assume 0 + x = x. By a rule of inference on functions from first order logic, we can apply S to both sides to get S(0 + x) = S(x). Using PA5 with 0 substituted for x and then x substituted for y yields 0 + S(x) = S(0 + x). By transitivity of equality (another derived rule 11 One may even take P (x) to be a formula that does not contain x as a free variable. However, then P (x), P (0), and P (S(x)) are identical, and thus PA3 does not say anything interesting in this case.

106

4. Computability and Provability

of inference of first order logic), it follows that 0 + S(x) = S(x), as required. Let Γ be a set of sentences in the language of PA. If Γ contains the axioms of PA, then we call Γ an extension of PA. If P is a theorem of PA and Γ is an extension of PA, then P is also a theorem of Γ. If there is an algorithm that can determine if a given formula is a member of Γ, then we say Γ is axiomatized. For example, PA is axiomatized. In 1930, G¨ odel proved and announced his first incompleteness theorem, which was published in 1931. Theorem 4.13 (G¨odel’s first incompleteness theorem). If Γ is a consistent12 axiomatized extension of PA,13 then there is a sentence G such that neither G nor ¬G is a theorem of Γ. When there is a sentence such that Γ can prove neither it nor its negation, we say Γ is incomplete. Thus G¨odel’s second incompleteness theorem shows that any consistent axiomatized extension of PA is incomplete. Suppose Γ is a consistent axiomatized set of formulas, each of which is true in N, the intended model of PA. Then N is also a model of Γ. If a sentence is a theorem of Γ, then by the soundness theorem it is true in the model N. G¨ odel’s first incompleteness theorem yields a sentence G such that both G and ¬G are not theorems of Γ. Now, sentences are either true or false in a model, and so one of G or ¬G is true in N. Thus G¨ odel’s theorem yields a sentence that is true in N but is not a theorem of the axiomatized extension of PA! In other words, our extension of PA has failed to capture all of arithmetic. One could argue that this sentence should then be added to Γ as an additional axiom. However, the incompleteness theorem could then be applied again to obtain a new sentence that is true in N but is not 12 G¨ odel originally proved his theorem assuming something called ω-consistency, which is a stronger condition than consistency. In 1936, J. Barkley Rosser (1907–1989) showed how to replace this stronger condition with consistency. 13 Actually, G¨ odel’s first incompleteness theorem can be proved for a theory weaker than PA. Essentially, we can remove PA3, the induction axiom, but must then add a new symbol < to the language and include a few additional axioms related to it. This theory is weaker than PA in the sense that every theorem it can prove is a theorem of PA, but there are theorems of PA that cannot be proved in this theory.

4.4. G¨ odel’s Incompleteness Theorems

107

a theorem of this enlarged consistent axiomatized extension. There is no way that we can extend PA so that it is able to prove all sentences that are true in N and have it remain consistent and axiomatized. We note that if we drop the requirement of consistency, then the result becomes trivial. An inconsistent extension of PA will prove every sentence in the language of PA, and is thus complete (but also useless). What if we drop the requirement of the extension being axiomatized? There does exist a complete and consistent extension of PA that is not axiomatized, called complete arithmetic. We simply let Γ be the set of all sentences in LPA that are true in N (with the usual successor function and the usual operations of + and × on N). Since the axioms of PA are true in N, this is an extension of PA. Trivially, every true sentence in N is a theorem of Γ, and so Γ is complete. It is also trivial that N is a model of Γ, and so Γ is consistent.14 The fact that Γ is not axiomatized follows from G¨odel’s first incompleteness theorem: if it were axiomatized, then since it is consistent, it must not be complete, a contradiction. While a proof using complete arithmetic is trivial,15 the problem with using the theory lies in determining exactly which sentences are elements of Γ! A rigorous proof of G¨odel’s theorem is outside the scope of this book, but we are able to give some of the details. G¨odel described a way to assign a natural number to each formula in LPA , and then to each proof of a theorem in a consistent axiomatized extension Γ of PA. This allowed him to embed statements about provability into Γ itself. He showed how to use this to write down a sentence in LPA that essentially says “I am not a theorem of Γ”. He then showed that neither this sentence nor its negation is a theorem of Γ. Informally, one can see that if either the sentence or its negation were a theorem, it would lead to a contradiction. This is similar to the liar paradox : a person says “I am lying”. Are they lying or telling the truth? Either situation leads to a contradiction. The contradiction arises because any sentence must be either true or false, at least in first order logic. The reason G¨ odel’s sentence does not lead to a paradox 14 As previously mentioned, the statement “Γ is consistent” is a theorem of a theory in which N can be constructed, such as ZFC set theory. 15 Since every true sentence in N is an element of Γ, a proof of a true sentence P consists of one line: P !

108

4. Computability and Provability

is because there are three options. The first two, that the sentence or its negation are theorems of Γ, are ruled out. Thus it must be that Γ is incomplete. We begin by explaining the G¨odel numbering. To each of symbol s of the language of PA, we assign a number f (s). The logical connectives ¬, ∨, ∧, ⇐=, and ⇐⇒ are assigned numbers 1, 3, 5, 7, and 9, respectively. We assign to ∀ and ∃ the numbers 11 and 13. The left and right parentheses are assigned numbers 15 and 17. The equality symbol = is assigned the number 19. For the nonlogical symbols, we set f (0) = 21, f (S) = 23, f (+) = 25, and f (×) = 27. Finally, for n ≥ 1, we set f (xn ) = 27 + 2n. Then, if P is a formula made up of symbols s1 s2 · · · sn , we set f (s1 ) f (s2 ) p2

g(P ) = p1

· · · pnf (sn ) ,

where pi is the ith prime number. For example, we have g(∀x1 (x1 = x1 )) = 211 329 515 729 1119 1321 1717 . On the other hand, if we are given a number, then there is an algorithm to determine which formula it represents, if any. We need only to factor the number, check that the number is the product of consecutive primes starting with 2, with each prime raised to an odd power, and, if so, then write down the symbols and apply the formularecognizing algorithm. g(P ) is called the G¨ odel number for P . Note that for any formula P , g(P ) is even, although not every even number is the G¨odel number of a formula.16 Also note that the exponents on each prime in the factorization of a G¨odel number are odd. Due to unique factorization, different formulas have different G¨ odel numbers; that is, g is injective. Now suppose we have a proof using Γ of a formula P . The proof consists of a finite list of formulas P1 , P2 , . . . , Pn = P . To this proof, we assign the G¨ odel number g(P1 ) g(P2 ) p2

p1

n) · · · pg(P . n

Note that since each g(Pi ) is even, the G¨ odel numbers for formulas and for proofs are distinct. 16 For example, 780 = 21 31 53 is the G¨ odel number for ¬¬∨, which is nonsensical and not a formula. 10 is not a G¨ odel number since it is not the product of consecutive primes.

4.4. G¨ odel’s Incompleteness Theorems

109

G¨odel numbering allows us to give relations on the natural numbers that say something about proofs of theorems using Γ. For example, we can define a relation Rpr (m, n) to hold if and only if m is the G¨odel number of a formula P and n is the G¨odel number of a proof of P using Γ. Since this is a relation on N, can we find some way to represent this relation in LPA ? For m ∈ N, we write m = S m (0), where S m (0) is an abbreviation for m successive applications of the successor function to 0. Thus m is a term in LPA . In the model N of PA with the usual interpretation of the successor function, +, and ×, m is interpreted as the natural number m. Given a relation R(m1 , . . . , mn ) on N, we say that R is expressible in LPA if there is a formula P (x1 , . . . , xn ) with free variables x1 , . . . , xn such that for all m1 , . . . , mn in N, (1) if R(m1 , . . . , mn ), then P (m1 , . . . , mn ) is a theorem of PA, and (2) if ¬R(m1 , . . . , mn ), then ¬P (m1 , . . . , mn ) is a theorem of PA. We then say that P expresses R. One can give formal proofs in PA to show that many common relations on N are expressible in PA. For even fairly simple relations, these proofs can be long. Fortunately, G¨ odel proved that a large class of relations on N are expressible. Given a relation R(m1 , . . . , mn ) on N, we can define its characteristic function by  1 if R(m1 , . . . , mn ), char(m1 , . . . , mn ) = 0 if ¬R(m1 , . . . , mn ). We say that the relation R is recursive if its characteristic function is a recursive function. G¨ odel proved that if R is a recursive relation, then it is expressible. We are forced to omit the details here, but note that this takes some work to prove. Essentially, one must define what it means to express a function in PA, show that the basic recursive functions are expressible in PA, and then show that the operations of composition, primitive recursion, and minimalization preserve expressibility. Furthermore, these must be done with formal proofs in PA. Let us return to the relation Rpr (m, n) on N. Suppose Γ is axiomatized. Given m, n ∈ N, we can factor m to determine if it is the

110

4. Computability and Provability

G¨odel number of a formula P in the language of PA. If it is, we can then factor n to determine if it is the G¨odel number of a proof of P using Γ. This is where we use the fact that Γ is axiomatized. Thus we have an algorithm to determine whether or not Rpr (m, n) holds, and hence to compute its characteristic function. By the Church– Turing thesis, the characteristic function, and hence the relation, is odel’s theorem on expressibility, there is a formula recursive.17 By G¨ Ppr (x, y) of LPA that expresses Rpr . G¨ odel originally proved his first incompleteness theorem using something called ω-consistency instead of consistency. This condition is stronger than consistency. Rosser later showed how to weaken the ω-consistency condition to consistency. Γ is ω-consistent if for every formula P (x) with precisely one free variable x, if Γ  P (n) for each n ∈ N, then ¬∀xP (x) is not a theorem of Γ. To see that ω-consistency implies consistency, suppose Γ is ω-consistent and take P (x) to be x = x. Since ∀x(x = x) is an axiom of first order logic, n = n is a theorem of Γ for each n ∈ N. By ω-consistency, this implies ¬∀x(x = x) is not a theorem of Γ. If Γ were inconsistent, then every formula is a theorem of Γ. Thus Γ is consistent. We are now ready to construct a sentence of PA such that neither it nor its negation is a theorem of an ω-consistent axiomatized extension Γ. We define a relation R(m, n) on N to hold if and only if m is the G¨odel number of a formula P (x) that contains precisely one free variable x, and n is the G¨odel number of a proof using Γ of P (m). Note that we have introduced some self-reference, as P (x) has G¨odel number m, which we have placed back in P . Given m, n ∈ N, we may factor m to determine if it is the G¨ odel number of a formula P (x) with precisely one free variable. If it is, we may then factor n and use the fact that Γ is axiomatized to determine if n is the G¨odel number for a proof using Γ of P (m). Thus we have an algorithm to determine if R holds for m and n. By the Church–Turing thesis, this odel’s theorem on expressibility, implies that R is recursive.18 By G¨ 17 One may show that Rpr is recursive without appealing to the Church–Turing thesis, provided that the condition that Γ is axiomatized is strengthened to Γ recursively axiomatized. 18 The previous footnote about avoiding the Church–Turing thesis applies here as well.

4.4. G¨ odel’s Incompleteness Theorems

111

there is a formula Q(x, y) that expresses R. That is, for all m, n ∈ N, (4.1)

if R(m, n), then Γ  Q(m, n)

and (4.2)

if ¬R(m, n), then Γ  ¬Q(m, n).

Let m be the G¨ odel number for the formula ∀y¬Q(x, y). Note that this formula has precisely one free variable. Thus by the definition of R, for this value of m we have (4.3)

R(m, n) if and only if n is the G¨odel number for a proof using Γ of ∀y¬Q(m, y).

Let G be the sentence ∀y¬Q(m, y). We will show that this is a sentence such that neither it nor its negation is a theorem of Γ. Note that G may be written as ¬∃yQ(m, y). Thus it states that there is no n ∈ N such that Q(m, n). By (4.2), this means that there is no n ∈ N such that R(m, n). By (4.3), there is no n ∈ N that is the G¨odel number for a proof using Γ of ∀y¬Q(m, y). However, this last sentence is simply G! Thus, informally, G states that G is not a theorem of Γ. We now show that G is not a theorem of Γ. Suppose Γ  G. Let n be the G¨ odel number of such a proof. By (4.3), R(m, n) holds. By (4.1), Γ  Q(m, n). On the other hand, since G is a theorem of Γ, we may take y to be n, which shows that Γ  ¬Q(m, n). This contradicts the consistency of Γ. Finally, we show that ¬G is not a theorem of Γ. Suppose Γ  ¬G. Furthermore, suppose there were n ∈ N for which R(m, n) holds. By the definition of R, n is the G¨odel number of a proof using Γ of ∀y¬Q(m, y). That is, Γ  G, which contradicts consistency. Thus for all n ∈ N, we must have ¬R(m, n), and so Γ  ¬Q(m, n). Since ¬Q(m, y) has precisely one free variable, we may use ω-consistency to deduce that ¬∀y¬Q(m, y) is not a theorem of Γ. That is, ¬G is not a theorem of Γ, a contradiction.

112

4. Computability and Provability

As mentioned, in 1936 Rosser showed how to weaken the ωconsistency condition to consistency. This completes our discussion of G¨odel’s first incompleteness theorem, and we move on to his second incompleteness theorem. Theorem 4.14 (G¨ odel’s second incompleteness theorem). Let Γ be a consistent axiomatized extension of PA. Then the consistency of Γ is not a theorem of Γ. Essentially, the second incompleteness theorem says that any axiomatic theory strong enough to include Peano arithmetic cannot prove its own consistency. For example, PA itself cannot prove its own consistency. We previously saw that PA is consistent since N is a model. However, G¨ odel’s second incompleteness theorem is telling us that this model cannot be constructed within PA. As we saw in Chapter 2, the set of natural numbers can be constructed in ZFC, and so there is a proof in ZFC of the consistency of PA. However, there can be no proof in PA of the consistency of PA. While a rigorous proof of this theorem is far outside the scope of this book, we can provide some explanation on how it was proved. To start, how can we formulate the consistency of PA in LPA ? Recall that the relation Rpr (m, n) holds if and only if m is the G¨odel number of a formula P and n is the G¨odel number of a proof of P using Γ. We observed that there is an algorithm to determine whether Rpr holds for any given m and n, which implies, by the Church–Turing thesis, that there is a formula Ppr (x, y) of LPA that expresses Rpr . Similarly, we define a relation Rf or (n) on N to hold if and only if n is the G¨odel number of a formula of LPA . Given n, we may factor it and determine if Rf or holds for n. Thus, by the Church–Turing thesis, there is a formula Qf or (x) of LPA that expresses Rf or .19 Consider the following sentence of LPA : ∃x(Qf or (x) ∧ ¬∃yPpr (x, y)). This sentence says that there is a formula that is not a theorem of Γ. Now, if Γ were inconsistent, then every formula would be a theorem 19 As above, one may show that Rf or is recursive without using the Church–Turing thesis if the conditions on Γ are strengthened.

4.4. G¨ odel’s Incompleteness Theorems

113

of Γ. Thus the above sentence, which is in LPA , is asserting that PA is consistent. Let us denote this sentence by C. Let Γ be axiomatized. In the proof of his first incompleteness theorem, G¨odel showed that if Γ is consistent, then the sentence G is not a theorem of Γ. Recall that, informally, G states that G is not a theorem of Γ. G¨ odel observed that the proof of his first incompleteness theorem can actually be carried out within Peano arithmetic!20 That is, Γ can prove that if Γ is consistent, then G is not a theorem of Γ, and so Γ  C =⇒ G. Suppose there is a proof using Γ of the consistency of Γ. That is, suppose Γ  C. Applying modus ponens yields Γ  G, which contradicts G¨odel’s first incompleteness theorem. G¨odel’s second incompleteness theorem can be applied to any axiomatic system in which the axioms of PA are theorems. For example, it applies to ZFC set theory. If ZFC is consistent, then it cannot prove its own consistency. As previously mentioned, since PA has a model that can be constructed in ZFC, the consistency of PA is a theorem of ZFC. Do we really need axioms as strong as those in ZFC to prove the consistency of PA? ZFC is stronger than PA in the sense that it can prove every theorem of PA. In order to prove the consistency of PA, do we need to move to a stronger theory? In 1936, Gerhard Gentzen (1909–1945) showed that the answer to both these questions is no. He gave a proof of the consistency of PA. His proof was carried out in a theory called primitive recursive arithmetic, augmented with something called quantifier-free transfinite induction up to the ordinal 0 . This theory is much weaker than ZFC set theory. It is not stronger than PA, in the sense that there are theorems of PA that cannot be proved in this theory. It is also not weaker than PA, as it can prove the consistency of PA while PA cannot. A proof of the consistency of a axiomatized extension Γ of PA must be carried out in a different, but not necessarily stronger, theory.

20 It requires a lot of work to actually demonstrate this. In fact, G¨ odel only asserted that this can be done and left it to others to carefully work out the details.

114

4. Computability and Provability

4.5. Goodstein’s Theorem G¨odel’s first incompleteness theorem yields a sentence of LPA that is true in N but is not a theorem of PA (this is either G or ¬G for G given in the previous section). Thus PA cannot prove all sentences that are true in N. However, one could argue that this sentence is fairly “unnatural”. It was constructed explicitly for the purpose of being true for N but unprovable, and one would hardly expect to arrive at such a sentence when doing “ordinary” mathematics with N. In this section, we discuss a much more “natural” sentence that is true in N but cannot be proved in PA. Given natural numbers m and n with n ≥ 2, we may write m in the form ck nk + ck−1 nk−1 + · · · + c1 n + c0 for some natural number k, where 0 ≤ ci < n for each i. This is the base n expansion of m, and the ci are the base n digits of m. For example, we have 521 = 29 + 23 + 1 as the base 2 expansion of 521 (all missing powers of 2 have a coefficient of 0). Now, we can take the base n expansion of m and write the exponents in base n as well. We can do the same for any exponents appearing in these base n expansions, and so on. This process eventually terminates, leaving us with the hereditary base n expansion of m. For example, the hereditary base 2 expansion of 521 is 2+1

521 = 22

+1

+ 22+1 + 1.

Given a natural number m > 0, we define a sequence of natural numbers Gn (m) for n ≥ 2 called the Goodstein sequence for m. We set G2 (m) = m. To form Gn+1 (m), write Gn (m) in its hereditary base n expansion, replace each n with n + 1, and then subtract 1. If a Goodstein sequence ever reaches 0, then it terminates. The sequences Gn (1), Gn (2), and Gn (3) quickly terminate. However, for larger m, this sequence seems to grow to be quite large. For

4.5. Goodstein’s Theorem

115

example, 2+1

G2 (521) = 521 = 22 3+1

G3 (521) = 33

+1

+ 22+1 + 1,

+1

+ 33+1

4+1

+1

+ 44+1 − 1

4+1

+1

+ 3 · 44 + 3 · 43 + 3 · 42 + 3 · 4 + 3

≈ 1039 , G4 (521) = 44 = 44

≈ 10617 , 5+1

G5 (521) = 55

+1

+ 3 · 55 + 3 · 53 + 3 · 52 + 3 · 5 + 2

≈ 1010922 . One can imagine how large Gn (m) grows when starting with a large value of m. In 1944, Reuben Goodstein (1912–1985) proved a surprising result about these sequences. Theorem 4.15 (Goodstein’s theorem). For any natural number m > 1, there is a natural number n such that Gn (m) = 0. The sequence Gn (521) that seems to be growing so large will eventually reach 0. No matter what number we start with, the associated Goodstein sequence will eventually reach 0! We saw this happening for m = 1, 2, and 3. What about the next largest value of m, m = 4? We have G2 (4) = 4 = 22 . Then G3 (4) = 33 − 1 = 2 · 32 + 2 · 3 + 2. In the next step, the 3’s become 4’s and 1 is subtracted. Following this, the 4’s become 5’s and another 1 is subtracted. This leaves us with G5 (4) = 2 · 52 + 2 · 5. In the next step, the 5’s become 6’s, which will yield a final term of 2 · 6. We will have to take one of these two 6’s to subtract 1, yielding G6 (4) = 2 · 62 + 6 + 5. Skipping ahead five steps brings us to G11 (4) = 2 · 112 + 11

116

4. Computability and Provability

and G12 (4) = 2 · 122 + 12 − 1 = 2 · 122 + 11. Skipping ahead 11 steps brings us to G23 (4) = 2 · 232 and G24 (4) = 2 · 242 − 1 = 242 + 23 · 24 + 23. Repeating this process, we have G47 (4) = 472 + 23 · 47, G95 (4) = 952 + 22 · 95, G191 (4) = 1912 + 21 · 191. Note that when going from each of these values to the next, it takes one step to break into the final term so that we may subtract 1 (this reduces the coefficient of the final term by 1), and then in the subsequent steps we reduce the new final term, which is less than the base and hence does not grow, to 0. Thus, when going from each of the above given values to the next, the base is doubled and then increased by 1. Doing this 21 more times leaves us with just the square. At this point, the base is 221 · 191 + 220 + 219 + · · · + 2 + 1 = 402653183. Thus G402653183 (4) = 4026531832 , G402653184 (4) = 4026531842 − 1 = 402653183 · 402653184 + 402653183, G805306367 (4) = 402653183 · 805306367. Repeating the above process, the coefficient 402653183 will decrease to 2 at base B = 2402653181 · 805306367 + 2402653180 + 2402653179 + · · · + 1 = 2402653181 · 805306368 − 1. Then GB (4) = 2B, and so GB+1 (4) = 2(B + 1) − 1 = (B + 1) + B = 2B + 1,

4.5. Goodstein’s Theorem

117

where 2B + 1 is the maximum value for this sequence. It stays here for a while, GB+2 (4) = (B + 2) + B − 1 = 2B + 1, GB+3 (4) = (B + 3) + B − 2 = 2B + 1, and so on, until G2B+1 (4) = 2B + 1, G2B+2 (4) = 2B + 2 − 1 = 2B + 1. Now our expansion contains only one coefficient, and it is less than the base. It will decrease by 1 after each step. Skipping ahead 2B steps, we have G4B+2 (4) = 1, and so G4B+3 (4) = 0. Thus Gn (4) terminates for n equal to 4B + 3 = 4(2402653181 · 805306368 − 1) + 3 = 2402653184 · 402653184 − 1, reaching a maximum value of 2B +1 = 2402653182 ·805306368−1 along the way. The number of steps for Gn (4) to terminate is approximately 7×10121210694 , an extremely large number. To put this in perspective, physicists today estimate the number of atoms in the universe to be about 1080 . The above example hopefully gives some insight into what is happening with the Goodstein sequences. Even though the bases are increasing, subtracting 1 will chip away at the last coefficient, eventually requiring us to steal something from the preceding term. How did Goodstein prove that every Goodstein sequence terminates? He used the ordinal numbers. Recall that in Section 2.2, we discussed the Cantor normal form: every ordinal may be written uniquely in the form ω β1 c1 + ω β2 c2 + · · · + ω βk ck , where k and c1 , . . . , ck are positive natural numbers, and β1 > β2 > · · · > βk are ordinals. We may write each βi in Cantor normal form, and so on. If the ordinal is less than 0 , then this process will terminate, leaving us with what we will call the hereditary Cantor normal form of an ordinal. Recall also that if α and β are ordinals, then

118

4. Computability and Provability

α < β means α ∈ β. Since the ordinals are well-ordered by ∈, any strictly decreasing sequence of ordinals must be finite in length. Fix m > 1. To each Gn (m) we associate an ordinal as follows. Write Gn (m) in hereditary base n expansion, with the coefficients multiplying powers of the base on the right. We then replace each occurrence of n with ω. For example, let us return to Gn (521). We give the first four elements of the sequence along with their associated ordinals: 2+1

+1

+ 22+1 + 1  ω ω

3+1

+1

+ 33+1  ω ω

4+1

+1

+ 3 · 44 + 3 · 43 + 3 · 42 + 3 · 4 + 3

G2 (521) = 22 G3 (521) = 33 G4 (521) = 44

 ωω 5+1

G5 (521) = 55

+1

ω+1

+1

ω+1

ω+1

+1

+1

+ ω ω+1 + 1,

+ ω ω+1 ,

+ ω ω 3 + ω 3 3 + ω 2 3 + ω3 + 3,

+ 3 · 55 + 3 · 53 + 3 · 52 + 3 · 5 + 2

 ωω

ω+1

+1

+ ω ω 3 + ω 3 3 + ω 2 3 + ω3 + 2.

This association yields ordinals less than 0 written in hereditary Cantor normal form. Furthermore, one can show that these ordinals are strictly decreasing (this is an exercise). Since any strictly decreasing sequence of ordinals is finite, the sequence of ordinals must terminate, and hence the sequence Gn (m) must also terminate. However, the only way in which this can happen is if Gn (m) reaches 0. Thus for any m, Goodstein’s sequence must terminate at 0. The above proof of Goodstein’s theorem used infinite ordinal numbers to prove a result about a finite sequence of finite numbers. Goodstein’s theorem may be formalized in Peano arithmetic. Since the theorem deals with a finite sequence of natural numbers, it seems reasonable to expect that one might be able to find a proof of it in PA. Amazingly, in the 1982 paper [KP] Laurence Kirby and Jeff Paris (born 1944) showed that this is not the case! Theorem 4.16. Goodstein’s theorem is not a theorem of PA. The proof of this is far beyond the scope of this text. Essentially, they showed that Goodstein’s theorem implies that PA is consistent.

Further Reading

119

Furthermore, they proved this entirely within PA. Thus, if Goodstein’s theorem were a theorem of PA, we could apply modus ponens and deduce the consistency of PA as a theorem of PA. This contradicts G¨odel’s second incompleteness theorem, and so Goodstein’s theorem cannot be a theorem of PA. Note that the negation of Goodstein’s theorem is also not a theorem of PA. To see this, we note that since each axiom of PA is a theorem of ZFC, any proof carried out in PA can be translated into a proof of ZFC. Thus if PA could prove the negation of Goodstein’s theorem, then so would ZFC. However, we have a proof of Goodstein’s theorem in ZFC. The Kirby and Paris result on Goodstein’s theorem was one of the first examples of a natural mathematical statement that is independent from PA.21 For m > 0, we define Goodstein’s function G(m) to be the least value of n such that Gn (m) = 0. By Goodstein’s theorem, this function is defined for all m. We have G(1) = 3, G(2) = 5, G(3) = 7, and G(4) = 2402653184 · 402653184 − 1. This function grows very quickly. In a sense, it grows too quickly to be captured by PA. We previously discussed the Ackermann function, which also grows very fast. However, one can show that the Ackermann function can be captured by PA (in the sense that PA can prove that the Ackermann function is defined for all natural numbers, which PA cannot do for G), and so Goodstein’s function grows much faster than the Ackermann function.

Further Reading There are many texts on computability and Turing machines. A classic is Davis’s Computability and Unsolvability [Da1]. Although now 60 years old, it is still highly recommended. Our presentation of Turing machines was influenced by Davis’s text. Hodel’s An Introduction to Mathematical Logic [Ho] is an excellent source for learning more on the material presented in Sections 4.3 and 4.4. Our treatment of these topics has certainly been influenced by Hodel’s text. In fact, Hodel’s text contains chapters on computability (using register machines instead of Turing machines), 21 Paris and Leo Harrington (born 1946) gave a combinatorial example in 1977, a variant of Ramsey’s theorem.

120

4. Computability and Provability

recursive functions, and Hilbert’s tenth problems, making it an excellent source to learn more about the material covered in this text. However, note that these three topics are covered in later sections of the book, and may use the earlier material on first order logic. A concise and well written survey of most of the topics contained in this chapter can be found in What Is Mathematical Logic? [Cr]. Each chapter is written by a different author: Crossley, Ash, Brickhill, Stillwell, and Williams. There are numerous quality texts on mathematical logic. Enderton’s A Mathematical Introduction to Logic [En] and Leary and Kristiansen’s A Friendly Introduction to Mathematical Logic [LK] are both well regarded.

Exercises 4.1. Write a Turing machine that computes the constant function C0 (n) = 0. 4.2. Write a Turing machine that computes the identity function f (m) = m on N. Then write a machine for the identity function on Nn . 4.3. Write a Turing machine that computes the function  1 if n = 0, Z(n) = 0 if n ≥ 1. 4.4. Write a Turing machine that computes f (m, n) = |m − n|. 4.5. Using the assignment of natural numbers to Turing machines described in the chapter, find the smallest natural number that is assigned to a valid Turing machine. Does this machine halt on any given nonempty input? Does it halt when started on an empty tape? 4.6. Show that there is no Turing machine that can determine if a given Turing machine acting on given input m will yield an output that contains the symbol sk (for a fixed k ≥ 1; since all but finitely many symbols on a tape are s0 , every Turing

Exercises

121

machine will leave an s0 on any input). That is, show that a machine V (m, n) that determines if Tn (m) yields an output that contains sk leads to a contradiction. Note that if Tn (m) does not halt, then V (m, n) will answer in the negative (since there is no output, the output does not contain sk ). Model your argument on the solution of the halting problem. Compare this result to the Turing machine, mentioned in the chapter, that determines if a given Turing machine contains an instruction to write the symbol s1 . 4.7. Show that the function P (x, y) = xy is primitive recursive. 4.8. Given a primitive recursive function p(x1 , . . . , xn , y), show that the function z h(x1 , . . . , xn , z) = p(x1 , . . . , xn , k) k=0

is primitive recursive. 4.9. Show that the “less than or equal to” relation on N × N is primitive recursive. 4.10. Use induction to show A(1, n) = 2 + (n − 3) + 3, A(2, n) = 2(n + 3) − 3, and A(3, n) = 2n+3 − 3. Letting .2 ..

EX(n) = 22

 n 2s,

show A(4, n) = EX(n + 3) − 3. 4.11. Show that if A is a decidable set, then so is its complement. Then show that if A and B are decidable sets, then so are A ∪ B and A ∩ B. 4.12. Show that (∀xP ∨ ∀xQ) =⇒ ∀x(P ∨ Q) (where P and Q are formulas that may or may not have x as a free variable) is logically valid. Is the converse logically valid? 4.13. Prove the converse of the compactness theorem.

122

4. Computability and Provability

4.14. Suppose P is true in every model of Γ. Prove that there is a finite subset Γ1 of Γ such that P is true in every model of Γ1 . 4.15. Let P2 be the sentence ∃x1 ∃x2 (¬(x1 = x2 )), let P2 be the sentence ∃x1 ∃x2 ∃x3 (¬(x1 = x2 )∧¬(x1 = x3 )∧¬(x2 = x3 )), and so on. Then if Pn is true in a model, that model must contain at least n elements. Suppose Γ has arbitrarily large finite models. Let Γ1 = Γ ∪ {Pn : n ∈ N, n ≥ 2}. Show that every finite subset of Γ1 has a model. Deduce that Γ must have an infinite model. 4.16. Let Γ be axiomatized, and let Rpr (m, n) be the relation on N that holds if and only if m is the G¨odel number of a formula P of LPA and n is the G¨odel number of a proof of P using Γ. We saw that this is a decidable relation. Let Ppr (x, y) be a formula of LPA that expresses Rpf (m, n). Let Q be an axiom of PA with G¨odel number m. Is Ppr (m, 2m ) true or false in Γ? 4.17. Let Gn (m) be the Goodstein sequence for m. Write out all elements of the sequences Gn (1), Gn (2), and Gn (3). 4.18. Let α = ω γ1 a1 + ω γ2 a2 + · · · + ω γk ak and β = ω δ1 b1 + ω δ2 b2 + · · · + ω δ b

(with k and positive natural numbers, ai , bi ∈ N, and γi , δi ordinals with γ1 > γ2 > · · · > γk and δ1 > δ2 > · · · > δ ) be two ordinals in Cantor normal form, both less than 0 . Describe the conditions on k, , γi , and δi that are equivalent to α < β. Use this to show that the ordinals associated to the elements of a Goodstein sequence are strictly decreasing.

Chapter 5

Hilbert’s Tenth Problem

5.1. Diophantine Sets and Functions In the tenth of his previously mentioned list of twenty-three problems, Hilbert asked for an algorithm to determine if an arbitrary polynomial equation with integral coefficients and any number of variables (called a Diophantine equation) has integer solutions. Here is his wording, translated to English: Given a Diophantine equation with any number of unknown quantities and with integral numerical coefficients: to devise a process according to which it can be determined by a finite number of operations whether the equation is solvable in integers. In this chapter, we will show that no such algorithm exists. Many of these results were given by Martin Davis, Julia Robinson, and Hilary Putnam in the 1950s and 1960s. The final missing piece was given in 1970 by Yuri Matiyasevi˘c. In order to increase readability and ease of understanding, we do not present the solution to Hilbert’s tenth problem in the order of discovery. Instead, we will comment on the history of the solution to the problem at the end of the chapter. In what follows, we will discuss algorithms for determining if a Diophantine equation has natural number solutions. The problem 123

124

5. Hilbert’s Tenth Problem

˘ Martin Davis, Julia Robinson, and Yuri Matiyasevic (Photograph taken by Louise Guy in Calgary, 1982. Courtesy Richard Guy.)

is equivalent to that for integer solutions. In particular, to test the equation P (x1 , . . . , xn ) = 0 for natural number solutions (x1 , . . . , xn ), we may use the fact from Theorem 3.15 that every natural number can be written as the sum of four squares and test the equation P (p21 + q12 + r12 + s21 , . . . , p2n + qn2 + rn2 + s2n ) = 0 for integer solutions (p1 , q1 , r1 , s1 , . . . , pn , qn , rn , sn ). Conversely, to test the equation P (z1 , . . . , zn ) = 0 for integer solutions (z1 , . . . , zn ), we may test the equation P (x1 − y1 , . . . , xn − yn ) for natural number solutions (x1 , y1 , . . . , xn , yn ). When working with Diophantine equations, we typically have an equation in mind and would like to determine its solutions. Here, we turn the problem on its head: we start with a set of “solutions”, and would like to find a corresponding Diophantine equation. We say a set S of ordered n-tuples of natural numbers is Diophantine if there is a natural number m and a polynomial P (x1 , . . . , xn , y1 , . . . , ym ) with integer coefficients such that (x1 , . . . , xn ) is in S if and only if there exist natural numbers y1 , . . . , ym for which P (x1 , . . . , xn , y1 , . . . , ym ) = 0. That is, (x1 , . . . , xn ) ∈ S ⇐⇒ (∃y1 , . . . , ym )(P (x1 , . . . , xn , y1 , . . . , ym ) = 0). Note that P may, and in all but trivial cases will, have negative coefficients, but the xi and yi are natural numbers.

5.1. Diophantine Sets and Functions

125

We give some examples of Diophantine sets. The set of natural numbers is trivially Diophantine, as x ∈ N ⇐⇒ (∃y)(x − y = 0). Any finite set is Diophantine, as x ∈ {s1 , . . . , sn } ⇐⇒ (x − s1 ) · · · (x − sn ) = 0. The set of composite numbers is Diophantine, since x is composite if and only if there exist y and z with x = (y + 2)(z + 2). Thus we may take P (x, y, z) = x − (y + 2)(z + 2). The set of numbers that are not powers of 2 is Diophantine. This is because a number is not a power of 2 if and only if it is divisible by an odd number greater than 1. That is, x is not a power of 2 if and only if there exist y and z with x = y(2z + 3), and hence we may take P (x, y, z) = x − y(2z + 3). Since relations are sets, they too may be Diophantine. For example, the ≤ relation is Diophantine since x ≤ y if and only if there exists z such that x + z = y. The divisibility relation is Diophantine since x | y if and only if there exists z such that xz = y. What about the “congruence modulo 5” relation?1 We know x ≡ y (mod 5) if and only if 5 | (x−y). However, note that x−y is not necessarily a natural number, as it could be negative. We can break into two cases: x ≡ y (mod 5) if and only if there exists a natural number z with x − y = 5z or y − x = 5z. That is, with x − y − 5z = 0 or y − x − 5z = 0. We can combine this into a single equation with multiplication, since the product of two numbers is 0 if and only if at least one of the numbers is 0. Thus x ≡ y (mod 5) if and only if there exists z such that (x − y − 5z)(y − x − 5z) = 0. We now show that the set of numbers that are both composite and not a power of 2 is Diophantine. By our work above, x is composite if and only if there exist y1 and z1 such that x − (y1 + 2)(z1 + 2) = 0. Similarly, x is not a power of 2 if and only if there exist y2 and z2 such that x − y2 (2z2 + 3) = 0. These two equations may be combined 1

There is nothing special about 5 here; any other moduli may be used.

126

5. Hilbert’s Tenth Problem

into a single equation by using the fact that the sum of the squares of two numbers is 0 if and only if both numbers are 0. Thus x is both composite and not a power of 2 if and only if there exist y1 , y2 , z1 , z2 with (x − (y1 + 2)(z1 + 2))2 + (x − y2 (2z2 + 3))2 = 0. As seen in the last two examples, given expressions that yield Diophantine sets, we may combine them using the logical connectives “and” (conjunction) and “or” (disjunction) to obtain another Diophantine set. Since both 5 | (x − y) and 5 | (y − x) may be given Diophantine definitions, so can their disjunction. Since we may give Diophantine definitions for the composite numbers and the numbers that are not powers of 2, we may also do so for their conjunction. This is because (∃y1 , . . . , ym )(P1 = 0) and (∃z1 , . . . , zn )(P2 = 0) ⇐⇒ (∃y1 , . . . , ym , z1 , . . . , zn )(P12 + P22 = 0) and (∃y1 , . . . , ym )(P1 = 0) or (∃z1 , . . . , zn )(P2 = 0) ⇐⇒ (∃y1 , . . . , ym , z1 , . . . , zn )(P1 P2 = 0). There is another logical symbol that may be freely used: the existential quantifier ∃. For example, the set S of ordered pairs (x, y) with y 2 | x is Diophantine because (x, y) ∈ S ⇐⇒ (∃z)(y 2 z − x = 0). Since the expression y 2| x yields a Diophantine set, so does (∃y)(y 2| x). To see this, let T = {x : ∃y(y 2 | x)}. We then have x ∈ T ⇐⇒ (∃y, z)(y 2 z − x = 0). The composite numbers and numbers that are not powers of 2 are Diophantine. What about the prime numbers or the powers of 2? Are these sets Diophantine? It turns out that they are but the proof is not easy, as we shall soon see.

5.1. Diophantine Sets and Functions

127

Hilary Putnam found the following surprising characterization of Diophantine sets of natural numbers. Theorem 5.1. A set S of natural numbers is Diophantine if and only if there is a polynomial P such that S is equal to the set of natural numbers in the range of P . That is, if and only if S is the nonnegative range of P . Proof. First let S be the natural numbers in the range of a polynomial P (x1 , . . . , xm ). Then x ∈ S if and only if ∃x1 , . . . , xm such that x = P (x1 , . . . , xm ). That is, if and only if P (x1 , . . . , xm ) − x = 0, so that S is Diophantine. Conversely, let S be Diophantine, so that x ∈ S ⇐⇒ (∃y1 , . . . , ym )(Q(x, y1 , . . . , ym ) = 0) for some polynomial Q. Let P (x, y1 , . . . , ym ) = (x + 1)(1 − Q2 (x, y1 , . . . , ym )) − 1. We show that S is equal to the nonnegative range of P . If x ∈ S, choose y1 , . . . , ym such that Q(x, y1 , . . . , ym ) = 0. Then P (x, y1 , . . . , ym ) = x and so x is in the range of P . On the other hand, if z = P (x, y1 , . . . , ym ) with z ≥ 0, then z + 1 = (x + 1)(1 − Q2 (x, x1 , . . . , xm )). Since z + 1 ≥ 1 and x + 1 ≥ 1, Q(x, x1 , . . . , xm ) must vanish. This implies z = x and x ∈ S.  One nice aspect of the above result is that it is constructive. If we know the polynomial in the Diophantine definition of a set, then we can construct the nonnegative range polynomial. Take the set of composite numbers. We saw that x is composite if and only if there exist y and z with x − (y + 2)(z + 2) = 0. Taking the left-hand side of this equation as our Q, we see that the set of composite numbers is the nonnegative range of  2 − 1. (x + 1) 1 − x − (y + 2)(z + 2)

128

5. Hilbert’s Tenth Problem

When one stares at this equation long enough, it becomes clear why this is, although the clarity is lost if we are given the equation in expanded form: −xy 2 z 2 − y 2 z 2 + 2x2 yz − 4xy 2 z − 4xyz 2 − x3 + 4x2 y + 4x2 z −4xy 2 − 4y 2 z − 4xz 2 − 4yz 2 − 14xyz + 7x2 − 4y 2 − 4z 2 −12xy − 12xz − 16yz − 7x − 16y − 16z − 16. It is not at all obvious that the set of nonnegative values taken on by the above polynomial is equal to the set of composite numbers!2 The consequences of this result are even more surprising once we show that the prime numbers are Diophantine and that the powers of 2 are Diophantine. It is then possible to give a polynomial for which the nonnegative range is precisely the set of prime numbers and a polynomial for which the nonnegative range is precisely the powers of 2! A function f mapping from Nn to N is called Diophantine if the set {(x1 , . . . , xn , y) : y = f (x1 , . . . , xn )} is a Diophantine set. That is, f is Diophantine if its graph is Diophantine. One of our goals will be to determine which functions are Diophantine. In Chapter 1 we discussed Cantor’s pairing function, which is a bijection P from N × N to N with formula (x + y)(x + y + 1) + x. 2 and write F (z) = (L(z), R(z)) so that P (x, y) =

We let F = P −1

P (L(z), R(z)) = z,

L(P (x, y)) = x,

and R(P (x, y)) = y.

Then P (x, y), L(z), and R(z) are Diophantine functions since z = P (x, y) ⇐⇒ 2z = (x + y)(x + y + 1) + 2x, x = L(z) ⇐⇒ (∃y)(2z = (x + y)(x + y + 1) + 2x), and y = R(z) ⇐⇒ (∃x)(2z = (x + y)(x + y + 1) + 2x). 2 Note that this polynomial may take on all sorts of negative values, including negative prime numbers. However, the set of all nonnegative numbers in its range is precisely the set of composite numbers.

5.1. Diophantine Sets and Functions

129

We also note that L(z) ≤ z and R(z) ≤ z. In Chapter 1, we gave the chart below. If the row number is taken to be x and the column number to be y, then the body gives P (x, y). We can now use this chart to find L(z) and R(z). We find z in the body of the chart. Then L(z) is the row number for this entry, and R(z) is the column number. For example, since 22 is in the row for 1 and the column for 5, we have L(22) = 1 and R(22) = 5. R(z) 2 3

4

5

0 1 3 6 2 4 7 11 5 8 12 17 9 13 18 24 14 19 25 32 20 26 33 41

10 16 23 31 40 50

15 22 30 39 49 60

0

L(z)

0 1 2 3 4 5

1

In Chapter 1, we saw that there are countably many finite sequences of elements from a countable set. We now give a Diophantine function β(u, i) that explicitly enumerates all finite sequences of natural numbers. This function is due to G¨odel, and it makes clever use of the Chinese remainder theorem (Theorem 3.12) in its construction. Theorem 5.2. For u, i ∈ N, we define β(u, i) to be the remainder when L(u) is divided by 1 + (1 + i)R(u). Then for any finite sequence of natural numbers a0 , . . . , aN , there exists a natural number u such that β(u, i) = ai for i = 0, . . . , N . Also, β(u, i) ≤ u. Proof. We will make use of the Chinese remainder theorem. The first step is to give a set of N + 1 relatively prime numbers that we will use as our moduli. Let y = N ! max{ai }. Then y is divisible by 1, 2, . . . , N, and y ≥ ai for each i. The former implies that 1 + y, 1 + 2y, . . . , 1 + (N + 1)y are all relatively prime. To see this, suppose a prime p divides 1 + iy and 1 + jy for 1 ≤ i < j ≤ N + 1. Then p will divide their difference, which is (j − i)y. Note that j − i ≤ N . If p does not divide y, then it divides j − i, and hence it is at most N . However, y is divisible by

130

5. Hilbert’s Tenth Problem

each natural number up to N , and hence p | y. Since p also divides 1 + iy, it must divide 1, a contradiction since p is prime. We now use the Chinese remainder theorem, which yields a number x with x ≡ a0

(mod 1 + y)

x ≡ a1

(mod 1 + 2y)

.. . x ≡ aN

(mod 1 + (N + 1)y).

We may always take x to be a natural number, since if it were negative, we could then add to it multiples of the product of the moduli to obtain another solution. Let u = P (x, y), so that L(u) = x and R(u) = y. Then for each i = 0, . . . , N we have L(u) ≡ ai

(mod 1 + (i + 1)R(u)).

Since each ai ≤ y = R(u) < 1 + (i + 1)R(u), it follows that ai is the remainder when L(u) is divided by 1 + (i + 1)R(u). This is our definition of β(u, i), and hence β(u, i) = ai for i = 0, . . . , N . We also note that β(u, i) ≤ L(u) ≤ u.  It remains to show that β(u, i) is Diophantine. Theorem 5.3. The function β(u, i) of Theorem 5.2 is Diophantine. Proof. We claim that z = β(u, i) holds if and only if the following three equations have a solution: 2u = (x + y)(x + y + 1) + 2x, x = z + q (1 + (i + 1)y) , z + v + 1 = 1 + (i + 1)y. The first equation is equivalent to L(u) = x and R(u) = y. The second equation is equivalent to x ≡ z (mod 1 + (i + 1)y), and the third to z < 1 + (i + 1)y. Together, these hold if and only if z is equal to the remainder when L(u) is divided by 1 + (i + 1)R(u). Thus

5.2. The Brahmagupta–Pell Equation Revisited

131

z = β(u, i) if and only if there exist natural numbers q, v, x, y with ((x + y)(x + y + 1) + 2z − 2u)2 + (z + q(1 + (i + 1)y) − x)2 2

+ (z + v − (i + 1)y) = 0. Hence β(u, i) is Diophantine.



5.2. The Brahmagupta–Pell Equation Revisited Our goal in the next section, Section 5.3, will be to show that the exponential function h(b, n) = (b + 1)n is Diophantine. At first it may seem surprising that a set exhibiting exponential growth may be given a Diophantine definition. However, we have previously seen a particular Diophantine equation whose solutions grow exponentially: the Brahmagupta–Pell equation, x2 − dy 2 = 1, of Section 3.4. Thus we revisit the equation again here. However, we will now take d = a2 − 1 for a natural number a greater than 1. Then (a, 1) is easily seen to be a solution. Furthermore, since it has the smallest possible y-value greater than that of the trivial solution (1, 0), it is the generator. We restate some of the results of Section 3.4 in this special case. Theorem 5.4. All solutions (xk , yk ) of x2 − dy 2 = 1 with d = a2 − 1 are given by

√ √ xk + yk d = (a + d)k .

When discussing the solutions of multiple equations, we may write xk = xk (a) and yk = yk (a) to distinguish between solutions from different equations. These solutions satisfy the following recursive equations: (5.1)

xk± = xk x ± dyk y ,

(5.2)

yk± = x yk ± xk y ,

(5.3)

xk+1 = 2axk − xk−1 ,

(5.4)

yk+1 = 2ayk − yk−1 .

132

5. Hilbert’s Tenth Problem

The xk and yk are increasing and satisfy (5.5)

ak ≤ xk ≤ (2a)k and k ≤ yk < (2a)k .

We have gcd(xk , yk ) = 1 and yk | y if and only if k | .

(5.6)

Proof. The theorem follows immediately upon letting d = a2 −1 and (x1 , y1 ) = (a, 1) in Theorems 3.18, 3.19, 3.20, and 3.23, and Lemmas 3.21 and 3.22.  In the remainder of this section, we derive some new results on the solutions xk and yk . It may not be clear why some of these results are interesting or important, but they will be useful when we show that the yk are Diophantine in the next section. To begin, we show some divisibility results. Lemma 5.5. We have yk2 | ykyk . Furthermore, if yk2 | ym , then yk | m. Proof. Since

√ √ xk + yk d = (a + d)k

√ = (xk + yk d)

   −i i i/2 = x y d , i k k i=0

we have yk =

   −i i (i−1)/2 . x y d i k k i=0

i odd

Reducing modulo yk3 leaves only the term when i = 1, and hence (5.7)

yk ≡ xk −1 yk

(mod yk3 ).

Letting = yk yields yk2 | ykyk . To show the second part of the lemma, suppose yk2 | ym . Then (5.6) of Theorem 5.4 implies k | m. Writing m = k , (5.7) yields ym ≡ xk −1 yk

(mod yk3 ),

5.2. The Brahmagupta–Pell Equation Revisited

133

−1 and hence yk2 | x −1 k yk . This implies yk | xk . Since gcd(xk , yk ) = 1, we have yk | , and hence yk | m. 

Our next few results are obtained from the recursive formulas (5.3) and (5.4) of Theorem 5.4. To begin, we show one more bound on yk . Lemma 5.6. We have yk ≥ (2a − 1)k−1 for k ≥ 1. Proof. Since y1 = 1 and y2 = 2a > 2a − 1, the result holds for k = 1, 2. By induction along with (5.4) of Theorem 5.4 and the fact that yk is increasing, we have yk+1 = 2ayk − yk−1 > 2ayk − yk = (2a − 1)yk ≥ (2a − 1)k , 

as required.

We now give several congruence results on the solutions to the Brahmagupta–Pell equation. Lemma 5.7. We have yk ≡ k (mod a − 1). Proof. Since yk = k for k = 0, 1, the congruence holds in these cases. By induction and (5.4) of Theorem 5.4, we have yk+1 = 2ayk − yk−1 ≡ 2k − (k − 1)

(mod a − 1)

≡ k + 1 (mod a − 1). We used the fact that a ≡ 1 (mod a − 1).



Lemma 5.8. We have xk ≡ pk + yk (a − p) (mod 2ap − p2 − 1), with the right-hand side of the congruence less than or equal to the left-hand side when 0 < pk < a.

134

5. Hilbert’s Tenth Problem

Proof. For k = 0, 1, we have equality, and so the congruence holds. By induction with (5.3) and (5.4) of Theorem 5.4, we have xk+1 − yk+1 (a − p) = 2axk − xk−1 − (2ayk − yk−1 )(a − p) = 2a(xk − yk (a − p)) − (xk−1 − yk−1 (a − p)) ≡ 2apk − pk−1

(mod 2ap − p2 − 1)

≡ pk−1 (2ap − 1) (mod 2ap − p2 − 1) ≡ pk+1

(mod 2ap − p2 − 1).

To show the inequality, we first show that (a − 1)yk < xk .

(5.8)

This is true for k = 0. For k ≥ 1, since x2k − (a2 − 1)yk2 = 1, we have x2k − 1 = a2 − 1. yk2 Thus xk > yk

 x2k − 1  2 = a − 1 ≥ a − 1, yk

and so (5.8) holds. Now suppose 0 < pk < a. If p = 1, then (5.8) yields 1 + yk (a − 1) < 1 + xk , and so 1 + yk (a − 1) ≤ xk , as required. We consider p ≥ 2. Equality holds for k = 0, 1. For k ≥ 2, we have yk ≥ y2 = 2a > a > pk . This, along with p ≥ 2 and (5.8), yields pk + yk (a − p) < (1 + a − p)yk ≤ (a − 1)yk < xk . 

This completes the proof. Lemma 5.9. If a ≡ b (mod c), then xk (a) ≡ xk (b) (mod c) and yk (a) ≡ yk (b) for all k.

(mod c)

5.2. The Brahmagupta–Pell Equation Revisited

135

Proof. Note that x0 (a) = x0 (b) = 1, y0 (a) = y0 (b) = 0, and y1 (a) = y1 (b) = 1. Since x1 (a) = a and x1 (b) = b, the result holds for k = 0 and 1. By induction with (5.3) and (5.4) of Theorem 5.4, we have xk+1 (a) = 2axk (a) − xk−1 (a) ≡ 2bxk (b) − xk−1 (b)

(mod c)

≡ xk+1 (b) (mod c) and yk+1 (a) = 2ayk (a) − yk−1 (a) ≡ 2byk (b) − yk−1 (b) (mod c) ≡ yk+1 (b)

(mod c), 

completing the proof.

Next we deduce some periodicity properties of the sequence xk . Lemma 5.10. We have x2n±j ≡ −xj

(mod xn )

and x4n±j ≡ xj

(mod xn ).

Proof. By (5.1) and (5.2) of Theorem 5.4, we have x2n±j = xn xn±j + dyn yn±j = xn xn±j + dyn (xj yn ± xn yj ) = xn xn±j ± dxn yn yj + xj (x2n − 1) ≡ −xj

(mod xn ).

Using this, we have x4n±j = x2n+(2n±j) ≡ −x2n±j ≡ xj

(mod xn )

(mod xn ).



In our final result of this section, we examine the situation when xi ≡ xj (mod xn ) and see what information this can give us on i and j.

136

5. Hilbert’s Tenth Problem

Lemma 5.11. If xi ≡ xj (mod xn ) for 0 < i ≤ n, then j ≡ ±i (mod 4n). Proof. First, suppose xi ≡ xj (mod xn ) for i ≤ j ≤ 2n and n > 0. We show that i = j except in the cases a = 2, n = 1, i = 0, and j = 2. We begin with the case when xn is odd. Set q = (xn − 1)/2. Then −q, . . . , q are 2q + 1 = xn consecutive integers, and hence are all distinct modulo xn . By (5.3) of Theorem 5.4, for n ≥ 2 we have xn − axn−1 = axn−1 − xn−2 > xn−1 − xn−2 > 0, the last step holding since xk is increasing. Hence xn−1
0 and 4n − r > 0. Thus we have either i = r or i = 4n − r ≡ −r (mod 4n), and hence j = 4nq + r ≡ r ≡ ±i

(mod 4n),

which completes the proof.



5.3. The Exponential Function Is Diophantine In this section we will show that the function h(b, n) = (b + 1)n is Diophantine. Before we can do this, we first show that y = yk+1 (a) can be given a Diophantine definition. Given y and a ≥ 2, it is easy to give a Diophantine definition for y being the second component of some solution to the Brahmagupta–Pell equation, since this holds if and only if there exists x with x2 − (a2 − 1)y 2 = 1. However, given y, a ≥ 2, and k, it is much more difficult to give a Diophantine

138

5. Hilbert’s Tenth Problem

definition of y being the second component of the (k + 1)-th solution to the Brahmagupta–Pell equation. This is what we will do now. Theorem 5.12. Given a, k, and y with a ≥ 2, the system P1. x2 − (a2 − 1)y 2 = 1, P2. u2 − (a2 − 1)v 2 = 1, P3. s2 − (b2 − 1)t2 = 1, P4. v = 4ry 2 , P5. b = a + u2 (u2 − a), P6. s = x + cu, P7. t = k + 1 + 4dy, P8. y = k + e + 1, has a solution in the remaining variables if and only if y = yk+1 (a). Proof. We begin with the forward direction. Suppose equations P1 to P8 have a solution. If b = 0, then P3 implies s = 0 or t = 0. If s = 0, then P6 implies x = 0, which is impossible by P1. The case t = 0 is impossible by P7. If b = 1, then P3 implies s = 1, and so P6 implies x = 0 or x = 1. By P1 we cannot have x = 0, and so x = 1, which implies y = 0. However, this contradicts P8. Thus b ≥ 2. By P1, P2, and P3, we have x = xi (a), y = yi (a), u = xn (a), v = yn (a), s = xj (b), and t = yj (b) for some i, j, and n. Since x ≥ 2, we must have i ≥ 1. By P4, y ≤ v, and so i ≤ n. If u = 1, then P5 implies b = 1, a contradiction. Thus xn (a) = u ≥ 2. Equation P6 implies xj (b) ≡ xi (a) (mod xn (a)). By P5, b ≡ a (mod xn (a)). Thus Lemma 5.9 implies xj (a) ≡ xj (b) (mod xn (a)), and hence xi (a) ≡ xj (a) (mod xn (a)).

5.3. The Exponential Function Is Diophantine

139

We have now met the conditions to apply Lemma 5.11, which yields j ≡ ±i (mod 4n). By P4, yi (a)2 | yn (a). By Lemma 5.5, this yields yi (a) | n. Hence (5.9)

j ≡ ±i

(mod 4yi (a)).

By P4, v ≡ 0 (mod 4y), and so P2 implies u2 ≡ 1 (mod 4y). By P5, we then have b ≡ 1 (mod 4yi (a)), and so 4yi (a) | (b − 1). Since Lemma 5.7 yields (b − 1) | (yj (b) − j), we have 4yi (a) | (yj (b) − j), and hence (5.10)

yj (b) ≡ j

(mod 4yi (a)).

By P7, we have yj (b) ≡ k + 1 (mod 4yi (a)). This with (5.9) and (5.10) yields k + 1 ≡ ±i

(mod 4yi (a)).

Now P8 implies k + 1 ≤ yi (a), and (5.5) of Theorem 5.4 implies i ≤ yi (a). Thus k + 1 = i, and so y = yk+1 (a), as required. We now show the reverse direction. Suppose y = yk+1 (a). Set x = xk+1 (a) to satisfy P1. Let m = 4(k + 1)yk+1 (a), and set u = xm (a), v = ym (a) to satisfy P2. By (5.2) of Theorem 5.4, y2(k+1)y = y(k+1)y+(k+1)y = 2x(k+1)y y(k+1)y , and so ym = y4(k+1)y = y2(k+1)y+2(k+1)y = 2x2(k+1)y y2(k+1)y = 4x(k+1)y x2(k+1)y y(k+1)y . 2 2 By Lemma 5.5, yk+1 | y(k+1)y , and so 4yk+1 | ym . That is, 4y 2 | v, and so we may choose r to satisfy P4. Set

b = a + u2 (u2 − a). We need to be sure that b ≥ 0 in order for P5 to be satisfied, and we will in fact eventually require b ≥ 2. Since y = yk+1 (a) ≥ 1, we have

140

5. Hilbert’s Tenth Problem

m = 4(k + 1)yk+1 (a) ≥ 4 and hence u = xm (a) > 1 and v = ym (a) > 1. By P2, u2 − 1 = (a2 − 1)v 2 > a2 − 1, and so a ≤ a2 < u2 < u2 + 1. Multiplying by u2 − 1 yields a(u2 − 1) < u4 − 1, and so 1 < a + u4 − au2 = a + u2 (u2 − a) = b. Therefore b ≥ 2, and so P5 is satisfied. We now set s = xk+1 (b) and t = yk+1 (b) to satisfy P3. By (5.5), yk+1 (a) ≥ k + 1, and so we can choose e to satisfy P8. As seen above, u2 > a, and hence u4 > au2 , which implies u2 (u2 − a) > 0. Thus b = a + u2 (u2 − a) > a. This implies s = xk+1 (b) > xk+1 (a) = x. By P5, a ≡ b (mod xm (a)). Thus Lemma 5.9 implies xk+1 (a) ≡ xk+1 (b) (mod xm (a)). That is, x ≡ s (mod u). This and the fact that x < s allows us to choose c to satisfy P6. By (5.5) of Theorem 5.4, k + 1 ≤ yk+1 (b) = t. By Lemma 5.7, t = yk+1 (b) ≡ k + 1 (mod b − 1), and so (b − 1) | (k + 1 − t). By P4, v ≡ 0 (mod 4y). Then by P2, we have u2 ≡ 1 (mod 4y). This with P5 implies b ≡ 1 (mod 4y), and hence 4y | (b − 1). We then have 4y | (k + 1 − t) and so t ≡ k + 1 (mod 4y). This and the fact that k + 1 ≤ t allows us to choose d to satisfy P7.  We can eliminate some of the equations and variables in P1 to P8. Using equations P4 to P7, we eliminate v, b, s, and t from the remaining equations, which yields the following theorem. Theorem 5.13. Given a, k, and y with a ≥ 2, the system B1. x2 − (a2 − 1)y 2 = 1, B2. u2 − 16(a2 − 1)r 2 y 4 = 1,

5.3. The Exponential Function Is Diophantine

141

B3. (x + cu)2 − ((a + u2 (u2 − a))2 − 1)(k + 1 + 4dy)2 = 1, B4. y = k + e + 1 has a solution in the remaining variables if and only if y = yk+1 (a). We are almost ready to prove that the exponential function is Diophantine. We require one last lemma before we do so. Lemma 5.14. For e ≥ 2, if e3 (e + 2)(a + 1)2 + 1 is a perfect square, then e − 1 + ee−2 ≤ a. Also, given positive integers e and t, we can satisfy e3 (e + 2)(a + 1)2 + 1 = 2 with a value of a satisfying t | (a + 1). Proof. To show the first part, write m = e + 1. We then have (m − 1)3 (m + 1)(a + 1)2 + 1 = n2 for some n. Rearranging yields  2 n2 − (m2 − 1) (m − 1)(a + 1) = 1, a Brahmagupta–Pell equation. Since m ≥ 3, we have (m − 1)(a + 1) = yk (m) for some k. Since (m − 1)(a + 1) ≥ 2, we have k = 0. By Lemma 5.7, (m − 1) | (yk (a) − k). Hence (m − 1) | k. Since k = 0, we have m − 1 ≤ k. Now for m ≥ 4, we have m − 2 < m − 1 ≤ (m − 1)m−3 . Thus (m − 2)(m − 1) ≤ (m − 1)m−2 , this inequality holding for m = 3 as well. Hence, (m − 2)(m − 1) + (m − 1)m−2 ≤ 2(m − 1)m−2 ≤ 2m−2 (m − 1)m−2 = (2m − 2)m−2 < (2m − 1)m−2 ≤ ym−1 (m) ≤ yk (m)

(by Lemma 5.6) (since m − 1 ≤ k)

= (m − 1)(a + 1).

142

5. Hilbert’s Tenth Problem

Dividing by m−1 and replacing m with e+1 yields e−1+ee−2 < a+1, and hence e − 1 + ee−2 ≤ a. We now show the second part of the lemma. Since (m2 − 1)(m − 1)2 t2 is not a perfect square when m > 1, the Brahmagupta–Pell equation   x2 − (m2 − 1)(m − 1)2 t2 y 2 = 1 has a nontrivial solution with y ≥ 1. Then (m − 1)3 (m + 1)(ty)2 + 1 = x2 . Since t ≥ 1 and y ≥ 1, we have ty ≥ 1. Taking m = e + 1, a + 1 = ty, and = x yields e3 (e + 2)(a + 1)2 + 1 = 2 with t | (a + 1).



We may now give a Diophantine definition of the exponential function. Theorem 5.15. Given numbers f , x, and n with x ≥ 1, the system E1. v 2 − (a2 − 1)w2 = 1, E2. u2 − 16(a2 − 1)r 2 w4 = 1, E3. (v + cu)2 − ((a + u2 (u2 − a))2 − 1)(n + 1 + 4dw)2 = 1, E4. w = n + p + 1, E5. e3 (e + 2)(a + 1)2 + 1 = 2 , E6. e = x + n + f + 2, E7. v = f + w(a − x) + i(2ax − x2 − 1) has a solution in the remaining variables if and only if f = xn+1 . Proof. We show the forward direction first. Suppose equations E1 to E7 are satisfied. Equation E6 implies e ≥ 2, and so Lemma 5.14 with E5 implies e − 1 + ee−2 ≤ a. With E6, this implies x + n + f + 1 + (x + n + f + 2)x+n+f ≤ a.

5.3. The Exponential Function Is Diophantine

143

Hence, we have f < a and xn+1 < a. It also implies that a ≥ 2. Since 1 ≤ x < a, we have x2 < ax = 2ax − ax ≤ 2ax − a. Thus x2 ≤ 2ax − a − 1, and so a ≤ 2ax − x2 − 1. From this it follows that f < 2ax − x2 − 1 and xn+1 < 2ax − x2 − 1. By equations B1 to B4 of Theorem 5.13, equations E1 to E4 imply v = xn+1 (a) and w = yn+1 (a). By Lemma 5.8, it follows that v ≡ xn+1 + w(a − x) (mod 2ax − x2 − 1). Equation E7 yields v ≡ f + w(a − x) (mod 2ax − x2 − 1). Hence f ≡ xn+1 (mod 2ax − x2 − 1). The inequalities given above then imply f = xn+1 , as required. We now show the reverse direction. Suppose f = xn+1 for x ≥ 1. Set e = x + n + f + 2 to satisfy E6. Lemma 5.14 implies that we can find a and to satisfy E5 with a ≥ 2, since we can have 3 | (a + 1). Set w = yn+1 (a). Then Theorem 5.13 implies that we may find c, d, p, r, u, and v satisfying E1 to E4, and that v = xn+1 (a). Lemma 5.8 then implies v ≡ f + w(a − x) (mod 2ax − x2 − 1) with the right-hand side less than or equal to the left-hand side. Thus we may choose i to satisfy E7.  Theorem 5.16. The function h(b, n) = (b + 1)n is Diophantine. Proof. We would like to use Theorem 5.15, but we would like to allow the exponent to be equal to 0. A Diophantine definition can be given for g = xn with x ≥ 1 by appending an additional equation to those of Theorem 5.15: E8. xg = f. Thus h(b, n) = (b + 1)n can be shown to be Diophantine by replacing each x with b + 1 in E1 to E8, moving all terms to one side in each equation, and then summing their squares. 

144

5. Hilbert’s Tenth Problem

5.4. More Diophantine Functions We previously asked if the powers of 2 form a Diophantine set. Given the results of the previous section, we now see that the answer to that question is yes. What about the prime numbers? To answer this question, we require Diophantine definitions for a few additional functions, including the binomial coefficients and the factorial function. We give a Diophantine definition of the binomial coefficients. The basic idea is to use the binomial theorem on (u+1)a and to take u large enough so that the coefficients of the powers of u in the expansion are the digits of the base u representation of (u + 1)a . Theorem 5.17. Given numbers a, b, and c with b ≤ a, the system C1. u > 2a , C2. (u + 1)a = xub+1 + cub + y, C3. c < u, C4. y < ub has a solution in the remaining variables if and only if c = a the function f (a, b) = b is Diophantine.

a b . Thus

Proof. We show the forward direction. Suppose equations C1 to C4 are satisfied. Then for 0 ≤ b ≤ a, C1 implies    a   a a = (1 + 1)a = 2a < u. ≤ i b i=0 Since

a    a i (u + 1) = u i i=0   and b ≤ a, the above inequality implies that ab is the bth digit in the base u representation of (u + 1)a . However, C2 with the inequalities in C3 and C4 imply that  c is the bth digit in the base u representation of (u + 1)a . Thus c = ab , as required.   We now show the converse. Suppose that c = ab with b≤ a. We can choose any u > 2a to satisfy C1. Then, as above, c = ab is the bth digit in the base u representation of (u + 1)a . Thus c < u, a

5.4. More Diophantine Functions

145

satisfying C3, and we may find numbers x and y to satisfy C2 and C4. Since the exponential function and the less than  relation are Diophantine, it follows that the function f (a, b) = ab is Diophantine.  We now give a Diophantine definition of the factorial function. Theorem 5.18. Given numbers n and b with n, b ≥ 1, the system F1. v = 2b, F2. a = v b ,   F3. c = ab , F4. f = ab , F5. nc ≤ f , F6. f < (n + 1)c has a solution in the remaining variables if and only if n = b!. Thus the function g(b) = b! is Diophantine. Proof. We claim that for a = (2b)b , ab b! ≤ a < b! + 1. b

The result holds for b = 1, with equality in the first inequality. We assume b ≥ 2. Then ab a = b

ab b! a(a − 1)(a − 2) · · · (a − (b − 1))

b!    = 1 2 1 − a 1 − a ··· 1 − On one hand,



1 1− a

b−1 a

.

    2 b−1 1− ··· 1 − < 1, a a

and so ab a > b!. b

146

5. Hilbert’s Tenth Problem

On the other hand, 1     1 − a1 1 − a2 · · · 1 −

b−1 a

1 <  b−1 1 − ab  b−1  2 b b = 1+ + + ··· a a   b−1  2 1 1 b 1+ + ≤ 1+ + ··· a 2 2  b−1 2b = 1+ a  b−1  b − 1  2b j = j a j=0   j−1 b−1  2b 2b  b − 1 =1+ j a j=1 a  b−1  2b  b − 1 1 is prime if and only if (n − 1)! ≡ −1 (mod n). That is, n > 1 is prime if and only if there exist m, f , and k with m + 1 = n, f = m!, and f + 1 = kp. Since we have a Diophantine definition for the factorial function, this implies that the set of prime numbers is Diophantine. Putnam’s result then implies the existence of a polynomial whose nonnegative range is precisely the set of prime numbers! In fact, we will work to explicitly write down such a polynomial in the next chapter. We will require one more Diophantine definition for a certain product function, namely y

(a + bk).

k=1

Note that when setting a = 0 and b = 1, this product is equal to y!. Thus this function is a generalization of the factorial function. Theorem 5.19. Given a, b, y, and z with y, b ≥ 1, the system M1. r = a + by, M2. s = r y , M3. M = bs + 1,

148

5. Hilbert’s Tenth Problem M4. bq = a + M t, M5. u = by , M6. v = y!, M7. z < M , M8. w = q + y,   M9. x = wy ,

M10. z + M p = uvx has a solution in the remaining variables if and only if z=

y

(a + bk).

k=1

Proof. We first note that if bq ≡ a (mod M ), then y

y

(a + bk) ≡

k=1

(bq + bk)

(mod M )

k=1

≡ by

(5.11)

y

(q + k)

k=1



q+y ≡ b y! y

(mod M )



y

(mod M ).

We first show the forward direction. Suppose equations M1 to M10 are satisfied. Then M1 to M3 imply M = b(a + by)y + 1. Hence, M > (a + by)y =

y

(a + by) >

k=1

y

(a + bk).

k=1

By M4 we have bq ≡ a (mod M ), and so (5.11) holds. However, M10 together with M5, M6, M8, and M9 imply   q+y (mod M ). z ≡ by y! y Since z≡

y

(a + bk)

(mod M )

k=1

with, by M7, both sides less than M , we have z = required.

y

k=1 (a

+ bk), as

5.5. The Bounded Universal Quantifier

149

We now show the converse. Suppose that z=

y

(a + bk)

k=1

with b ≥ 1. We can then set r to satisfy M1, s to satisfy M2, and M to satisfy M3. It follows that M = b(a + by)y + 1, and so M>

y

(a + bk) = z,

k=1

as above, satisfying M7. We also have that gcd(M, b) = 1. Thus we may find q with bq ≡ a (mod M ). Taking q large enough so that bq > a, we may find t to satisfy M4. We may set u, v, w, and x to satisfy M5, M6, M8, and M9. By (5.11), we have   q+y y (mod M ). z ≡ b y! y Since a < bq, it follows that z=

y

(a + bk)
Q(y, u, x1 , . . . , xn ). Thus (a) yields pk > u, and hence 0 ≤ j ≤ u < pk . Since yi,k is a remainder upon division by pk , we have 0 ≤ yi,k < pk . Thus yi,k ≡ j (mod pk ) implies j = yi,k , and hence yi,k ≤ u, as required. Since pk divides both 1 + (c + 1)t and 1 + (k + 1)t, they are congruent to 0, and hence to each other modulo pk . We have seen that pk does not divide t, and so t is invertible modulo pk . Thus k ≡ c (mod pk ). We know yi,k ≡ ai (mod pk ), and so P (y, k, x1 , . . . , xn , y1,k , . . . , ym,k ) ≡ P (y, c, x1 , . . . , xn , a1 , . . . , am ) (mod pk ). Since pk | (1 + (c + 1)t), (4) implies P (y, c, x1 , . . . , xn , a1 , . . . , am ) ≡ 0 (mod pk ), and hence P (y, k, x1 , . . . , xn , y1,k , . . . , ym,k ) ≡ 0 (mod pk ). By (c) we have that |P (y, k, x1 , . . . , xn , y1,k , . . . , ym,k )| ≤ Q(y, u, x1 , . . . , xn ) < pk . Therefore, P (y, k, x1 , . . . , xn , y1,k , . . . , ym,k ) = 0. This completes the proof of the reverse direction. For the forward direction, suppose for each k = 0, . . . , y we can find yi,k for 1 ≤ i ≤ m with 0 ≤ yi,k ≤ u and P (y, k, x1 , . . . , xn , y1,k , . . . , ym,k ) = 0.

152

5. Hilbert’s Tenth Problem

Set t = Q(y, u, x1 , . . . , xn )! to satisfy (2). Since y

(1 + (k + 1)t) ≡ 1 (mod t),

k=0

there is a c with 1 + (c + 1)t =

y

(1 + (k + 1)t).

k=0

The fact that t ≥ 1 implies c ≥ 0, and thus (1) is satisfied. We show that the numbers 1 + (k + 1)t for k = 0, . . . , y are relatively prime. To see this, suppose p is a prime with p | (1+(k+1)t) and p | (1 + ( + 1)t) for some 0 ≤ k < ≤ y. Then p will divide their difference ( − k)t. Note that p does not divide t. Thus p | ( − k), and so p ≤ y. Then (b) implies p ≤ Q(y, u, x1 , . . . , xn ). Since t = Q(y, u, x1 , . . . , xn )!, it follows that p | t, a contradiction. Thus the numbers 1 + (k + 1)t for k = 0, . . . , y are relatively prime, and hence form an admissible sequence of moduli for the Chinese remainder theorem. Hence, for each i we may find a number ai such that ai ≡ yi,k

(mod 1 + (k + 1)t) for k = 0, . . . , y.

We note that we may take ai > u since adding a multiple of y

(1 + (k + 1)t) = 1 + (c + 1)t

k=0

to ai will yield the same congruences. Since (1+(k+1)t) | (1+(c+1)t), it follows that (1 + (k + 1)t) divides 1 + (k + 1)t − (1 + (c + 1)t) = (k − c)t. Hence, (k − c)t ≡ 0 (mod 1 + (k + 1)t). Since gcd(t, 1 + (k + 1)t) = 1, t is invertible modulo 1 + (k + 1)t. This implies k ≡ c (mod 1 + (k + 1)t).

5.5. The Bounded Universal Quantifier

153

Thus P (y, c,x1 , . . . , xn , a1 , . . . , am ) ≡ P (y, k, x1 , . . . , xn , y1,k , . . . , ym,k )

(mod 1 + (k + 1)t)

≡ 0 (mod 1 + (k + 1)t). Since 1+(k +1)t for k = 0, . . . , y are relatively prime and each divides P (y, c, x1 , . . . , xn , a1 , . . . , am ), so does their product. Hence, P (y, c, x1 , . . . , xn , a1 , . . . , am ) ≡ 0 (mod 1 + (c + 1)t), satisfying (4). Since ai ≡ yi,k (mod 1 + (k + 1)t), we have (1 + (k + 1)t) | (ai − yi,k ). As 0 ≤ yi,k ≤ u, it follows that u   (1 + (k + 1)t)  (ai − j). j=0

Finally, since 1 + (k + 1)t for k = 0, . . . , y are relatively prime, we have u   (ai − j). (1 + (c + 1)t)  j=0

and so (3) may be satisfied.



We now show that the use of the bounded universal quantifier on a Diophantine expression yields a Diophantine expression. Theorem 5.21. Given y, x1 , . . . , xn , and a polynomial P (y, k, x1 , . . . , xn , y1 , . . . , ym ), (∀k)≤y (∃y1 , . . . , ym ) (P (y, k, x1 , . . . , xn , y1 , . . . , ym ) = 0) if and only if there exist u, c, t, a1 , . . . , am , e, f, g1 , . . . , gm , h1 , . . . , hm , and Q(y, u, x1 , . . . , xn ) with Q satisfying properties (a), (b), and (c) of Lemma 5.20 and U1. e = 1 + (c + 1)t, y U2. e = (1 + (k + 1)t), k=0

U3. f = Q(y, u, x1 , . . . , xn ), U4. t = f !,

154

5. Hilbert’s Tenth Problem U5. g1 = a1 − u, g2 = a2 − u, . . . , gm = am − u, u u (g1 + k), . . . , hm = (gm + k), U6. h1 = k=0

k=0

U7. e | h1 , . . . , e | hm , U8. = P (y, c, x1 , . . . , xn , a1 , . . . , am ), and U9. e | . Proof. First note that we have (∀k)≤y (∃y1 , . . . , ym )[P (y, k, x1 , . . . , xn , y1 , . . . , ym ) = 0] ⇐⇒ (∃u)(∀k)≤y (∃y1 , . . . , ym )≤u [P (y, k, x1 , . . . , xn , y1 , . . . , ym ) = 0]. The reverse implication is trivial. In the forward direction, for each k = 0, . . . , y we have numbers yi,k for which P (y, k, x1 , . . . , xn , y1,k , . . . , ym,k ) = 0. Setting u to be the maximum of the finite set {yi,k : 0 ≤ k ≤ y, 1 ≤ i ≤ m} yields the result. If we are given P (y, k, x1 , . . . , xn , y1 , . . . , ym ), then we may always find Q(y, u, x1 , . . . , xn ) satisfying properties (a), (b), and (c) of Lemma 5.20. For example, replacing each coefficient of P with its absolute value, setting k = y and yi = u for each i, and adding u and y to the result will yield a valid polynomial Q. Thus the theorem follows from Lemma 5.20.  Most of equations U1 to U9 of Theorem 5.21 are clearly Dioy+1 phantine expressions. For U2, we may re-index as e = k=1 (1 + kt), satisfying the requirements of Theorem 5.19. Recall that we have each a > u, so that gi ≥ 1. Thus U6 may be re-indexed as hi = u+1 i k=1 ((gi − 1) + k), satisfying the requirements of Theorem 5.19. We may now use the bounded universal quantifier to give a Diophantine definition for the set of primes that does not use Wilson’s theorem. A number n is prime if and only if n > 1 and for all x, y ≤ n, either xy < n, xy > n, x = 1, or y = 1. Since this is made up of

5.6. Recursive Functions Revisited

155

Diophantine expressions, disjunctions, a conjunction, and bounded universal quantifiers, it is also Diophantine.

5.6. Recursive Functions Revisited We now have some rather strong tools at our disposal for demonstrating that a function or set is Diophantine. In this section, we will see just how far these methods may be pushed. In fact, we will show that a function is Diophantine if and only if it is recursive, and that a set is Diophantine if and only if it is computably enumerable. These notions were introduced in Section 4.2. We recall the definition of the recursive functions. The constant function C0 (x) = 0, the successor function S(x) = x + 1, and the projection functions Pin (x1 , . . . , xn ) = xi (for n ≥ 1 and 1 ≤ i ≤ n) are defined to be recursive. Additional recursive functions may be obtained by repeatedly applying to these functions the operations of composition, primitive recursion, and minimalization. The composition of given function f (t1 , . . . , tm ) with given functions g1 (x1 , . . . , xn ), . . . , gm (x1 , . . . , xn ) is the function h(x1 , . . . , xn ) = f (g1 (x1 , . . . , xn ), . . . , gm (x1 , . . . , xn )). Given functions f (x1 , . . . , xn ) and g(t1 , . . . , tn+2 ), primitive recursion yields the function h(x1 , . . . , xn , z) satisfying h(x1 , . . . , xn , 0) = f (x1 , . . . , xn ), and h(x1 , . . . , xn , t + 1) = g(t, h(x1 , . . . , xn , t), x1 , . . . , xn ). Given a function f (z, x1 , . . . , xn ), minimalization yields the partial function h(x1 , . . . , xn ) = min{f (z, x1 , . . . , xn ) = 0}. z

If no such z exists, then h is undefined. In order for h to be recursive, we require h to be a total function. In Section 4.2, we defined the addition function A(x, y) = x + y, and the multiplication function M (x, y) = xy. We defined functions Quo(a, b) and Rem(a, b) to be the quotient and remainder, respectively, of a when divided by b + 1. All of these functions were shown to be recursive. We now show that some additional important functions are recursive.

156

5. Hilbert’s Tenth Problem

Theorem 5.22. Cantor’s pairing function P (x, y) and G¨ odel’s β function β(u, i) are recursive. Proof. We have (x + y)(x + y + 1) +x 2 = Quo((x + y)(x + y + 1), 1) + x

P (x, y) =

= A(Quo(M (A(x, y), A(x, S(y))), 1), x), and hence P (x, y) is recursive. Now, L(z) is the unique x such that P (x, y) = z for some y. In fact, y must then be R(z), and so y ≤ z. Thus we can characterize L(z) as the minimum x such that |P (x, y) − z| = 0 for some y ≤ z. Since a product is equal to zero if and only if at least one of the factors is zero, we have   z |P (x, y) − z| = 0 . L(z) = min x

Similarly,

y=0

 R(z) = min y

z

 |P (x, y) − z| = 0 .

x=0

In the exercises for Chapter 4, it was shown that the finite product of recursive functions is recursive. In the same chapter, we saw that the function |x − y| is recursive. Thus L(z) and R(z) are recursive functions. Finally, β(u, i) was defined to be the remainder when L(u) is divided by 1 + (i + 1)R(u). That is, β(u, i) = Rem(L(u), (i + 1)R(u)) = Rem(L(u), M (S(i), R(u))), and hence β(u, i) is recursive.



We now show one direction of the equivalence between Diophantine and recursive functions. Theorem 5.23. If f (x1 , . . . , xn ) is a Diophantine function, then it is recursive. Proof. Recall that f is Diophantine if and only if {(x1 , . . . , xn , y) : y = f (x1 , . . . , xn )}

5.6. Recursive Functions Revisited

157

is a Diophantine set. Thus we have a polynomial P with integer coefficients such that y = f (x1 , . . . , xn ) if and only if there exist t1 , . . . , tm for which P (x1 , . . . , xn , y, t1 , . . . , tm ) = 0. Grouping positive and negative coefficients, we have y = f (x1 , . . . , xn ) if and only if there exist t1 , . . . , tm such that Qpos (x1 , . . . , xn , y, t1 , . . . , tm ) − Qneg (x1 , . . . , xn , y, t1 , . . . , tm ) = 0, where Qpos and Qneg are polynomials with natural number coefficients. We may now choose u so that β(u, 0) = y, β(u, 1) = t1 , . . . , β(u, m) = tm . Then y = f (x1 , . . . , xn ) if and only if there exists u with  Qpos (x1 , . . . , xn , β(u, 0), β(u, 1), . . . , β(u, m))  − Qneg (x1 , . . . , xn , β(u, 0), β(u, 1), . . . , β(u, m)) = 0. Since y = β(u, 0), we see that f (x1 , . . . , xn ) is equal to  β min Qpos (x1 , . . . , xn , β(u, 0), β(u, 1), . . . , β(u, m)) u

 − Qneg (x1 , . . . , xn , β(u, 0), β(u, 1), . . . , β(u, m)) = 0 , 0 .

In Section 4.2, we saw that polynomials with natural number coefficients are recursive, and so Qpos and Qneg are recursive. We have just seen that β(u, i) is recursive, and in Section 4.2 we saw that |x − y| is recursive. It follows that f is recursive.  We now show the converse of the previous theorem. Theorem 5.24. If a function is recursive, then it is Diophantine. Proof. It is trivial to check that the constant function C0 (x), successor function S(x), and projection functions Pin (x1 , . . . , xn ) are Diophantine. Thus we must show that the operations of composition, primitive recursion, and minimalization performed on Diophantine functions will yield another Diophantine function. Suppose h(x1 , . . . , xn ) = f (g1 (x1 , . . . , xn ), . . . , gm (x1 , . . . , xn )) is the composition of Diophantine functions g1 , . . . , gm with Diophantine function f . Then y = h(x1 , . . . , xn ) if and only if there

158

5. Hilbert’s Tenth Problem

exist t1 , . . . , tm with t1 = g1 (x1 , . . . , xn ), t2 = g2 (x1 , . . . , xn ), . . . , tm = gm (x1 , . . . , xn ), and y = f (t1 , . . . , tm ). Since this is the conjunction of Diophantine expressions, h is Diophantine. Suppose h(x1 , . . . , xn , z) is obtained through primitive recursion on Diophantine functions f (x1 , . . . , xn ) and g(t1 , . . . , tn+2 ). That is, suppose h(x1 , . . . , xn , 0) = f (x1 , . . . , xn ) and h(x1 , . . . , xn , t + 1) = g(t, h(x1 , . . . , xn , t), x1 , . . . , xn ). We use G¨odel’s β function to encode h(x1 , . . . , xn , 0), . . . , h(x1 , . . . , xn , z) as follows: there is some u with β(u, 0) = h(x1 , . . . , xn , 0) = f (x1 , . . . , xn ) and for t + 1 ≤ z, β(u, t + 1) = h(x1 , . . . , xn , t + 1) = g(t, h(x1 , . . . , xn , t), x1 , . . . , xn ) = g(t, β(u, t), x1 , . . . , xn ). Hence y = h(x1 , . . . , xn , z) if and only if there exists u such that the following three statements hold: (a) (∃w)(w = β(u, 0) and w = f (x1 , . . . , xn )), (b) (∀t)≤z (t = z) or (∃w)(w = β(u, t + 1)

and w = g(t, β(u, t), x1 , . . . , xn )) ,

(c) y = β(u, z). In Theorem 5.3, we showed that β(u, i) is Diophantine. Since the conjunction of the above three statements is the conjunction, disjunction, existential quantification, and bounded universal quantification of Diophantine expressions, it too is Diophantine. Thus h is Diophantine. Finally, suppose h(x1 , . . . , xn ) = min{f (y, x1 , . . . , xn ) = 0} y

5.7. Solution of Hilbert’s Tenth Problem

159

with f Diophantine and h total. Then y = h(x1 , . . . , xn ) if and only if f (y, x1 , . . . , xn ) = 0 and (∀t)≤y [(t = y) or f (x1 , . . . , xn , t) > 0] . Since this is the conjunction, disjunction, and bounded universal quantification of Diophantine expressions, it is also Diophantine. Thus h is Diophantine.  In summary, we have shown that a function is Diophantine if and only if it is recursive. As discussed in Chapter 4, the recursive functions are the same as the computable functions. Thus our definition of a Diophantine function is really just another way to characterize the class of computable functions! We now give the link between Diophantine sets and computably enumerable sets. Theorem 5.25. A set of natural numbers is Diophantine if and only if it is computably enumerable. Proof. Suppose S is a computably enumerable set of natural numbers. Then S is equal to the range of a computable function f . That is, y ∈ S if and only if there exist x1 , . . . , xn such that y = f (x1 , . . . , xn ). Since we now know that computable functions are Diophantine, we have y ∈ S if and only if there exist x1 , . . . , xn , t1 , . . . , tm with P (x1 , . . . , xn , y, t1 , . . . , tm ) = 0. This implies that S is Diophantine. For the converse, we make use of the Church–Turing thesis. Suppose S is Diophantine. Then y ∈ S if and only if there exist t1 , . . . , tn with P (y, t1 , . . . , tm ) = 0. Using the inverse of Cantor’s pairing function repeatedly, we may traverse through all (m + 1)-tuples of natural numbers. For each (m + 1)-tuple (y, t1 , . . . , tm ), we determine if P (y, t1 , . . . , tm ) = 0. If so, we list y. Thus we have an algorithm to list the members of S. By the Church–Turing thesis, this implies S is computably enumerable. 

5.7. Solution of Hilbert’s Tenth Problem We have now seen enough to quickly resolve Hilbert’s tenth problem.

160

5. Hilbert’s Tenth Problem

Theorem 5.26 (Negative solution to Hilbert’s tenth problem). There does not exist an algorithm that will determine if an arbitrary Diophantine equation has natural number solutions. Proof. In Theorem 4.2, we described a set U of natural numbers that is computably enumerable but not decidable. Since U is computably enumerable, it is Diophantine. Thus x ∈ U if and only if there exist y1 , . . . , ym with P (x, y1 , . . . , ym ) = 0, where P is a polynomial. Suppose we were to possess an algorithm to determine if an arbitrary Diophantine equation has natural number solutions. Given x, we would then be able to use the algorithm to determine whether P (x, y1 , . . . , ym ) has a solution in y1 , . . . , ym . That is, we would have an algorithm to decide whether or not x is in U . This implies U is decidable, a contradiction. Hence no such algorithm exists!  While satisfying, the above argument relies on our construction in Theorem 4.2 of the set U , which made use of the halting problem. It is possible to describe such a set directly in terms of Diophantine sets. In the remainder of this section, we do this to give a solution to Hilbert’s tenth problem that does not make reference to the halting problem. Our first step is to enumerate the Diophantine sets. Since Diophantine sets are described by polynomials, we begin by enumerating all polynomials. Let us write our polynomials with variables x0 , x1 , . . . . Inductively, we define P0 = 1, P3i+1 = xi , P3i+2 = PL(i) + PR(i) , and P3i+3 = PL(i) PR(i) . Every three steps, this enumeration adds a new variable and lists the sum and product of two previously listed polynomials. It does this in such a way that every variable is eventually listed, and the sum and product of every pair of listed polynomials are eventually listed. Since all polynomials with natural number coefficients can be built by taking sums and products of finitely many variables and 1, this

5.7. Solution of Hilbert’s Tenth Problem

161

enumeration will list all such polynomials. We note that our enumeration is redundant, as any given polynomial will appear infinitely often.3 Now, every Diophantine equation can be written as Pi = Pj for some pair i, j, and we can rewrite this using a single index with the functions L and R, namely PL(n) = PR(n) for some value of n. Thus all Diophantine sets of natural numbers can be enumerated explicitly as Dn for Dn equal to !  " x0 : (∃x1 , . . . , xn ) PL(n) (x0 , x1 , . . . , xn ) = PR(n) (x0 , x1 , . . . , xn ) . Since L(n) and R(n) are at most n, PL(n) and PR(n) can only depend on variables up to xn . Note that since the Diophantine sets are the computably enumerable sets, Dn also gives an enumeration of the computably enumerable sets. Using Cantor’s method of diagonalization, we can use this enumeration of Diophantine sets to construct a set different from each Dn , and hence is not Diophantine. Theorem 5.27. There is a set V of natural numbers that is not Diophantine. Proof. We let V = {n : n ∈ / Dn }. Suppose V were Diophantine. We would then have V = Dk for some k. Then / Dk , k ∈ Dk ⇐⇒ k ∈ V ⇐⇒ k ∈ the latter equivalence by the definition of V . This is a contradiction, and so V is not a Diophantine set.  Note that since the Diophantine sets are the computably enumerable sets, V is an example of a set that is not computably enumerable. We previously gave an example of such a set in Theorem 4.2 by use of the halting problem. We now show that the set of ordered pairs (n, x) with x ∈ Dn is Diophantine. We call this the universality theorem. 3

For example, since P0 = 1, for any polynomial Pn we have P0 Pn =Pn . Since  the n(n+1) n(n+1) Cantor pairing function applied to (0, n) is equal to , we have L =0 2 2   n(n+1) = P P = P . This process may then be = n. Thus P and R 0 n n 3n(n+1) 2 2

repeated.

+3

162

5. Hilbert’s Tenth Problem

Theorem 5.28 (Universality theorem). The set {(n, x) : x ∈ Dn } is Diophantine Proof. We show that x ∈ Dn if and only if there exists u such that each of the following hold: D1. β(u, 0) = 1, D2. β(u, 1) = x, D3. (∀i)≤n (β(u, 3i + 2) = β(u, L(i)) + β(u, R(i))), D4. (∀i)≤n (β(u, 3i + 3) = β(u, L(i))β(u, R(i))), D5. β(u, L(n)) = β(u, R(n)). Since each of these are Diophantine, it will follow that {(n, x) : x ∈ Dn } is Diophantine. To show the forward direction, suppose x ∈ Dn . By definition of Dn , there exist x1 , . . . , xn with PL(n) (x, x1 , . . . , xn ) = PR(n) (x, x1 , . . . , xn ). We can then use the β function to choose u with β(u, i) = Pi (x, x1 , . . . , xn ) for i = 0, . . . , 3n + 3. By definition of the Pi , conditions D1 to D4 hold. Since PL(n) (x, x1 , . . . , xn ) = PR(n) (x, x1 , . . . , xn ), D5 holds, completing the proof of this direction. To show the converse, suppose D1 to D5 hold for some n, x, and u. Let x1 = β(u, 4), x2 = β(u, 7), . . . , xn = β(u, 3n + 1). Then, by construction of the Pi with D1 to D4, we have β(u, i) = Pi (x, x1 , . . . , xn ) for i = 0, . . . , 3n + 3. By D5, it follows that PL(n) (x, x1 , . . . , xn ) = PR(n) (x, x1 , . . . , xn ). By definition of Dn , this implies x ∈ Dn , completing the proof.



We are now ready to give an alternative proof of Theorem 5.26.

5.7. Solution of Hilbert’s Tenth Problem

163

Alternative Proof of Theorem 5.26. By the universality theorem, we have x ∈ Dn if and only if there exist y1 , . . . , ym such that P (x, n, y1 , . . . , ym ) = 0. Here P is some particular (fixed) polynomial.4 Suppose now that we were to possess an algorithm to determine if an arbitrary Diophantine equation has natural number solutions. We could use this algorithm to test P for solutions. That is, we could use the algorithm to determine whether or not x ∈ Dn . This algorithm could then be used to list the elements of the non-Diophantine set V of Theorem 5.27: for each natural number n, determine if n ∈ Dn . If it is not, then we list n. This would imply that V is a computably enumerable set, which is a contradiction. Thus no such algorithm exists.  We note that the negative solution to Hilbert’s tenth problem implies that there is no one algorithm that can decide whether or not an arbitrary Diophantine equation has solutions. There are, of course, algorithms that work for certain classes of Diophantine equations. To end this section, we briefly discuss the history of the solution to Hilbert’s tenth problem. In his PhD thesis, Martin Davis showed that every computably enumerable set can be put in what is called the Davis normal form, where only existential quantifiers and one bounded universal quantifier are used. Julia Robinson worked with Diophantine sets, attempting to show that the exponential function is Diophantine. Unable to do so, she considered the exponential Diophantine sets. A set S of ordered ntuples is exponential Diophantine if there is a polynomial P (x1 , . . . , xn , u1 , . . . , um , v1 , . . . , vm , w1 , . . . , wm ) such that (x1 , . . . , xn ) ∈ S if and only if there exists ui , vi , and wi with P = 0 and ui = viwi for each i. She showed that the binomial coefficients and factorial function are exponential Diophantine using more or less the same method that we have used here. Davis and Hilary Putnam worked together, and came upon the idea of using G¨ odel’s β function to deal with the bounded universal 4 In fact, James P. Jones has explicitly written down several such polynomials; see [Jo1] and [Jo2].

164

5. Hilbert’s Tenth Problem

quantifier. They showed that, under the assumption that there are arbitrarily long arithmetic progressions consisting entirely of prime numbers, every computably enumerable set is exponential Diophantine. However, their assumption was an open problem at the time, one that was not resolved until 2004 (published in 2008 in [GT]) by Ben Green (born 1977) and Terrence Tao (born 1975). Robinson was able to remove this assumption. In [DPR], Davis, Putnam, and Robinson proved that the computably enumerable sets are exponential Diophantine in a 1961 paper. All that remained was to show that the exponential function is Diophantine. Given the consequences of this, some at the time felt this was unlikely. In 1970, Matiyasevi˘c was able to show that the Fibonacci numbers are Diophantine, from which it follows that the exponential function is Diophantine. In this text, we have used solutions to the Brahmagupta–Pell equation in place of the Fibonacci numbers, but the methods are similar. In particular, it was Matiyasevi˘c who first saw how to use results similar to our Lemmas 5.5 and 5.11. Davis, Matiyasevi˘c, Putnam, and Robinson all played crucial roles in the solution of the problem. Davis, Matiyasevi˘c, and Robinson continued to work on the consequences of their solution to Hilbert’s tenth problem, and some of their work is described in the next chapter.

Further Reading Martin Davis’s article Hilbert’s tenth problem is unsolvable [Da2] is an excellent and approachable exposition of the solution to the tenth problem; indeed, it has influenced our presentation of the material here. Note that while we include 0 as a natural number here, Davis does not in his paper. Our presentation here uses some modifications given by Jones et al. in [JSWW]. Matiyasevi˘c’s book Hilbert’s Tenth Problem [Ma] is another excellent source. The way in which he approaches the problem is somewhat different from our approach, and he gives much additional information that we do not cover.

Exercises

165

If you used Hodel’s An Introduction to Mathematical Logic [Ho] to learn more about the material from Sections 4.3 and 4.4, then note that the final chapter of his book covers Hilbert’s tenth problem. Smory´ nski’s Logical Number Theory I [Sm] also gives a solution to Hilbert’s tenth problem. This interesting book contains numerous results in the intersection of logic and number theory.

Exercises 5.1. Use the definition of a Diophantine set to show that each of the following sets of natural numbers are Diophantine. In particular, write down a polynomial P (x, y1 , . . . , ym ) such that there exist y1 , . . . , ym with P (x, y1 , . . . , ym ) = 0 if and only if x is an element of the given set. (a) The set of even numbers. (b) The multiples of 3. (c) Natural numbers that are not multiples of 3. (d) Natural numbers that belong to a Pythagorean triple. (e) The set of perfect squares. (f) The set of natural numbers that are not perfect squares. (Hint: Recall that when the natural number d is a nonzero perfect square, the Brahmagupta–Pell equation x2 −dy 2 = 1 has only the trivial solution (x, y) = (1, 0), and when d is not a perfect square, there exists a nontrivial solution.) 5.2. Let A and B be Diophantine sets of n-tuples. Show that A ∩ B and A ∪ B are Diophantine. 5.3. For r ∈ R, let r denote the greatest integer less than or equal to r. Prove that for natural numbers x, y, and z, z = x/y if and only if yz ≤ x < y(z + 1). Use this to prove that the function f (x, y) = x/y is Diophantine. 5.4. Show that L(z) ≤ z and R(z) ≤ z.

166

5. Hilbert’s Tenth Problem

5.5. Find a value of u such that β(u, i) of Theorem 5.2 satisfies β(u, 0) = 2, β(u, 1) = 3, and β(u, 2) = 5. 5.6. Fix a natural number b. Prove that ab lim a = b!. b

a

a→∞

b

Although a and b are Diophantine, the above limit does not immediately imply that b! is Diophantine. In Theorem 5.18, we b showed   that taking a large enough (we took a = (2b) ) brings b a a / b within distance 1 of b!, which allowed us to show that b! is Diophantine. 5.7. We say that n is a lower twin prime if n and n+2 are both prime. Make use of either Wilson’s theorem or the bounded universal quantifier to show that the set of lower twin primes is Diophantine. Deduce that there is a polynomial whose nonnegative range is equal to the set of lower twin primes.

Chapter 6

Applications of Hilbert’s Tenth Problem

6.1. Related Problems In this section, we discuss a few corollaries and relatively immediate applications of the negative solution to Hilbert’s tenth problem. If we let NP be the number of solutions to a Diophantine equation P = 0, then Hilbert’s tenth problem asks for an algorithm to determine if NP = 0. Given k ∈ N ∪ {ℵ0 } with k = 0, is there an algorithm that will determine if NP = k? We show now that the answer to this question is no.1 Theorem 6.1. Let k ∈ N ∪ {ℵ0 } with k = 0. Then is no algorithm that will determine if an arbitrary Diophantine equation has exactly k solutions. Proof. We first consider the case k = ℵ0 . Let y be a variable not appearing in P , and let Q = (y + 1)P . We show NQ = ℵ0 if and only if NP > 0. Suppose NQ = ℵ0 so that (y +1)P = 0 has infinitely many solutions. Since y + 1 = 0, P = 0 must have at least one solution, and so NP > 0. Conversely, suppose NP > 0. Then there is a solution 1 This result is due to Martin Davis and can be found in [Da3]. In fact, he has shown more: let S be a nonempty proper subset of {ℵ0 , 0, 1, . . .}. Then there is no algorithm to determine whether or not NP ∈ S.

167

168

6. Applications of Hilbert’s Tenth Problem

to P = 0, which yields a solution to (y + 1)P = 0 for y = 0, 1, 2, . . . , and hence NQ = ℵ0 . Thus NQ = ℵ0 if and only if NP = 0. Suppose we were to possess an algorithm to test whether or not a Diophantine equation has infinitely many solutions. Given a Diophantine equation P , the algorithm would allow us to determine if NQ = ℵ0 , and hence if NP = 0. This contradicts the negative solution to Hilbert’s tenth problem. We now consider the case k ∈ N. By n − 1 applications of the inverse of Cantor’s pairing function, we may computably enumerate the n-tuples of natural numbers. Given a nonzero Diophantine equation P = P (x1 , . . . , xn ), we define Diophantine equations Pk inductively by P0 = P and   Pk+1 = Pk · (x1 − a1 )2 + · · · + (xn − an )2 , where (a1 , . . . , an ) is the first n-tuple that is not a solution to Pk . Then Pk+1 = 0 if and only if Pk = 0 or (x1 , . . . , xn ) = (a1 , . . . , an ), and it cannot be the case that both of these disjuncts are true. Thus NPk+1 = NPk + 1, and so NPk = NP + k. Therefore, NP = 0 if and only if NPk = k. Suppose we were to possess an algorithm to test whether or not a Diophantine equation has exactly k solutions. Given a Diophantine equation P , the algorithm would allow us to determine if NPk = k, and hence if NP = 0. This contradicts the negative solution to Hilbert’s tenth problem.  In Chapter 5, we saw that conjunction, disjunction, the existential quantifier, and the bounded universal quantifier may be used on Diophantine expressions to yield another Diophantine expression. We can now show that use of any of the remaining standard logical connectives or of the (unbounded) universal quantifier on Diophantine expressions may yield a non-Diophantine expression. In Section 5.7, we gave an enumeration Dn of all Diophantine sets of natural numbers. The universality theorem (Theorem 5.28) established that the set {(n, x) : x ∈ Dn } is Diophantine. Thus there is a polynomial P such that x ∈ Dn if and only if there exist y1 , . . . , ym with P (x, n, y1 , . . . , ym ) = 0. Finally,

6.1. Related Problems

169

in Theorem 5.27 the set V = {n : n ∈ / Dn } was shown to be not Diophantine. Thus the following are equivalent: (a) n ∈ V . (b) It is not the case that (∃y1 , . . . , ym )(P (n, n, y1 , . . . , ym ) = 0). (c) If (∃y1 , . . . , ym )(P (n, n, y1 , . . . , ym ) = 0), then 0 = 1. (d) For all y1 , . . . , ym , P (n, n, y1 , . . . , ym ) < 0 or

P (n, n, y1 , . . . , ym ) > 0.

Now, (b) is negation applied to a Diophantine expression, (c) is the implication of two Diophantine expressions, and (d) is the universal quantification of a Diophantine expression. Thus the negation, implication, and universal quantification of Diophantine expressions may yield an expression that is not Diophantine. Given a Diophantine set of natural numbers, we may ask for the smallest polynomial that can be used in its Diophantine description. We define the degree of the Diophantine set S = {x : (∃y1 , . . . , ym )(P (x, y1 , . . . , ym ) = 0)} to be the least degree of a polynomial P that may be used in a Diophantine description of S. We define the dimension of S to be the least value of m that may be used in such a P . We may reduce the degree of an equation P (x1 , . . . , xn ) = 0 as follows. We introduce new equations zi = xj xk and zi = x2j with new variables zi . By applying repeated substitution with these new equations, the degree of P may be brought down to 2. Then the equation found by summing the squares of the additional equations with the square of the reduced P will be equal to 0 if and only if P = 0, and it will be of degree 4. As an example, consider the equation x31 x2 x43 − 2x21 = 0. We set z1 = x21 , z2 = x1 z1 so that z2 = x31 , z3 = x23 , z4 = z32 so that z4 = x43 and z5 = x2 z4 . Then x31 x2 x43 − 2x21 = z2 z5 − 2z1 . Thus the original equation is equal to 0 if and only if (z1 − x21 )2 + (z2 − x1 z1 )2 + (z3 − x23 )2 + (z4 − z32 )2 + (z5 − x2 z4 )2 + (z2 z5 − 2z1 )2 = 0.

170

6. Applications of Hilbert’s Tenth Problem

Note that our method for decreasing the degree will increase the number of variables. We have shown the following theorem. Theorem 6.2. Any Diophantine set of natural numbers may be described with a polynomial of degree at most 4. There is an algorithm that will determine if an arbitrary Diophantine equation of degree 2 has natural number solutions, given in 1972 by Carl Ludwig Siegel (1896–1981) in [Sie]. Hence, not every Diophantine set may be described with a degree 2 polynomial, since this would yield a positive solution to Hilbert’s tenth problem. Whether or not every Diophantine set may be described with a degree 3 polynomial remains an open question. It is related to the theory of elliptic curves. It turns out that the dimension of a Diophantine set of natural numbers also has an upper bound. Theorem 6.3. There exists a natural number m such that any Diophantine set of natural numbers may be described with a polynomial with at most m + 1 variables. Proof. Recall that in Section 5.7, we gave an enumeration Dn of the Diophantine sets of natural numbers. The universality theorem (Theorem 5.28) yields a universal polynomial P such that x is an element of Dn if and only if there exist y1 , . . . , ym with P (x, n, y1 , . . . , ym ) = 0. Given a Diophantine set S of natural numbers, there is some n for which S = Dn . That is, we have S = {x : (∃y1 , . . . , ym )(P (x, n, y1 , . . . , ym ) = 0)} for some particular value of n. Thus, the value of m in such a polynomial P gives an upper bound on the dimension of any Diophantine set of natural numbers.  One could use the results of Chapter 5 to write down such a polynomial P , although it would be tedious and the result would be far from optimal.2 In fact, it has been shown that m can be brought 2 Several universal polynomials have been explicitly written down by James P. Jones in [Jo1] and [Jo2].

6.2. A Prime Representing Polynomial

171

as low as 9.3 It is possible that an even lower value would suffice, although this is an open question. The existence of a universal polynomial P is truly surprising. By merely changing the value of n, the polynomial P will define any Diophantine set. Since the Diophantine sets are one and the same as the computably enumerable sets, P defines all computably enumerable sets. The computably enumerable sets are those for which we have an algorithm to list the elements. It is surprising that a single polynomial P can contain enough information to yield every possible set of natural numbers for which we have an element listing algorithm!4

6.2. A Prime Representing Polynomial In Theorem 5.25, we saw that the Diophantine sets are one and the same as the computably enumerable sets. Since we have an algorithm to list the prime numbers, they form a Diophantine set. In Theorem 5.1, we saw that a set is Diophantine if and only if it is the nonnegative range of a polynomial. This implies the existence of a polynomial whose nonnegative range consists of the set of prime numbers (the negative numbers in the range of the polynomial may or may not be prime). In fact, the methods we gave in Chapter 5 were constructive, allowing such a polynomial to be written down. In general, writing out these polynomials can be tedious, especially if bounded universal quantifiers must be used. However, Wilson’s theorem (Theorem 3.11) allowed us to give a Diophantine definition of the prime numbers without any bounded universal quantifiers. In this section, we use Wilson’s theorem to give an explicit Diophantine definition of the

3 This was proved by Matiyasevi˘ c in 1975, partially using methods he developed with Robinson. The result remained unpublished for seven years until Jones gave a proof, with permission from Matiyasevi˘ c, in [Jo2]. 4 This may not have been surprising to Turing. In the same paper in which he first introduced Turing machines, Turing proved the existence of a universal Turing machine: a Turing machine U(m, n) that, given n, will run the Turing machine Tn on input m. Here Tn is the nth machine in the enumeration of the Turing machines given in Theorem 4.1.

172

6. Applications of Hilbert’s Tenth Problem

prime numbers, and then write down an explicit prime representing polynomial.5 Recall that Wilson’s theorem states that a natural number n > 1 is prime if and only if (n − 1)! ≡ −1

(mod n).

Letting n = m + 2 for a natural number m, we have m + 2 is prime if and only if (m + 1)! ≡ −1 (mod m + 2). This occurs if and only if (m + 2) | ((m+1)! + 1) ⇐⇒ (∃κ ∈ N)((m + 1)! + 1 = (κ + 1)(m + 2)) ⇐⇒ (∃κ ∈ N)((m + 1)! = κm + 2κ + m + 1). By Theorem 5.18, β = (m + 1)! if and only if there exist h, n, q, z, γ, δ, and  satisfying F1. z = 2(m + 1), F2. h = n + 1, F3. h = z m+1 ,  n+1  , F4. γ = m+1 F5. q = hm+1 , F6. βγ + δ = q, F7. q +  + 1 = (β + 1)γ. These equations have been slightly modified from those of Theorem 5.18; inequalities have been replaced with their Diophantine equivalent and some variables have been renamed. Note that the value of a in Theorem 5.18 is at least 2, and hence not 0, allowing us to replace it with n + 1.  n+1  if and only if there exist f, g, x, y, By Theorem 5.17, γ = m+1 α, φ, ρ, and σ satisfying C1. x = 3n+1 , 5 Such a polynomial was first explicitly given in 1976 by Jones, Sato, Wada, and Wiens in [JSWW], and we follow their method here. Due to differences in the presentation of material, our polynomial will be slightly longer than the one they gave.

6.2. A Prime Representing Polynomial

173

C2a. y = x + 1, C2b. g = y n+1 , C2c. f = xm+1 , C2d. g = φxf + γf + ρ, C3. γ + α + 1 = x, C4. ρ + σ + 1 = f . Equation C2 of Theorem 5.17 has been split into multiple equations, inequalities have been replaced with their Diophantine equivalent, and variables have been renamed. In Theorem 5.17, the only requirement on u (here called x) is that it is greater than 2n+1 . We take x = 3n+1 for convenience. Thus m + 2 is prime if and only if there exist f, g, h, n, q, x, y, z, α, β, γ, δ, , κ, φ, ρ, and σ satisfying β = κm + 2κ + m + 1 and equations F1, F2, F3, F5, F6, F7, C1, C2a, C2b, C2c, C2d, C3, and C4. All but F3, F5, C1, C2b, and C2c are Diophantine equations. Thus we must replace h = z m+1 , q = hm+1 , x = 3n+1 , g = y n+1 , and f = xm+1 with their Diophantine equivalents. We could do this by using Theorem 5.15 five times, which will result in 35 more Diophantine equations and 45 new variables. However, it is possible to modify Theorem 5.15 to encode multiple exponentials at less of a cost. In the theorem below, equations X1 to X7 are essentially E1 to E7 of Theorem 5.15, although we have modified E6. They encode f = xn+1 . Equations X8 to X10 below allow us to introduce a second exponential g = y m+1 by re-using some of the work of equations X1 to X7, although we will also require that m < n (as is the case here). These three equations use four new variables. Finally, each of equations X11 to X13 allow us to add an additional exponential that uses exponents n + 1 or m + 1. Each of these equations introduces one new variable. Theorem 6.4. Given numbers f, g, h, m, n, q, x, y, and z with m < n and h, x, y, z ≥ 1, the system X1. v 2 − (a2 − 1)w2 = 1, X2. u2 − 16(a2 − 1)r 2 w4 = 1, X3. (v + cu)2 − ((a + u2 (u2 − a))2 − 1)(n + 1 + 4dw)2 = 1, X4. w = n + s + p + 1,

174

6. Applications of Hilbert’s Tenth Problem X5. e3 (e + 2)(a + 1)2 + 1 = 2 , X6. e = x + y + m + n + f + g + h + q + z + 2, X7. v = f + w(a − x) + i(2ax − x2 − 1), X8. t2 − (a2 − 1)s2 = 1, X9. s = m + 1 + k(a − 1), X10. t = g + s(a − y) + j(2ay − y 2 − 1), X11. v = x + w(a − 3) + λ(6a − 10), X12. t = h + s(a − z) + χ(2az − z 2 − 1), X13. t = q + s(a − h) + ω(2ah − h2 − 1)

has a solution in the remaining variables if and only if f = xn+1 , g = y m+1 , h = z m+1 , q = hm+1 , and x = 3n+1 . Proof. We show the forward direction first. Suppose equations X1 to X13 are satisfied. Equation X6 implies e ≥ 2, and so Lemma 5.14 with X5 implies e − 1 + ee−2 ≤ a. With X6, this implies x+y+m+n+f +g+h+q+z+1   x+y+m+n+f +g+h+q+z ≤ a. + x+y+m+n+f +g+h+q+z +2 Using this, we deduce that the following quantities are strictly less than a: f , g, h, q, x, xn+1 , y m+1 , z m+1 , hm+1 , and 3n+1 . Also, we have a > 2, n < a − 1, m + 1 < a − 1, and y ≤ a − 1. As in the proof of Theorem 5.15, equations X1 to X4 imply w = yn+1 (a) and v = xn+1 (a). The conclusion that f = xn+1 may be drawn using Lemma 5.8 with equation X7, as in the proof of Theorem 5.15. Equation X8 implies s = ym (a) and t = xm (a) for some m . Equation X4 yields s < w, and so m < n + 1. Since n < a − 1, we have m ≤ n < a − 1. Equation X9 implies s ≡ m + 1 (mod a − 1), and Lemma 5.7 implies s ≡ m

(mod a − 1).

Since m ≡ m + 1 (mod a − 1) with m < a − 1 and m + 1 < a − 1, we have m = m + 1 and so s = ym+1 (a) and

t = xm+1 (a).

6.2. A Prime Representing Polynomial

175

Then Lemma 5.8 implies t ≡ y m+1 + s(a − y)

(mod 2ay − y 2 − 1),

while equation X10 implies t ≡ g + s(a − y)

(mod 2ay − y 2 − 1).

Hence, g ≡ y m+1

(mod 2ay − y 2 − 1).

Since y ≤ a − 2, we have y 2 + 1 ≤ y(a − 2) + 1 = ay + 1 − 2y. Now y ≥ 1 yields both y ≤ 2y − 1 and 1 − 2y < 0. Thus y 2 + 1 < a(2y − 1), and so a < 2ay − y 2 − 1. Since g < a and y m+1 < a, we have both g and y m+1 less than 2ay − y 2 − 1. Since they are also congruent modulo 2ay − y 2 − 1, it follows that g = y m+1 , as required. Now Lemma 5.8 yields v ≡ 3n+1 + w(a − 3)

(mod 6a − 10),

while equation X11 yields v ≡ x + w(a − 3) (mod 6a − 10). Thus, x ≡ 3n+1

(mod 6a − 10).

Since x < a < 6a − 10 and 3 Similarly, Lemma 5.8 yields

n+1

t ≡ z m+1 + s(a − z)

< a < 6a − 10, we have x = 3n+1 . (mod 2az − z 2 − 1)

and t ≡ hm+1 + s(a − h) (mod 2ah − h2 − 1), while equation X12 yields t ≡ h + s(a − z)

(mod 2az − z 2 − 1)

and X13 yields t ≡ q + s(a − h) (mod 2ah − h2 − 1).

176

6. Applications of Hilbert’s Tenth Problem

Thus h ≡ z m+1

(mod 2az − z 2 − 1)

q ≡ hm+1

(mod 2ah − h2 − 1).

and Since h < a < 2az − z 2 − 1, z m+1 < a < 2az − z 2 − 1, q < a < 2ah − h2 − 1, and hm+1 < a < 2ah − h2 − 1, we have h = z m+1 and q = hm+1 . We now show the reverse direction. Suppose f = xn+1 , g = y m+1 , h = z m+1 , q = hm+1 , and x = 3n+1 for m < n and h, x, y, z ≥ 1. Set e=x+y+m+n+f +g+h+q+z+2 to satisfy X6. Equations X1, X2, X3, X5, and X7 may be satisfied as in the proof of Theorem 5.15, with n < w. Set s = ym+1 (a) and t = xm+1 (a) so that X8 is satisfied. Since yk (a) is increasing with k and we have m + 1 ≤ n, it follows that ym+1 (a) ≤ yn (a). One may show with induction and Theorem 5.3 that n + yn (a) < yn+1 (a). Thus, n + s = n + ym+1 (a) ≤ n + yn (a) < yn+1 (a) = w, and so p may be found to satisfy X4. Lemma 5.7 implies s ≡ m + 1 (mod a − 1). Since (5.5) of Theorem 5.4 yields m + 1 ≤ ym+1 (a) = s, we may choose k so that X9 is satisfied. Lemma 5.8 implies t ≡ g + s(a − y)

(mod 2ay − y 2 − 1),

v ≡ x + s(a − 3) (mod 6a − 10), t ≡ h + s(a − z)

(mod 2az − z 2 − 1), and

t ≡ q + s(a − h) (mod 2ah − h2 − 1), with each right-hand side less than or equal to the left-hand side, This allows us to choose j, λ, χ, and ω to satisfy equations X10, X11, X12, and X13. 

6.2. A Prime Representing Polynomial

177

To summarize what we have so far, m + 2 is prime if and only if β = κm + 2κ + m + 1, and equations F1, F2, F6, F7, C2a, C2d, C3, C4, and X1 to X13 have a solution. This is a system of 22 equations in 36 variables (including m). We can eliminate some of the variables with substitution, provided the quantity we are substituting is always positive (otherwise, we may be losing information). We use β = κm+2κ+m+1 and equations F1, F2, F6, C2a, C2d, C3, C4, X4, and X9 to eliminate variables β, z, h, q, y, g, x, f, w, and s. Equation F7 then becomes γ = δ +  + 1, allowing us to further eliminate γ. This leaves us with 11 equations in 25 variables. We have m+2 prime if and only if the following system has a solution: D1. v 2 − (a2 − 1)(n + m + p + k(a − 1) + 2)2 = 1, D2. u2 − 16r 2 (a2 − 1)(n + m + p + k(a − 1) + 2)4 = 1, D3. (v + cu)2 − ((a + u2 (u2 − a))2 − 1) ×(n + 1 + 4d(n + m + p + k(a − 1) + 2))2 = 1, D4. e3 (e + 2)(a + 1)2 + 1 = 2 , D5. e = 3m + 2n + 2α + δ + 2ρ + σ + φ(ρ + σ + 1)(α + 1) +(κm + 2κ + m + (φ + 1)(ρ + σ + 1) + 3)(δ +  + 1) + 9, D6. v = ρ + σ + 1 + (n + m + p + k(a − 1) + 2)(a − δ −  − α − 2) +i(2a(δ +  + α + 2) − (δ +  + α + 2)2 − 1), D7. t2 − (a2 − 1)(m + 1 + k(a − 1))2 = 1, D8. t = (ρ + σ + 1)(φ(α + 1) + (φ + 1)(δ +  + 1)) + ρ +(m + 1 + k(a − 1))(a − δ −  − α − 3) +j(2a(δ +  + α + 3) − (δ +  + α + 3)2 − 1), D9. v = δ ++α+2+(n+m+p+k(a−1)+2)(a−3)+λ(6a−10), D10. t = n + 1 + (m + 1 + k(a − 1))(a − 2m − 2) +χ(4a(m + 1) − 4(m + 1)2 − 1), D11. t = (κm + 2κ + m + 1)(δ +  + 1) + δ +(m+1+k(a−1))(a−n−1)+ω(2a(n+1)−(n+1)2 −1). Some of these equations have been simplified after making the substitutions.

178

6. Applications of Hilbert’s Tenth Problem

We can rearrange each equation so that all terms are on one side. For the time being, let us write the resulting equations as A = 0, B = 0, . . . , K = 0. Consider the polynomial (m + 2)(1 − A2 − B 2 − · · · − K 2 ). If m + 2 is prime, then A = B = · · · = K = 0, and so m + 2 is in the (positive) range of this polynomial. On the other hand, if ψ is in the positive range of the polynomial, then we have ψ = (m + 2)(1 − A2 − B 2 − · · · − K 2 ). For the right-hand side to be positive, we must have A = B = · · · = K = 0. This means m + 2 must be prime and yields ψ = m + 2. Thus (m + 2)(1 − A2 − B 2 − · · · − K 2 ) is a polynomial whose positive range is equal to the set of prime numbers. Using our equations above, we may now write down our prime representing polynomial. Since we have eliminated some variables, we may replace the greek letter variables with now unused roman letters. We replace α, δ, , κ, λ, ρ, σ, φ, χ, and ω with b, f, g, h, q, s, w, x, y, and z, respectively.

6.2. A Prime Representing Polynomial

179

Theorem 6.5. The nonnegative range of # 2  (m + 2) 1 − v 2 − (a2 − 1)(n + m + p + k(a − 1) + 2)2 − 1  2 − u2 − 16r 2 (a2 − 1)(n + m + p + k(a − 1) + 2)4 − 1  − (v + cu)2 − ((a + u2 (u2 − a))2 − 1) 2 · (n + 1 + 4d(n + m + p + k(a − 1) + 2))2 − 1 2  − e3 (e + 2)(a + 1)2 + 1 − 2  − 3m + 2n + 2b + f + 2s + w + x(s + w + 1)(b + 1) + (hm + 2h + m + (x + 1)(s + w + 1) + 3)

2 · (f + g + 1) + 9 − e

 − s + w + 1 + (n + m + p + k(a − 1) + 2) · (a − f − g − b − 2)

+ i(2a(f + g + b + 2) − (f + g + b + 2)2 − 1) − v  2 − t2 − (a2 − 1)(m + 1 + k(a − 1))2 − 1  − (s + w + 1)(x(b + 1) + (x + 1)(f + g + 1)) + s + (m + 1 + k(a − 1))(a − f − g − b − 3) + j(2a(f + g + b + 3) − (f + g + b + 3)2 − 1) − t

 − f + g + b + 2 + (n + m + p + k(a − 1) + 2)

· (a − 3) + q(6a − 10) − v

 − n + 1 + (m + 1 + k(a − 1))(a − 2m − 2)

+ y(4a(m + 1) − 4(m + 1)2 − 1) − t

2

2

2

2

 − (hm+2h+m+1)(f +g+1) + f + (m+1+ k(a − 1)) 2 $ · (a − n − 1) + z(2a(n + 1) − (n + 1)2 − 1) − t is equal to the set of prime numbers. This polynomial has 25 natural number variables, comprising all letters except for o. One might try to use this polynomial to discover new primes, but unfortunately this is highly impractical. Since our original equations

180

6. Applications of Hilbert’s Tenth Problem

C2b, C2a, C1, F2, F3, and F1 are g = y n+1 , y = x + 1, x = 3n+1 , h = n + 1, h = z m+1 , and z = 2(m + 1), it follows that

(2(m+1))m+1 m+1 2m+2 g = 3(2(m+1)) +1 ≈ 3(2m+2) . Along the way, g was replaced with a degree 3 polynomial in five of the greek letter variables, and so at least one of these variables must grow roughly as fast as the cube root of g. The size of g grows very fast with m. We could look for primes by running through all possible values of the variables of the polynomial, checking if the polynomial is positive, and noting the prime m + 2 if it is. Doing this, we would discover that 2 is prime once we had g √ = (32 + 1)2 = 100 (and so 3 at least one of the variables is around 100 ≈ 4.6; not bad). We would discover that 3 is prime when g = (316 + 1)16 . The cube root of this number has 41 digits. The next smallest prime, 5, would be 8 discovered when g ≈ 38 = 316777216 , a number whose cube root has 2668256 digits! The prime 7 requires a value of g whose cube root has over a trillion digits!6 For most values of its variables, the polynomial will be negative, and the extreme size of some of the variables needed to yield primes makes it impractical for finding primes.

6.3. Goldbach’s Conjecture and the Riemann Hypothesis The methods of Chapter 5 will allow us to show that many important open problems are equivalent to the unsolvability of a Diophantine equation. Furthermore, the constructive nature of the negative solution to Hilbert’s tenth problem allows such polynomials to be written out explicitly, given enough time and patience. To begin, we discuss Goldbach’s conjecture. In 1742, Christian Goldbach (1690–1764), a mathematician best known today for his correspondence with some of the most prominent mathematicians of 6 If you were to take the cube root of the value of g that yields the prime 11 and print it in 10-point font on rather thin (0.05 mm thick) letter-sized paper, the stack of paper would be higher than the distance travelled when making two return trips to Alpha Centauri! The cube root of the value of g that would yield the prime 17 would require a stack of paper 2.7 trillion times larger than the width of the universe!!

6.3. Goldbach’s Conjecture, Riemann Hypothesis

181

his day, proposed a conjecture to Euler: Every even natural number greater than 2 can be written as the sum of two primes. Euler replied that he was certain this was true, but could not prove it. The conjecture remains open to this day. With the help of computers, it has been verified to hold for numbers up to 4 × 1018 . Several results have brought us close to the conjecture. In 1973, Chen Jingrun (1933–1996) showed that every sufficiently large even natural number can be written as either the sum of two primes or the sum of a prime and the product of two primes. Chen’s proof uses sophisticated sieve theory and represents a tour de force of 20th-century analytic number theory. Earlier, in 1937, I. M. Vinogradov (1891–1983) applied the circle method, originally discovered by Srinivasa Ramanujan (1887–1920),7 to show that every sufficiently large odd number can be written as the sum of three primes. His method was ineffective in that it supplied no explicit lower bound. Several mathematicians have devoted themselves to modifying Vinogradov’s approach so as to make it effective. Recently, in 2013, building on earlier work by Olivier Ramar´e and others, Harald Helfgott (born 1977) proved that every odd number greater than 5 can be written as the sum of three primes. This is known as the ternary Goldbach problem. It would be an easy consequence of the Goldbach conjecture, if the conjecture were proven to be true. We now link Goldbach’s conjecture with Diophantine equations. Theorem 6.6. There is a Diophantine equation that has no solutions if and only if Goldbach’s conjecture is true. Proof. An even natural number greater than 2 can be written in the form 2a + 4. As z runs from 0 to a, (z + 2) + (2a + 2 − z) runs over all possible ways of writing 2a + 4 as the sum of two natural numbers greater than or equal to 2. Thus, 2a + 4 is a counterexample 7 The circle method was developed by G. H. Hardy (1877–1947) and Ramanujan in their study of partitions. Later, Hardy and J. E. Littlewood (1885–1977) applied it to study Waring’s problem and other additive questions. Since then, it has been called the Hardly–Littlewood method.

182

6. Applications of Hilbert’s Tenth Problem

to Goldbach’s conjecture if and only if (∀z)≤a (∃x, y) (z + 2 = (x + 2)(y + 2) or 2a + 2 − z = (x + 2)(y + 2)) , which is equivalent to (6.1)

 (∀z)≤a (∃x, y) (z + 2 − (x + 2)(y + 2))

 · (2a + 2 − z − (x + 2)(y + 2)) = 0 .

Applying the existential quantifier and the bounded universal quantifier to a Diophantine expression yields another Diophantine expression. Thus, there exists a polynomial P (a, y1 , . . . , ym ) such that 2a+4 is a counterexample to Goldbach’s conjecture if and only if there exist y1 , . . . , ym with P (a, y1 , . . . , ym ) = 0. Hence, Goldbach’s conjecture holds if and only if the Diophantine equation P (a, y1 , . . . , ym ) = 0 has no solutions.  Although it would be tedious, one can actually write down the above Diophantine equation. Using Theorem 5.21, the bounded universal quantifier can be removed from (6.1). Then earlier theorems can be used to replace the product functions, factorials, binomial coefficients, and exponential equations with Diophantine expressions. Recall that the resulting Diophantine equation P = 0 has natural number variables. If instead we desire a Diophantine equation that has no integer solutions if and only if Goldbach’s conjecture is true, we can replace each natural number variable in P with the sum of the squares of four new integer variables. The procedure that we have just applied to Goldbach’s conjecture is actually quite general. We say that a property Prop(n) of the natural numbers is decidable if the set S = {n : Prop(n) is true} is a decidable set. That is, a property is decidable if we have an algorithm that can be applied to any natural number to determine whether or not the property holds for that number. Note that this may tell us nothing about whether the property holds for all natural numbers, as we may only apply the algorithm to one n at a time. Theorem 6.7. Let Prop(n) be a decidable property of the natural numbers. There exists a Diophantine equation P (n, y1 , . . . , ym ) = 0 such that Prop(n) holds for all n if and only if P = 0 has no solutions.

6.3. Goldbach’s Conjecture, Riemann Hypothesis

183

Proof. Since Prop is decidable, we may run through the natural numbers n, determine whether Prop(n) holds for each, and list the n for which it does not hold. Thus, the set {n : Prop(n) is false} is computably enumerable and, hence, Diophantine. This implies the existence of a polynomial P (n, y1 , . . . , ym ) such that Prop(n) is false if and only if there exist y1 , . . . , ym for which P (n, y1 , . . . , ym ) = 0. Finally, Prop(n) is true for all n if and only if there does not exist an n for which Prop(n) is false. That is, if there do not exist n, y1 , . . . , ym for which P (n, y1 , . . . , ym ) = 0.  The above theorem shows that any statement of the form “for all natural numbers, a decidable property holds” is equivalent to the unsolvability of a particular Diophantine equation. Since we may list the n for which a decidable property does not hold, these are statements for which there exists a process that will find a counterexample, if a counterexample exists. There are many important theorems and open problems that can be put in this form. Thus they are each equivalent to the unsolvability of a particular Diophantine equation! The problem of determining if a Diophantine equation has solutions is quite deep indeed. This makes the negative solution to Hilbert’s tenth problem less surprising. If we were to possess an algorithm that could determine whether a Diophantine equation has a solution, we could then simply apply the algorithm to solve problems in the form of those in Theorem 6.7, such as Goldbach’s conjecture. In the remainder of this section we show that the Riemann hypothesis, perhaps the most important and well-known open problem in number theory, is equivalent to the unsolvability of a particular Diophantine equation.8 As we are not assuming that the reader has previously studied complex analysis, some details will be omitted. We refer the reader to [Mu] for an introduction to analytic number theory. 8 Our equivalence of the Riemann hypothesis is that given by Davis, Matiyasevi˘ c, and Robinson in [DMR], where they acknowledge the assistance of Harold N. Shapiro (1922–2013).

184

6. Applications of Hilbert’s Tenth Problem The Riemann zeta function is defined to be ζ(s) =

∞  1 , ns n=1

which converges for s with real part greater than 1. Other descriptions of ζ(s) may be given that converge elsewhere in the complex plane, allowing us to define ζ(s) for all s = 1.9 It turns out that ζ(s) = 0 for s = −2k with k ∈ N. These are called the trivial zeroes of ζ(s).10 All other zeroes of ζ(s) must satisfy 0 < Re s < 1.11 The Riemann hypothesis, made by Bernhard Riemann (1826–1866) in 1859, is the following statement: The real part of each nontrivial zero of ζ(s) is 12 . The Riemann hypothesis has a strong connection to the distribution of the prime numbers, although the connection is not obvious in its above form. Let π(x) be the prime counting function  1. π(x) = p≤x

The prime number theorem, proved in 1896 independently by Charles Jean de la Vall´ee Poussin (1866–1962) and Jacques Hadamard (1865– 1963), showed that π(x) ∼ li(x), %

where li(x) =

2 9

x

dt . log t

Using a technique called partial summation, it follows that  ∞ {x} 1 dx, −s ζ(s) = 1 + s−1 xs+1 1

where {x} = x − x is the fractional part of x. The integral converges for Re s > 0, allowing us to extend ζ(s) to an analytic function for these values of s, provided s = 1. Riemann showed how to extend ζ(s) to the entire complex plane, except for the simple pole at s = 1. He also proved the functional equation     1−s s s 1−s ζ(s) = π − 2 Γ ζ(1 − s). π− 2 Γ 2 2 It gives a relation between the value of ζ(s) at s with the value at 1 − s. 10 This can be seen by using the functional equation with the fact that Γ(s) has poles at s = 0, −1, −2, . . . and no zeroes. 11 The fact that ζ(s) = 0 for Re s = 1 is equivalent to the prime number theorem, which is mentioned below. It takes some work to show that this equivalence holds.

6.3. Goldbach’s Conjecture, Riemann Hypothesis

185

Thus the quotient of π(x) and li(x) approaches 1 as x gets large.12 How closely does li(x) approximate π(x)? To answer this question, we look at their difference. It has been shown that |π(x) − li(x)| ≤ Axe−B

√ log x

for certain constants A and B. However, the Riemann hypothesis is equivalent to a stronger bound √ |π(x) − li(x)| ≤ C x log x for a certain constant C. In this form, the connection between the Riemann hypothesis and the distribution of the prime numbers is more evident. In fact, it is enough for the above bound to hold for the positive integers in order to imply the Riemann hypothesis. However, it is not clear that the above inequality is a decidable property of x. Given a natural number x, how can we determine if the left-hand side is less than or equal to the right-hand side? We can remove the square root by squaring both sides, but the appearance of li(x) and log x present us with some issues from a computational perspective. To avoid these, we will give another form of the Riemann hypothesis, one that replaces π(x) with a closely related function. Theorem 6.8. For Re s > 1, we have −1  1 . 1− s ζ(s) = p p This is called the Euler product for ζ(s). Proof. Using the geometric series, we have  −1   1 1 1 = 1− s 1 + s + 2s + · · · p p p p p =

∞  1 . s n n=1

12 Using integration by parts or L’Hˆ opital’s rule, one can show that li(x) ∼ Thus the prime number theorem is often stated in an equivalent form:

π(x) ∼

x . log x

x log x .

186

6. Applications of Hilbert’s Tenth Problem

The last line is due to the fundamental theorem of arithmetic (Theorem 3.6), which states that every natural number factors uniquely as a product of primes.  We note that we have not been careful with convergence issues in the above proof and will continue to gloss over such issues in subsequent proofs, as we are not assuming a strong background in analysis on the part of the reader. However, ignoring convergence issues can easily lead one astray, and so much care would have to be taken here in a more rigorous treatment of this material. We refer the reader to [Mu] for a formal introduction, which is not essential now for our discussion here. Theorem 6.9. For Re s > 1, we have − where

 Λ(n) =

∞  Λ(n) ζ (s) = , ζ ns n=1

log p

if n = pα for some α ≥ 1,

0

otherwise,

is the von Mangoldt function. Proof. Applying the logarithm to the Euler product of Theorem 6.8 and then using the Maclaurin series for log(1 − x), we have    1 log ζ(s) = − log 1 − s p p =

∞  p

1 . ms mp m=1

Differentiating this yields ∞  ζ log p (s) = − ζ pms p m=1

=− as required.

∞  Λ(n) , ns n=1



6.3. Goldbach’s Conjecture, Riemann Hypothesis

187

We now define a function closely related to the prime counting function π(x). We let ψ(x) =



log p =

pα ≤x



Λ(n).

n≤x

Thus this function counts all prime powers less than or equal to x, and weights each by log p. The behaviour of ψ(x) and π(x) are closely linked. For example, the prime number theorem is equivalent to ψ(x) ∼ x. It is much easier to work with ψ(x) than π(x), partially because it is the sum of the first x numerators in the series for −(ζ  /ζ)(s) that was given in Theorem 6.9. We set ψ1 (x) =



Λ(n)(x − n).

n≤x

It can be shown that %

x

ψ1 (x) =

ψ(t)dt 1

(this is an exercise).13 The prime number theorem in terms of ψ1 (x) 2 is that ψ1 (x) ∼ x2 . For c > 0, it may be shown that

(6.2)

1 2πi

% (c)

y s+1 ds = s(s + 1)



0

if 0 < y < 1,

y−1

if y ≥ 1,

although doing so requires contour integration. Here the notation (c) in the integration means we integrate from c − i∞ to c + i∞.14 Then, taking c > 1 so that switching the sum and integral can be justified

13 Using ψ1 (x) instead of ψ(x) allows us to avoid some convergence issues with a sum over the nontrivial zeroes of ζ(s). 14 In particular, we integrate over the line from c − it to c + it, and send t to infinity.

188

6. Applications of Hilbert’s Tenth Problem

and using Theorem 6.9, we have % %  ∞ 1 xs+1 1 Λ(n) xs+1 ζ ds = ds − (s) 2πi (c) ζ s(s + 1) 2πi (c) n=1 ns s(s + 1) % ∞  nΛ(n) (x/n)s+1 = ds 2πi (c) s(s + 1) n=1

x  = −1 nΛ(n) n n≤x

= ψ1 (x). We used (6.2) with y = x/n, which allowed us to switch from an infinite sum over all natural numbers to a finite sum over natural numbers up to x. We can also use contour integration to evaluate the above integral by “moving the line of integration to the left”. This is a common technique used in complex analysis, but it is outside the scope of this book to cover it in detail. Again, we refer the student to [Mu]. We note that (ζ  /ζ)(s) has a simple pole at s = 1, where ζ(s) has a pole and has simple poles at the zeroes of ζ(s). The residue of the pole at s = 1 is −1, and the residue of the poles at the trivial zeroes of ζ(s) is 1. This, with much more justification, yields the following explicit formula for ψ1 (x). Theorem 6.10. Let x ≥ 1. Then ∞  x1−2k ζ x2  xρ+1 − − x log 2π + (−1) + , ψ1 (x) = 2 ρ(ρ + 1) ζ 2k(1 − 2k) ρ k=1

where the first sum is over the nontrivial zeroes ρ of ζ(s) and is taken with multiplicity.15 The first term on the right-hand side, which was expected given the prime number theorem, comes from the pole at s = 1. The next term comes from the nontrivial zeroes of ζ(s). The following two terms come from the poles of the integrand at s = 0 and s = −1.16 Finally, the last sum comes from the trivial zeroes of ζ(s). 15 That is, if ρ were a zero of ζ(s) of order 2, then it would appear twice in the summation.  16 We used the fact that ζζ (0) = log 2π here. The reader can find a proof of this in [Dav, p. 81].

6.3. Goldbach’s Conjecture, Riemann Hypothesis

189

We are now ready to show an equivalence of the Riemann hypothesis. Theorem 6.11. The Riemann hypothesis holds if and only if   2  ψ1 (x) − x  < 4.564x 32  2 for every positive natural number x. Proof. We prove the forward direction first. Suppose the Riemann hypothesis holds, so that every nontrivial zero of ζ(s) has real part equal to 12 . Then Theorem 6.10 yields   2  ψ1 (x) − x  ≤ Cx 32  2 for C=

 ρ

    ∞ ζ  1 1 + log 2π +  (−1) + . |ρ||ρ + 1| ζ 2k(2k − 1) k=1

Now, using computational methods, it is possible to show that    ζ   (−1) < 1.986. ζ  Using results in analytic number theory beyond the scope of this text, one can show17 that  1 ≤ 2 + γ − log 4π. |ρ||ρ + 1| ρ Here, γ is the Euler–Mascheroni constant defined by   n 1 − log n . γ = lim n→∞ k k=1

17 Note that since we are assuming the Riemann hypothesis, if ρ is a nontrivial zero of ζ(s), then ρ = 1 − ρ. Thus

 ρ

 1  1  1 1 = ≤ = . 2 |ρ||ρ + 1| |ρ| ρρ ρ(1 − ρ) ρ ρ ρ

To see that the latter sum is equal to 2+γ −log 4π (which does not require the Riemann hypothesis), let s = 1 in the logarithmic derivative of the Hadamard product for   s ζ(s). s(s − 1)Γ 2

190

6. Applications of Hilbert’s Tenth Problem

We have 0.577 < γ < 0.578. Finally, we have ∞  k=1



 1 = 2k(2k − 1) =



k=1 ∞ 

1 1 − 2k − 1 2k



(−1)n+1 n n=1

= log 2. Thus     ζ  C ≤ 2 + γ − log 4π + log 2π +  (−1) + log 2 ζ     ζ  = 2 + γ +  (−1) ζ < 4.564. We now show the reverse direction. Suppose there is a constant M such that for every positive natural number x, we have   2  ψ1 (x) − x  < M x 32 .  2 Now letting x ≥ 1 be real, the triangle inequality yields       2 2 2 2    ψ1 (x) − x  ≤ |ψ1 (x) − ψ1 (x)| + ψ1 (x) − x  +  x − x  .    2 2   2 3

The second term on the right-hand side is less than M x 2 , while for the last term we have    x2 − x2  (x − x)(x + x)  =   2 2 x + x < 2 ≤x 3

≤ x2 .

6.3. Goldbach’s Conjecture, Riemann Hypothesis For the first term, we have

%

|ψ1 (x) − ψ1 (x)| =

191

x

ψ(t)dt x

≤ ψ(x)  = Λ(n) n≤x





log x

n≤x

= x log x 3

< x2 . Thus, for real x ≥ 1, we have   2  ψ1 (x) − x  < (M + 2)x 23 . (6.3)  2 Now, for y a natural number we have  ψ(n) − ψ(n − 1)  Λ(n) = s n ns

n≤y

n≤y

 ψ(n)  ψ(n) − s n (n + 1)s n≤y n≤y−1    1 ψ(y) 1 = s + ψ(n) − y ns (n + 1)s n≤y−1 % n+1  s ψ(y) ψ(n) dx = s + s+1 y x n n≤y−1  % n+1 ψ(x) ψ(y) dx = s +s y xs+1 n≤y−1 n % y ψ(x) ψ(y) dx = s +s s+1 y 1 x % y ψ(y) ψ1 (x) ψ1 (y) = s + s s+1 + s(s + 1) dx. s+2 y y 1 x =

To move ψ(n) inside the integral, we used the fact that ψ(x) = ψ(n) for any x with n ≤ x < n + 1. In the last line, we used integration

192

6. Applications of Hilbert’s Tenth Problem

by parts. Since ψ(y) ≤ y log y, sending y to infinity will send the first two terms to 0 when Re s > 1. Using Theorem 6.9 yields % ∞ ζ ψ1 (x) − (s) = s(s + 1) dt ζ xs+2 1 for Re s > 1. Hence, −

ζ s(s + 1) (s) − = s(s + 1) ζ 2(s − 1)

%



1

ψ1 (x) − xs+2

x2 2

dx.

By (6.3) the integral on the right-hand side converges for Re s > 12 . Due to analytic continuation, the equality then holds for all s = 1 with Re s > 12 , and so ζ(s) must not vanish for 12 < Re s < 1. This implies the Riemann hypothesis.  Note that since the reverse direction of the above proof was done using an arbitrary constant M , we may replace the constant 4.564 in Theorem 6.11 with any larger constant, and the equivalence will still hold. Unfortunately, Theorem 6.11 does not let us use Theorem 6.7 to immediately conclude that the Riemann hypothesis is equivalent to the unsolvability of a Diophantine equation, as it is still not clear that the given property is decidable. We modify the theorem slightly. Let p. δ(x) = i 1 if K = Q. In other words, for any nontrivial extension of Q, there exist ramified primes. Dedekind’s theory led to further reflections on the notion of a prime. Indeed, if p is a prime ideal of OK , we can define a valuation, denoted vp as follows. For any α ∈ OK , the principal ideal (α) admits a unique factorization into prime ideals, pvp (α) , (α) = p

where the product is over all prime ideals of OK and for any fixed α, vp (α) = 0 except for finitely many p. In this way, we obtain a function vp : OK → R+ ∪ {0}, where R+ denotes the positive reals. Clearly, we may extend this definition to K since K is the field of fractions of OK . That is, if α/β ∈ K, β = 0 with α, β ∈ OK , we may set vp (α/β) = vp (α)−vp (β).

7.1. Background on Algebraic Number Theory

209

Let us now define5 |x|p := N(p)−vp (α) . Thus, | · |p is an example of a valuation (synonymously called place or norm or absolute value) which is defined as a map v : K → R+ ∪ {0} that satisfies the following three properties: (1) v(0) = 0, and v(x) = 0 if and only if x = 0; (2) v(xy) = v(x)v(y) for all x, y ∈ K; (3) there is a constant C such that v(x + y) ≤ C max(v(x), v(y)) for all x, y ∈ K. The reader can verify that vp satisfies these properties with C = 1. The familiar absolute value also satisfies these properties with C = 2 as a consequence of the triangle inequality. Moreover, we can define for each embedding K → K (i) , a valuation v (i) , α → |α(i) |,

1 ≤ i ≤ n.

These valuations are called Archimedean valuations. The others, namely | · |p , are called non-Archimedean valuations. There is always the trivial valuation, v(0) = 0 and v(x) = 1 for all x = 0. We usually discard this trivial valuation in our study. Each valuation defines a metric on K that makes K into a Hausdorff topological field in which the field operations are continuous. Two valuations are said to be equivalent if they induce the same topology on K. A celebrated theorem of Alexander Ostrowski (1893–1986), proved in 1918, states that up to equivalence, any nontrivial valuation of K is either | · |p corresponding to a prime ideal p of OK or v (i) for some embedding of K. It is this theorem that led to the view that valuations are to be seen as the appropriate generalization of the concept of a prime. This perspective gave rise to our modern adelic viewpoint that has transformed number theory and mathematics in general. The 5 The use of N(p) here can be replaced by any constant c > 1, and this would give rise to the same topology on K. We have used here a convenient normalization often used in algebraic number theory so as to make formulas (such as the product formula) more elegant.

210

7. Hilbert’s Tenth Problem over Number Fields

modern perspective is to view an algebraic number field K as a spectrum of valuations consisting of both non-Archimedean (finite) and Archimedean (infinite) places. This has served as a grand unifying theme in number theory culminating in Tate’s thesis. Briefly stated, Tate’s thesis takes the adelic perspective to study the Dedekind zeta function and to derive its analytic continuation and functional equation as a consequence of Fourier duality. The search for a generalization of Dirichlet’s theorem on the infinitude of primes in arithmetic progressions led to the study of ideal class groups and generalized ideal class groups. The initial impulse is to study the ideal class group defined as the multiplicative group generated by the ideals of OK modulo the subgroup of principal ideals. In 1871 Dedekind proved that this group is a finite group. The ideal class group is a measurement of how far OK is from being a principal ideal domain. The generalized ideal class groups are defined as follows. Let m0 be an ideal of OK , and let m∞ be a subset of real embeddings of K. Let I be the multiplicative group generated by all ideals of OK coprime to m0 . We consider the subgroup P of fractional ideals (α) (that is, the multiplicative group generated by principal ideals) with α ≡ 1 (mod m0 ) and α(i) > 0 for all i ∈ m∞ . The generalized ideal class group determined by the pair (m0 , m∞ ) is the quotient I/P . These groups are viewed as the number field generalizations of the more familiar coprime residue classes of the rational number field. Indeed, if m0 ∈ Z and m∞ is the usual embedding Q → R, then the ideal class group determined by (m0 , m∞ ) is the usual group (Z/m0 Z)× . Thus, the ideal classes of the generalized ideal class groups are the natural generalizations of arithmetic progressions. Once these ideal class groups are defined, it is then natural to extend Dedekind’s theorem and show that they are finite. Then, to extend Dirichlet’s theorem on the infinitude of primes in arithmetic progressions, we define the L-series L(s, χ) for each character χ of the generalized ideal class group

L(s, χ) =

 χ(a) . (N a)s a

7.1. Background on Algebraic Number Theory

211

These are generalizations of the Dedekind zeta function. In 1918, Hecke proved that these L-series extend to the entire complex plane and satisfy a suitable functional equation. Consequently, we refer to these L-series as Hecke L-series. In the years following the work of Hecke, algebraic number theory underwent a remarkable transformation, largely through the use of the topology of adele rings of number fields. These rings are defined as follows. As noted earlier, a convenient way of looking at prime ideals of OK is to view them as part of the spectrum of valuations of the field K. If v is a valuation, then we may complete K to get the v-adic field Kv . If v is non-Archimedean (that is, corresponding to a prime ideal of OK ), then we define the ring of v-adic integers to be the set of x ∈ Kv such that v(x) ≤ 1. We denote this ring as Ov . The adele ring AK consists of infinite tuples (xv ), as v ranges over all the inequivalent valuations (or places) with xv ∈ Kv , but with the proviso that xv ∈ Ov for all but finitely many places. Addition and multiplication in this ring are defined componentwise. This makes AK into a commutative ring. We make it a locally compact topological ring by declaring that for each finite set S of places containing the Archimedean places, the set Kv × Ov , v∈S

v ∈S /

with the product topology, is a basic neighbourhood of the identity element of AK . One can view K as embedded into AK via the map x → (x, x, x, . . .). If GLn (AK ) is the group of invertible n × n matrices with entries in AK , one can similarly define a topology on it so as to make it into a locally compact topological group. Indeed, for each finite set S containing the infinite places, we declare GLn (Kv ) × GLn (Ov ), v∈S

v ∈S /

with the product topology, as a basic neighbourhood of the identity. The group of units of AK , denoted A× K , is called the group of ideles. It is clear that K × is embedded in A× K , as before. The group

212

7. Hilbert’s Tenth Problem over Number Fields

× A× is called the idele class group. Characters of this group are K /K called grossencharacters, and Hecke’s work shows that one can associate L-functions to these grossencharacters which extend to the entire complex plane and satisfy a suitable functional equation. This formulation of Hecke’s work is the essence of Tate’s thesis.

7.2. Introduction to Zeta Functions and L-functions All of the characters attached to generalized ideal class groups turn out to be special cases of grossencharacters. Robert Langlands (born 1936) formulated a vast generalization of the construction of these L-functions. As hinted before, GLn (AK ) is a locally compact topological group in which GLn (K) is embedded diagonally as a discrete subgroup. If I denotes the n × n identity matrix and Z := {zI : z ∈ A× K }, then the coset space Z GLn (K)\ GLn (AK ) has finite volume with respect to any GLn (AK ) invariant measure. Let us now fix a grossencharacter ω and consider the Hilbert space L2 (GLn (K)\ GLn (AK ), ω) consisting of measurable functions φ on GLn (K)\ GLn (AK ) satisfying (i) φ(zg) = ω(z)φ(g) ∀z ∈ Z, g ∈ GLn (K)\ GLn (AK ); % |φ(g)|2 dg < ∞. (ii) Z GLn (K)\ GLn (AK )

A special role is played by the standard parabolic subgroups of GLn . They are in one-to-one correspondence with partitions n = n1 + n2 + · · · + nr . If Mn is a generic n × n matrix with entries in AK and In is the n × n identity matrix, the standard parabolic subgroup consists of matrices

7.2. Introduction to Zeta Functions and L-functions of the form

⎛ ⎜ ⎜ ⎜ ⎝

Mn1

∗ Mn2

··· ··· .. .

∗ ∗

213

⎞ ⎟ ⎟ ⎟, ⎠

Mnr and any subgroup conjugate to a standard parabolic subgroup is called a parabolic subgroup. Such a subgroup P admits a decomposition (called the Levi decomposition) of the form P = M N, where N is the unipotent radical (consisting of elements of P , all of whose eigenvalues are equal to 1). The subspace of cusp forms L2o (GLn (K)\ GLn (AK ), ω) of L2 (GLn (K)\ GLn (AK ), ω) is defined as the collection of φ satisfying (i) and (ii) above and for all parabolic subgroups P of GLn (AK ), we have % (iii) φ(ng)dn = 0 ∀g ∈ GLn (AK ), N(K)\ N(AK )

where N is the unipotent radical of P . The right regular representation R of GLn (AK ) is defined as an action of GLn (AK ) on L2 (GLn (K)\ GLn (AK ), ω) by the formula (R(g)φ)(x) = φ(xg)

∀φ ∈ L2 (GLn (K)\ GLn (AK ), ω)

and x, g ∈ GLn (AK ). An automorphic representation is a subquotient of the right regular representation. A cuspidal automorphic representation is a subrepresentation of the right representation of GLn (AK ) on L2o (GLn (K)\ GLn (AK ), ω). It is called admissible if its restriction to the compact group Un (C) × On (R) × GLn (Ov ) v complex

v real

v finite

214

7. Hilbert’s Tenth Problem over Number Fields

contains each irreducible representation with finite multiplicity (where the product is over all valuations of K, and where Un (C), On (R) denote the unitary and orthogonal groups of n × n matrices, respectively). Such admissible representations π can be written as a restricted tensor product , πv , π= v

where πv is an irreducible representation of GLn (Kv ). By the work of Harish-Chandra (1923–1983), the structure of these representations is well known. Indeed, if B is the Borel subgroup of GLn (Kv ) consisting of upper triangular matrices ⎛ ⎞ b1 ∗ · · · ∗ ⎜ b2 · · · ∗ ⎟ ⎜ ⎟ b=⎜ ⎟, .. ⎝ ⎠ . bn for any n-tuple, z = (z1 , z2 , . . . , zn ) ∈ Cn , we define a character χz of B by setting χz (b) = |b1 |zv1 · · · |bn |zvn , where |·|v denotes the v-adic metric. We let π -v,z be the representation of GLn (Kv ) obtained by inducing χz from B to GLn (Kv ). We assume Re(z1 ) ≥ Re(z2 ) ≥ · · · ≥ Re(zn ). A special case of the Langlands classification theorem shows that π -v,z has a unique irreducible quotient πv,z . One shows that πv is equivalent to πv,z for some z. Using this data, we define the matrix Av = diag(N v −z1 , . . . , N v −zn ), where N v denotes the norm of v. For a given representation π, there is a finite set S of places such that πv is of the type described above for v ∈ / S. For such v, we set Lv (s, π) = det(I − Av N v −s )−1 and set LS (s, π) =

v ∈S /

Lv (s, π).

7.3. A Brief Overview of Elliptic Curves

215

Using known estimates of the zi , one can show that this defines an analytic function in some fixed half-plane. Langlands obtained the meromorphic continuation of LS (s, π). It is possible to define Lv (s, πv ) for v ∈ S such that the complete L-function L(s, π) = Lv (s, πv ) v

has a meromorphic continuation and functional equation. If π is cuspidal, then L(s, π) extends to an entire function unless n = 1 and π is of the form | · |t for some t ∈ C. This is a celebrated theorem of Roger Godement (1921–2016) and Herv´e Jacquet (born 1939). The Ramanujan conjecture is the assertion that the eigenvalues of Av are of absolute value 1 for cuspidal automorphic representations. This conjecture has been proved in some special cases but remains largely an open problem. An inspired account of the development of the Langlands program can be found in the recent autobiography of Edward Frenkel [Fr]. A more advanced introduction can be found in the expository article of Gelbart [Ge].

7.3. A Brief Overview of Elliptic Curves and Their L-functions This is an extremely brief synopsis of a rich theory worthy of careful study. We can recommend two accessible texts for the undergraduate student. The first is by Silverman and Tate [ST] and the other is Chapter 18 of the book by Ireland and Rosen [IR]. For the ambitious student, we suggest the book by Silverman [Sil]. An elliptic curve E over a field K is given by an equation y 2 + a1 xy + a3 y = x3 + a2 x2 + a4 x + a6 with ai ∈ K, and the discriminant of the equation is nonzero together with a fixed basepoint. If the field K has characteristic not equal to 2 or 3, then we can describe E using a Weierstrass equation (7.1)

y 2 = x3 + ax + b

with a, b ∈ K, and the discriminant Δ = −16(4a3 + 27b2 ) = 0.

216

7. Hilbert’s Tenth Problem over Number Fields

If K is an algebraic number field, one can associate the conductor of E by N= pδ(p) , p

where the product is over prime divisors of the discriminant and δ(p) is a positive integer determined by the behaviour of E at the prime ideal p. We say E has good reduction at p if δ(p) = 0. For such primes, the number of points modulo p can be written as N(p) + 1 − a(p) with N(p) being the norm of the ideal p and (7.2)

1

|a(p)| ≤ 2 N(p) 2 .

The L-series of E/K is defined as L(E/K, s) := Lp (E/K, s), p

where the product is over all prime ideals p of OK , and for p coprime to N −1  . Lp (E/K, s) = 1 − a(p) N(p)−s + N(p)1−2s For p|N , one can define Lp (E/K, s) based on its reduction modulo p. The bound given in (7.2) shows that L(E/K, s) converges absolutely for Re(s) > 3/2. TheTaniyama–Shimura conjecture is the assertion that L(E/K, s) is equal to L(s − 1/2, π) for some automorphic representation π of GL2 (AK ). When K is the rational number field, this is the celebrated theorem of Andrew Wiles (born 1953) and Breuil, Conrad, Diamond, and Taylor. It is also known for real quadratic fields. There are some partial results in the general case. In the literature, this conjecture is sometimes referred to as the modularity conjecture. We say E is automorphic over K when the conjecture holds. The work of Wiles combined with earlier work of Ken Ribet (born 1948) led to the solution of Fermat’s last theorem. The set of solutions of (7.1) with x, y ∈ K, denoted E(K), can be given the structure of an abelian group. A celebrated theorem of Louis J. Mordell (1888–1972) and Andr´e Weil (1906–1998) proves

7.3. A Brief Overview of Elliptic Curves

217

that E(K) is a finitely generated abelian group when K is an algebraic number field. The number of generators is called the rank. That is, E(K)  E(K)tors ⊕ Zr , where the torsion subgroup E(K)tors is finite. The famous Birch and Swinnerton-Dyer conjecture predicts that L(E/K, s) has a zero of order r at s = 1. The L-function satisfies a functional equation relating its value at s to its value at 2 − s. Thus, the line Re(s) = 1 is the critical line of symmetry. There is a substantially weaker conjecture called the parity conjecture. This predicts that the parity of the rank equals the parity of the order of zero at s = 1. These conjectures are partially motivated by a powerful analogy × , the group of units of the ring of integers of between E(K) and OK × OK . The reader will recall that OK is a finitely generated abelian × is equal to the order of group, and it is known that the rank of OK the zero of ζK (s) at s = 0. This analogy has led to further conjectures about orders of zeros of L-functions attached to algebraic varieties. One can associate to each elliptic curve E over an algebraic number field K, the Shafarevich–Tate group, denoted X(E/K), which measures the deviation of the local-global principle for E. More precisely, we say two elliptic curves E1 and E2 over K are locally isomorphic if they are isomorphic (as varieties) over all completions Kv . If two curves are locally isomorphic, then Ernst S. Selmer (1920–2006) showed by giving explicit examples that it does not follow necessarily that they are globally isomorphic. For a given curve E/K, we may consider the set S of all elliptic curves E/K which are locally isomorphic to E/K. The subset of S on which E acts simply transitively can be given the structure of an abelian group, and this is X(E/K). It is conjectured that X(E/K) is finite, and Barry Mazur (born 1937) has shown that this conjecture is equivalent to the finiteness of S. We refer the reader to the excellent expository article of Mazur [Maz]. It is known that if X(E/K) is finite, then its order must be a perfect square. Some progress on the finiteness conjecture has been made. In 1987, Karl Rubin proved this for some elliptic curves of rank at most one and with complex multiplication. In 1988 Victor

218

7. Hilbert’s Tenth Problem over Number Fields

Kolyvagin showed the same for modular elliptic curves using an analytic theorem of Murty and Murty [MM1] and Bump, Friedberg, and Hoffstein [BFH].

7.4. Nonvanishing of L-functions and Hilbert’s Problem We give in this section a brief survey of the contents of the paper [MP] which connects the theory of L-functions and Hilbert’s tenth problem over number fields. Let K be an algebraic number field, and let OK be its ring of integers. If we can show that Z has a Diophantine definition in OK , then Hilbert’s tenth problem over OK reduces the problem to Hilbert’s tenth problem over Z, which by Davis, Matiyasevi˘c, Putnam, and Robinson, is unsolvable. This has been the approach adopted by many who have been working on this problem. Using this method, we know that Hilbert’s tenth problem is unsolvable if K is totally real or is a quadratic extension of a totally real field through the work of Denef and Lipshitz (see [D1] and [DL]), and if K has exactly one nonreal Archimedean place by the work of Pheidas [Ph], Shlapentokh [Sh1], Videla [Vi] (independently). To discuss briefly these developments without being stifled by technical verbiage, it is convenient to make the following definitions. n is said to be Diophantine in OK if there is a polynomial A set S ⊆ OK f ∈ OK [x1 , . . . , xn , y1 , . . . , ym ] such that n : ∃(b1 , . . . , bm ) S = {(a1 , . . . , an ) ∈ OK

with f (a1 , . . . , an , b1 , . . . , bm ) = 0}. It is easy to see that if Z is Diophantine in OK , then any algorithm requested by Hilbert’s tenth problem for OK can be modified to get a general algorithm for Hilbert’s tenth problem over Z, which is not possible. So, all methods aimed at showing that Hilbert’s tenth problem is unsolvable over OK have focused on showing that Z is Diophantine in OK .

7.4. Nonvanishing of L-functions

219

More generally, we say that a number field extension L/K is integrally Diophantine if OK is Diophantine in OL . This property has some nice functorial properties. For instance, if L/K is integrally Diophantine and Hilbert’s tenth problem is unsolvable in OK , then it is unsolvable over OL as well. Then there is the transitive property: if L/K and K/M are both integrally Diophantine, then so is L/M . If L/M is integrally Diophantine and M ⊆ K ⊆ L is an intermediate field, then K/M is integrally Diophantine. Finally, if L/K1 and L/K2 are both integrally Diophantine, then so is L/K1 ∩ K2 . These results can be found in [SS] These properties will be useful in our investigation of Hilbert’s tenth problem in number fields. For example, we can use them to show the desired unsolvability for any abelian extension of Q. Indeed, Hilbert’s tenth problem is unsolvable for any cyclotomic field (which is a CM field and hence a quadratic extension of a totally real field). By the celebrated Kronecker–Weber theorem, every abelian extension of Q is contained in some cyclotomic field. Since it has been shown that Z is Diophantine for any cyclotomic field, it follows that any abelian extension is integrally Diophantine. So the result follows from the first property. In 2002 Bjorn Poonen [Po] linked the theory of elliptic curves with Hilbert’s tenth problem by proving the following remarkable theorem. Let L/K be a finite extension of algebraic number fields. Suppose there is an elliptic curve E/K such that rk E(L) = rk E(K) = 1. Then L/K is integrally Diophantine. This result motivated Poonen to ask whether such a curve exists. If we believe the Birch and Swinnerton-Dyer conjecture, the question asks for an elliptic curve E whose associated L-function has a simple zero at s = 1 and whose base change to the extension L/K also has a simple zero at s = 1. Since we know that the base change L-function factors as a product of the L-function of E over K and twists of this L-function, the condition is equivalent to the nonvanishing of all the twists. Since our goal is to show that Hilbert’s tenth problem is unsolvable for any number field K/Q, it suffices to verify Poonen’s elliptic

220

7. Hilbert’s Tenth Problem over Number Fields

curve criterion for cyclic extensions of prime degree. Mazur and Rubin [MR] have shown that assuming that the 2-torsion part of the Shafarevich–Tate groups of elliptic curves is a perfect square (the groups are conjecturally finite; if they are finite, a famous theorem of J. W. S. Cassels implies it must be a perfect square), then Hilbert’s tenth problem is unsolvable for all algebraic number fields. Poonen’s criterion was generalized by Cornelissen, Pheidas, and Zahidi [CPZ] and later by Alexandra Shlapentokh [Sh2] as follows. Suppose there is an elliptic curve E/K such that rk E(L) = rk E(K) > 0. Then L/K is integrally Diophantine. This criterion is less restricted but still amounts to showing nonvanishing of certain L-functions, assuming the Birch and Swinnerton-Dyer conjecture. This weakened criterion allowed Murty and Pasten [MP] to show the following. Suppose that elliptic curves over number fields are automorphic and that they satisfy the parity conjecture. In addition, assume that for every grossencharacter η, ords=1 L(E/K, s, η) = 0 ⇒ dim(E(L) ⊗ C)η = 0. (This is often referred to as the analytic rank 0 part of the twisted Birch and Swinnerton-Dyer conjecture.) Then, for every number field K, Hilbert’s tenth problem for OK is unsolvable. The analytic rank condition described above has been the focus of considerable attention ever since the work of Kolyvagin appeared. The works of Murty and Murty [MM1] and Bump, Friedberg, and Hoffstein [BFH] can be applied to attain the desired end. These ideas are amplified in a recent paper of Murty and Pasten [MP]. The elaborate details are beyond the scope of this monograph.

Exercises 7.1. Show that integer.

√ 2/3 is an algebraic number but not an algebraic

Exercises

221

√ 7.2. Show that the ring of integers of Q( −1) is the Gaussian ring √ Z[ −1]. 7.3. Show that at least one of the numbers π + e and πe is transcendental. (It is conjectured that both are transcendental.) 7.4. Let (A, B) be a pair of sets of rational numbers with B = Q\A. Then (A, B) is a Dedekind cut if the following hold: • A = ∅ and A = Q; • if p ∈ A and q < p, then q ∈ A; • if p ∈ A, then there exists r ∈ A with r > p. – Suppose (A, B) and (C, D) are Dedekind cuts. Show that A ⊆ C or C ⊆ A. – Let r ∈ Q. Let A = {q ∈ Q : p < r} and B = Q\A. Show that (A, B) is a Dedekind cut. – For each natural number n, let n   1 . An = x ∈ Q : x < j! j=0 Let A = n An . Show that Euler’s number e is defined by the Dedekind cut (A, B) where B = Q\A.

Appendix A

Background Material

In this text we have assumed that the reader has taken some sort of advanced level math course, at least enough to be acquainted with the basics of logic, sets, relations, and functions. An introductory course to mathematical proofs, commonly offered by many universities and colleges, should be sufficient. Even if a student has not taken such a course, much of this information would be covered by a good first year course in calculus or linear algebra. In this appendix, we give a brief overview of some of this material. For propositions P and Q, which take on either the value true, denoted T , or false, denoted F , we define the logical connectives ¬ (negation, read as “not”), ∨ (disjunction, read as “or”), ∧ (conjunction, read as “and”), =⇒ (conditional or implication, read as “if, then”), and ⇐⇒ (biconditional, read as “if and only if”) in the usual way. We give their truth tables below, which show how the truth values for each connective depend on the truth of P and Q.

P

¬P

T F

F T

P

Q

P ∨Q

P

Q

P ∧Q

T T F F

T F T F

T T T F

T T F F

T F T F

T F F F

223

224

A. Background Material P

Q

P =⇒ Q

P

Q

P ⇐⇒ Q

T T F F

T F T F

T F T T

T T F F

T F T F

T F F T

We use two quantifiers: the universal quantifier ∀ (read as “for all” or “for every”) and the existential quantifier ∃ (read as “there exists” or “for some”). The proposition ∀xP (x) is true if P (x) is true for every value of x and is false otherwise.1 The proposition ∃xP (x) is true if there is at least one x for which P (x) is true and is false otherwise. A variable that is under the scope of a quantifier is called bound. If a variable is not bound, then it is free. For example, in P (x, y) ∧ ∀xQ(x, y), the second appearance of the variable x is bound by the universal quantifier, while the first appearance of x and the variable y are free. A set is a collection of objects. Often, sets are written in the form {x ∈ S : P (x)}, where S is a previously given set and P (x) is a property of x. If S is implicitly clear, it may not be explicitly stated. For example, working over N, E = {x : ∃y(x = 2y)} (here x, y ∈ N) is the set of even natural numbers. If for each x ∈ A we have x ∈ B, then we write A ⊆ B and say A is a subset of B. For example, for the set E given above, we have E ⊆ N. We may build new sets from given sets A and B. The union of A with B is A ∪ B = {x : x ∈ A ∨ x ∈ B}. The intersection of A and B is A ∪ B = {x : x ∈ A ∧ x ∈ B}. The complement of A is / A}. Ac = {x : x ∈ 1 If not otherwise stated, it is implicitly understood that we are quantifying over all x in some universe; perhaps over all natural numbers, or over all sets, for example.

A. Background Material

225

Here, we understand that x are taken from some implicit universal set if not otherwise stated. For example, the complement of the set E of even natural numbers is the √ numbers, and it √ set of odd natural / E. does not include, for example, 2 even though 2 ∈ Given sets A and B, a relation from A to B is any subset of {(a, b) : a ∈ A ∧ b ∈ B}. That is, a relation R is a set consisting of some ordered pairs whose first components are elements of A and second components are elements of B. A relation from A to A is called a relation on A. If (a, b) ∈ R, then we say that a is related to b by R. For example, working over N we can define R = {(a, b) : ∃c(a + c = b)} (here a, b, c ∈ N). This defines the usual ≤ relation: (a, b) ∈ R if and only if a ≤ b. This same definition of a relation can be extended from ordered pairs to ordered n-tuples. Given a relation R from A to B, the inverse relation R−1 is the relation from B to A: R−1 = {(b, a) : (a, b) ∈ R}. For example, the inverse relation of ≤ on N is ≥. A relation R on A is reflexive if for each a ∈ A, we have (a, a) ∈ R. That is, a relation is reflexive if every element of A is related to itself. R is symmetric if (a, b) ∈ R implies (b, a) ∈ R. Finally, R is transitive if (a, b) ∈ R and (b, c) ∈ R implies (a, c) ∈ R. A relation that is reflexive, symmetric, and transitive is called an equivalence relation. If R is an equivalence relation on A and a ∈ A, then we define the equivalence class for a to be the set a = {b ∈ A : (a, b) ∈ R}. That is, the equivalence class for a consists of all elements related to a. Since R is reflexive, the equivalence class for a contains at least a, and is thus nonempty. It is a fundamental theorem on equivalence relations that the distinct equivalence classes partition A into disjoint sets.

226

A. Background Material

Modular arithmetic is an important application of equivalence relations. Fix a natural number n ≥ 2. We define a relation on Z as follows: a is related to b if n divides a − b. This is an equivalence relation. We write a ≡ b (mod n) when a is related to b. Let a, b ∈ Z have equivalence classes a and b, respectively. Note that each of these are sets of integers, and if c ∈ a, then c = a. Thus, the same equivalence class will have many different representatives. We define a + b to be a + b and a · b to be ab. It is an important exercise to show that these operations are well defined; that is, the sum and product of equivalence classes do not depend on the representatives used for each class. These operations give us modular arithmetic. Given sets A and B, a function from A to B is a relation from A to B with the following property: for each a ∈ A, there is exactly one b ∈ B such that a is related to b. If f is a function from A to B, we write f : A → B. Since a relation is a set of ordered pairs, so is a function. A function is a relation where every element of a appears as the first coordinate in exactly one ordered pair in the relation. If f is a function and (a, b) ∈ f , we write f (a) = b. The use of equality here is justified by the fact that for each a there is a unique b with (a, b) ∈ f . The set A is called the domain of the function, and B is called the codomain. The subset of the codomain defined by {b ∈ B : ∃a ∈ A(f (a) = b)} is called the range of f . Let f be a function from A to B. If for all a, b ∈ A, f (a) = f (b) implies a = b, then we say that f is injective or one-to-one. For an injective function, the elements of its codomain are mapped to at most once. If for each b ∈ B, there is some a ∈ A with f (a) = b, then we say that f is surjective or onto. For a surjective function, the elements of its codomain are mapped to at least once. If f is both injective and surjective, we say that it is bijective. For a bijective function, each element of its codomain is mapped to exactly once. That is, a bijective function f : A → B yields a perfect pairing between the elements of A and B.

A. Background Material

227

If f : A → B is bijective, then the inverse relation f −1 is a function from B to A. This is a fundamental result on bijective functions. When f is bijective, f is said to be invertible, and f −1 : B → A is called the inverse of f . If f (a) = b, then f −1 (b) = a. Given functions f : A → B and g : B → C, the composition g ◦ f is the function from A to C defined by (g ◦ f )(x) = g(f (x)) for all x ∈ A. If f and g are injective, then so if g ◦ f . If f and g are surjective, then so is g ◦ f . Thus the composition of two bijective functions is bijective. If f : A → B is bijective and, hence, invertible, then f −1 ◦ f = iA , where iA : A → A is the identity function on A defined by iA (a) = a for all a ∈ A.

Bibliography

[AMS]

F. E. Browder (ed.), Mathematical developments arising from Hilbert problems, Proceedings of Symposia in Pure Mathematics, Vol. XXVIII, American Mathematical Society, Providence, R. I., 1976. MR0419125

[Ba1]

A. Baker, A concise introduction to the theory of numbers, Cambridge University Press, Cambridge, 1984. MR781734

[Ba2]

A. Baker, A comprehensive course in number theory, Cambridge University Press, Cambridge, 2012. MR2954465

[BFH]

D. Bump, S. Friedberg, and J. Hoffstein, On some applications of automorphic forms to number theory, Bull. Amer. Math. Soc. (N.S.) 33 (1996), no. 2, 157–175, DOI 10.1090/S0273-0979-96-00654-4. MR1359575

[CPZ]

G. Cornelissen, T. Pheidas, and K. Zahidi, Division-ample sets and the Diophantine problem for rings of integers (English, with English and French summaries), J. Th´ eor. Nombres Bordeaux 17 (2005), no. 3, 727–735. MR2212121

[Cr]

J. N. Crossley, C. J. Ash, C. J. Brickhill, J. C. Stillwell, and N. H. Williams, What is mathematical logic?, Oxford University Press, London-New York, 1972. Oxford Paperbacks University Series, No. 60. MR0414308

[Dav]

H. Davenport, Multiplicative number theory, 2nd ed., Graduate Texts in Mathematics, vol. 74, Springer-Verlag, New York-Berlin, 1980. Revised by Hugh L. Montgomery. MR606931

[Da1]

M. Davis, Computability and unsolvability, McGraw-Hill Series in Information Processing and Computers, McGraw-Hill Book Co., Inc., New YorkToronto-London, 1958. MR0124208

[Da2]

M. Davis, Hilbert’s tenth problem is unsolvable, Amer. Math. Monthly 80 (1973), 233–269, DOI 10.2307/2318447. MR0317916

[Da3]

M. Davis, On the number of solutions of Diophantine equations, Proc. Amer. Math. Soc. 35 (1972), 552–554, DOI 10.2307/2037646. MR0304347

[DMR]

M. Davis, Y. Matijaseviˇ c, and J. Robinson, Hilbert’s tenth problem: Diophantine equations: positive aspects of a negative solution, Mathematical developments arising from Hilbert problems (Proc. Sympos. Pure Math., Vol. XXVIII, Northern Illinois Univ., De Kalb, Ill., 1974), Amer. Math. Soc., Providence, R. I., 1976, pp. 323–378. MR0432534

229

230

Bibliography

[Daw]

J. W. Dawson Jr., Logical dilemmas: The life and work of Kurt G¨ odel, A K Peters, Ltd., Wellesley, MA, 1997. MR1429389

[De]

R. Dedekind, Theory of algebraic integers, Cambridge Mathematical Library, Cambridge University Press, Cambridge, 1996. Translated from the 1877 French original and with an introduction by John Stillwell. MR1417492

[D]

J. Denef, Hilbert’s tenth problem for quadratic rings, Proc. Amer. Math. Soc. 48 (1975), 214–220, DOI 10.2307/2040720. MR0360513

[D1]

J. Denef, Diophantine sets over algebraic integer rings. II, Trans. Amer. Math. Soc. 257 (1980), no. 1, 227–236, DOI 10.2307/1998133. MR549163

[DL]

J. Denef and L. Lipshitz, Diophantine sets over some rings of algebraic integers, J. London Math. Soc. (2) 18 (1978), no. 3, 385–391, DOI 10.1112/jlms/s2-18.3.385. MR518221

[DPR]

M. Davis, H. Putnam, and J. Robinson, The decision problem for exponential diophantine equations, Ann. of Math. (2) 74 (1961), 425–436, DOI 10.2307/1970289. MR0133227

[Du]

A. K. Dutta, Kut..taka, bh¯ avan¯ a and cakrav¯ ala, Studies in the history of Indian mathematics, Cult. Hist. Math., vol. 5, Hindustan Book Agency, New Delhi, 2010, pp. 145–199. MR2648498

[En]

H. B. Enderton, A mathematical introduction to logic, 2nd ed., Harcourt/Academic Press, Burlington, MA, 2001. MR1801397

[Fo]

B. Fodden, Diophantine equations and the generalized Riemann hypothesis, J. Number Theory 131 (2011), no. 9, 1672–1690, DOI 10.1016/j.jnt.2011.01.017. MR2802141

[Fr]

E. Frenkel, Love and math: The heart of hidden reality, Basic Books, New York, 2013. MR3155773

[Ge]

S. Gelbart, An elementary introduction to the Langlands program, Bull. Amer. Math. Soc. (N.S.) 10 (1984), no. 2, 177–219, DOI 10.1090/S0273-09791984-15237-6. MR733692

[Go]

D.C. Goldrei, Classic set theory for guided independent study, CRC Press, Boca Raton, FL, 1998.

[Gra]

J. J. Gray, The Hilbert challenge, Oxford University Press, Oxford, 2000. MR1828558

[GT]

B. Green and T. Tao, The primes contain arbitrarily long arithmetic progressions, Ann. of Math. (2) 167 (2008), no. 2, 481–547, DOI 10.4007/annals.2008.167.481. MR2415379

[Ha]

P. R. Halmos, Naive set theory, Springer-Verlag, New York-Heidelberg, 1974. Reprint of the 1960 edition; Undergraduate Texts in Mathematics. MR0453532

[HW]

G. H. Hardy and E. M. Wright, An introduction to the theory of numbers, 6th ed., Oxford University Press, Oxford, 2008. Revised by D. R. Heath-Brown and J. H. Silverman; With a foreword by Andrew Wiles. MR2445243

[Haw]

S. Hawking (ed.), God created the integers: The mathematical breakthroughs that changed history, Running Press, Philadelphia, PA, 2007. Edited, with commentary, by Stephen Hawking. MR2382242

[Hil02]

D. Hilbert, Mathematical Problems, Bull. Amer. Math. Soc. 8 (1902), no. 10, 437–479. MR1557926

[Ho]

R. Hodel, An Introduction to Mathematical Logic, Dover Publications, New York, 2013.

[Hod]

A. Hodges, Alan Turing: the enigma, The centenary edition, Princeton University Press, Princeton, NJ, 2012. With a foreword by Douglas Hofstadter and a new preface by the author. MR2963548

Bibliography

231

[HR]

P. Howard and J. E. Rubin, Consequences of the axiom of choice, Mathematical Surveys and Monographs, vol. 59, American Mathematical Society, Providence, RI, 1998. With 1 IBM-PC floppy disk (3.5 inch; WD). MR1637107

[IR]

K. F. Ireland and M. I. Rosen, A classical introduction to modern number theory, Graduate Texts in Mathematics, vol. 84, Springer-Verlag, New YorkBerlin, 1982. Revised edition of Elements of number theory. MR661047

[Je]

T. Jech, Set theory: The third millennium edition, Springer Monographs in Mathematics, Springer-Verlag, Berlin, 2003. revised and expanded. MR1940513

[Jo1]

J. P. Jones, Three universal representations of recursively enumerable sets, J. Symbolic Logic 43 (1978), no. 2, 335–351, DOI 10.2307/2272832. MR0498049

[Jo2]

J. P. Jones, Universal Diophantine equation, J. Symbolic Logic 47 (1982), no. 3, 549–571, DOI 10.2307/2273588. MR666816

[JSWW] J. P. Jones, D. Sato, H. Wada, and D. Wiens, Diophantine representation of the set of prime numbers, Amer. Math. Monthly 83 (1976), no. 6, 449–464, DOI 10.2307/2318339. MR0414514 [KP]

L. Kirby and J. Paris, Accessible independence results for Peano arithmetic, Bull. London Math. Soc. 14 (1982), no. 4, 285–293, DOI 10.1112/blms/14.4.285. MR663480

[Ku]

K. Kunen, Set theory, Studies in Logic (London), vol. 34, College Publications, London, 2011. MR2905394

[LK]

C. Leary, and L. Kristiansen, A friendly introduction to mathematical logic, Second edition, Milne Library, Genesco, NY, 2015.

[Ma]

Y. V. Matiyasevi˘ c, Hilbert’s tenth problem, Foundations of Computing Series, MIT Press, Cambridge, MA, 1993. Translated from the 1993 Russian original by the author; With a foreword by Martin Davis. MR1244324

[Maz]

B. Mazur, On the passage from local to global in number theory, Bull. Amer. Math. Soc. (N.S.) 29 (1993), no. 1, 14–50, DOI 10.1090/S0273-0979-199300414-2. MR1202293

[MR]

B. Mazur and K. Rubin, Ranks of twists of elliptic curves and Hilbert’s tenth problem, Invent. Math. 181 (2010), no. 3, 541–575, DOI 10.1007/s00222-0100252-0. MR2660452

[Mu]

M. R. Murty, Problems in analytic number theory, 2nd ed., Graduate Texts in Mathematics, vol. 206, Springer, New York, 2008. Readings in Mathematics. MR2376618

[ME]

M. R. Murty and J. Esmonde, Problems in algebraic number theory, 2nd ed., Graduate Texts in Mathematics, vol. 190, Springer-Verlag, New York, 2005. MR2090972

[MM1]

M. R. Murty and V. K. Murty, Mean values of derivatives of modular Lseries, Ann. of Math. (2) 133 (1991), no. 3, 447–475, DOI 10.2307/2944316. MR1109350

[MM2]

M. R. Murty and V. K. Murty, Non-vanishing of L-functions and applications, Progress in Mathematics, vol. 157, Birkh¨ auser Verlag, Basel, 1997. MR1482805

[MP]

M. R. Murty and H. Pasten, Elliptic curves, L-functions, and Hilbert’s tenth problem, J. Number Theory 182 (2018), 1–18, DOI 10.1016/j.jnt.2017.07.008. MR3703929

[MR]

M. R. Murty and P. Rath, Transcendental numbers, Springer, New York, 2014. MR3134556

[Ph]

T. Pheidas, Hilbert’s tenth problem for a class of rings of algebraic integers, Proc. Amer. Math. Soc. 104 (1988), no. 2, 611–620, DOI 10.2307/2047021. MR962837

232

Bibliography

[Po]

B. Poonen, Using elliptic curves of rank one towards the undecidability of Hilbert’s tenth problem over rings of algebraic integers, Algorithmic number theory (Sydney, 2002), Lecture Notes in Comput. Sci., vol. 2369, Springer, Berlin, 2002, pp. 33–42, DOI 10.1007/3-540-45455-1 4. MR2041072

[SS]

H. N. Shapiro and A. Shlapentokh, Diophantine relationships between algebraic number fields, Comm. Pure Appl. Math. 42 (1989), no. 8, 1113–1122, DOI 10.1002/cpa.3160420805. MR1029120

[Sh1]

A. Shlapentokh, Extension of Hilbert’s tenth problem to some algebraic number fields, Comm. Pure Appl. Math. 42 (1989), no. 7, 939–962, DOI 10.1002/cpa.3160420703. MR1008797

[Sh2]

A. Shlapentokh, Elliptic curves retaining their rank in finite extensions and Hilbert’s tenth problem for rings of algebraic numbers, Trans. Amer. Math. Soc. 360 (2008), no. 7, 3541–3555, DOI 10.1090/S0002-9947-08-04302X. MR2386235

[Sh3]

A. Shlapentokh, Hilbert’s tenth problem: Diophantine classes and extensions to global fields, New Mathematical Monographs, vol. 7, Cambridge University Press, Cambridge, 2007. MR2297245

[Sie]

C. L. Siegel, Zur Theorie der quadratischen Formen (German), Nachr. Akad. Wiss. G¨ ottingen Math.-Phys. Kl. II (1972), 21–46. MR0311578

[Sil]

J. H. Silverman, The arithmetic of elliptic curves, Graduate Texts in Mathematics, vol. 106, Springer-Verlag, New York, 1986. MR817210

[ST]

J. H. Silverman and J. Tate, Rational points on elliptic curves, Undergraduate Texts in Mathematics, Springer-Verlag, New York, 1992. MR1171452

[Sm]

C. Smory´ nski, Logical number theory I, Springer-Verlag, Berlin, 1991.

[Vi]

C. Videla, On Hilbert’s tenth problem. Atas da Xa Escola de Algebra, Vitoria, ES, Brasil Colecao Atas 16 Sociedade Brasileira de Matematica (1989), 95– 108.

[We]

A. Weil, Number theory: An approach through history; From Hammurapi to Legendre, Birkh¨ auser Boston, Inc., Boston, MA, 1984. MR734177

[Yan]

B. H. Yandell, The honors class: Hilbert’s problems and their solvers, A K Peters, Ltd., Natick, MA, 2002. MR1880187

Index

LPA , 92 LZFC , 92 0 , 32, 113 ω, 26 ω-consistency, 110 Ackermann function, 85, 88 Ackermann, W., 85 adele ring, 211 adequacy theorem, 99 admissible, 213 algebraic integer, 201 algebraic number, 10, 201 algebraic number field, 202 algorithm, 71 Archimedean valuation, 209 Aryabhata, 43 automorphic representation, 213 axiom of choice, 27, 29, 100 axiom of existence, 24 axiom of extensionality, 24 axiom of infinity, 26 axiom of regularity, 26 axiomatized, 106 Banach, S., 28 Banach–Tarski paradox, 28 Bernstein, F., 14 Bhaskaracharya, 56 binomial coefficient, 144

Birch and Swinnerton-Dyer conjecture, 217 Borel subgroup, 214 bounded universal quantifier, 149, 153 Brahmagupta, 56 Brahmagupta’s identity, 51, 52, 57 Brahmagupta–Pell equation, 55, 66, 131

canonical interpretation, 99 Cantor normal form, 33, 117 Cantor’s diagonalization method, 82, 161 Cantor’s pairing function, 7, 128, 156, 168 Cantor, G., 5, 82 cardinal, 35 cardinal addition, 36 cardinal exponentiation, 36 cardinal multiplication, 36 cardinal number, 34 cardinality, 13 cartesian product, 7, 36 Cassels, J. W. S., 220 Cauchy, A.-L., 204 chakravala method, 56 characteristic function, 84, 109 Chen, J., 181

233

234 Chinese remainder theorem, 49, 68, 129 Church’s thesis, 73 Church, A., 73 Church–Turing thesis, 73 Church–Turing thesis, 159 Cohen, P., 28, 37, 101 compactness theorem, 102 complete arithmetic, 107 completeness of Γ, 99 complex numbers, 51 comprehension schema, 24 computable function, 73, 77, 159 computable set, 88 computably enumerable set, 88, 159 conductor, 216 congruence, 46 conjugate field, 203 conjunction, 126 consistency of Γ, 98 consistency theorem, 98 constructible universe, 101 continued fraction algorithm, 56 continuum hypothesis, 16, 37, 100 coprime, 44 countable, 6 countably infinite, 6 cusp forms, 213 cuspidal automorphic representation, 213 Davis, M., 72, 123, 167 de la Vall´ ee Poussin, C., 184 decidable property, 182 decidable set, 88 decimal expansion, 10 Dedekind cut, 29, 204, 221 Dedekind zeta function, 206 Dedekind, R., 14, 203, 205 degree, 202 Diophantine m-tuple, 69 Diophantine equation, 72, 123 Diophantine function, 128 Diophantine relation, 125 Diophantine set, 124, 218 Dirichlet approximation theorem, 63 Dirichlet, P. G. L., 63, 203, 207

Index discriminant, 208 disjunction, 126 division algorithm, 41 divisor, 42 effectively computable, 71 Einstein, A., 104 elliptic curves, 170, 215 empty set, 24 Entscheidungsproblem, 74 equivalent valuations, 209 Euclid–Mullin sequence, 89 Euclidean algorithm, 43 Euler product, 185, 206 Euler’s theorem, 68 Euler’s totient function, 68 Euler, L., 56, 181 Euler–Mascheroni constant, 189 exponential function, 137 expressible relation in PA, 109 extension of Peano arithmetic, 106 extension theorem, 99 factorial function, 83, 145 Fermat’s last theorem, 205 Fermat’s little theorem, 48 Fermat, P., 56 Fibonacci numbers, 67 first order language, 91 first order logic, 93 floor function, 7, 165 formula, 92 Fraenkel, A., 27 Frege, G., 16, 34 Frenkel, E., 215 Fueter, R., 8 Fueter–P´ olya theorem, 8 function-like formula, 26 functional equation, 184 fundamental theorem of arithmetic, 45, 186, 205 Galois extension, 203 Gauss, C. F., 45, 203 Gelfond, A., 13 general recursive function, 86 generalized continuum hypothesis, 37 generalized ideal class groups, 210

Index generalized Riemann hypothesis, 206 Gentzen, G., 113 G¨ odel number, 108 G¨ odel sentence, 111 G¨ odel’s β function, 129, 130, 156 G¨ odel’s completeness theorems, 100 G¨ odel’s first incompleteness theorem, 106 G¨ odel’s second incompleteness theorem, 112, 195, 197 G¨ odel, K, 37, 86 G¨ odel, K., 28, 73, 99, 100, 106, 109, 129 Godement, R., 215 Goldbach’s conjecture, 180 Goldbach, C., 180 good reduction, 216 Goodstein sequence, 114 Goodstein, R., 115 greatest common divisor, 42 Green, B., 164 grossencharacter, 212 Hadamard, J., 184 halting problem, 81, 90, 160 Hardy, G. H., 181 Harish-Chandra, 214 Harrington, L., 119 Hawking, S., 5, 204 Hecke L-series, 211 Hecke, E., 206, 211 Helfgott, H., 181 Henkin, L., 99 hereditary expansion, 114 Hermite, C., 13 Hilbert problems, 16 Hilbert’s hotel, 17 Hilbert’s tenth problem, 72, 123, 159 Hilbert’s twenty-three problems, 1, 13 Hilbert, D., 1, 13, 100, 123 ideal class groups, 210 ideal theory, 204 idele group, 211 inaccessible cardinal, 196

235 incompleteness of Γ, 106 indicator function, 84 integral basis, 208 integrally Diophantine, 219 interpretation of a first order language, 94 irrational numbers, 9, 12 Jacquet, H., 215 Jayadeva, 56 Jones, J. P., 163, 170–172 Kirby, L., 118 Kleene, S., 86 Kolyvagin, V., 218 Kronecker, L., 203, 205 Kronecker–Weber theorem, 219 L¨ owenheim, L., 101 L¨ owenheim–Skolem theorem, 101 Lagrange’s four square theorem, 53 Lagrange, J.-L., 53, 56 lambda calculus, 73 Langlands classification theorem, 214 Langlands, R., 212 language of PA, 92 language of ZFC, 92 Levi decomposition, 213 limit ordinal, 30 Lindemann, F., 8, 13 Liouville, J., 13, 202 listable set, 88 Littlewood, J. E., 181 logically valid, 96 Matiyasevi˘c, Y., 72, 123, 171 Mazur, B., 217 minimal polynomial, 202 minimalization, 86 Minkowski, H., 208 model existence theorem, 99 model of Γ, 96 modular arithmetic, 46 modularity conjecture, 216 modus ponens, 93, 194 Mordell, L. J., 216 Mordell–Weil theorem, 216

236 non-Archimedean valuation, 209 nonstandard model, 102 norm, 206 normal extension, 203 order isomorphic, 30 ordinal, 30, 117 ordinal addition, 31 ordinal exponentiation, 32 ordinal multiplication, 31 Ostrowski’s theorem, 209 Ostrowski, A., 209 pairing axiom, 25 parabolic subgroup, 213 Paris, J., 118 parity conjecture, 217 partial function, 77 partial recursive function, 86 partially computable function, 77 Pasten, H., 220 Peano axioms, 104 Pell, J., 56 P´ eter, R., 85 pigeonhole principle, 64, 65 place, 209 P´ olya, G., 8 Poonen, B., 219 power set, 13 power set axiom, 25 predecessor function, 84 prime number, 45 prime number theorem, 184 prime representing polynomial, 179 primitive element, 202 primitive recursive function, 82 primitive recursive relation, 85 projection function, 82 proof using Γ, 94 Putnam, H., 72, 123, 127, 147 Pythagorean triples, 47 Ramanujan conjecture, 215 Ramanujan, S., 181 Ramar´ e, O., 181 ramification, 208 rank, 217 recursive function, 73, 82, 87, 155 recursive relation, 85, 109

Index recursive set, 88 recursively enumerable set, 88 regular cardinals, 196 relatively prime, 44 replacement schema, 27 residue classes, 46 Ribet, K., 216 Riemann hypothesis, 184 Riemann zeta function, 184 Riemann, B., 184 Riemann, G. F. B., 203 right regular representation, 213 ring of integers, 203 Robinson, J., 72, 123, 171 Robinson, R., 85 Rosser, J. B., 106, 110, 112 Rubin, K., 217 Russell’s paradox, 17, 93, 96 Russell, B., 17 Schneider, T., 13 Schr¨ oder, E., 14 Schr¨ oder–Bernstein theorem, 15, 35 Selmer, E., 217 semantic concept, 91 semidecidable set, 88 sentence, 92 Shafarevich–Tate group, 217 Shapiro, H. N., 183 Shlapentokh, A., 220 Siegel, C. L., 170 Sierpi´ nski, W., 37 singular cardinals, 196 Skolem’s paradox, 102 Skolem, T., 101 soundness theorem, 97 standard parabolic subgroup, 213 strongly inaccessible cardinal, 196 successor cardinal, 35 successor function, 77, 82 successor ordinal, 30 Sunzi Suanjing, 68 syntactic concept, 91 Taniyama–Shimura conjecture, 216 Tao, T., 164 Tarski, A., 28, 94 Tate’s thesis, 210

Index term, 92 ternary Goldbach problem, 181 theorem listing algorithm, 194 total function, 77, 155 total ordering, 29 totally real field, 207 totient function, 68 transcendental number, 12, 201 transitive set, 29 trichotomy law for cardinals, 35 trivial valuation, 209 truth in an interpretation, 95 Turing machine, 73, 75, 120 Turing’s thesis, 73 Turing, A., 73, 81, 171 twin prime conjecture, 198 twin primes, 198 uncountable, 6 union set axiom, 25 unipotent radical, 213 unique factorization theorem, 45, 205 universal Turing machine, 171 universality theorem, 162 valuation, 208, 211 Vinogradov, I. M., 181 von Mangoldt function, 186 von Neumann assignment, 34 von Neumann, J., 30 weakly inaccessible cardinals, 196 Weil, A., 216 well-ordering, 29 Wiles, A., 216 Wilson’s theorem, 48, 147, 166, 172 Zermelo, E., 27

237

Selected Published Titles in This Series 88 M. Ram Murty and Brandon Fodden, Hilbert’s Tenth Problem, 2019 87 Matthew Katz and Jan Reimann, An Introduction to Ramsey Theory, 2018 86 Peter Frankl and Norihide Tokushige, Extremal Problems for Finite Sets, 2018 85 Joel H. Shapiro, Volterra Adventures, 2018 84 Paul Pollack, A Conversational Introduction to Algebraic Number Theory, 2017 83 Thomas R. Shemanske, Modern Cryptography and Elliptic Curves, 2017 82 A. R. Wadsworth, Problems in Abstract Algebra, 2017 81 Vaughn Climenhaga and Anatole Katok, From Groups to Geometry and Back, 2017 80 Matt DeVos and Deborah A. Kent, Game Theory, 2016 79 Kristopher Tapp, Matrix Groups for Undergraduates, Second Edition, 2016 78 Gail S. Nelson, A User-Friendly Introduction to Lebesgue Measure and Integration, 2015 77 Wolfgang K¨ uhnel, Differential Geometry: Curves — Surfaces — Manifolds, Third Edition, 2015 76 John Roe, Winding Around, 2015 ˇamal, Mathematics++, 75 Ida Kantor, Jiˇ r´ı Matouˇ sek, and Robert S´ 2015 74 Mohamed Elhamdadi and Sam Nelson, Quandles, 2015 73 Bruce M. Landman and Aaron Robertson, Ramsey Theory on the Integers, Second Edition, 2014 72 Mark Kot, A First Course in the Calculus of Variations, 2014 71 Joel Spencer, Asymptopia, 2014 70 Lasse Rempe-Gillen and Rebecca Waldecker, Primality Testing for Beginners, 2014 69 Mark Levi, Classical Mechanics with Calculus of Variations and Optimal Control, 2014 68 Samuel S. Wagstaff, Jr., The Joy of Factoring, 2013 67 Emily H. Moore and Harriet S. Pollatsek, Difference Sets, 2013 66 Thomas Garrity, Richard Belshoff, Lynette Boos, Ryan Brown, Carl Lienert, David Murphy, Junalyn Navarra-Madsen, Pedro Poitevin, Shawn Robinson, Brian Snyder, and Caryn Werner, Algebraic Geometry, 2013

For a complete list of titles in this series, visit the AMS Bookstore at www.ams.org/bookstore/stmlseries/.

Hilbert’s tenth problem is one of 23 problems proposed by David Hilbert in 1900 at the International Congress of Mathematicians in Paris. These problems gave focus for the exponential development of mathematical thought over the following century. The tenth problem asked for a general algorithm to determine if a given Diophantine equation has a solution in integers. It was finally resolved in a series of papers written by Julia Robinson, Martin Davis, Hilary Putnam, and finally Yuri Matiyasevich in 1970. They showed that no such algorithm exists. This book is an exposition of this remarkable achievement. Often, the solution to a famous problem involves formidable background. Surprisingly, the solution of Hilbert’s tenth problem does not. What is needed is only some elementary number theory and rudimentary logic. In this book, the authors present the complete proof along with the romantic history that goes with it. Along the way, the reader is introduced to Cantor’s transfinite numbers, axiomatic set theory, Turing machines, and Gödel’s incompleteness theorems. Copious exercises are included at the end of each chapter to guide the student gently on this ascent. For the advanced student, the final chapter highlights recent developments and suggests future directions. The book is suitable for undergraduates and graduate students. It is essentially self-contained.

For additional information and updates on this book, visit www.ams.org/bookpages/stml-88

STML/88