x H x
11 −
11: s p q p q s r
10: p q s r
9 * 10 * 9: s p q
8: q s r
5 s 6 q 7 p 8 + 7:p
6:q
p
5:s p
2 3 q 4 s
4:s r
3:q
(p+1)*q − p*(q+(r+1)) 1 r 2:p
1:r
ψ
if φ is a formula and x is a variable, then xφ and xφ are
formulas
nothing else is a formula
xφ xφ
where P is a predicate of arity n, t’s are terms and x is a variable.
Convention
x and x bind most tightly
then and
then
or
(father is function) as before, but use f x to represent “the
father of
x”; the statement
may be represented as
x S x f m B x m
to verify that xQ x is true amounts to replace x by any of its
possible values and checking that Q holds for each one of them
similarly for xQ x , but in this case xQ x is true when Q
holds for at least one particular value of x
S f x y y x P
x Q x
S y y x P x Q x
f x y x
S y y x P x Q x
What about
yS x y x P x Q x f y x
yS f y y x P x Q x ??
yS f y y x P x Q x
Reason
the meaning of the formula is unexpectedly changing: the new term
f y (which replaces x) makes y to bound to more variable occur-
sponding occurrence of y should be free and the truth value of the formula should
depend on y
— however, in yS f y y x P x Q x there is no free occurrence of y,
and φ 10 is true. Take f x 2 x. With the “unsafe” substitution
2 y x we get
φ 2 y y2 y y x x 100 x 10
and φ 10 φ 2 5 is false. Using the forthcoming “safe” substi-
tution we get
φ 2 y z2 y z x x 100 x 10
and φ 10 φ 2 5 is true, as in the original formula.
zS x z x P x Q x
then apply
the substitution
zS x z x P x Q x f y x
zS f y z x P x Q x
Examples:
φ yS x y x P x Q x ;
then f z is free for x in φ,
but g z y is not free for x in φ
1 1 x 1 0 1 x 1 1 x 0
1 x 1 1 x premise
2 x 1 1 x 1 0 premise
3 1 x 1 1 x 0 ( e) for 1,2
reflexive: t t
symmetric: t1 t2 t2 t1
1. t1 t2 premise
2. t1 t1 (=i)
3. t2 t1 (=e) 1,2 (where φ is x t1
t2 t2
transitive: t1 t3 t1 t3
1. t2 t3 premise
2. t1 t2 (=i)
3. t1 t3 (=e) 1,2 (where φ is t1 x)
Example 1: P t x P x Q x Q t
1 P t
premise
2 x P x Q x premise
3 P t Q t ( xe) for 2
4 Q t ( e) for 3,1
Example 2: x P x Q x xP x xQ x
1 x P x Q x premise
2 xP
x
premise
3 x0 P x0 Q x0 ( xe) for 1
4 P x0 ( xe) for 2
5 Q x0 ( e) for 3,4
6 xQ x xi for 3-5
Example 1: xφ xφ
1 xφ premise
2 φ x x ( xe) for 1
3 xφ ( xi) for 2
Example 2: x P x Q x xP x xQ x
1 x P x Q x premise
2 xP
x premise
3 x0 P x0
( xe) for 1
4 P x0 Q x0 ( xe) for 1
6 xQ x ( xi) for 5
7 xQ x ( xe) for 2,3-6