23
Proof and truth in mathematics Wong Tin Lok National University of Singapore 3 September, 2021 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 proof) that every 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. Hilbert 1900 translated by Newson 1902

Proof and truth in mathematics

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Proof and truth in mathematics

Proof and truth inmathematics

Wong Tin Lok

National University of Singapore

3 September, 2021

It is probably this important fact alongwith other philosophical reasons that givesrise to the conviction (which everymathematician shares, but which no onehas as yet supported by a proofproof) that everyeverydefinite mathematical problem mustdefinite mathematical problem mustnecessarily be susceptible of an exactnecessarily be susceptible of an exactsettlementsettlement, either in the form of an actualanswer to the question asked, or by theproof of the impossibility of its solution andtherewith the necessary failure of allattempts. Hilbert 1900

translated by Newson 1902

Page 2: Proof and truth in mathematics

Proof and truth in mathematics

Solving a mathematical problem

Input: mathematical statement σ

Output: true or false

Procedure: do the followingsimultaneously.

1. Search for a proof of σ. Iffound, then stop and return true.

2. Search for a proof of ¬σ. Iffound, then stop and return false.

Claim (Hilbert 1900)

This procedure stops on every input(given enough time, memory, . . . ).

Mathematical logicI the logic of mathematics

— MA1100, CS1231(S)

I the study of logic using mathematicalmethods

— MA4207, MA5219, . . .

A combination of these allows one to provefacts about mathematics.

What do these facts say about Hilbert’sclaim?

Page 3: Proof and truth in mathematics

What is a mathematical statement?I It is a finite string of symbols.

logical symbols:

¬ ∧ ∨ → ↔ ∀ ∃ v0, v1, v2, . . . =

not and or implies iff for all there exists variables equals

non-logical symbols, specific to the context:

– constant symbols, e.g., 0, 1, π, e, ∅– function symbols, e.g., +, ·, exp, sin, log, ∩, ∪– relation symbols, e.g., 6, ∈, ⊆

punctuation symbols: commas, brackets, etc.

I These symbols should be put together according to certain grammatical rules,

e.g., ∀x ∃y (x = y + y ∨ x = y + y + 1) is grammatical;sin(∀, π) ∧ exp(1) 6 ∅ is not grammatical.

I There should be an algorithm which can tell whether a given string of symbols isgrammatical or not. Grammatical strings are called formulas.

I Formulas without free variables, aka sentences, are our mathematical statements.

Page 4: Proof and truth in mathematics

What is a proof?

axioms

theorems

inference rules

I Axioms are assumptions from which one starts the proofs.

I Inference rules are ways to derive true formulas from true formulas.

I A proof is a derivation of a sentence from the axioms by finitely many successiveapplications of the inference rules.

I Sentences that admit proofs are called theorems.

Page 5: Proof and truth in mathematics

RCOF: axioms for (R, 0, 1,+, ·, <)

Real-closed ordered fields are ordered fields satisfying the Intermediate Value Theoremfor all polynomials with coefficients in the field.

∀x , y , z (x + y) + z = x + (y + z). ∀x , y , z (x · y) · z = x · (y · z).

∀x x + 0 = x . ∀x x · 1 = x .

∀x ∃y x + y = 0. ∀x 6= 0 ∃y x · y = 1.

∀x , y x + y = y + x . ∀x , y x · y = y · x .∀x , y , z x · (y + z) = (x · y) + (x · z). ∀x x 6< x .

∀x , y (x < y ∨ x = y ∨ y < x). ∀x , y , z (x < y < z → x < z).

∀x , y , z (x < y → x + z < x + z). ∀x , y (x > 0 ∧ y > 0→ x · y > 0).

For each polynomial p(X ) with real coefficients,

∀x , y

(x < y ∧ p(x) < 0 < p(y)

→ ∃z (x < z < y ∧ p(z) = 0)

).

z

x

y

X

p(X )

Page 6: Proof and truth in mathematics

ACF0: axioms for (C, 0, 1,+, ·)Algebraically closed fields of characteristic 0 are fields of characteristic 0 in which everynon-constant polynomial with coefficients in the field has a zero.

∀x , y , z (x + y) + z = x + (y + z). ∀x , y , z (x · y) · z = x · (y · z).

∀x x + 0 = x . ∀x x · 1 = x .

∀x ∃y x + y = 0. ∀x 6= 0 ∃y x · y = 1.

∀x , y x + y = y + x . ∀x , y x · y = y · x .∀x , y , z x · (y + z) = (x · y) + (x · z).

For each positive integer n,1 + 1 + · · ·+ 1︸ ︷︷ ︸

n-many 1’s

6= 0.

For each polynomial p(X ) with complex coefficients,

