Otherwise, if x y we
proceed by induction on the height of the expression being substituted
in.
Base Case Let E1 be an expression of height 0. Then we have the following cases:
Inductive step:
Suppose for some n, for all
i n
Consider
an expression E of height n+1. We must show that our
result holds for E. E can be formed by application (case S4)
of the definition of substitution, or by -abstraction (cases
S5-S7).
and hence y FV(F1), y
FV(F2).
Note that both
F1 and F2 are of height n
or less. So we can write
and by S4 this is
which by the inductive hypothesis is
Now, starting from the right hand side we have:
and by S4 this can be written
and again using S4 we have
by S5. On the other hand
by Lemma Sub.1 since y FV(F)
We have
which, by S6
On the other hand
Which by S7, choosing
w FV(E2
is
So RHS LHS
We can conclude that, as above, y FV(F) .
We have
which, by S6
where the height of F is n.
by the inductive hypothesis.
On the other hand, given that xu
since u FV(E2)
We have
which, by S7, with our choice of w which ensures
w u
On the other hand
Which by S7, with our choice of w, is
by the inductive hypothesis
So RHS LHS
We can conclude that, as above, y FV(F) .
We have
which, by S7
where the height of F is n.
by the inductive hypothesis.
On the other hand, given that xu
We observed early on that the meaning of
and the meaning of (+ 5) were both the function "add 5". This observation can be generalised and encoded as a reduction rule.
For the pure -calculus, the
rule can be stated: