Predicate Terms and substitution

The Lecture Logical laws for quantifiers

Last Jouko Väänänen: Predicate logic viewed Logical laws for quantifiers

 Idea: If ∀xA is true, then A is true for every value of x, but what does this mean?

Last Jouko Väänänen: Predicate logic viewed Logical laws for quantifiers

 Idea: If ∀xA is true, then A is true for every value of x, but what does this mean?

 Another idea: If A is true for some value of x then ∃xA is true, but what does this mean?

Last Jouko Väänänen: Predicate logic viewed Terms

Last Jouko Väänänen: Predicate logic viewed Terms

 Constants and variables are called terms.  x,y,z,c,d,0,1,…

Last Jouko Väänänen: Predicate logic viewed Terms

 Constants and variables are called terms.  x,y,z,c,d,0,1,…

 Characteristic of terms is that they have a value if we fix a model and an assignment.

Last Jouko Väänänen: Predicate logic viewed The value of a

Last Jouko Väänänen: Predicate logic viewed The value of a term

 The value tM⟨s⟩ of a term t in a model M under the assignment s is defined as follows:  If t is a constant c, then tM⟨s⟩ is cM.  If t is a variable x, then tM⟨s⟩ is s(x).

Last Jouko Väänänen: Predicate logic viewed The value of a term

 The value tM⟨s⟩ of a term t in a model M under the assignment s is defined as follows:  If t is a constant c, then tM⟨s⟩ is cM.  If t is a variable x, then tM⟨s⟩ is s(x).

 If we had function symbols like +, - and · there would be more terms:  x+y, x·y, (x+y)·(x-y), (x·x)·x, etc  polynomials

Last Jouko Väänänen: Predicate logic viewed Changing variables

Last Jouko Väänänen: Predicate logic viewed Changing variables

 For the logical laws of quantifiers we have to look at ways in which variables can be changed in a formula.

Last Jouko Väänänen: Predicate logic viewed Changing variables

 For the logical laws of quantifiers we have to look at ways in which variables can be changed in a formula.

 There are some simple rules that govern change of variables.

Last Jouko Väänänen: Predicate logic viewed Bound variables can be changed

Last Jouko Väänänen: Predicate logic viewed Bound variables can be changed

 If you change x to z in ∀xR0(x,y), the meaning does not change: The following are equivalent:

1) M⊨s∀xR0(x,y)

2) M⊨s∀zR0(z,y)

Last Jouko Väänänen: Predicate logic viewed Bound variables can be changed

 If you change x to z in ∀xR0(x,y), the meaning does not change: The following are equivalent:

1) M⊨s∀xR0(x,y)

2) M⊨s∀zR0(z,y)

This is like

Both are a1+a2+a3+a4+a5.

Last Jouko Väänänen: Predicate logic viewed But one has to be careful!

Last Jouko Väänänen: Predicate logic viewed But one has to be careful!

 If you change x to y in ∀xR0(x,y), the meaning does change: The following are not equivalent in general:

1) M⊨s∀xR0(x,y)

2) M⊨s∀yR0(y,y)

Last Jouko Väänänen: Predicate logic viewed But one has to be careful!

 If you change x to y in ∀xR0(x,y), the meaning does change: The following are not equivalent in general:

1) M⊨s∀xR0(x,y)

2) M⊨s∀yR0(y,y)

 This is like

Last Jouko Väänänen: Predicate logic viewed The point

Last Jouko Väänänen: Predicate logic viewed The point

 When a bound variable is changed to another, no free occurrence should become bound.  Easy case: If a bound variable is changed to a completely new variable, no free occurrence becomes bound.

Last Jouko Väänänen: Predicate logic viewed When exactly can a bound variable be changed to another?

Last Jouko Väänänen: Predicate logic viewed When exactly can a bound variable be changed to another?

 To understand this properly, we need a new of freedom.

Last Jouko Väänänen: Predicate logic viewed The concept “free for”

Last Jouko Väänänen: Predicate logic viewed The concept “free for”

 A variable x is free for another variable y in a formula A, if no free occurrence of y in A becomes a bound occurrence of x if x is substituted for y in A.

Last Jouko Väänänen: Predicate logic viewed The concept “free for”

 A variable x is free for another variable y in a formula A, if no free occurrence of y in A becomes a bound occurrence of x if x is substituted for y in A. free

