handouts/Advanced/Lambda Calculus/parts/01 combinators.tex
2023-10-04 09:42:09 -07:00

39 lines
1.1 KiB
TeX
Executable File

\section{Combinators}
\definition{}
A \textit{free variable} in a $\lm$-expression is a variable that isn't bound to any input. \par
For example, $b$ is a free variable in $\lm a. b$. The same is true of $\star$ in any of the previous pages.
A \textit{combinator} is a function with no free variables.
\definition{The Kestrel}
Notable combinators are often named after birds.\hspace{-0.5ex}\footnotemark{} We've already met a few: \par
The \textit{Idiot}, $I = \lm a.a$ \par
The \textit{Mockingbird}, $M = \lm f.ff$ \par
The \textit{Cardinal}, $C = \lm fgx.(~ f(g(x)) ~)$
\footnotetext{Raymond Smullyan's \textit{To Mock a Mockingbird} is responsible for this.}
\vspace{2ex}
Another notable combinator is $K$, the \textit{Kestrel}:
$$
K = \lm ab . a
$$
\problem{}
What does the Kestrel do? Explain in plain English. \par
\hint{What is $(K~\heartsuit~\star)$?}
\vspace{2cm}
\problem{}
Reduce $(K~I)$ to derive the \textit{Kite}. How does the Kite compare to the Kestrel? \par
We'll call the Kite KI.
\begin{solution}
$\text{KI} = \lm ab . b$.
\end{solution}
\vfill
\pagebreak