Lambda edits

This commit is contained in:
2023-10-16 15:06:51 -07:00
parent 790cd77e87
commit b093e368e5
6 changed files with 121 additions and 81 deletions

View File

@ -49,13 +49,9 @@ How about $(8~NOT~F)$?
\pagebreak
\problem{}
This handout may remind you of Professor Oleg's handout on Peano's axioms. Good. \par
Recall the tools we used to build the natural numbers: \par
We had a zero element and a \say{successor} operation so that $1 \coloneqq S(0)$, $2 \coloneqq S(1)$, and so on.
\vspace{1ex}
Create a successor operation for the Church numerals. \par
Peano's axioms state that we only need a zero element and a \say{successor} operation to
build the natural numbers. We've already defined zero.
Now, create a successor operation so that $1 \coloneqq S(0)$, $2 \coloneqq S(1)$, and so on. \par
\hint{A good signature for this function is $\lm nfa$, or more clearly $\lm n.\lm fa$. Do you see why?}
\begin{solution}
@ -175,36 +171,5 @@ $D(1) = 0$, $D(2) = 1$, etc. $D(0)$ should be zero. \par
$D = \lm n . \Bigl[(~n~H~\langle 0, 0 \rangle~)~T\Bigr]$
\end{solution}
\begin{solution}
Here's a different solution. \par
Can you figure out how it works?
\vspace{1ex}
$
D_0 =
\lm p . \Bigl[p~T\Bigr]
\Bigl\langle
F ~,~ p~F
\Bigr\rangle
\Bigl\langle
F
~,~
\bigl\langle
p~F~T ~,~ ( (p~F~T)~(P~F~F) )
\bigr\rangle
\Bigr\rangle
$
\vspace{1ex}
$
D = \lm nfa .
\Bigl(
n D_0 \Bigl\langle T, \langle f, a \rangle \Bigr\rangle
\Bigr)~F~F
$
\end{solution}
\vfill
\pagebreak