∃x , y p(x) 6= p(y)→ ∃x p(x) = 0.

Page 7: Proof and truth in mathematics

PA: axioms for (N, 0, 1,+, ·, <)The Peano axioms for arithmetic consist of the defining properties of 0, 1, theadding-one function, +, ·, and <, together with induction.

1 = 0 + 1.

∀x(x 6= 0↔ ∃y (x = y + 1)

).

∀x , y (x + 1 = y + 1→ x = y).

∀x x + 0 = x .

∀x , y x + (y + 1) = (x + y) + 1.

∀x x · 0 = 0.

∀x , y(x · (y + 1) = (x · y) + x

).

∀x , y(x < y ↔ x 6= y ∧ ∃z (z + x = y)

).

For each formula θ(x),

θ(0) ∧ ∀x(θ(x)→ θ(x + 1)

)→ ∀x θ(x).

Page 8: Proof and truth in mathematics

Inference rules: natural deductionϕ ψ

∧Iϕ ∧ ψ

ϕ ∧ ψ ∧E1ϕ

ϕ ∧ ψ ∧E2ψ

ϕ∨I1 ϕ ∨ ψψ∨I2 ϕ ∨ ψ

ϕ ∨ ψ

[ϕ]...θ

[ψ]...θ∨E

θ

[ϕ]...ψ

→Iϕ→ ψ

ϕ ϕ→ ψ→E

ψ

[ϕ]...

ψ ∧ ¬ψ¬I ¬ϕ

¬¬ϕ¬E

ϕ

ϕ(a)∀I ∀x ϕ(x)

∀x ϕ(x)∀E

ϕ(a)

ϕ(a)∃I ∃x ϕ(x)

∃x ϕ(x)

[ϕ(a)]...ψ∃E

ψ

Page 9: Proof and truth in mathematics

Completeness

Godel’s Completeness Theorem (1930, informally stated)

No further validvalid inference rule can enlarge the set of provable sentences.

Godel’s Completeness Theorem (1930, more formally stated)

One can derive a sentence σ from a set T of axioms using the inference rules listed ifand only if every structurestructure satisfyingsatisfying T must also satisfysatisfy σ.

structure

(N, 0, 1,+, ·, <)

(R, 0, 1,+, ·, <)

(C, 0, 1,+, ·)

sentence

∀x , y , z x + (y · z) = (x · y) + (x · z).

satisfies

∀x ∃y x + y = 0.

∃x 0 < x < 1.

Page 10: Proof and truth in mathematics

Completeness: consequences

Godel’s Completeness Theorem (1930, informally stated)

No further validvalid inference rule can enlarge the set of provable sentences.

Solving a mathematical problem (advanced version)

Input: sentence σ

Output: true or false

Algorithm: do the following simultaneously.

1. Search for a proof of σ from the axiomsfrom the axioms using the inference rules listedusing the inference rules listed.If found, then stop and return true.

2. Search for a proof of ¬σ from the axiomsfrom the axioms using the inference rules listedusing the inference rules listed.If found, then stop and return false.

I It should be algorithmically checkable whether a given sentence is an axiom.

I Proofs are algorithmically verifiable, and can be enumerated exhaustively by analgorithm.

Page 11: Proof and truth in mathematics

Does this algorithm stop? It depends on what we are working with.

(N, 0, 1,+, ·, <)

(N, 0, 1,+, ·, <)

? 7 (Z, 0, 1,+, ·, <)

(Z, 0, 1,+, ·, <)

? 7 (Q, 0, 1,+, ·, <)

(Q, 0, 1,+, ·, <)

? 7

(R, 0, 1,+, ·, <)

(R, 0, 1,+, ·, <)

? 3 (C, 0, 1,+, ·)

(C, 0, 1,+, ·)

? 3

Solving a mathematical problem (advanced version)

Input: sentence σ

Output: true or false

Algorithm: do the following simultaneously.

1. Search for a proof of σ from the axiomsfrom the axioms using the inference rules listedusing the inference rules listed.If found, then stop and return true.

2. Search for a proof of ¬σ from the axiomsfrom the axioms using the inference rules listedusing the inference rules listed.If found, then stop and return false.

I It should be algorithmically checkable whether a given sentence is an axiom.

I Proofs are algorithmically verifiable, and can be enumerated exhaustively by analgorithm.

Page 12: Proof and truth in mathematics

The real numbers

Theorem (Tarski 1948)

The following algorithm stops on every input (and always gives the correct answer).

Decision procedure for (R, 0, 1,+, ·, <)

Input: sentence σ

Output: true or false

Algorithm: do the following simultaneously.

1. Search for a proof of σ from the RCOF axiomsRCOF axioms using the inference rules listed.If found, then stop and return true.

