Consider the following in untyped lambda calculus
( \ x. x x ) ( \ g. \ f. g f )
Even though each variable is uniquely named reducing this will require an $\alpha$-renaming.
( \ x. x x ) ( \ g. \ f. g f )
( \ g. \ f. g f ) ( \ g. \ f. g f )
( \ f. ( \ g. \ f. g f ) f )
The bolded f
is ambiguous since it is could refer to one of two bindings. (If you are of the opinion that this sort of ambiguity resolves to the closest binding you can run it another step in which case we end up with two f
s in the same context referring to different bindings)
My question is whether there also exists such an expression, that is one that has unique variable names which requires alpha renaming, in simply typed lambda calculus. The given example does not work because ( \ x. x x )
would require an infinite type in STLC.