x is free for y in ∀zR0(z,y): ∀zR0(z,x).

Last Jouko Väänänen: Predicate logic viewed The concept “free for”

 A variable x is free for another variable y in a formula A, if no free occurrence of y in A becomes a bound occurrence of x if x is substituted for y in A. free

x is free for y in ∀zR0(z,y): ∀zR0(z,x).

x is not free for y in ∀xR0(x,y): ∀xR0(x,x).

bound Last Jouko Väänänen: Predicate logic viewed Convention

Last Jouko Väänänen: Predicate logic viewed Convention

 We agree that a constant is always free for any variable in any formula.

Last Jouko Väänänen: Predicate logic viewed Convention

 We agree that a constant is always free for any variable in any formula.

: If a constant is substituted for a variable, it cannot give rise to new occurrences of bound variables, because a constant is not a variable at all.

Last Jouko Väänänen: Predicate logic viewed Substitution

Last Jouko Väänänen: Predicate logic viewed Substitution

 A(t/y) is the formula obtained from A by substituting the term t for y in every free occurrence of y in A. We never use this notation unless we know that t is free for y in A.

Last Jouko Väänänen: Predicate logic viewed Substitution

 A(t/y) is the formula obtained from A by substituting the term t for y in every free occurrence of y in A. We never use this notation unless we know that t is free for y in A.

A A(x/y)

P0(y) P0(x) ∃z(zEy) ∃z(zEx)

∃z(R0(z,y)→∀xR1(x,z)) ∃z(R0(z,x)→∀xR1(x,z))

∃z(R0(z,y)→∀xR1(x,y)) (not allowed)

Last Jouko Väänänen: Predicate logic viewed Basic fact about substitution

Last Jouko Väänänen: Predicate logic viewed Basic fact about substitution

 Substitution lemma: If t is free for y in A, then the following are equivalent:

Last Jouko Väänänen: Predicate logic viewed Basic fact about substitution

 Substitution lemma: If t is free for y in A, then the following are equivalent:

 M ⊨s A(t/y) M  M ⊨s(a/y) A, where a=t ⟨s⟩

Last Jouko Väänänen: Predicate logic viewed Basic fact about substitution

 Substitution lemma: If t is free for y in A, then the following are equivalent:

 M ⊨s A(t/y) M  M ⊨s(a/y) A, where a=t ⟨s⟩

Proof: Exercise.

Last Jouko Väänänen: Predicate logic viewed Changing bound variables

Last Jouko Väänänen: Predicate logic viewed Changing bound variables

 We can change y to x in ∀yA, getting ∀xA(x/y) if x does not occur free but is free for y in A. The formulas ∀yA and ∀xA(x/y) are logically equivalent.  Similarly we can change y to x in ∃yA, getting ∀xA(x/y), if x does not occur free but is free for y in A. The formulas ∃yA and ∃xA(x/y) are logically equivalent.

Last Jouko Väänänen: Predicate logic viewed Change of bound variables made easy

 You can always change a bound variable to a variable which does not occur in the original formula.

Last Jouko Väänänen: Predicate logic viewed Valid formulas about quantifiers

Last Jouko Väänänen: Predicate logic viewed Valid formulas about quantifiers

 ∀yA→A(t/y), where t is free for y in A  A(t/y)→∃yA, where t is free for y in A

Last Jouko Väänänen: Predicate logic viewed Valid formulas about quantifiers

 ∀yA→A(t/y), where t is free for y in A  A(t/y)→∃yA, where t is free for y in A

Neither is valid if t is not free for y in A

Last Jouko Väänänen: Predicate logic viewed Recap

Last Jouko Väänänen: Predicate logic viewed Recap

 We need substitution in formulating logical laws concerning quantifiers.

Last Jouko Väänänen: Predicate logic viewed Recap

 We need substitution in formulating logical laws concerning quantifiers.

 In order that substitution goes right we need the concept of “free for”.

Last Jouko Väänänen: Predicate logic viewed Recap

 We need substitution in formulating logical laws concerning quantifiers.

 In order that substitution goes right we need the concept of “free for”.

 Also, in order that change of variables goes right we need the concept of “free for”.

Last Jouko Väänänen: Predicate logic viewed