2. Search for a proof of ¬σ from the RCOF axiomsRCOF axioms using the inference rules listed.If found, then stop and return false.

Theorem (Fischer–Rabin 1974)

Any such decision procedure needs time at least exponential in the length of the input.

Page 13: Proof and truth in mathematics

The complex numbers

Theorem (Tarski 1948)

The following algorithm stops on every input (and always gives the correct answer).

Decision procedure for (C, 0, 1,+, ·)Input: sentence σ

Output: true or false

Algorithm: do the following simultaneously.

1. Search for a proof of σ from the ACF0 axiomsACF0 axioms using the inference rules listed.If found, then stop and return true.

2. Search for a proof of ¬σ from the ACF0 axiomsACF0 axioms using the inference rules listed.If found, then stop and return false.

Theorem (Fischer–Rabin 1974)

Any such decision procedure needs time at least exponential in the length of the input.

Page 14: Proof and truth in mathematics

What is “wrong” with the natural numbers?

(N, 0, 1,+, ·, <) can talk about algorithms.

The predicate “x is composite” can be expressed in N by the formula

x > 1 ∧∧ ∃y < x ∃z < x∃y < x ∃z < x (x = y · z).

This corresponds to the following algorithm for input x ∈ N:ifif x > 1

thenthen for y ← 0, 1, . . . , x − 1for y ← 0, 1, . . . , x − 1for z ← 0, 1, . . . , x − 1for z ← 0, 1, . . . , x − 1

ifif x = y · zthenthen return true

end-ifend-ifend-forend-for

end-forend-forreturn false

elseelse return falseend ifend if

Church–Turing Thesis(informal version)

Every algorithm corresponds tosome special formula about(N, 0, 1,+, ·, <) in this sense.

Example. (N, 0, 1,+, ·, <)knows what formulas are,which sentences are axioms,what proofs are, etc.

Page 15: Proof and truth in mathematics

The natural numbersGodel’s First Incompleteness Theorem (1931, weak version)

For any algorithmically checkable set T of axioms for (N, 0, 1,+, ·, <) extending PA,there is a sentence σ such that neither σ nor ¬σ can be proved from T .

Consequences

I The algorithm below does not stop on input σ, if σ as above.

Do the following simultaneously.

1. Search for a proof of σ from T using the inference rules listed.If found, then stop and return true.

2. Search for a proof of ¬σ from T using the inference rules listed.If found, then stop and return false.

I Hilbert’s 1900 claim on the solvability of all mathematical problems, as weinterpreted it, is false.

I “While all provable sentences are true, not all true sentences are provable.”

Page 16: Proof and truth in mathematics

The integers and the rational numbersGodel’s First Incompleteness Theorem (1931, weak version)

For any algorithmically checkable set T of axioms for (N, 0, 1,+, ·, <) extending PA,there is a sentence σ such that neither σ nor ¬σ can be proved from T .

ObservationThis incompleteness transfers to (Z, 0, 1,+, ·, <).

Proof sketchBy Lagrange’s Four-Square Theorem, one can define N in Z as follows:

N = {x ∈ Z : ∃a, b, c , d ∈ Z x = a2 + b2 + c2 + d2}.

Theorem (J. Robinson 1949)

This incompleteness transfers to (Q, 0, 1,+, ·, <).

Proof ideaDevise a formula ϕ(x) such that

N = {x ∈ Q : ϕ(x) is true in (Q, 0, 1,+, ·, <)}.

Page 17: Proof and truth in mathematics

The provability version of the liar sentenceGodel’s First Incompleteness Theorem (1931, weak version)

For any algorithmically checkable set T of axioms for (N, 0, 1,+, ·, <) extending PA,there is a sentence σ such that neither σ nor ¬σ can be proved from T .

Proof sketchI Find a sentence σ such that the following can be proved from PA:

How?

0–1 string natural number

(∗) σ is true ⇔ σ cannot be proved from T .

algorithmically checkable

formulaabout N

I Claim: σ is true.

– Assume σ is false.– Then σ can be proved from T by the ⇐ direction of (∗).– This implies σ is true, because T is a set of true axioms, contradicting our

assumption.

I Now σ cannot be proved from T by the ⇐ direction of (∗).

I Also ¬σ cannot be proved from T because σ is true and T is a set of trueaxioms.

Page 18: Proof and truth in mathematics

The Diagonal LemmaGodel’s First Incompleteness Theorem (1931, weak version)

For any algorithmically checkable set T of axioms for (N, 0, 1,+, ·, <) extending PA,there is a sentence σ such that neither σ nor ¬σ can be proved from T .

Proof sketchI Find a sentence σ such that the following can be proved from PA:

(∗) σ is true ⇔ σ cannot be proved from T .

algorithmically checkable

