0% found this document useful (0 votes)
22 views41 pages

414 F24 Lecture26 Final Exam Review

Uploaded by

yuxi20030429
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views41 pages

414 F24 Lecture26 Final Exam Review

Uploaded by

yuxi20030429
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Contents

1 No Tuesday Office hours this week - meetings by appoint-


ment 2

2 Recursive, Semirecursive, Recursively Enumerable 2

3 Derivations, Completeness, Soundness, Compactness 7


3.1 The Logical Axioms . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2 The Compactness Theorem . . . . . . . . . . . . . . . . . . . 11

4 Formal Arithmetic 17
4.1 “True in the Standard Model” and “Provable”: Keep them
straight! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 More Terminology . . . . . . . . . . . . . . . . . . . . . . . . 21

5 Expressing Recursion Theory in a Theory of Arithmetic 22


5.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.2 Recursive functions are ∃-rudimentary . . . . . . . . . . . . . 25

6 Theories that are Short of Full Arithmetic, Particularly Q 28

7 Minimal Arithmetic Q 31
7.0.1 Axioms of Q . . . . . . . . . . . . . . . . . . . . . . . . 32
7.1 Nonstandard models revisited and ω - completeness . . . . . . 34

8 Gödel’s Theorem and the Diagonal Lemma 38


8.1 Undefinability of ”True in Arithmetic” in Arithmetic . . . . . 39

1
1 No Tuesday Office hours this week - meetings by appointment

2 Recursive, Semirecursive, Recursively Enumerable

Problem set 6 included questions that presupposed knowl-


edge of semirecursive sets, recursive sets, recursively enu-
merable sets, etc. These are also ideas that play a role in
the reasoning that supports the Gödel theorem. So you
should be prepared for questions that draw on these ideas.

First of all, remember to think about these ideas in terms


of the equivalent notions in intuitive computability:

Recursive = the characteristic function of the set is (Tur-


ing) decidable

That is, if you can describe an effective procedure that


will give a yes/no answer to: Is n ∈ S? for every n ∈ N
then S is recursive.

2
Semirecursive = the characteristic function of the set is
positively semi- (Turing) decidable.

That is: you can describe an effective procedure that will


give a yes answer to: is n ∈ S? whenever it is in fact
true that n ∈ S, then S is semirecursive.

A basic connection between semirecursive sets and recur-


sive relations is:
S is semirecursive ⇔ for some recursive two-place rela-
tion R, and for every y ∈ N:

y ∈ S ⇔ (∃n)R(y, n)

3
Semirecursive sets are sometimes called recursively enu-
merable sets.

The official definition is:

S is recursively enumerable ⇔ S is the range of a total


recursive function f .

Recall that the range (which I’ll write Rf ) of a function


f (x) = y is the set of all r such that for some d in the
domain Df of f , f (d) = r.

In symbols: r ∈ Rf ⇔ ∃d ∈ Df , f (d) = r

4
How do we know that recursively enumerable ⇒ semire-
cursive?

Because i) the graph of a total recursive function is a


recursive relation.
That is: the relation Qxy ⇔ f (x) = y is a recursive
relation if f is a total recursive function.
ii) Since Qxy is recursive, we can define the range Rf of
f by:
y ∈ Rf ⇔ ∃xQxy

So Rf is semirecursive.

5
How do we know that recursively enumerable ⇒ (intu-
itively) positively semidecidable?

Since f is total, it has a value for every n ∈ N. Say that


r ∈ Rf .

Then you just need to evaluate f (0), f (1), . . . in turn.

Each f (i) terminates eventually. Eventually you’ll eval-


uate f (k), where f (k) = r.

6
3 Derivations, Completeness, Soundness, Compactness

In the first part of the course we leaned a lot on the con-


cept of (semantic) validity signified by ⊨, and we continue
to use it in the second half.

But now we supplement that concept with a distinct con-


cept of “good argument” — that of “derivability”, signi-
fied by ⊢.

7
3.1 The Logical Axioms

The following are axioms of FOL:

Propositional Axioms:
A1) B → (C → B)
A2) (B → (C → D)) → (B → C) → (B → D)
A3) (∼ C →∼ B) → ((∼ C → B) → B))

