NB: This is a full reworking of an earlier post of mine (which I have now deleted). That earlier post was flawed due to a technicality (applying $\eta$-reduction without considering the question of free variables) that clouded issue. This version sidesteps that technicality altogether (I think).
The $\mathbf{identity}$ function can be represented like this:
$$\lambda f.f\label{a}\tag{1}$$
Now, if I understand $\eta$-reduction correctly, the (atomic!) name that makes up the body of this function, namely $f$, is equivalent to the function $\lambda x.(f\;x)$.
Consider the expression obtained by replacing the body of the identity function above with the equivalent expression $\lambda x.f\;x$ (thus performing an "$\eta$-expansion", if you will):
$$ \lambda f.\lambda x.(f\;x)\label{b}\tag{2} $$
My question is: are expressions $\ref{a}$ and $\ref{b}$ equivalent?
My naive answer to this question is: "of course!", but I hesitate because
- I'm not completely confident on which manipulations produce equivalent $\lambda$-expressions; and, more importantly
- My book gives expressions $\ref{a}$ and $\ref{b}$ different names ($\mathbf{identity}$ and $\mathbf{apply}$, respectively), and says nothing about their being equivalent.