Download Lecture 11 What did we do so far ? • We defined first order structures

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Sets and Logic (234293) WS 2014/5
Lecture 11
Lecture 11
What did we do so far ?
• We defined first order structures and showed examples.
• We introduced the syntax of first order logic F OL.
• We started introducing the semantics of first order logic.
• Meaning function for terms.
11s-2014
1
Sets and Logic (234293) WS 2014/5
Lecture 11
Outline of lecture 11
• We continue the semantics of first order logic.
• Meaning function for atomic formulas.
• Meaning function for formulas.
• Satisfiability, validity and logical consequence.
• Definability in first order logic.
11s-2014
2
Sets and Logic (234293) WS 2014/5
Lecture 11
Definition 1 (4.3.19)
Semantics of First Order Logic
The semantic for our languages is described by means of the
meaning function
M (φ, A, z)
where φ is a formula, A a structure and z an assignment.
The meaning function is defined inductively, using the Unique
Readability Theorem for First Order Logic.
11s-2014
3
Sets and Logic (234293) WS 2014/5
Lecture 11
Definition 1 contd (4.3.19)
Semantics of First Order Logic (Contd)
Basis:
equality:
M ((t1 ≈ t2), A, z) = 1
iff
MT(t1, z) = MT(t2, z);
relation:
M (Rj,α(t1 . . . , tj ), A, z) = 1
iff
(MT(t1, z), . . . , MT(tj , z)) ∈ A(Rj,α);
11s-2014
4
Sets and Logic (234293) WS 2014/5
Lecture 11
Definition 1 contd (4.3.19)
Semantics of First Order Logic (Contd)
Closure (Boolean connectives):
¬: M (¬φ, A, z) = TT¬ (M (φ, A, z))
∨: M ((φ ∨ ψ), A, z) =
TT∨ (M (φ, A, z), M (ψ, A, z));
∧: M ((φ ∧ ψ), A, z) =
TT∧ (M (φ, A, z), M (ψ, A, z));
→: M ((φ → ψ), A, z) =
TT→ (M (φ, A, z), M (ψ, A, z));
11s-2014
5
Sets and Logic (234293) WS 2014/5
Lecture 11
Definition 1 contd (4.3.19)
Semantics of First Order Logic (Contd)
Closure (quantifiers):
∃: M ((∃vi φ), A, z) = 1 iff
there exists z1 ∈ Ass(A) such that
z =i z1 and M (φ, A, z1 ) = 1;
∀: M ((∀vi φ), A, z) = 1 iff
for every z1 ∈ Ass(A) such that
z =i z1 we have that M (φ, A, z1 ) = 1
11s-2014
6
Sets and Logic (234293) WS 2014/5
Lecture 11
Examples
φ(v1 , v2 , v3 ) = ”v12 + v22 = v32 ” :
(F+ (F× (v1 , v1 ), F× (v2 , v2 )) ≈ F× (v3 , v3 ))
ψ(v2 ) = ”there are v1 , v3 with v12 + v22 = v32 ” :
∃v1 ∃v3 (F+ (F× (v1 , v1 ), F× (v2 , v2 )) ≈ F× (v3 , v3 ))
We look at two assignments z and z 0 :
z(v1 ) = 5, z(v2 ) = 12, z(v3 ) = 13
z 0 (v1 ) = 5, z 0 (v2 ) = 4, z 0 (v3 ) = 3
We compute the meaning function in the structure N:
M (φ, N, z) = 1,
M (ψ, N, z) = 1,
11s-2014
M (φ, N, z 0 ) = 0
M (ψ, N, z 0 ) = 1
7
Sets and Logic (234293) WS 2014/5
Lecture 11
Examples
φ1 = ∀v1 ∃v2 R< (v1 , v2 )
φ2 = ∀v2 ∃v1 R< (v1 , v2 )
φ3 = ∃v1 ∀v2 R< (v1 , v2 )
φ4 = ∃v1 ∀v2 (R< (v1 , v2 ) ∨ (v1 ≈ v2 ))
Our assignment is
z(v1 ) = 3, z(v2 ) = 2, z(v3 ) = 1,
We compute the meaning function in N and Z,
with (m, n) ∈ N(R< ) iff m < n and
with (m, n) ∈ Z(R< ) iff m < n.
M (φ1 , N, z) = 1
M (φ2 , N, z) = 0
M (φ3 , N, z) = 0
M (φ4 , N, z) = 1
11s-2014
M (φ1 , Z, z) = 1
M (φ2 , Z, z) = 1
M (φ3 , Z, z) = 0
M (φ4 , Z, z) = 0
8
Sets and Logic (234293) WS 2014/5
Lecture 11
n is a prime number
We construct formulas
• φdiv (v1 , v2 ) says:
v1 divides v2 properly.
∃v3 ((F× (v1 , v3 ) ≈ v2 ) ∧
(¬(v3 ≈ c1 ) ∧ ¬(v3 ≈ v2 )))
• φprime(v2 ) says:
v2 is a prime number ( v2 is a variable, n is a number):
¬∃v1 φdiv (v1 , v2 )
which, fully written, is
¬∃v1 ∃v3 ((F× (v1 , v3 ) ≈ v2 ) ∧
(¬(v3 ≈ c1 ) ∧ ¬(v3 ≈ v2 )))
11s-2014
9
Sets and Logic (234293) WS 2014/5
Lecture 11
There are infinitely many prime numbers
We construct formulas
• φinf (ψ(v2 )) says:
There are arbitrarily large v2
such that ψ(v2 ).
∀v1 ∃v2 (R< (v1 , v2 ) ∧ ψ(v2 ))
• φinf −primes says:
there are arbitrarily large primes:
∀v1 ∃v2 (R< (v1 , v2 ) ∧ φprime(v2 ))
11s-2014
10
Sets and Logic (234293) WS 2014/5
Lecture 11
Checking M (φ, A, z) = 1
To show that M (φinf −primes, N, z) = 1, we have to show that there are
arbitrarily large primes in N.
This needs a proof.
Given z(v1 ) = m, let p1 , p2 , . . . , pk(m) be
all the prime numbers smaller or equal to m.
Put m1 = p1 · p2 · . . . · pk(m) + 1 and let q(m) be the smallest prime dividing m1 .
We find that q ≥ pi for every i ≤ k(m),
and q ≥ m.
We put now z(v2 ) = q(m).
11s-2014
11
Sets and Logic (234293) WS 2014/5
Lecture 11
gcd(a, b) = c
We build the formula φgcd(v1, v2, v3)
which says that gcd(v1, v2) = v3
• First we define ψ(v1, v2, v3),
which says that v3 divides both v1 and v2.
(∃v4 (F×(v1, v4) ≈ v3) ∧ ∃v4 (F×(v2, v4) ≈ v3))
• Now we put φgcd(v1, v2, v3) =
(ψ(v1, v2, v3)∧ ∀v4 (ψ(v1, v2, v4) →
(R<(v4, v3) ∨ (v4 ≈ v3)))
11s-2014
12
Sets and Logic (234293) WS 2014/5
Lecture 11
There are infinitely many prime numbers p(x) = a · x + b,
provided gcd(a, b) = 1.
(Dirichlet’s Theorem, 1837)
We use the formula φinf −lin =
∀v1∀v3∀v4 φgcd(v3, v4, c1) →
∃v2 R<(v1, v2) ∧ φprime F+(v3, F×(v4, v2))
To see that M (φinf −lin, N, z) = 1 we use
Dirichlet’s theorem, which says exactly this.
The proof is highly non-trivial.
Paulo Ribenboim, The Book of Prime Number Records, Springer
1988
11s-2014
13
Sets and Logic (234293) WS 2014/5
Lecture 11
There are infinitely many prime number twins
A pair (p, q) of prime numbers is a twin if q = p + 2.
We use the formula φinf −twins =
∀v1∃v2
R<(v1, v2) ∧ φprime(v2)
∧φprime F+(v2, F+(c1, c1))
To show that M (φinf −twins, N, z) = 1 we have to show that there
are arbitrarily large prime twins in N.
This is an open problem in Number Theory.
11s-2014
14
Sets and Logic (234293) WS 2014/5
Lecture 11
Example 2 (Exercise 4.5.7)
The FOL-Induction Principle
Here we give a FOL-version of the Induction principle.
Let Ind+φ be the following formula:
∀v1, . . . , ∀vk [(φ(c0, v1, . . . , vk )∧
∀v0 φ(v0, v1, . . . , vk ) → φ(F+(v0, c1), v1, . . . , vk ))
→ ∀v0φ(v0, v1, . . . , vk )]
Verify that N |= Ind+φ for every τarith-formula φ.
11s-2014
15
Sets and Logic (234293) WS 2014/5
Lecture 11
Conclusion
• Checking M (φ, A, z) = 1
in a particular structure A and for a particular formula φ
is Mathematics
• Studying properties of the meaning function M (φ, A, z)
is Logic
11s-2014
16
Sets and Logic (234293) WS 2014/5
Lecture 11
Basic Semantic Concepts of First Order Logic
As for Propositional Logic we now define for First Order Logic:
• satisfiability,
• tautologies,
• logical equivalence and
• logical consequence.
As particular examples and applications of the notion of logical equivalence
we study the effect of substitution of subformulas and some normal forms for
first order logic.
11s-2014
17
Sets and Logic (234293) WS 2014/5
Lecture 11
Definition 3 (4.4.1)
Satisfiability and (Logical) Validity,
Let Σ be a set of τ -formulas and φ and ψ be two τ -formulas.
(i) We extend the meaning function to sets of formulas:
M (Σ, A, z) = 1 iff for every φ ∈ Σ we have that M (φ, A, z) = 1.
(ii) Σ is satisfiable iff there is a τ -structure A and an assignment z such that
M (Σ, A, z) = 1
(iii) φ is a tautology (or logically valid) iff
for every τ -structure A and
for every assignment z we have that
M (Σ, A, z) = 1
11s-2014
18
Sets and Logic (234293) WS 2014/5
Lecture 11
Examples 4
The following are tautologies (logically valid):
Let φ(v1 ), ψ(v1 ) and θ(v1 , v2 ) be a F OL-formulas with free variables v1 , v2 as
indicated.
∃v1 (R1,0 (v1 ) ∨ ¬R1,0 (v1 ))
∃v1 (φ(v1 ) ∨ ¬φ(v1 ))
∀v2 (v2 ≈ v2 )
(φ(v1 ) ∨ ¬φ(v1 ))
∀v1 (φ(v1 ) ∨ ¬φ(v1 ))
(φ(v1 ) → (ψ(v1 ) → φ(v1 )))
∃v1 (φ(v1 ) → (ψ(v1 ) → φ(v1 )))
(∀v1 ∀v2 θ(v1 , v2 ) → ∀v2 ∀v1 θ(v1 , v2 ))
(∃v1 ∃v2 θ(v1 , v2 ) → ∃v2 ∃v1 θ(v1 , v2 ))
11s-2014
19
Sets and Logic (234293) WS 2014/5
Lecture 11
Definition 5 (4.4.1, contd)
Logical Equivalence and Logical Consequence
Let Σ be a set of τ -formulas and φ and ψ be two τ -formulas.
Let A be a τ -structure and z be an assignment.
(i) φ is a logical consequence of Σ,
and we write Σ |= φ,
if for every τ -structure A and every assignment z such that
M (Σ, A, z) = 1 we have also that M (φ, A, z) = 1.
(ii) We say that φ and ψ are logically equivalent,
and we write φ ≡ ψ,
if {φ} |= ψ and if {ψ} |= φ.
11s-2014
20
Sets and Logic (234293) WS 2014/5
Lecture 11
Notation
(i) If Σ = ∅
we write simply
|= φ instead of ∅ |= φ.
(ii) If Σ = {ψ} is a singleton we write,
by abuse of notation,
also ψ |= φ instead of {ψ} |= φ.
(iii) Similarly, we write
Σ |= Σ1 if
Σ |= φ for every φ ∈ Σ1.
11s-2014
21
Sets and Logic (234293) WS 2014/5
Lecture 11
Proposition 6 (4.4.3)
As for propositional logic
(i) φ is a tautology iff ¬φ is not satisfiable.
(ii) φ is a tautology (or valid) if it is a consequence of the empty set, i.e.
|= φ.
(iii) Σ |= (φ → ψ) iff Σ ∪ {φ} |= ψ.
(iv) Σ |= (φ ∧ ¬φ) iff Σ is not satisfiable.
(v) Σ is not satisfiable iff for every φ we have that Σ |= φ.
(vi) φ ≡ ψ iff both |= (φ → ψ) and |= (ψ → φ)
11s-2014
22
Sets and Logic (234293) WS 2014/5
Lecture 11
Proposition 7 (4.4.4 (i))
Tautologies obtained by substitution
Let B(p1 , . . . , pn ) ∈ WFF be a propositional formula
which is a (propositional) tautology.
Let φ1 , . . . , φn be τ -formulas.
Let φ be the τ -formula
B(φ1 , . . . , φn )
obtained from B by replacing each occurrence
of the propositional variable pi by φi .
Then φ is a tautology (among first order formulas).
Proof: (Exercise)
Compute the meaning function.
First we prove by induction on the structure of B that M (φ, A, z) = MP L(B, z1 )
where z1 is the propositional assignment defined by z1 (pi ) = M (φi , A, z).
Then we use that B is a propositional tautology to conclude that φ is a first
order tautology.
11s-2014
23
Sets and Logic (234293) WS 2014/5
Lecture 11
Proposition 8 (4.4.4 (ii))
Logical equivalences obtained by substitution
Let φ1 , ψ1 and ψ2 be τ -formulas such that ψ1 is a subformula of φ1 and ψ1 ≡ ψ2 .
Let φ2 be the formula obtained from φ1 by replacing ψ1 by ψ2 .
Then φ1 ≡ φ2 .
Proof: (Exercise)
Compute the meaning function.
Let φ1 = α ◦ ψ1 ◦ β.
We proceed by backward induction on α
and induction on β
and use the Unique Readability Theorem.
11s-2014
24
Sets and Logic (234293) WS 2014/5
Lecture 11
Manipulating quantifiers
The most important issue in understanding the
Meaning Function of
First Order Logic
is understanding the
manipulation of quantifiers.
11s-2014
25
Sets and Logic (234293) WS 2014/5
Lecture 11
Proposition 9
Moving quantifiers into formulas
Let φ, ψ be τ -formulas. Then
(i) ∀vi (φ ∧ ψ) ≡ (∀vi φ ∧ ∀vi ψ);
∃vi (φ ∨ ψ) ≡ (∃vi φ ∨ ∃vi ψ);
(ii) If vi does not occur free in ψ then
(∀vi φ ∧ ψ) ≡ ∀vi (φ ∧ ψ) ;
(∀vi φ ∨ ψ) ≡ ∀vi (φ ∨ ψ);
and
(∃vi φ ∨ ψ) ≡ ∃vi (φ ∨ ψ):
(∃vi φ ∧ ψ) ≡ ∃vi (φ ∧ ψ);
(iii) ¬∀vi φ ≡ ∃vi ¬φ
and
¬∃vi φ ≡ ∀vi ¬φ;
11s-2014
26
Sets and Logic (234293) WS 2014/5
Lecture 11
Homework
Study examples of formulas where
vi does occur free in ψ and
show that proposition 9(ii) is false, i.e.,
(∀viφ ∧ ψ) 6≡ ∀vi(φ ∧ ψ) ;
(∀viφ ∨ ψ) 6≡ ∀vi(φ ∨ ψ);
and
(∃viφ ∨ ψ) 6≡ ∃vi(φ ∨ ψ);
(∃viφ ∧ ψ) 6≡ ∃vi(φ ∧ ψ).
11s-2014
27
Sets and Logic (234293) WS 2014/5
Lecture 11
Definition 10 (4.4.6)
Substitution of variables by terms
Let s : Var 7→ T erm(τ ) be a function.
Let t ∈ T erm(τ ) and φ be a τ -formula.
We define first st(t, s) which applies the substitution s to terms:
(i) st(cα , s) = cα ;
(ii) st(vi , s) = s(vi );
(iii) st(Fn,α (t1 , . . . , tn ), s) =
Fn,α (st(t1 , s), . . . , st(tn , s));
11s-2014
28
Sets and Logic (234293) WS 2014/5
Lecture 11
Definition 10 (4.4.6. contd)
Substitution in formulas
(iv) subst((t1 ≈ t2 ), s) = st(t1 , s) ≈ st(t2 , s);
(v) subst(Rn,α (t1 , . . . , tn ), s) =
Rn,α (st(t1 , s), . . . , st(tn , s));
(vi) subst(¬φ, s) = ¬subst(φ, s);
(vii) subst((φ ∧ ψ), s) = (subst(φ, s) ∧ subst(ψ, s));
And similarly for ∨ and →.
(viii) subst(∀vi φ, s) = ∀vi subst(φ, s1 ) with
s1 (vi ) = vi and s1 (vj ) = s(vj ) for all i 6= j.
(ix) subst(∃vi φ, s) = ∃vi subst(φ, s1 ) with
s1 (vi ) = vi and s1 (vj ) = s(vj ) for all i 6= j.
11s-2014
29
Sets and Logic (234293) WS 2014/5
Lecture 11
Proposition 11 (4.4.7)
Renaming of Bound Variables
Let s : Var 7→ Var be a function and φ a τ -formula. Assume that s(vj ) does
not occur at all in φ and s(vi ) = vi for every i 6= j. Then
∀vj φ ≡ ∀s(vj )subst(φ, s)
and
∃vj φ ≡ ∃s(vj )subst(φ, s).
Proof:
The proof uses the fact that M (φ, A, z) is not dependent on z(s(vj )). Q.E.D.
The condition that s(vj ) does not occur at all in φ
in proposition 11 can be weakend further.
11s-2014
30
Sets and Logic (234293) WS 2014/5
Lecture 11
Talking First Order Logic
We now will express
some mathematical concepts
from the Real Numbers
in First Order Logic.
11s-2014
31
Sets and Logic (234293) WS 2014/5
Lecture 11
Dense Linear Orders
Let Σdense−order consist of the following five statements:
Three cases:
∀v1 ∀v2 ((R< (v1 , v2 ) ∨ R< (v2 , v1 )) ∨ v1 ≈ v2 )
Asymmetry:
∀v1 ∀v2 (¬ (R< (v1 , v2 ) ∧ R< (v2 , v1 )))
Transitivity:
∀v1 ∀v2 ∀v3 ((R< (v1 , v2 ) ∧ R< (v2 , v3 ))
→ R< (v1 , v3 ))
Density:
∀v1 ∀v2 (R< (v1 , v2 )
→ ∃v3 (R< (v1 , v3 ) ∧ R< (v3 , v2 )))
There are at least two elements:
∃v1 ∃v2 R< (v1 , v2 )
11s-2014
32
Sets and Logic (234293) WS 2014/5
Lecture 11
Logical Consequences of Σdense−order
For which of the following formulas φ do we have Σdense−order |= φ ?
First element: (no)
∃v1 ∀v2 (¬v1 ≈ v2 → R< (v1 , v2 ))
There are at least three elements: (yes)
∃v1 ∃v2 ∃v3 ((¬v1 ≈ v2 ∧ ¬v2 ≈ v3 ) ∧ ¬v1 ≈ v3 )
Two between each two: (yes)
∀v1 ∀v2 (R< (v1 , v2 ) →
∃v3 ∃v4 (R< (v1 , v3 ) ∧ (R< (v3 , v4 ) ∧ R< (v4 , v2 ))))
No last element: (no)
∀v1 ∃v2 R< (v1 , v2 )
11s-2014
33
Sets and Logic (234293) WS 2014/5
Lecture 11
Ordered Fields, I
Recall τarith = {F+ , F∗ , R< , c0 , c1 } and consider the following statements:
Commutativity:
x + y = y + x, x ∗ y = y ∗ x;
Associativity:
x + (y + z) = (x + y) + z
x ∗ (y ∗ z) = (x ∗ y) ∗ z;
Neutral Element:
0 + x = x, 1 ∗ x = x, 0 ∗ x = 0;
Inverse Element:
For every x there is a y such that x + y = 0,
for every x 6= 0 there is a y such that x ∗ y = 1;
Distributivity:
x ∗ (y + z) = (x ∗ y) + (x ∗ z).
11s-2014
34
Sets and Logic (234293) WS 2014/5
Lecture 11
Ordered Fields, II
Asymmetry:
If x < y then not y < x;
Transitivity:
if x < y and y < z then x < z;
Linearity:
for every x, y either x < y or y < x or x = y;
Monotonicity:
0<1
If x < y then for every z also x + z < y + z;
if 0 < x and 0 < y then also 0 < x ∗ y.
Let Φord−f ield be the conjunction of the translations
of these statements into F OL(τarith ).
11s-2014
35
Sets and Logic (234293) WS 2014/5
Lecture 11
A non-trivial unsatisfiable set of formulas
In the vocabulary of arithmetic
∃v0 (F+ (F∗ (v0 , v0 ), c1 ) ≈ c0 )
says that −1 has a square root.
We look at the statement
In an ordered field
there is no square root of −1.
Formalize this as
Φord−f ield ∪ {∃v0 (F+ (F∗ (v0 , v0 ), c1 ) ≈ c0 )}
is not satisfiable.
11s-2014
36
Sets and Logic (234293) WS 2014/5
Lecture 11
Theorem 12
Φord−f ield ∪ {∃v0(F+(F∗(v0, v0), c1) ≈ c0)} is not satisfiable.
Proof: Let
Σ1 = Φord−f ield ∪ {∃v0 (F+ (F∗ (v0 , v0 ), c1 ) ≈ c0 )}
and
Σ2 (v0 ) = (Φord−f ield ∪ {F+ (F∗ (v0 , v0 ), c1 ) ≈ c0 )}
Assume for contradiction, there is A and z such that
M (Σ1 , A, z) = 1
Let z =0 z 0 with z 0 (v0 ) = a and
M (Σ2 , A, z 0 ) = 1
In other words Σ1 is satisfiable iff Σ2 is satisfiable.
11s-2014
37
Sets and Logic (234293) WS 2014/5
Lecture 11
Proof of Theorem 12 (contd)
Now in A we have either a < 0, a = 0 or 0 < a.
If a = 0, so a2 = 0 = −1 but 0 6= −1.
If 0 < a then 0 < a2 = −1 but −1 < 0.
If a < 0 then
−a > 0 and (−1)a > 0 and (−1)2 a2 = −1 > 0, but −1 < 0.
Each case gives a contradiction.
11s-2014
Q.E.D.
38
Sets and Logic (234293) WS 2014/5
Lecture 11
Proof sequences for FOL
We shall see a
formalization of proof rules for FOL
at the end of the course.
The system we shall exhibit is sound and complete.
11s-2014
39
Sets and Logic (234293) WS 2014/5
Lecture 11
Prenex Normal Form
• First order formulas are built by using the boolean operations and quantification in arbitrary order.
• The purpose of Normal Forms is to restrict the order of these building
steps, similar as in the case of CNF for propositional logic.
• The most important normal form for first order logic is the Prenex
Normal Form.
The word ”prenex” refers to ”pre” (latin: before) and ”nexus” (latin: bound)
and is used in logic to indicate that all the variable binding appears in the
formula before any other logical operations.
11s-2014
40
Sets and Logic (234293) WS 2014/5
Lecture 11
Definition 13 (4.4.10)
Quantifier free formulas
The set QF(τ ) of quantifier free τ -formulas is built inductively
as follows:
Basis:
Atomic τ -formulas are quantifier free.
Closure:
If φ, ψ ∈ QF(τ ) then so are
¬φ, (φ ∧ ψ), (φ ∨ ψ), (φ → ψ).
11s-2014
41
Sets and Logic (234293) WS 2014/5
Lecture 11
Definition 14 (4.4.11)
Prenex Normal Form
The set PNF(τ ) of τ -formulas in prenex normal form is built
inductively as follows:
Basis:
QF(τ ) ⊆ PNF(τ ).
Closure:
If φ ∈ PNF(τ ) then so are ∀viφ and ∃viφ.
11s-2014
42
Sets and Logic (234293) WS 2014/5
Lecture 11
Examples for PNF
We look at the formula:
∀v0 (∀v1 R(v1 , v0 ) → ∃v1 R(v0 , v1 ))
We replace → and rename the last bound occurrence of v1 :
∀v0 (¬∀v1 R(v1 , v0 ) ∨ ∃v2 R(v0 , v2 ))
Now we move ¬ inside:
∀v0 (∃v1 ¬R(v1 , v0 ) ∨ ∃v2 R(v0 , v2 ))
Now we move the quantifiers out:
∀v0 ∃v1 ∃v2 (¬R(v1 , v0 ) ∨ R(v0 , v2 ))
and reintroduce →:
∀v0 ∃v1 ∃v2 (R(v1 , v0 ) → R(v0 , v2 ))
11s-2014
43
Sets and Logic (234293) WS 2014/5
Lecture 11
Examples for PNF (contd)
The following are pairs of equivalent formulas, where one is in PNF:
Density:
∀v1 ∀v2 (R< (v1 , v2 ) → ∃v3 (R< (v1 , v3 ) ∧ R< (v3 , v2 )))
∀v1 ∀v2 ∃v3 (R< (v1 , v2 ) → (R< (v1 , v3 ) ∧ R< (v3 , v2 )))
Transitivity:
∀v1 ∀v2 ∀v3 ((R< (v1 , v2 ) ∧ R< (v2 , v3 )) → R< (v1 , v3 ))
∀v1 ∀v3 (∃v2 (R< (v1 , v2 ) ∧ R< (v2 , v3 )) → R< (v1 , v3 ))
11s-2014
44
Sets and Logic (234293) WS 2014/5
Lecture 11
Examples for PNF (contd)
Consider the conjunction of
First element:
∃v1 ∀v2 (¬v1 ≈ v2 → R< (v1 , v2 ))
No last element:
∀v1 ∃v2 R< (v1 , v2 )
Conjunction:
(∃v1 ∀v2 (¬v1 ≈ v2 → R< (v1 , v2 )) ∧ ∀v1 ∃v2 R< (v1 , v2 ))
in PNF:
∃v1 ∀v2 ∀v3 ∃v4 ((¬v1 ≈ v2 → R< (v1 , v2 )) ∧ R< (v3 , v4 ))
11s-2014
45
Sets and Logic (234293) WS 2014/5
Lecture 11
Examples for PNF (contd)
We write now R instead of R< .
φ(v0 ) says there are at least three elements smaller than v0 but uses only
two variables:
∃v1 (R(v1 , v0 ) ∧ ∃v0 (R(v1 , v0 ) ∧ ∃v1 R(v1 , v0 )))
In PNF this looks:
∃v1 ∃v2 ∃v3 ((R(v1 , v0 ) ∧ R(v2 , v1 )) ∧ R(v3 , v2 ))
How many variables do we need to say:
There are exactly 17 elements smaller than v0 ?
Can we do with three variables? In PNF?
v0 is smallest such that ψ(v0 ):
(ψ(v0 ) ∧ ∀v1 (ψ(v1 ) → (R(v0 , v1 ) ∨ v0 ≈ v1 )))
11s-2014
46
Sets and Logic (234293) WS 2014/5
Lecture 11
Theorem 15 (4.4.12)
Prenex Normal Form Theorem
For every τ -formula φ there is a τ -formula ψ such that:
ψ ∈ PNF(τ ),
φ ≡ ψ and
φ and ψ have the same free variables.
Furthermore the length of ψ is linear in the length of φ.
Proof:
The proof is by induction on φ.
If φ ∈ PNF(τ ) there is nothing to prove.
In the other cases we use
the proposition on moving quantifiers 9,
renaming bound variables 11
and replacing equivalent subformulas 7. and 8.
11s-2014
Q.E.D.
47
Related documents