2021 James B. Wilson
Colorado State University
The funny names are historical and while not memorable, they are still used today in logic and informatics.
Goal: substitute variable in \(M\) consistently.
Rule: one variable at a time, denote it:
\[x\mapsto M\qquad \lambda x.M\]
This is an anonymous-function, also called a "\(\lambda\)".
the variable \(x\) is bound in \(x\mapsto M\)
\((x,y)\mapsto x+y\) can be treated as one by partial evaluation
\[L_x = y\mapsto x+y\]
\[x\mapsto L_x\]
We could do likewise with \(R_y=x\mapsto x+y\).
Called "Currying" and it needs context to know the order.
Identity: \(I(x)=x\) means \(I(7)=7\) \[[x:=C](x\mapsto x) \quad \rhd\quad C\]
Constant: \(K_3(x)=3\) means \(K_3(7)=3\) \[[x:=C](x\mapsto A)\quad\rhd\quad A\]
Recursion: \(f(x)=x^2+x\) means \(f(7)=7^2+7\) \[[x:=C](x\mapsto AB)\quad\rhd\quad [x:=C]A [x:=C]B\]
E.g. \(K_c(x)=c\) is constant until we set \(c=x\) when startlingly it become the identity \(K_x(x)=x=I(x)\).
\[[c:=x](c\mapsto (x\mapsto c))\qquad \rhd \qquad x\mapsto x\]
Solution: rename the variable.