In lambda calculus, the $Y$ combinator :
$$Y = \lambda f.(\lambda x.f(xx))(\lambda x.f(xx))$$
I'm trying to interpret it using the only two lambda calculus notational conventions I'm aware of, namely:
- abstraction body extends to as far to the right as possible, and
- application is left associative
A. If I apply 1., I get the following interpretation of $Y$:
$$Y = \lambda f.{\LARGE (}(\lambda x.f(xx))(\lambda x.f(xx)){\LARGE )}$$
B. However, if I apply ``2.`, I get the following different interpretation of $Y$:
$$Y = {\LARGE (}\lambda f.(\lambda x.f(xx)){\LARGE )}(\lambda x.f(xx))$$
Which one is the correct interpretation? And in general when applying the conventions 1. and 2. is there an order/precedence?
The body of an abstraction extends as far right as possible: $λx.MN$ means $λx.(MN)$, so your first interpretation is the right one. Also, Y combinator is just a special lambda expression with no free variables, thus if you interpret in your second way it's really an application, not a lambda abstraction.