Два контрпримеры:
- (λx.bx(bc))c(λx.bx(bc))c and (λx.xx)(bc)(λx.xx)(bc) (Plotkin).
- (λx.a(bx))(cd)(λx.a(bx))(cd) and a((λy.b(cy))d)a((λy.b(cy))d) (Van Oostrom).
The counterexample detailed below is given in The Lambda Calculus: Its Syntax and Semantics by H.P. Barenredgt, revised edition (1984), exercise 3.5.11 (vii). It is attributed to Plotkin (no precise reference). I give an incomplete proof which is adapted from a proof by Vincent van Oostrom of a different counterexample, in Take Five: an Easy Expansion Exercise (1996) [PDF].
The basis of the proof is the standardization theorem, which allows us to consider only beta expansions of a certain form. Intuitively speaking, a standard reduction is a reduction that makes all of its contractions from left to right. More precisely, a reduction is non-standard iff there is a step MiMi whose redex is a residual of a redex to the left of the redex of a previous step MjMj; “left” and “right” for a redex are defined by the position of the λλ that is eliminated when the redex is contracted.
The standardization theorem states that there if M→∗βNM→∗βN then there is a standard reduction from MM to NN.
Let L=(λx.bx(bc))cL=(λx.bx(bc))c and R=(λx.xx)(bc)R=(λx.xx)(bc). Both terms beta-reduce to bc(bc)bc(bc) in one step.
Suppose that there is a common ancestor AA such that L←∗βA→∗βRL←∗βA→∗βR. Thanks to the standardization theorem, we can assume that both reductions are standard. Without loss of generality, suppose that AA is the first step where these reductions differ. Of these two reductions, let σσ be the one where the redex of the first step is to the left of the other, and write A=C1[(λz.M)N]A=C1[(λz.M)N] where C1C1 is the context of this contraction and (λz.M)N(λz.M)N is the redex. Let ττ be the other reduction.
Since ττ is standard and its first step is to the right of the hole in C1C1, it cannot contract at C1C1 nor to the left of it. Therefore the final term of ττ is of the form C2[(λz.M′)N′]C2[(λz.M′)N′] where the parts of C1C1 and C2C2 to the left of their holes are identical, M→∗βM′M→∗βM′ and N→∗βN′N→∗βN′. Since σσ starts by reducing at C1C1 and never reduces further left, its final term must be of the form C3[S]C3[S] where the part of C3C3 to the left of its hole is identical to the left part of C1C1 and C2C2, and M[z←N]→∗βSM[z←N]→∗βS.
Observe that each of LL and RR contains a single lambda which is to the left of the application operator at the top level. Since ττ preserves the lambda of λz.Mλz.M, this lambda is the one in whichever of LL or RR is the final term of ττ, and in that term the argument of the application is obtained by reducing NN. The redex is at the toplevel, meaning that C1=C2=C3=[]C1=C2=C3=[].
If ττ ends in RR, then M→∗βzzM→∗βzz, N→∗βbcN→∗βbc and M[z←N]→∗β(λx.bx(bc))cM[z←N]→∗β(λx.bx(bc))c. If NN has a descendant in LL then this descendant must also reduce to bcbc which is the normal form of NN. In particular, no descendant of NN can be a lambda, so σσ cannot contract a subterm of the form ˇNPNˇP where ˇNNˇ is a descendant of NN. Since the only subterm of LL that reduces to bcbc is bcbc, the sole possible descendant of N in L is the sole occurrence of bc itself.
If τ ends in L, then M→∗βbz(bc), N→∗βc, and M[z←N]→∗β(λx.xx)(bc). If N has a descendant in R then this descendant must also reduce to c by confluence.
At this point, the conclusion should follow easily according to van Oostrom, but I'm missing something: I don't see how tracing the descendants of N gives any information about M. Apologies for the incomplete post, I'll think about it overnight.