Вы находитесь на странице: 1из 29

Introduction to Mathematical Logic

Lecture Notes of Lecture MAT309 by B. Rossman

Yannick Limmer
Mathematics Department, University of Toronto

October 1, 2019
2
Contents

1 Structure and Languages of FO Logic 5


1.1 The Syntax of First Order Logic . . . . . . . . . . . . . . . . . . 5
1.2 Free and bounded variables . . . . . . . . . . . . . . . . . . . . . 7
1.3 Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Truth in structures . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.6 Logical implication . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2 Deductions 15
2.1 Logical Axioms and Rules of Inference . . . . . . . . . . . . . . . 16
2.2 Properties of the deductive system . . . . . . . . . . . . . . . . . 21
2.3 Language of number theory . . . . . . . . . . . . . . . . . . . . . 26

3
4 CONTENTS
Chapter 1

Structure and Languages of


FO Logic

1.1 The Syntax of First Order Logic


1.1.1 Definition. A First Order language L is specified by a collection of
symbols:

= ()¬ ∨ ∀ v1 , v2 , v3 , ... (1.1)


| {z } | {z }
special symbols countable sequence of variable symbols

plus language depended symbols:

• a set of zero or more constant symbols

• for each n ∈ N a set if zero or more n-ary function symbols

• for each n ∈ N a set if zero or more n-ary relation symbols


a(f1 ) a(f2 ) a(R1 ) a(R2 )
We often write "L is {c1 , c2 , ...; f1 , f2 , ...; R1 , R2 , ...}".
Examples. • LGraphs = {Edge(2) } is a single binary edge relation.

• LNT = {0; S (1) , +(2) , ·(2) ; <(2) }

• LGroups = {1; +(2) , inverse(1) }

• LSet Theory = {∈(2) }

5
6 CHAPTER 1. STRUCTURE AND LANGUAGES OF FO LOGIC

• LReal Vector Space = {0; +(2) , {c̄(1) }c∈R }


1.1.2 Definition. A term of L is a non-empty finite string t of symbols from
L such that either:
1. t is a variable (i.e. v1 , v2 , ...)

2. t is a constant symbol

3. t is f t1 ...tn where f is a n-ary function symbol in L and and t1 , ..., tn are


terms in L
Example. L = {0, S (1) }, terms would be 0; S0; SS0. The string SOSO is no
term.
Convention. Vars = {v1 , v2 , ...}. Let x, y, z represent distinct elements in Vars.
Example. L = {f (2) }, terms of L: x; f xy; f f xyf xy [= f (f (x, y), f (x, y))].
1.1.3 Remark. Unique readability (Homework exercise):
Every term of length ≥ 2 can be written as f t1 ...tn for unique terms t1 , ..., tn
1.1.4 Definition. A formula of L is a non-empty finite string φ, s.t. either:
1. φ is = t1 t2 where t1 , t2 are terms.

2. φ is Rt1 ...tn where R is n-ary relation symbol in L.

3. φ is (¬α) where α is a formula.

4. φ is (α ∨ β) where α, β are formulas.

5. φ is (∀x)(α) where x is a variable symbol and α a formula.


Such strings meeting condition 1. or 2. are called atomic formulas.
Abreviations. (Syntax sugar)
• t1 = t2 instead of = t1 t2

• (t1 + t2 ) instead of +t1 t2

• t1 6= t2 :≡ ¬(t1 = t2 )

• α ∧ β :≡ ¬((¬α) ∨ (¬β))

• (∃x)(α) :≡ ¬((∀x)(¬α))

• α → β :≡ (¬α) ∨ β

• α ↔ β :≡ (α → β) ∧ (β → α)

• α ∨ β ∨ γ :≡ (α ∨ β) ∨ γ
1.2. FREE AND BOUNDED VARIABLES 7

1.2 Free and bounded variables


See also Section 1.5 of C. Learly: A Friendly Introduction to Mathematical Logic.

1.2.1 Definition. A variable x is free in a formula φ if:

1. φ is atomic and x occurs (as a symbol) in φ. (E.g. S0 + x = y · z.)

2. φ :≡ (¬α) and x is free in α.

3. φ :≡ (α ∨ β) and x is free in α or free in β.

4. φ :≡ (∀y)(α), x is not y and free in α.

Examples. • (∀v2 )(S0 + v1 = v1 · v3 ) has free variables v1 and v3 . Variable


v2 is not free.

• ((∀v2 )(S0 + v2 = v2 · v3 )) ∨ (v2 < S0) has free variables v1 , v2 and v3 .

1.2.2 Lemma. A variable x is free in φ iff x occurs somewhere in φ outside


the scope of any (∀x)(...) quantifier.

1.2.3 Definition. A sentence is a formula with no free variables.

1.3 Structures
1.3.1 Definition. An L-structure A consists of a non-empty set A which is
called the "universe" of A, together with "interpretations" for the constant,
function and relation symbols in L:

• each constant symbol c has interpretation cA ∈ A.

• each n-ary function symbol f has interpretation f A : An −→ A.

• each n-ary realtion symbol R has interpretation RA ⊆ An .