Quantifier Axioms
A4) ∀xB(x) → B(t) if t is any term. (See qualification
on the next slide)

A5) ∀x(B → C) → (B → ∀xC) if x doesn’t occur free


in B.
Remarkably, we will only need two of them. For any wffs
of FOL B and C;

Rules of Inference:
Modus Ponens: B, B → C ⊢ C

Generalization:: B(x) ⊢ ∀xB(x)

8
For what we wanted to do, the sole work we needed the
derivation rules for is to underwrite this fact, which brings
together the completeness and soundness theorems for
FOL.

Γ⊢S⇔Γ⊨S

In the final, you’ll need to be clear on the difference be-


tween ⊨ and ⊢.

For example, in discussing definability, you want to be


clear on the difference between a sentence S being true
in the standard model of arithmetic (N ∗ ⊨ S), (aka cor-
rect) and S being derivable in some axiomatic theory T
of arithmetic. (T ⊢ S).

(Soundness:)
Γ⊢S⇒Γ⊨S

(Completeness:)
Γ⊨S⇒Γ⊢S

9
You aren’t expected to know proofs of these theorems,
but you should know that they are true.

Occasionally it will be useful to know that something fol-


lows by the logical rules.

Say, to consider a super-simple example, that for some


theory T you have established that
T ⊢∼ S and T ⊢ S ∨ V .

Perhaps you need it to be the case that T ⊢ V . Rather


than find a way to construct a derivation using the rules
and axioms, you can just observe that:

T ⊢∼ S and T ⊢ S ∨ V
⇔ (soundness)
T ⊨∼ S and T ⊨ S ∨ V
⇔ (simple reasoning about models)
T ⊨V
⇔ (completeness)
T ⊢V

10
3.2 The Compactness Theorem

You also aren’t going to be expected to know any of the


many proofs of the compactness theorem for first-order
logic, but you will need to apply it.

It is worthwhile to learn, and keep in mind several equiv-


alent statements, since for a given problem requiring the
compactness theorem, it is usual that some statements
are much more directly and obviously applicable than
others.

11
Here are a few:

Compactness theorem (form 1): If a set of sentences Γ


has no model, then some finite subset of Γ has no model.

Compactness theorem (form 1 contrapositive): If every


finite subset of a set of sentences Γ has a model, then Γ
has a model.

Compactness theorem (form 2): If for some set Γ and


sentence S we have Γ ⊨ S, then there is some finite
subset Γ′ ⊆ Γ such that Γ′ ⊨ S.

And of course, all of these also hold with ⊢ in place of ⊨,


thanks to the completeness / soundness equivalence of ⊢
and ⊨.

12
As I mentioned in lecture, compactness can be proven
independently of completeness — for example the ul-
traproduct construction Dhruv discussed in his lecture
a supports a direct proof of compactness.

But if you have a proof of completeness and soundness


already in hand — as we did in the lectures — the proof
of compactness is deceptively simple.

The first ⇔ is soundness/completness, the second is be-


cause every derivation has only a finite number of premises,
and the third is soundness/completness again.

Γ⊨S

Γ⊢S

Γ′ ⊢ S for some finite Γ′ ⊆ Γ

Γ′ ⊨ S for some finite Γ′ ⊆ Γ

13
A couple of tricks to bear in mind:

If you have an infinite set of sentences and what you need


is a single sentence, there are some times when you can
use the compactness theorem to get a finite subset, and
then take a conjunction.

An example of this move is exercise 2 on problem set 7.

Sometimes you can exploit the compactness theorem ap-


plied to a set S by adding an infinite number of extra
sentences to S, making sure that each finite subset is
consistent.

An example of this trick in action is exercise 3 problem


set 7.

14
For some of the “add additional sentences” problems, it’s
useful to remember some sentences that are true in only
models with domains of different sizes.

Here is a sentence that is true in all and only the models


that have at least n members:

∃x1 ∃x2 . . . ∃xn−1 ∃xn (x1 ̸= x2 & x1 ̸= x3 & . . . &xn−1 ̸= xn )

