I am currently reading about the lambda calculus as well as the Y combinator. I know that for any function $f$, $Yf$ is a fixed-point of $f$, that is $f(Yf) = Yf$. In order to wrap my head around this, I came up with the following example:
$Y := \lambda f. (\lambda x. f(x, x)) (\lambda x. f(x, x))$
$i : = \lambda n. n$
In order to exemplify the equasion $f(Yf) = Yf$, I tried to get from $i(Yi)$ to $Yi$, which only really required one step:
$i(Yi) = \lambda n. n (\lambda f. (\lambda x. f(x, x)) (\lambda x. f(x, x)) \lambda n.n) = \lambda f. (\lambda x. f(x, x)) (\lambda x. f(x, x)) \lambda n.n = Yi$
However, I can't seem to get from $Yi$ to $i(Yi)$. I guess I am not applying $\beta$-reduction correctly. If someone could show me how to get there, I would be so greatful.
Thank you in advance!