Computer Science 591i
More Tree-Surgery for Church-Rosser Theorems

In the first case of the proof of Church-Rosser Theorem we showed that if we used path p to select a redex, and alternatively used path q to select another redex, then we could arrive at a common result by using q and p respectively, provided the two paths diverged.

This leaves us with the cases in which we have one path contained in another. We'll need to tuck a few more appropriate lemmas under our belt before we can essay the remaining cases.

We'll need to prove these using induction on path-length, so let's define this useful concept.


Definition

If p is a path, we define the length of p recursively by

A Confession

It seems that we would have been better to disallow addressing of a constant or variable by a non-empty path... But the definition of proper addressing given below attempts to remedy this.

Also, a certain amount of hand-waving with respect to -conversion (and other matters) is going to occur. This is marked by the symbol


However the following Lemma from Hindley's book should assuage our collective conscience:

Lemma-

If P P' and Q Q' and P Q then P' Q'

Proof

See Hindley, Lemma 1.27

Definition

Let E be a term of the -calculus, and let p be a path. We say that p properly addresses the term E if cases PH2, PH3 of the definition of the concept of address by a path don't occur.

Definition

Let E be a term of the -calculus, with v a variable, and let p be a path. We say that v remains in scope from E down p, and write seen(v,E,p) according to the following definition:
We're going to need the odd lemma here, mostly to say how substitution interacts with path-indexing.

Lemma PT3

If E,F are terms of the -calculus, and v is a variable of the aforementioned, and p is a path which properly addresses E and seen(v,E,p) then there is an E' which is -congruent to E for which

Proof

Let E' be formed from E by -converting any -abstraction found on p whose bound variable is a member of FV(F) to an abstraction whose bound variable is not a member of FV(F).

We now proceed by induction on the length of p.

Base Case

In the base-case length(p)=0, so that p = (). In this case, since by PH1 E'[p]=E' and v is in scope, we have

Inductive Step

Suppose for some natural number n that length(p) n implies that Consider a path p for which length(p) = n+1 Then p = s::p', where p'=tl(p), and length(p')=n.

Lemma PT4

If E,F,G are terms of the -calculus, and v is a variable of the aforementioned, and p is a path which properly addresses E and seen(v,E,p) then there is an E' which is -congruent to E for which

Proof

Let E' be formed from E by -converting any -abstraction found on p whose bound variable is a member of FV(F) to an abstraction whose bound variable is not a member of FV(F).

We now proceed by induction on the length of p.

Base Case

In the base-case length(p)=0, so that p = (). In this case, since by UP1 E'[p:=G]=G and v is in scope, we have While

Inductive Step

Suppose for some natural number n that length(p) n implies that Consider a path p for which length(p) = n+1 Then p = s::p', where p'=tl(p), and length(p')=n

Lemma Sub.4

Let E, F, G be terms of the -calculus, and let u, v be variables, for which u v
and u FV(G) and v FV(F). Let it be the case also that no variable bound in E is free in F or in G. Then

Proof

We proceed by induction on n, the height of E.

Base Case n=0


Inductive Step

Suppose for a given n we have for any term E for which height(E) n

Consider an expression E of height n+1 We must show our result holds for E

.

Figure for Proposition LC2

Proposition LC2

Let (E = ( u.C) G) be a redex of the -calculus.

Let p be a path for which E[p] = ( v.D) H) where hd(p)=0 and hd(tl(p))=1. and also seen(u,E,p). Let p' = tl(tl(p)). Then

Proof

Let C' be formed from C by -converting any -abstraction whose bound variable is a member of FV(G) FV(H) to an abstraction whose bound variable is not a member of {u} FV(G)) FV(H).

Let (E' = ( u'.C') G) and let v', D', H' be the converted forms of v,D,H.

Consider that by Lemma PT3.

using the definition of path-addressing, and expanding E. Now we apply S4 to distribute substitution across the application and next we can apply S6 because we have -converted to avoid variable-capture.

Which is a redex. So, we can work out

that is using lemma PT4, as being On the other hand, we can immediately apply the definition of to obtaining Expanding E' and using (twice) the definition of path-addressing, we obtain which, by the definition of is Now, we can use lemma PT4 to distribute the outer-substitution across the path-update: Whence we can apply Lemma Sub.4 because we have chosen v' FV(G) FV(H). Thus we have shown that local-confluence holds for E', which is -congruent to E. Local confluence for Eitself follows from -conversion.