Where the sentence includes a conjunct xi ̸= xj for every


1 ≤ i, j ≤ n

So for example,

∃x1∃x2∃x3(x1 ̸= x2 & x1 ̸= x3 & x2 ̸= x3)

requires that the domain contain at least 3 objects in or-


der to be true.

Note that the inequalities are necessary: If you say ∃x1∃x2


[sentence] there is nothing in the quantifiers alone to en-
sure that the two objects have to be distinct.

15
Writing In for the sentence that can only be true if there
are at least n objects in the domain, note:

The set {I1, I2, . . . , In, . . .} has only infinite models, since
a model of it has at least n objects for arbitrarily large
n.

Note that this set has the feature that although the whole
set is true in only infinite models, any finite subset is true
in at least one finite model (and in fact infinitely many
of them).

16
4 Formal Arithmetic

4.1 “True in the Standard Model” and “Provable”: Keep them


straight!

Generally when we’ve dealt with first-order logic, we’ve


considered all the models of a given set of sentences as
more or less equal.

A theory is satisfiable if it is true in some model or other.

An inference is valid if the conclusion is true on all mod-


els making the premises true.

But when we are dealing with formal arithmetic and the


Gödel theorems, there will be one specific interpretation
that is singled out as distinguished: The standard model
of arithmetic, consisting of the natural numbers and the
standard interpretations of the symbols like 0, + and ×.

17
There will often be arguments where we will find ourselves
saying things like “If blah-blah is true (in the standard
model), then hum-hum is provable in the formal theory
T”.

It is very, very important to keep these two things sep-


arate on the exam.

Don’t say “true in the standard model” when you should


say “provable in theory T”, and don’t say “provable in
theory T” when you should say “true in the standard
model”.

Terminological reminder: In BJB ch. 16 and be-


yond the word “correct” is used to mean “true in the
standard model of arithmetic”.

Second Terminological Reminder: ⌜ϕ⌝ = the


Gödel number of ϕ = the code for the formula
ϕ

18
It is essential to almost everything we do in the second
half of the course that there be an effective coding that
assigns unique numbers to every sentence of the formal
language, and that allows us to code up metatheoretical
statements about arithmetic as statements in the formal
language.

Some illustrative examples of things we need to be recur-


sive: (and which are recursive on the BJB coding, and
on Gödel’s):

n codes the negation of the formula coded by m


neg(⌜ϕ⌝) = ⌜∼ ϕ⌝

n codes the disjunction of the two formulae coded by k


and m
conj(⌜ϕ⌝, ⌜θ⌝) = ⌜ϕ & θ⌝
..
.

19
And especially things like:

if Γ is a recursive set of sentences, and deductions involve


a finite set of rules that can be coded as recursive func-
tions, then the relation:

“n codes a deduction (using our rules) of ⌜ϕ⌝ from Γ”.

is recursive.
You don’t need to know the details of these coding schemes,
you just have to know that they exist and that they are
recursive (and hence can be represented in arithmetic in
certain ways, etc.)

20
4.2 More Terminology

We use the word “theory” (following BJB) to mean a


set of sentences that contains all the sentences deducible
from it.

(That is, if S is deducible from Γ and Γ is a theory then


S ∈ Γ.)

So if T is a theory, then ⊢T S ⇔ S ∈ T

A theory is consistent if not every sentence is a conse-


quence of it (alternatively: not every sentence is in it.)

This means that we can take “doesn’t prove 0=1” as a


surrogate for ”is consistent” when dealing with the sec-
ond Gödel theorem.

21
5 Expressing Recursion Theory in a Theory of Arithmetic

5.1 Definitions

Recall that BJB refer to the language of arithmetic as


L∗ = {0, ′, <, +, ·} and the standard model of arith-
metic as N ∗ = {N, 0, ′, <, +, ·} - the normal natural
numbers with the usual 0, less than, successor, plus and
times.

As I’ve noted a few times, but it can’t hurt to remind


you, BJB write nonlogical vocabulary in L∗ is written
in boldface to distinguish it from the non-boldfaced
0,′ , <, +, · that they denote.

