-
Notifications
You must be signed in to change notification settings - Fork 0
/
3-lambda.tex
84 lines (79 loc) · 1.96 KB
/
3-lambda.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
\section{Der $\lambda$-Kalkül}
\begin{frame}{Der $\lambda$-Kalkül}
\begin{itemize}
\item Programmierlogik
\item wichtige Grundlage für Programmiersprache
\item Weite Verbreitung in der Lehre (KIT 5. Semester)
\item Beispiel: $(\lambda x.\lambda y.x) (\lambda y.y)$
\end{itemize}
\end{frame}
\begin{frame}[<+->]{Der $\lambda$-Kalkül}
Visualisierung von Bret Victor:
\begin{center}
\begin{tabular}{rcl}
\raisebox{-.5\height}{\includegraphics[height=1.cm]{media/egg_blank}}
& $\Leftrightarrow$ &
$x$
\\[1cm]
\raisebox{-.5\height}{\includegraphics[height=1.cm]{media/alligator_blank}}
& $\Leftrightarrow$ &
$\lambda x.$
\end{tabular}
\end{center}
\end{frame}
\begin{frame}{Die $\beta$-Reduktion}
\begin{center}
\begin{tabular}{lccl}
&
\raisebox{-.5\height}{
\begin{tabular}{cc}
\tikz[remember picture] \node(a) {
\includegraphics[height=1.cm]{media/alligator_green}
};
&
\tikz[remember picture] \node(b) {
\includegraphics[height=.75cm]{media/egg_yellow}
};
\\
\includegraphics[height=.75cm]{media/egg_green}
\end{tabular}
\begin{tikzpicture}[remember picture,overlay]
\draw<2->[<-,thick,bend left=45]
($(a.east)+(-0.5,-0.1)$) to node[auto, swap] {}($(b.west)+(0.1,0)$);
\end{tikzpicture}
}
& $\Leftrightarrow$ &
$(\lambda x.x) y$
\\[2cm]
% SLIDE 3
\action<3->{
$\Rightarrow$
&
\visible<3->{
\raisebox{-.5\height}{
\parbox{3cm}{
\begin{center}
\begin{turn}{180}
\includegraphics[height=1.cm]{media/alligator_green}
\end{turn}
\\
\includegraphics[height=.75cm]{media/egg_yellow}
\end{center}
}
}
}
& $\Leftrightarrow$ &
$\cancel{\lambda x.}y$
}
\\[2cm]
% SLIDE 4
\action<4->{
$\Rightarrow$
&
\visible<4->{\includegraphics[height=.75cm]{media/egg_yellow}}
& $\Leftrightarrow$ &
$y$
}
\end{tabular}
\end{center}
\end{frame}