Download Predicate Logic Terms and substitution

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
Predicate Logic
Terms and substitution
The Lecture
Logical laws for quantifiers
Jouko Väänänen: Predicate logic
Last
viewed
Logical laws for quantifiers

Idea: If ∀xA is true, then A is true for
every value of x, but what does this
mean?
Jouko Väänänen: Predicate logic
Last
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?
Jouko Väänänen: Predicate logic
Last
viewed
Terms
Jouko Väänänen: Predicate logic
Last
viewed
Terms


Constants and variables are called
terms.
x,y,z,c,d,0,1,…
Jouko Väänänen: Predicate logic
Last
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.
Jouko Väänänen: Predicate logic
Last
viewed
The value of a term
Jouko Väänänen: Predicate logic
Last
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).
Jouko Väänänen: Predicate logic
Last
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
Jouko Väänänen: Predicate logic
Last
viewed
Changing variables
Jouko Väänänen: Predicate logic
Last
viewed
Changing variables

For the logical laws of quantifiers we
have to look at ways in which variables
can be changed in a formula.
Jouko Väänänen: Predicate logic
Last
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.
Jouko Väänänen: Predicate logic
Last
viewed
Bound variables can be changed
Jouko Väänänen: Predicate logic
Last
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)
Jouko Väänänen: Predicate logic
Last
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.
Jouko Väänänen: Predicate logic
Last
viewed
But one has to be careful!
Jouko Väänänen: Predicate logic
Last
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)
Jouko Väänänen: Predicate logic
Last
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
Jouko Väänänen: Predicate logic
Last
viewed
The point
Jouko Väänänen: Predicate logic
Last
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.
Jouko Väänänen: Predicate logic
Last
viewed
When exactly can a bound variable be
changed to another?
Jouko Väänänen: Predicate logic
Last
viewed
When exactly can a bound variable be
changed to another?

To understand this properly, we need a
new concept of freedom.
Jouko Väänänen: Predicate logic
Last
viewed
The concept “free for”
Jouko Väänänen: Predicate logic
Last
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.
Jouko Väänänen: Predicate logic
Last
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).
Jouko Väänänen: Predicate logic
Last
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).
Jouko Väänänen: Predicate logic
Last
viewed
bound
Convention
Jouko Väänänen: Predicate logic
Last
viewed
Convention

We agree that a constant is always free
for any variable in any formula.
Jouko Väänänen: Predicate logic
Last
viewed
Convention

We agree that a constant is always free
for any variable in any formula.

Reason: 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.
Jouko Väänänen: Predicate logic
Last
viewed
Substitution
Jouko Väänänen: Predicate logic
Last
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.
Jouko Väänänen: Predicate logic
Last
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)
Jouko Väänänen: Predicate logic
Last
viewed
Basic fact about substitution
Jouko Väänänen: Predicate logic
Last
viewed
Basic fact about substitution

Substitution lemma: If t is free for y
in A, then the following are equivalent:
Jouko Väänänen: Predicate logic
Last
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 ⊨s(a/y) A, where a=tM⟨s⟩
Jouko Väänänen: Predicate logic
Last
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 ⊨s(a/y) A, where a=tM⟨s⟩
Proof: Exercise.
Jouko Väänänen: Predicate logic
Last
viewed
Changing bound variables
Jouko Väänänen: Predicate logic
Last
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.
Jouko Väänänen: Predicate logic
Last
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.
Jouko Väänänen: Predicate logic
Last
viewed
Valid formulas about quantifiers
Jouko Väänänen: Predicate logic
Last
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
Jouko Väänänen: Predicate logic
Last
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
Jouko Väänänen: Predicate logic
Last
viewed
Recap
Jouko Väänänen: Predicate logic
Last
viewed
Recap

We need substitution in formulating
logical laws concerning quantifiers.
Jouko Väänänen: Predicate logic
Last
viewed
Recap

We need substitution in formulating
logical laws concerning quantifiers.

In order that substitution goes right we
need the concept of “free for”.
Jouko Väänänen: Predicate logic
Last
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”.
Jouko Väänänen: Predicate logic
Last
viewed
Related documents