To ease with reading formulate, we use various abbrevi-


ations, such as: 1 for 0′, 2 for 0′′, 3 for 0′′′, . . .

22
Definition: formula F (x) of L∗ arithmetically defines
S ⊆ N (or: defines S ⊆ N in arithmetic) iff:

n ∈ S ⇔ F (n) is correct.

(Repetitive note:

The LHS is a statement about a number being in a set


of numbers, without involving any formal language.

The RHS says that a formula of L∗ is true in the stan-


dard model. Very different things.)

When S ⊆ N is arithmetically defined by some formula,


we say that S is arithmetically definable, or just arith-
metical.

This definition also extends to formulae with more than


one variable, / functions and relations, but for that I’ll
just point you to the slides for lecture 19, section 4.1

23
A key fact is that: all recursive functions and recursive
sets / relations are arithmetical.

This is proved in a fairly challenging way, and you won’t


be expected to know the details.

24
5.2 Recursive functions are ∃-rudimentary

The proof that recursive sets / functions / relations are


definable in arithmetic actually proves something even
stronger — that these sets (etc.) are definable in arith-
metic using definitions that are restricted to a partic-
ularly simple and useful class of formulae.

A rudimentary formula of L∗ is any formula of L∗ that


is formed from atomic formulae using only conjunction,
disjunction, negation and bounded quantification ∃x < t
and ∀x < t, where t is any term of L∗ that doesn’t con-
tain x

(Note that this includes sentences formed using


↔, →, ∃x ≤ t, and ∀x ≤ t since these are definable from
the given connectives/quantifiers.)

An ∃-rudimentary formula of L∗ is any formula of the


form (∃x)F , where F is rudimentary.

A ∀-rudimentary formula of L∗ is any formula of the


form (∀x)F , where F is rudimentary.

25
I will skip most the details that you can find on p. 204
to the top of p. 206 of BJB and merely state this funda-
mental fact:

Every recursive function is definable in arithmetic by an


∃-rudimentary formula.

However, BJB identify some useful closure properties of


the class of ∃-rudimentary formulae on p. 205, and you
should take note of those.

The arguments for these closure properties are mostly


variations on one quantifier trick that you should pay
special attention to.

You will no doubt have noticed that as the ∃-rudimentary


formulae are defined, they may only have one unbounded
existential quantifier in front.

However, any formula

∃x1∃x2 . . . ∃xnF

that consists of a finite string of quantifiers followed by


a rudimentary formula F is equivalent in arithmetic to

26
the ∃-rudimentary formula you get by prefixing a single
existential quantifier and bounding the rest:

∃u∃x1 < u ∃x2 < u . . . ∃xn < u F

The same trick works with ∀ to reduce an unbroken string


of ∀ quantifiers to just 1, and it doesn’t work “across
quantifiers” but we won’t need to know those things for
the exam.

But for the record, do please remember the limits of this


trick:
Strings of quantifiers uniformly of the same type can be
“collapsed into one quantifer” by this trick, but alterna-
tions of quantifiers are robust.

27
6 Theories that are Short of Full Arithmetic, Particularly Q

So far we’ve seen that all recursive functions / sets rela-


tions / etc. are definable in arithmetic.

This gives us a link between what we considered in the


early part of the course — Turing and abacus machines,
recursive functions, intuitive effective computability etc.
— and facts of formal arithmetic. But we shouldn’t cel-
ebrate just yet.

The set of all sentences in L∗ that are true in the standard


model of arithmetic is a staggeringly complex theory, not
even close to axiomatisable.

Since our concern is with provability we want to work


with more restricted theories T , and with ideas that can
be stated in terms of being a theorem of T rather than
just being true in the standard model of arithmetic.

28
Given a theory T we say:

A set S is definable in T ⇔def for some F (x) in L∗ :

n ∈ S ⇒ ⊢T F (n)
and
n ̸∈ S ⇒ ⊢T ∼F (n)

NOTE:
This definition is NOT:

A set S is definable in T ⇔def for some F (x) in L∗ :