Example. Let LNT = {0; S (1) , +(2) , ·(2) ; <(2) }. The natural numbers N has the
universe {0, 1, 2, ...}, S N (n) = n + 1, +(m, n) = m + n, <N = {(m, n) ∈ N2 : m <
n} and 0N = 0. The LNT -structure Z has the universe {..., −2, −1, 0, 1, 2, ...}, so
the symbols have an other interpretation.
Example. LLO = {<(2) }.
1.3.2 Remark. A linear order is an LLO -structure A = (A, <A ) satisfying
axioms:
8 CHAPTER 1. STRUCTURE AND LANGUAGES OF FO LOGIC

1. (∀x)¬(x < x)

2. (∀x)(∀y)((x = y) ∨ (x < y) ∨ (y < x))

3. (∀x)(∀y)(∀z)((x < y) ∧ (y < z) → (x < z))

Example. A = {1, 2, 3}, <A = {(2, 3), (3, 1), (2, 1)} is a linear order.

◦ ◦ ◦
2 3 1

Example. Heightbook.

L = {Alice, Bob, <, Friend, Crush }


| {z } |{z} | {z } | {z }
constants x<y, "y is taller than x" 2-ary relation 1-ary function

Axioms of Heightbook:

• < is a linear order.

• (∀x)(∀y)(Friend(x, y) → Friend(y, x)).

• (∀x)(¬Friend(x, x)).

Consider the following statements as an exercise:

• Bob has exactly one friend.

• Alice is friends with the shortest user.

• Everyone ’s crush is taller than they are.