formulaabout N

Why does such a sentence σ exist?

– For each formula θ(x), define Diag(θ) = θ(θ).– Let θ(x) be a formula expressing “Diag(x) cannot be proved from T”.– Then Diag(θ) is true

⇔ θ(θ) is true by the definition of Diag;⇔ Diag(θ) cannot be proved from T by the definition of θ.

– So we can take σ = Diag(θ).

I [. . . ] Then σ is true. Neither σ nor ¬σ can be proved from T .

Rosser (1936) weakened this to the consistency of T .

Question. What does the unprovable sentence mean?

Page 19: Proof and truth in mathematics

ConsistencyLemma (Godel 1931)Let T be an algorithmically checkable set of axioms extending PA. Suppose σ is asentence such that the following equivalence can be proved from PA:

(∗) σ is true ⇔ σ cannot be proved from T .

Then it can be proved from PA that

σ is true ⇔ T is consistent.

one can prove acontradiction from T

Proof sketchPA is strong enough to carry out the arguments below.

(⇒) Suppose T is inconsistent. Then T proves any sentence, including σ. So σ isfalse by the ⇒ direction of (∗).

(⇐) σ is false

“σ can be proved from T” can be proved from T

σ can be proved from T(∗)

¬σ(∗)

⇒ T is not consistent

Page 20: Proof and truth in mathematics

Unprovability of consistencyLemma (Godel 1931)Let T be an algorithmically checkable set of axioms extending PA. Suppose σ is asentence such that the following equivalence can be proved from PA:

(∗) σ is true ⇔ σ cannot be proved from T .

Then it can be proved from PA that

(†) σ is true ⇔ T is consistent.

one can prove acontradiction from T

Godel’s Second Incompleteness Theorem (1931)

For any consistent algorithmically checkable set T of axioms extending PA, theconsistency of T cannot be proved from T .

Proof

T is consistent(†)=⇒ σ is true

(∗)==⇒ σ cannot be proved from T .

(†)T is consistent

Hilbert’s Second Problem (on the compatibility of the arithmetical axioms)

To prove that they are not contradictory, that is, that a finite number of logical stepsbased upon them never lead to contradictory results.

Page 21: Proof and truth in mathematics

Is σ an interesting sentence?Lemma (Godel 1931)Let T be an algorithmically checkable set of axioms extending PA. Suppose σ is asentence such that the following equivalence can be proved from PA:

(∗) σ is true ⇔ σ cannot be proved from T .

Then it can be proved from PA that

(†) σ is true ⇔ T is consistent.

one can prove acontradiction from T

Solution to Hilbert’s Tenth Problem (Matiyasevich 1970, J. Robinson, Davis,Putnam)

For any algorithmically checkable set T , there is a polynomial p(x) with integercoefficients such that the following equivalence can be proved from PA:

T is consistent ⇔ ¬∃x p(x) = 0.

Open problem

Find a “mathematically interesting” reformulation of the consistency of PA.

Page 22: Proof and truth in mathematics

Undecidability of first-order logic

Godel’s Second Incompleteness Theorem (1931)

For any consistent algorithmically checkable set T of axioms extending PA, theconsistency of T cannot be proved from T .

Corollary

There is no algorithmically calculable f : N→ N such that whenever σ is a provablesentence of length `, there must be a proof of σ of length at most f (`).

Proof sketchI Suppose there is such an f .

I Then there is an algorithm to determine whether a contradiction is provablefrom PA: simply search until we reach the bound given by f .

I PA is strong enough to prove the correctness of this algorithm.

I So PA can verify its own consistency, which contradicts Godel’s SecondIncompleteness Theorem.

Page 23: Proof and truth in mathematics

What mathematical logic tells us about mathematics and logic

I One can algorithmically check whether an object is a proof or not.

I One cannot algorithmically check whether a sentence can be proved or not.

I (Tarski 1948) One can algorithmically check (necessarily with at least exponentialrun time) whether a sentence is true in (R, 0, 1,+, ·, <) or in (C, 0, 1,+, ·).

I (Godel 1931, J. Robinson 1949) There is no algorithm that determine whether asentence is true in (N, 0, 1,+, ·, <), or in (Z, 0, 1,+, ·, <), or in (Q, 0, 1,+, ·, <).

I Why N, Z and Q are different from R and C is because the former numbersystems can talk about algorithms while the latter ones cannot.

I (Godel–Rosser Incompleteness Theorem) For every consistent algorithmicallycheckable set T of axioms extending PA, one can construct a sentence σ suchthat neither σ nor ¬σ can be proved in T .

I (Godel’s Second Incompleteness Theorem) If T is a consistent algorithmicallycheckable set of axioms extending PA, then the consistency of T cannot beproved from T .