n ∈ S ⇔ ⊢T F (n)
⇑ INCORRECT DEFINITION ALERT!!!⇑
On the difference between definability in arithmetic, and
definability in a theory T, you might want to review lec-
tures slides 20, pages 11-13.

In fact, the condition n ∈ S ⇔ ⊢T F (n) is used to define


“positively semidefinable in T” in exercise 16.8 p. 218.

29
For functions, in this context it is convenient to replace
the concept of corresponding to a definable relation with
the concept of being representable in T :

A (total) n-place function f is representable in T ⇔def


there is some some F (x1, . . . xn, , y) in L∗ such that for
any
a1, . . . , an, b ∈ N such that f (a1, . . . , an) = b:

⊢T ∀y(F (a1, . . . an, y) ↔ y = b)

Note that since f is assumed here to be total, this has


the consequence that if f (a1, . . . an) ̸= b then:

⊢T ∼F (a1, . . . an, b).

(NB: if f is representable in T , then it is representable


in any stronger theory extending T .)

30
7 Minimal Arithmetic Q

We want to craft the our arguments for the Gödel theo-


rem so that it will apply to as broad a range of theories
in L∗ as possible.

Since we need to represent recursive functions in a the-


ory in order to prove the Gödel theorem for that theory,
that means represent all recursive functions in as weak a
theory as we can.

That’s the point of minimal arithmetic Q: It is so basic


that we can expect it to be contained in any reasonable
theory of arithmetic formulated in L∗, and it is just strong
enough to represent all recursive functions.

31
7.0.1 Axioms of Q

Here are the axioms of Q.

NB: formulae below with unbound free variables should


be read as tacitly prefixed by a string of universal quan-
tifiers binding all these variables.

So for example, axiom (Q4), written x+y ′ = (x+y)′


should be understood as ∀x∀y(x+y ′ = (x+y)′)

(Q1) 0 ̸= x′ (0 is not a successor of anything.)


(Q2) x′ = y ′ → x = y (Successor is 1-1)
(Q3) x+0 = x (Base of recursion equations for +)
(Q4) x+y ′ = (x+y)′ (Recursion clause for +)
(Q5) x·0 = 0 (Base clause of recursion equations for ·)
(Q6) x·y ′ = (x·y)+x (Recursion clause for ·)
(Q7) ∼x< 0 (Nothing is less than 0)
(Q8) x<y ′ ↔ (x<y ∨ x = y)
(Q9) 0 <y ↔ y̸= 0
(Q10) x′ <y ↔ (x<y & y̸=x′)

32
The key bridge between truth in the standard model of
arithmetic and provability in Q is:

An ∃-rudimentary sentence ϕ is correct (= true in the


standard model) if and only if ϕ is a theorem of Q .
In symbols: N ∗ ⊨ ϕ ⇔ ⊢Q ϕ, if ϕ is ∃-rudimentary.

You won’t be responsible for the proof of this theorem


on the exam. But you should make sure you keep the
theorem close to your heart.

We get the representation result we want through this


intermediary:

All recursive relations are definable in arithmetic by ∃-


rudimentary formulae.

This gives us the bridge we need between being true in


the standard model and being a theorem of Q.

33
7.1 Nonstandard models revisited and ω - completeness

There are models of arithmetic that are different from the


standard model.

We saw a trick for producing such models when we con-


sidered the compactness theorem.

Take Q, and take a constant a not occurring in Q.

Add a set of sentences to Q to form this theory:

Q ∪ {0 < a, 1 < a, 2 < a, . . . n < a, . . .}

For any finite subset

S ⊆ Q ∪ {0 < a, 1 < a, 2 < a, . . . n < a, . . .},

there will be a largest k such that k < a ∈ S.

Hence every sentence of S can be interpreted as true in


the standard model extended to interpret a, by interpret-
ing a to be k + 1.

34
That means, by compactness, that the entire set
Q ∪ {0 < a, 1 < a, 2 < a, . . . , n < a, . . .}

has a model Mnonstandard.

Mnonstandard ⊨ Q, and since

Mnonstandard ⊨ {0 < a, 1 < a, 2 < a, . . . n < a, . . .},

|Mnonstandard| must have an element greater than every