• (∀x)[(x = crush(x) → ¬(∃y)(Friends(x, y))].

1.4 Truth in structures


1.4.1 Definition. A variable assignment function into A is a function s :
Vars −→ A.
The term assignment function generated by s is the function s̄A : A −→ A
defined inductively:
def
1. s̄A (c) = cA
def
2. s̄A (x) = s(x)
1.4. TRUTH IN STRUCTURES 9

def
3. s̄A (f t1 ...tn ) = f A (s̄A (t1 ), ..., s̄A (tn )

In the book, the notation of s̄A is simplified to s̄.

Example. Let s : Vars −→ {1, 2, 3, ...} any var. assignment function into N.
Then,

s̄( 0 )= 0
|{z} |{z}
const. symbol the number[=0N ]

(addition)
s̄(S0) = S N (s(0)) = S N (0) = 0 + 1 = 1
N N
s̄(+S0S0) = + (s̄(S0), s̄(S0)) = + (1, 1) = 1 + 1 = 2

Notation. (Modifying : Vars −→ A at one variable x.)


For x ∈ Vars and a ∈ A, let s[a|x] : Vars −→ A defined by s[x|a](x) = a and
s[x|a](y) = s(y).

1.4.2 Definition. For a structure A and a formula φ and a variable assignment


function s : Vars −→ A, we write

A |= φ[s]

("A satisfies φ under s" or " φ is true in A under s") in the following cases
(inductive definition):

1. A |= = t1 t2 [s] iff s̄A (t1 ) = s̄A (t2 ).

Example. "1 + 1 = 2" is N |= = +S0S0SS0[s].

2. A |= Rt1 ...tn [s] iff (s̄A (t1 ), ..., s̄A (tn )) ∈ RA .

Example. "1 < 2" is N |= =< S0SS0[s].

3. A |= (¬α)[s] iff it is not the case that A |= α[s].

4. A |= (α ∨ β)[s] iff A |= α[s] or A |= β[s].

5. A |= (∀x)(α)[s] iff A |= α[s[x|a]] for each a ∈ A.

We write A 2 φ[s] iff it is not the case that A |= φ[s].


10 CHAPTER 1. STRUCTURE AND LANGUAGES OF FO LOGIC

Example.

(3)
N |= ¬(= 0S0)[s] ⇔ N 2 (= 0S0)[s]
(1)
⇔ 0N 6= (S0)N
⇔ 0 6= 1

Reminder. (α ∧ β) :≡ ¬((¬α) ∨ (¬β))

1.4.3 Lemma. A |= (α ∨ β)[s] if and only if A |= α[s] and A |= β[s].

Proof.

(3)
A |= (α ∨ β)[s] ⇔A 2 ((¬α) ∨ (¬β))[s]
(4)
⇔ not A |= (¬α)[s] or A |= (¬β)[s]
(?)
⇔ not A 2 (¬α)[s] and A 2 (¬β)[s]
(3)
⇔A |= α[s] and A |= β[s]

whereby in (?) the "De Morgan’s law" is applied.

Reminder. (∃x)(α) :≡ ¬(∀x)(¬α)

1.4.4 Lemma. A |= (∃x)(α) if and only if there exists a ∈ A such that A |=


α[s[x|a]] and A.

Proof. Left to the reader.

We observe that the satisfaction relation A |= φ[s] only depends on the free
variables of φ.

1.4.5 Proposition. Let φ be a formula and suppose s1 , s2 : V ars −→ A such


that s1 (x) = s2 (x) for every variable x in φ. Then A = φ[s1 ] ⇔ A = φ[s2 ].

Example. φ :≡ Sx = SSSS0, N |= φ[s] if s(x) = 3.

1.4.6 Corollary. If φ is a sentence, then A |= φ[s1 ] ⇔ A |= φ[s2 ] for all


s1 , s2 : Vars −→ A.
1.5. SUBSTITUTION 11

1.5 Substitution
For terms u and t and a variable x, let uxt be the term from u replacing each
occurrence of x with the term t. This is provided in a more formal way in the
subsequent definition.

1.5.1 Definition (Substitution for terms). Using the notation from above:

uxt :≡ t if u is x
uxt :≡ u if u is a constant or variable other than x
uxt :≡ f (u1 )xt ...(un )xt if u is f u1 ...un

Example. Let u :≡ Sx + S(x + y) and t :≡ x + Sz then uxt ≡ S(x + Sz) + S((x +


Sz) + y).
Example. The above example rewritten in the pure notation: Let u :≡ +SxS +
xy and t :≡ +xSz then uxt ≡ +S + xSzS + +xSzy.

1.5.2 Definition (Substitution for formulas). For a formula φ we define φxt by


replacing each free occurrence of x with the term of t. Formally:

1. (= u1 u2 )xt ≡= (u1 )tx (u2 )xt

2. (Ru1 ...un )xt ≡ R(u1 )tx ...(un )xt

3. (¬α)xt ≡ ¬αtx

4. (α ∨ β)xt ≡ αtx ∨ βtx

5. ((∀x)(α))xt ≡ (∀x)(α)

6. ((∀y)(α))xt ≡ (∀y)(αtx )

Example. Let φ :≡ ((∀y)(Rxy)) ∨ Rxz and φxt :≡ ((∀x)(Rxy)) ∨ Rtz.


Example. Let φ :≡ (∀y)(x = y ∨ x < y), that says "x is minimal". Now:

• φxz ≡ (∀y)(z = y ∨ z < y) says "z is minimal".

• φxz ≡ (∀y)(y = y ∨ y < y) says "y is minimal", true in all structures.

1.5.3 Definition. A term t is not substitutable for x in φ if and only if φ


contains a subformula of the form (∀y)(α) where y occurs in t and α contains a
free occurrence of x in φ.
12 CHAPTER 1. STRUCTURE AND LANGUAGES OF FO LOGIC

Example. The term t :≡ x + Sy is not substitutable in φ :≡ ((∀y)(x = y ∨ x <


y)) ∨ (x < z).
Notation. We will write φ(x1 , ..., xk ) when φ is a formula and x1 , ...xk are free
variables in φ. This allows us to write A |= φ(a1 , ..., ak ) instead of A |= φ[s]
where s(x1 ) = a1 , s(x2 ) = a2 and s(xk ) = ak .
Example. Coprime(x, y) :≡ (∀z)((S0 < z) → (¬(∃w)(w · z = x) ∨ ¬(∃w)(w · z =
y))

1.6 Logical implication


- Missing text -

Reminder. 1. A |= φ iff A |= φ[s] for all var. assignments s : V ars −→ A.

2. For a set Σ of formulas A |= Σ iff for all φ ∈ Σ holds A |= φ.

3. Σ |= φ iff A |= Σ ⇒ A |= φ for all structures A.

4. |= φ iff ∅ |= φ iff A |= φ for all structures A.

1.6.1 Lemma. Suppose α is a formula and x is a variable. Then α is valid iff


(∀x)(α) is valid.

Proof. Note that (∀x)(α) is valid.


⇔ A |= (∀x)α for all structures A.
⇔ A |= (∀x)α[s] for all structures A and s : V ars −→ A.
⇔ A |= (∀x)α[s[x|a]] for all structures A, s : V ars −→ A and a ∈ A.
⇔ A |= α[s] for all structures A and s : V ars −→ A.
⇔ A |= α.

1.6.2 Definition. If α has free variables x1 , ..., xk , then the sentence (∀x1 )(∀x2 )...(∀xk )(α)
is called the universal closure of α.

1.6.3 Proposition. A formula α is valid iff its universal closure is valid.

1.6.4 Remark. Read on your own: Language L has a binary relation symbol P .

• Example 1.9.3 Detailed proof of |= (∃x∀yP (x, y)) → (∀x∃yP (x, y)).

• Exercise 2 in Section 1.9 x = x valid, x = y not valid, ¬(x = y) not valid.


1.6. LOGICAL IMPLICATION 13

• Exercise 4:

1. If |= (α → β) then α |= β (for all formulas α, β). (the other direction


holds only for sentences.)
2. If α :≡ x < y and β :≡ z < w, then α |= β, but 2 (α → β). Assume
A |= α. ...
14 CHAPTER 1. STRUCTURE AND LANGUAGES OF FO LOGIC
Chapter 2

Deductions

2.0.1 Definition. An (abstract) deduction system for a language L consists of

1. A set Γ of of formulas called "logical axioms".

2. A set I of pairs (Γ, θ) called "rules of inference", where Γ = {γ1 , ..., γk } is


a finite set of formulas and θ is a formula.

Each λ ∈ Γ is valid.
Example. (x = x) ∈ Γ. For each ({γ1 , ..., γk }, θ) ∈ I, (γ1 ∧ ... ∧ γk ) is valid.
This is called Soundness.

Let Σ be an arbitrary set of formulas (assumptions, for example the axioms for
linear orders).

2.0.2 Definition. For a formula φ, a deduction of φ from Σ is a finite sequence


D = (δ1 , ..., δn ) of formulas δi such that δn :≡ φ and for each i ∈ {1, ..., n},
either

1. δi ∈ Γ (δi is a logical axiom)

2. δi ∈ Σ (δi is an assumption) or

3. there exists a subset γ ⊆ {δ1 , ..., δi−1 } such that (γ, δi ) ∈ I

Notation. We write Σ ` φ iff there exists a deduction of φ from Σ. "Σ proves


φ".
Soundness. For all Σ and φ, if Σ ` φ, then Σ |= φ.
Completeness. For all Σ and φ, if Σ |= φ, then Σ ` φ.

15
16 CHAPTER 2. DEDUCTIONS

Example. L = {binary relation symbol P }. Assume Γ = ∅ and I = {({α, α →


β}) : α, β are formulas}.
Let Γ = {∀xP (x, x), P (u, v), P (u, v) → P (v, u), P (v, u) → P (u, u)}. The deduction
of P (u, u) from Γ:

δ1 P (u, v)
δ2 P (u, v) → P (v, u)
δ3 P (v, u)
δ4 P (v, u) → P (u, u)
δ5 P (u, u)

High-Level picture for the upcoming definitions.


For a language L we fix families:

• (E1), (E2), (E3), (Q1), (Q2) of logical axioms, each a family of valid L-
formulas.

• (QR), (PC) of rules of inference, each a family of pairs (Γ, θ) where Γ is


a finite set of L-formulas {γ1 , ..., γk } such that γ ∧ ... ∧ γk → θ is valid.

Reminder. For a set Σ of formulas and a formula φ, we write Σ ` φ iff ∃


deduction of φ from Σ, that is a sequence {δ1 , ..., δn } where δn ≡ φ and for each
i ∈ {1, ..., n} either

• δi ∈ Σ

• δi is a logical axiom

• ∃Γ ⊆ {δi , ..., δi−1 } such that (Γ, δi ) is a rule of inference.

Soundness Theorem. If Σ ` φ, then Σ |= φ.

2.1 Logical Axioms and Rules of Inference


2.1.1 Axiom (Logical axioms).

(E1) x = x for each x ∈ Vars. (Family of axioms v1 = v1 , v2 = v2 , ...)

(E2) for each n-ary function symbol f in L and all variables x1 , ...xn , y1 , ..., yn ∈
Vars (not necessarily distinct), we have the axiom (x1 = y1 ∧ ... ∧ xn =
yn ) → (f (x1 , ..., xn ) = f (y1 , ..., yn )).
2.1. LOGICAL AXIOMS AND RULES OF INFERENCE 17

(E3) for each n-ary relation symbol R in L we have the axiom (x1 = y1 ∧ ... ∧
xn = yn ) → (Rx1 ...xn → Ry1 ...yn ).
Also, (x1 = y1 ∧ x2 = y2 ) → (x1 = x2 → y1 = y2 ) is an (E3) axiom.

(Q1) whenever t is substitutable for x in φ we have the logical axiom (∀x)(φ) →


φxt .

(Q2) whenever t is substitutable for x in φ we have the logical axiom φxt →


(∃x)(φ).

2.1.2 Definition (Quantifier Rule of Inference (QR)).


For all formulas α and β and variable x such that x is not free in β, we have
rules of inference:

• ({β → α}, β → (∀x)(α))

• ({α → β}, (∃x)(α) → β)

If x is not free in β, then from β → α, we may deduce:

2.1.3 Lemma. (β → α) → (β → (∀x)(α)) is valid when x is not free in β.

2.1.4 Definition. Proposition variables A, B, C, ... take values in {T, F }. Proposition


formulas (αp , βp , ...) are defined by either

1. a proposition variable or

2. ¬αp where αp is a proposition formula or

3. αp ∨ βp where αp and βp are proposition formula.

Recall αp is tautology if it evaluates to T under all truth assignments {A, B, C, ...} →


{T, F }.

2.1.5 Definition. For each L-formula α, we define a propositional formula


[α]prop . If α is of the form t1 = t2 or Rt1 , ..., tn or (∀x)(β) then we introduce a
propositional variable Aα and set [α]prop :≡ Aα .
We set [¬α]prop ≡ ¬[α]prop and [α ∨ β]prop ≡ [α]prop ∨ [β]prop .

Example. Let L = { unary relation P , binary Q, constant c}. Let

φ :≡ ((∀x)(P (x)) ∧ Q(c, z)) → (Q(c, z) ∨ (∀x)(P (x)).


| {z } | {z } | {z } | {z }
A B B A

Then [φ]prop ≡ (A ∧ B) → (B ∨ A).


18 CHAPTER 2. DEDUCTIONS

Procedure for converting φ to [φ]prop :

1. Systematically replace all maximal sub-formulas of the form (∀x)(α) (not


inside the scope of another quantifier) with prop. variables A(∀x)(α) .

2. Systematically replace all atomic sub-formulas with prop variable.

2.1.6 Definition (The Proposition Calculus (PC) Rule of Inference).


Suppose Γ = {γ1 , ..., γn } is a finite set of L- formulas and φ is an L-formula.
We will say that φ is a propositional consequence of Γ if [(γ1 ∧ ... ∧ γk ) → φ]prop
is a tautology.
(PC) rule: (Γ, φ) is a rule of inference whenever φ is a prop. consequence of Γ.

Special case (Γ 6= ∅): If [φ]prop is a tautology, then (∅, φ) is a (PC) rule of


inference.
Example. Let L = {P (1) , Q(1) }. Let

Γ = {γ1 :≡ ∀xP (x) → ∃yQ(y)


| {z } | {z }
A B

γ2 :≡ ∃xQ(x) → P (x)
| {z } | {z }
B C

γ3 :≡ ¬ P (x) ↔ (y = z)}.
| {z } | {z }
C D

Let

φ :≡ ∀xP (x) → ¬ (y = z) .
| {z } | {z }
A D

Now:

[(γ1 ∧ γ2 ∧ γ3 ) → φ]prop ≡ ((A → B) ∧ (B → C) ∧ (¬C → D)) → (A → ¬D),

where the right side is a tautology. Therefore (Γ, φ) is a (PC) rule of inference.

Reminder. A binary rel. R is an equiv. relation if it satisfies the axioms:

• Rxx

• Rxy → Ryx

• (Rxy ∧ Ryz) → Rxz


2.1. LOGICAL AXIOMS AND RULES OF INFERENCE 19

Example. Let’s show that ` " = is an equivalence relation".

• `x=x

• x=y→y=x

• (x = y ∧ y = z) → (x = z)

Deduction of x = x:
δ1 :≡ x = x (E1) axiom.

Deduction of x = y → y = x:
δ1 :≡ (x = y ∧ x = x) → (x = x → y = x) (E3) with x1 = x2 = y3 = x, y1 = y
δ2 :≡ x = x (E1) axiom.
δ3 :≡ x = y → y = x (PC)
[(δ1 ∧ δ2 ) → δ3 ]Prop is a tautology.

Deduction of (x = y ∧ y = z) → (x = z):
δ1 :≡ (x = x ∧ y = z) → (x = y → x = z) (E3) with x1 = x, y1 = x, x2 = y,
y2 = z
δ2 :≡ x = x (E1) axiom.
δ3 :≡ (x = y ∧ y = z) → (x = z) (PC) rule

[(δ1 ∧δ2 ) → δ3 ]Prop is a tautology, but [δ1 → δ3 ]Prop is not a tautology. Therefore,
define A :≡ [x = x]prop , A :≡ [y = z]prop , A :≡ [x = y]prop , A :≡ [x = z]prop .
With that:

[δ1 → delta3 ]prop :≡ ((A ∧ B) → (C → D)) → ((C ∧ B) → D)

which is wrong for

A B C D
.
F T T F

Reminder. For every formula α and structure A.

A |= α ⇔ A |= (∀x)(α).

Therefore, for every set of sentences Σ,

Σ |= α ⇔ Σ |= (∀x)(α).
20 CHAPTER 2. DEDUCTIONS

2.1.7 Lemma. Σ ` α ≡ Σ ` (∀x)(α).

Proof. ” ⇐ ” : So we have ded. from Σ:


δ1
δ2
...
δn ≡ (∀x)(α)
δn+1 ≡ (∀x)(α) → αxx (Q1) axioms, since x is always
suitable for x in any formula α
δn+2 :≡ αxx ≡α (PC) rule, modus ponens.
So we get a deduction of α. More formally:

[δn ∧ δn+1 → deltan+2 ]prop ≡ (A ∧ (A → B)) → B.

” ⇒ ” : Assume we have a deduction (δ1 , ..., δn ) of α from Σ.


δ1
δ2
...
δn ≡ α
δn+1 :≡ ((y = y) ∨ ¬(y = y)) → α (PC) rule since [δn → δn+1 ]prop is a
tautology.
δn+2 :≡ ((y = y) ∨ ¬(y = y)) → (∀x)(α) (QR) since, ({β → α}, β → ∀xα)
when x is not free in β.
δn+3 :≡ (∀x)(α) (PC) rule
Therefore Σ ` (∀x)(α).

Repetition of last lecture

• Logical Axioms:
(E1) x = x
(E2) (x1 = y1 ∧ ... ∧ xn = yn ) → (f x1 ...xn = f y1 ...yn )
(E3) (x1 = y1 ∧ ... ∧ xn = yn ) → (Rx1 ...xn = Ry1 ...yn )
(Q1) ∀xφ → φxt
(Q2) φxt → ∃φ
whereby (Q1) and (Q2) only hold if t is substitutable in φ.
2.2. PROPERTIES OF THE DEDUCTIVE SYSTEM 21

• Rules of Inference:
(QR1) ({β → α}, β → ∀xα)
(QR2) ({α → β}, ∃xα → β)
whenever x is not free in β.

• Last time:
` (x = y) → (y = x)
` (x = y ∧ y = z) → (x = z)

• Deduction ∀xα ` α:
δ1 ∀xα ≡ α
δ2 ∀xα → αxx (QR)
δ3 α (P C)

• Recall the subsequent corollary :

2.1.8 Corollary. Σ |= α iff Σ ` ∀xα

2.2 Properties of the deductive system


1. Each logical axiom is valid.

2. Rules of inference (Γ, φ) preserves truth: Γ |= φ.

3. The sets of logical axioms and rules of inference are algorithmically decidable:

∃ alg. running in finite time which, given a formula φ or pair (Γ, φ)


decides whether it is a logical axiom or rule of inference

2.2.1 Proposition (Soundness Theorem).


For all Σ and φ, if Σ ` φ then Σ |= φ.

Proof.
Proof assuming (1) and (2). Suppose Σ ` φ. Then exists a deduction {δ1 , ..., δn }
of φ from Σ. We argue by induction on i = 1, ..., n, that Σ |= δi .
Recall that we have to show ∀A if A |= Σ, then A |= δi . Now, for each i,
consider the cases:

• If δi ∈ Σ, then clearly Σ |= δi .

• If δi is a logical axiom, then |= δi , hence Σ |= δi .


22 CHAPTER 2. DEDUCTIONS

• Otherwise ∃Γ ⊆ {δ1 , ..., δi−1 }, so Σ |= Γ and Γ |= δi , so Σ |= δi by


transitivity of |=.

(E2) is valid. Fix a structure A and s : Vars → A. We must show A |= ((x1 =


y1 ∧ xn = yn ) → (f x1 ...xn = f y1 ...yn ))[s].
Assume that A |= (x1 = y1 ∧ xn = yn )[s]. (Otherwise, done.) By def of |=, from
A |= (x1 = y1 )[s], ..., A |= (xn = yn )[s] follows s̄(x1 ) = s̄(y1 ), ..., s̄(xn ) = s̄(yn ).
Since f A is a function An −→ A, so f A (s̄(x1 ), ...s̄(xn )) = f A (s̄(y1 ), ...s̄(yn )) and
by definition of s̄: s̄f (x1 , ..., xn ) = s̄f (y1 , ..., yn ). Therefore A |= (f x1 ...xn =
f y1 ...yn )[s].

The proof of the remaining statements are left to the reader.

2.2.2 Proposition ((QR1) preserves truth). If s1 , s2 : Vars −→ A agree on


the free variables of a formula β, then A |= β[s1 ] ⇔ A |= β[s2 ].

Proof. Assume that x is not free in β. Want to show:

β → α |= β → ∀xα

We assume A |= β → α. We need to show A |= (β → ∀xα). That is, we need


to show

A |= (β → ∀α)[s] for all s : Vars −→ A.

So fix an arbitrary s : Vars −→ A and assume that A |= β[s]. (If not, we are
done.) We now only have to show: A |= ∀xα[s]. By definition of |=, for all
a ∈ A, thus we must show

A |= α[s[x|a]].

Fix any a ∈ A. Note that s and s[a|x] both agree on all free variables of β (since
x is not free in β). Therefore, by Definition 1.4.2:

A |= β[s] ⇔ for all a: A |= β[s[x|a]].

By assumption A |= β → α. So A |= (β → α)[s0 ] for all s0 : Vars −→ A. In


particular,

A |= (β → α)[s[x|a]].
2.2. PROPERTIES OF THE DEDUCTIVE SYSTEM 23

Obviously, s and s[x|a] agree on the free variables of β (since x is not free in β).
Since A |= β[s], by Proposition 1.4.5, A |= β[s[s|a]]. Therefore,

A |= α[s[x|a]]

is required.

2.2.3 Corollary. Assume x is not free in β. Then, {α → β} |= ∃xα → β.

Proof. We have logical implications:

α → β =| |= ¬β → ¬α
|= ¬β → ∀x(¬α)
|= ¬(∀x)(¬α) → ¬¬β
|= (∃x)(α) → β

2.2.4 Lemma. Let P be a propositional formula with propositional variables


V1 , ..., Vk , let α1 , ..., αk be L-formula, and let φ be the L-formula obtained from
P by replacing each Vi by α.
For any structure A and assignment s : Vars −→ A we have A |= φ[s] iff P
evaluates to TRUE under the truth assignment

T if A |= αi [s]
Vi 7−→
F if A 2 αi [s]

Proof. By induction on P .

• (Base case.) P is a propositional variable Vi : Lemma is trivial.

• (Indicator step.) Assume Lemma is true for propositional formulas Q1


and Q2 , then for P := ¬Q1 and P := Q1 ∨ Q2 it is true as well.

2.2.5 Corollary. If P is a tautology, then φ is valid.

2.2.6 Proposition ((PC) rule perceives truth). Let ({γ1 , .., γn }, β) is an instance
of (PC) rule. Then, γ1 , ..., γn models β.
24 CHAPTER 2. DEDUCTIONS

Proof. Let

φ :≡ (γ1 ∧ ...γm ) → β.

Let P = [φ]prop . Then P is a tautology with prop. variables V1 , ..., Vk . Let


α1 , ..., αk be the maximal sub-formulas of φ of the form t1 = t2 or Rt1 ...tm or
∀xψ. Then φ ≡ P (α1 , ..., αk ).
Since P is a tautology, φ is valid (by Corollary 2.2.5). Now suppose

A |= {φ1 , ...φn }.

We must show ∀sA |= β[s]. Therefore, fix any s. Since A |= γ1 , we have


A |= γi [s] for all i.
So A |= (φ1 , ..., φn )[s]. Since φ is valid, A |= β[s], as required.

In the tutorial, show: If t is substitutable for x in φ, then ∀xφ → φxt is valid.


The key-claim therefore would be: Consider any structure A and s : Vars → A
and elements a, b ∈ A and any distinct x, y ∈ Vars. Observation 1: s[x|a][x|b] =
s[x|b] as a function Vars → A. Observation 2: s[x|a][y|b] = s[y|b][x|a]. Now, let
t be a term, s̄(t) ∈ A. True or false:

s[x|s̄(t)][y|b] = s[y|b][x|s̄(t)]

What if t is substitutable for x in (∀y)(α)?

Suggestion: Read exercise 5-7, page 66 for examples of deductions.

Example (Exercise 7). Deduction of ` ((∀xP x) ∧ (∀xQx)) → (∀x)(P x ∧ Qx):


δ1 (∀xP x) → P x (Q1) axiom ((Px )xx ≡ Px )
δ2 (∀xQx) → Qx (Q1)
δ3 ((∀xP x) ∧ (∀xQx)) → (P x ∧ Qx) (PC) rule
δ4 ((∀xP x) ∧ (∀xQx)) → (∀x)(P x ∧ Qx) (QR) since [(δ1 ∧ δ2 ) →
δ3 ]prop is a tautology

2.2.7 Lemma. Let Σ be a set of formulas, let θ, φ be formulas. If Σ |= (θ → φ),


then Σ ∪ {θ} ` φ.

Proof. Assume Σ |= (θ → φ). Then Σ ∪ {θ} ` (θ → φ) and Σ ∪ {θ} ` θ.


Therefore, Σ ∪ {θ} ` φ by (PC) rule (modus ponens).
2.2. PROPERTIES OF THE DEDUCTIVE SYSTEM 25

2.2.8 Theorem (Deduction Theorem). If θ is a sentence, then

Σ ` (θ → φ) iff Σ ∪ {θ} ` φ

Proof. ” ⇒ ”: Follows directly from lemma 2.2.7.


” ⇐ ”: Let θ be a sentence and assume Σ ∪ {θ} ` φ. Fix a deduction of φ from
Σ ∪ {θ} : (δ1 , ..., δn ).
We will show that Σ ` (θ → δi ) for i = 1, ..., n by induction. We consider four
cases for each δi . Assume Σ → (θ → δj ) for all j < i.

Case 1 Suppose δi is a logical axiom or δi ∈ Σ. Then directly Σ ` δi . So Σ `


(θ → δi ) by (PC) rule.

Case 2 Suppose δi ≡ θ. Then again, Σ ` (θ → θ) by (PC) rule.

Case 3 Suppose ∃Γ ⊆ {δ1 , ..., δi−1 } s.t. (Γ, δi ) is a (PC) rule. Say Γ = {γ1 , ..., γk }.
So [(γ1 ∧ ... ∧ γk ) → δi ]prop is a tautology. It follows that [((θ → γ1 ) ∧ ... ∧
(θ → γk )) → (θ → gammai )]prop is a tautology.
Suppose P1 ∧ ... ∧ P2 ) → Q is a tautology and V is a prop. variable. Then
((V → P1 ) ∧ ... ∧ (V → Pk )) → (V → Q) is a tautology.

Case 4 Suppose δi ≡ β =⇒ ∀xα, where x is not free in β and β → α is δj for


some j < i. We have:
Σ ` θ(β → α) by induction hypothesis
Σ ` (θ ∧ β) → α (PC) rule
Σ ` (θ ∧ β) → (∀x)α (QR) rule, since x is not free in θ ∧ β
Σ ` θ → (β → (∀x))α (PC) rule since ((C ∧ B) → A) → (C →
(B → A)) is a tautology

Why must θ be a sentence? Consider formula θ :≡ Px and φ :≡ ∀xP x. Claim:


{θ} ` φ, however ∀θ → φ. On one hand: {θ} ` φ ⇔ {θ} ` ∀xθ ≡ φ. On the
other hand, assume for contradiction that ` θ → φ. By Soundness Theorem
(2.2.1) |= θ → φ. That is,

A |= (P x → ∀xP x)[s]

for all A and s.


Let A with universe {1, 2} and P A : {1}, let s : Vars −→ {1, 2}, s(x) = {1}.
26 CHAPTER 2. DEDUCTIONS

Observation: A 2 (P x → ∀xP x)[s], since A |= (P x)[s], since 1 = s(x) ∈ P A ,


but A 2 (P ∀xP x)[s] since 2 ∈
/ P A.
Proof by contradiction: We first fix some notation:

> :≡(∀v1 )(v1 = v1 ) ∨ ¬(∀v1 )(v1 = v1 )


⊥ :≡(∀v1 )(v1 = v1 ) ∧ ¬(∀v1 )(v1 = v1 )

2.2.9 Proposition. If θ is a sentence, then Σ ` θ ⇔ Σ ∪ {¬θ} ` ⊥.

Proof. ” ⇒ ”: Assume Σ ` θ. Then Σ ∪ {¬θ} ` θ, Σ ∪ {¬θ} ` ¬θ and


Σ ∪ {¬θ} ` ⊥ by the (PC) rule.
” ⇐ ”: Assume Σ ∪ {¬θ} ` ⊥. By Deduction Theorem (2.2.8), Σ ` ¬θ → ⊥,
since [(¬θ → ⊥) → θ]prop is a tautology, Σ ` θ by (PC) rule.

2.3 Language of number theory


We define LN T = {0, S, +, ·, E, <}. LN T -structure N. (Non-logical) axioms of
Robinson arithmetic N1 , N2 , ..., N11 :

N1 (∀x)¬(Sx = 0) "0 is not the successor of any number."

N2 (∀x∀y)¬(Sx = Sy → x = y) "Successor function is 1-to-1."

N3 (∀x)(x + 0 = x)

N4 (∀x∀y)(x + Sy = S(x + y))


..
.

2.3.1 Definition. For a ∈ N, let ā denote the terms

SS · · · S} 0.
| {z
a times

2.3.2 Lemma. For all a, b ∈ N:

1. If (a = b), then N1−11 ` ā = b̄.

2. If a 6= b, then N1−11 ` ¬(ā = b̄).

5. N1−11 ` (ā + b̄) = a + b

Proof. 1. Follows from homework problem 4(a).


2.3. LANGUAGE OF NUMBER THEORY 27

5. includes N1−11 ` SS0 + SSS0 = SSSSS0.


We first have to establish a few lemmata:

2.3.3 Lemma (∀-Lemma). φ ` ∀xφ and ∀xφ ` φ

Proof of Lemma 2.3.3. φ ` ∀xφ:


δ1 φ
δ2 T →φ (PC)
δ3 T → ∀xφ (QR)
δ4 ∀xφ (PC)

∀xφ ` φ:
δ1 ∀xφ
δ2 ∀xφ → φ (Q1)
δ3 φ (PC)

2.3.4 Lemma (Substitution Lemma). If t is subst. for x in Y , then φ → φxt .

Proof of Lemma 2.3.4.


δ1 φ
δ2 ∀xφ ∀-Lemma
δ3 ∀xφ → φxt (Q1) axiom
δ4 φxt (PC)

We return to the proof of Lemma 2.3.2.

5. By induction on b ∈ N.

– Base case (b = 0). We want to show that N1−11 ` (a+0 = (ā+0 = a).
We have:
N1−11 ` x + 0 = x (N3 )
N1−11 ` ā + 0 = ā (Sub Lemma)

– Induction step. Assume N1−11 ` (a + b = (a + b). We will show that

N1−11 ` (a + b + 1 = a + b + 1) .
| {z }
≡(a+Sb=Sa+b
28 CHAPTER 2. DEDUCTIONS

We start the deduction:


δ1 N1−11 ` (a + b = (a + b) (ind. hyp.)
δ2 x + Sy = S(x + y) (N4 )
δ3 a + Sy = S(a + y) substitute a for x.
δ4 a + Sb = S(a + b) substitute b for y.
δ5 x = y → Sx = Sy (E2)
δ6 a + b = y → S(a + b) = Sy sub a + b for x
δ7 a + b = a + b → S(a + b) = sub a + b for y
Sa + b
δ8 (x = y ∧ y = z) → (x = z) proved in class
δ9 S(ā + b̄) = Sa + b modus ponens (PC) rule
δ10 a + Sb = Sa + b substitution and modus
ponens

Now we want to show a different statement:


2.3.5 Remark. N1−11 0 ∀x∀y(x + y = y + x).

Proof. We will construct a structure

A = (A, 0A , S A , +A )

such that

A  N1−11 ∪ {∃x∃y(x + y 6= y + x)}.

For contradiction, we assume

N1−11 ` ∀x∀y(x + y = y + x).

Then by Soundness Theorem (2.2.1):

N1−11  ∀x∀y(x + y = y + x).

So ∀ structures A, if A |= N1−11 , then A |= ∀x∀yx + y = y + x. But we have a


counterexample!
Let
def
• A = N ∪ {a∗ : a ∈ N}.
2.3. LANGUAGE OF NUMBER THEORY 29

def
• 0A = 0.

• S A (a) = a + 1, S A (a∗ ) = (a + 1)∗ .

Now for a, b ∈ N:

• a +A b = a + b

• a∗ +A b∗ = (a + b)∗

• a + A b∗ = a + b

• a∗ +A b = (a + b)∗

• a∗ + 0 = a∗

• a+0=a

Вам также может понравиться