Lecture 17 Handout 3: Practice Substituting in Predicate Logic

Lecture 17 Handout 3:
Practice Substituting in Predicate Logic
1
Why we need practice with this
✤
We need practice in substituting in predicate logic because the rules
for the quantifiers involve substitution and are hard to get a handle
on (or even memorize) if you aren’t comfortable with substitutions.
✤
We’ll introduce the rules for the quantifiers in Lecture 21. But it’s
good to start practicing sooner rather than later with these things.
2
The Basic Idea
✤
So suppose that you have a
formula ϕ(x) with a free
variable x. For instance,
suppose that ϕ(x) is one of the
following:
✤
Then ϕ(a) is simply the result of
replacing the variable x
everywhere in the formula with
the individual constant a. For
instance:
✤
1.
Rxb
✤
1.
Rab
✤
2.
∀ y (Ryc ➝ Fx)
✤
2.
∀ y (Ryc ➝ Fa)
✤
3.
∃ z (Fz ∧ Rxz)
✤
3.
∃ z (Fz ∧ Raz)
3
Practice Problem
✤
Consider the following
formulas ϕ(y) in free variable y:
✤
Then write down what ϕ(b) is:
✤
1.
Ray
✤
1.
✤
2.
∀ z (Rzy ➝ Fy)
✤
2.
✤
3.
∀ z (Fy ➝ Rza)
✤
3.
✤
4.
∃ z (Fz ∧ Ryz)
✤
4.
✤
5.
∃ z (Rxz ∨ Fy)
✤
5.
4
The Other Way Around
✤
So suppose that you have a
sentence ϕ(a) with an
individual constant a. For
instance, suppose that ϕ(a) is
one of the following:
✤
Then ϕ(x) is simply the result of
replacing the individual
constant a everywhere in the
formula with the variable x. For
instance:
✤
1.
Fa ∧ (Ha ∧ Rab)
✤
1.
Fx ∧ (Hx ∧ Rxb)
✤
2.
Ha ➝ (∀ y Ray)
✤
2.
Hx ➝ (∀ y Rxy)
✤
3.
∀ y ∃ z (Rya ∧ Raz)
✤
3.
∀ y ∃ z (Ryx ∧ Rxz)
5
Practice Problem
✤
Consider the following
formulas ϕ(a) which contains
an individual constant a.
Then write down what ϕ(x) is:
✤
✤
1.
Ha ∧ (Hb ➝ Rab)
✤
1.
✤
2.
∃ y ∀ z (Fz ➝ Rya)
✤
2.
✤
3.
∀ y ∀ z (Rya ∧ Rza)
✤
3.
✤
4.
(∃ y Hy) ➝ (Fa ∨ Ga)
✤
4.
✤
5.
(∀ z Rza) ➝ (∀ z Raz)
✤
5.
6
Finding the Middle Formula
✤
✤
✤
✤
In handling the rules for the
quantifiers, we will need to “find the
middle formula.”
✤
So the task will be to find a formula
ϕ(x) such that
1. One of your lines is the sentence
ϕ(a) for some individual constant a.
2. Another of your lines is the sentence ∃ x ϕ(x) or the sentence ∀ x ϕ(x).
7
Example 1:
✤
ℓ1.
✤
ℓ2.
Ha ∧ Fa
∃ x (Hx ∧ Fx)
✤
Find the Middle Formula.
✤
Solution: the formula ϕ(x) is the
formula (Hx ∧ Fx).
✤
You can check your solution by
substituting back in. Line ℓ1 is the
sentence ϕ(a), while line ℓ2 is the
sentence ∃ x ϕ(x).
Practice Problems
✤
Example 2:
✤
✤
✤
ℓ1.
ℓ2.
✤
Fa ➝ Ga
∀ x (Fx ➝ Gx)
Example 3:
✤
✤
Find the middle formula.
✤
8
ℓ1.
ℓ2.
Fa ➝ Fb
∀ x (Fx ➝ Fb)
Find the middle formula.
Practice Problems
✤
Example 4:
✤
✤
✤
ℓ1.
ℓ2.
✤
∀ x (Fx ➝ Rxb)
Fa ➝ Rab
Example 5:
✤
✤
Find the middle formula.
✤
9
ℓ1.
ℓ2.
Rab
∃ x Rxb
Find the middle formula.
Multiple Quantifiers
✤
We can do this even when there are
multiple quantifiers running around.
✤
Example 7:
✤
ℓ1.
∃ y Ray
✤
ℓ2.
∀ x ∃ y Rxy
✤
Find the Middle Formula.
✤
Solution: the middle formula ϕ(x) is
the formula ∃ y Rxy.
10
✤
For, when you substitute in a for x in
ϕ(x), you get ϕ(a) which is ∃ y Ray or
line ℓ1.
✤
And when you take ϕ(x) and put a
universal quantifier in front of it,
you get ∀ x ∃ y Rxy, which is line ℓ2.
Practice Problems with Multiple
Quantifiers
✤
Example 8:
✤
✤
✤
ℓ1.
ℓ2.
✤
∀ y (Rby ➝ Ha)
∃ x ∀ y (Rby ➝ Hx)
Example 9:
ℓ1.
ℓ
2.
✤
✤
✤
Find the middle formula.
11
∀ y ∃ z (Rzy ∧ Raz)
∃ x ∀ y ∃ z (Rzy ∧ Rxz)
Find the middle formula.