ordinary natural number, so Mnonstandard cannot be the
standard model.

35
In such nonstandard models, you typically have these sit-
uations: Mnonstandard ⊨ F (n) for every n but:

Mnonstandard ⊨∼∀xF (x), since the witness to the false-


hood of ∀xF (x) in M is one of the nonstandard natural
numbers.

We have special labels for theories in which this sort of


thing doesn’t happen:

A theory T is ω - consistent if it is never the case that


⊢T F (m) for every m ∈ N and also ⊢T ∼∀xF (x).

An equivalent definition is: A theory T is ω - consistent


if it is never the case that ⊢T ∼F (m) for every m ∈ N
and also ⊢T ∃xF (x).

A theory T is ω - complete if whenever ⊢T ∃xF (x) then


there is some m ∈ N such that ⊢T F (m).

(And a theory is ω - inconsistent if it is not ω - consis-


tent, ω - incomplete if it is not ω - complete.)

36
The compactness argument that I just gave proves the ex-
istence of non-standard models for any consistent bmT
extending Q.

If you have a specific theory like Q you can also prove


the existence of a non-standard model by just directly
producing one.

As an example, you produced a model for the system


consisting of Q minus the axiom Q10, in problem 1 of
problem set 9.

Compactness arguments often work, but often the sim-


plest way to show that a set of sentences is consistent is
to just produce a model in which all the sentences are
true.

37
8 Gödel’s Theorem and the Diagonal Lemma

You will not be responsible for the proof of the Diagonal


Lemma, but you may be asked a question or questions
that require you to apply it.

And, since the proof of the first Gödel theorem is just


the Diagonal Lemma plus coding, plus things I reviewed
above, you won’t be asked anything specifically about the
Gödel theorems.

It would, however, be useful to review the proofs from


lecture 21 to make sure you feel comfortable with how
the ideas are put to use.

Here’s a reminder of the statement of the Diagonal Lemma:

Say that T is a theory containing Q. For any formula


B(y), there is a sentence G such that:

⊢T G ↔ B(⌜G⌝)

38
8.1 Undefinability of ”True in Arithmetic” in Arithmetic

Here’s a quick example of applying the Diagonal Lemma.


I’m proving the result differently from how I proved it in
the lectures, so that the role of the Diagonal Lemma is
up front.

Claim: The set of Gödel numbers of sentences of L∗


that are true in the standard model of arithmetic is not
definable in arithmetic. Say we call the set of codes of
true sentences of arithmetic S

Let T be the set of sentences true in the standard model


of arithmetic. T extends Q

Assume, for the sake of contradiction, that T R(x) is a


sentence that defines in T the set of sentences that are
true in the standard model of arithmetic.

Hence by the definition of “definable in T ”, we have:

n ∈ S ⇒ ⊢T T R(n)
and
n ̸∈ S ⇒ ⊢T ∼T R(n)

39
So we look around for a formula that will produce a con-
tradiction. Trying the negation of a given formulae can
often be the trick just by itself, though sometimes you
need to be more subtle.

In this case, we apply the Diagonal Lemma to ∼ |!T R(x)


to get a G such that:

⊢T G ↔∼ T R(⌜G⌝)

40
There are two possibilities: G is true in the standard
model (G ∈ S) or it is false (G ̸∈ S).

i) G is true in arithmetic
⇒ ⊢T T R(⌜G⌝)
But since we also have ⊢T G ↔∼T R(⌜G⌝)
By simple logic of ˜↔” we have ⊢T ∼G
But since T is the set of sentences true in the standard
model of arithmetic, ⊢T G
Since T is consistent (since it has a model) it can’t entail
both G and ∼ G.

ii) G is not true in the standard model of arithmetic


⇒⊢T ∼T R(⌜G⌝)
But since we also have ⊢T G ↔∼T R(⌜G⌝)
By simple logic of ˜↔” we have ⊢T G
But since T is the set of sentences true in the standard
model of arithmetic, ⊢T ∼G
Since T is consistent (since it has a model) it can’t entail
both G and ∼ G.

On either branch we have an inconsistency, so T R(x) is


impossible.

41

You might also like