Slides/Slides5.thy
changeset 2751 3b8232f56941
parent 2750 43283267737c
child 3224 cf451e182bf0
equal deleted inserted replaced
2750:43283267737c 2751:3b8232f56941
    80 
    80 
    81 
    81 
    82 text_raw {*
    82 text_raw {*
    83   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    83   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    84   \mode<presentation>{
    84   \mode<presentation>{
    85   \begin{frame}<1-2>
    85   \begin{frame}<1-6>
    86   \frametitle{New Types in HOL}
    86   \frametitle{New Types in HOL}
    87 
    87 
    88   picture
    88    \begin{center}
    89   
    89   \begin{tikzpicture}[scale=1.5]
       
    90   %%%\draw[step=2mm] (-4,-1) grid (4,1);
       
    91   
       
    92   \onslide<2-4,6>{\draw[very thick] (0.7,0.4) circle (4.25mm);}
       
    93   \onslide<1-4,6>{\draw[rounded corners=1mm, very thick] ( 0.0,-0.8) rectangle ( 1.8, 0.9);}
       
    94   \onslide<3-5,6>{\draw[rounded corners=1mm, very thick] (-1.95,0.85) rectangle (-2.85,-0.05);}
       
    95   
       
    96   \onslide<3-4,6>{\draw (-2.0, 0.845) --  (0.7,0.845);}
       
    97   \onslide<3-4,6>{\draw (-2.0,-0.045)  -- (0.7,-0.045);}
       
    98 
       
    99   \onslide<4-4,6>{\alert{\draw ( 0.7, 0.4) node {\footnotesize\begin{tabular}{@ {}c@ {}}$\alpha$-\\[-1mm]classes\end{tabular}};}}
       
   100   \onslide<4-5,6>{\alert{\draw (-2.4, 0.4) node {\footnotesize\begin{tabular}{@ {}c@ {}}$\alpha$-eq.\\[-1mm]terms\end{tabular}};}}
       
   101   \onslide<1-4,6>{\draw (1.8, 0.48) node[right=-0.1mm]
       
   102     {\footnotesize\begin{tabular}{@ {}l@ {}}existing\\[-1mm] type\\ \onslide<4-4,6>{\alert{(sets of raw terms)}}\end{tabular}};}
       
   103   \onslide<2-4,6>{\draw (0.9, -0.35) node {\footnotesize\begin{tabular}{@ {}l@ {}}non-empty\\[-1mm]subset\end{tabular}};}
       
   104   \onslide<3-5,6>{\draw (-3.25, 0.55) node {\footnotesize\begin{tabular}{@ {}l@ {}}new\\[-1mm]type\end{tabular}};}
       
   105   
       
   106   \onslide<3-4,6>{\draw[<->, very thick] (-1.8, 0.3) -- (-0.1,0.3);}
       
   107   \onslide<3-4,6>{\draw (-0.95, 0.3) node[above=0mm] {\footnotesize{}isomorphism};}
       
   108 
       
   109   \onslide<6>{\draw[->, line width=2mm, red] (-1.0,-0.4) -- (0.35,0.16);}
       
   110   \end{tikzpicture}
       
   111   \end{center}
       
   112   
       
   113   \begin{center}
       
   114   \textcolor{red}{\large\bf\onslide<6>{define $\alpha$-equivalence}}
       
   115   \end{center}
       
   116 
    90   \end{frame}}
   117   \end{frame}}
    91   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   118   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
    92 *}
   119 *}
    93 
   120 
    94 
   121 
   103   \begin{itemize}
   130   \begin{itemize}
   104   \item binding sets of names has some interesting properties:\medskip
   131   \item binding sets of names has some interesting properties:\medskip
   105   
   132   
   106   \begin{center}
   133   \begin{center}
   107   \begin{tabular}{l}
   134   \begin{tabular}{l}
   108   $\forall\{x, y\}.\, x \rightarrow y \;\;\approx_\alpha\;\; \forall\{y, x\}.\, y \rightarrow x$
   135   \textcolor{blue}{$\forall\{x, y\}.\, x \rightarrow y \;\;\approx_\alpha\;\; \forall\{y, x\}.\, y \rightarrow x$}
   109   \bigskip\smallskip\\
   136   \bigskip\smallskip\\
   110 
   137 
   111   \onslide<2->{%
   138   \onslide<2->{%
   112   $\forall\{x, y\}.\, x \rightarrow y \;\;\not\approx_\alpha\;\; \forall\{z\}.\, z \rightarrow z$
   139   \textcolor{blue}{$\forall\{x, y\}.\, x \rightarrow y \;\;\not\approx_\alpha\;\; \forall\{z\}.\, z \rightarrow z$}
   113   }\bigskip\smallskip\\
   140   }\bigskip\smallskip\\
   114 
   141 
   115   \onslide<3->{%
   142   \onslide<3->{%
   116   $\forall\{x\}.\, x \rightarrow y \;\;\approx_\alpha\;\; \forall\{x, \alert{z}\}.\, x \rightarrow y$
   143   \textcolor{blue}{$\forall\{x\}.\, x \rightarrow y \;\;\approx_\alpha\;\; \forall\{x, \alert{z}\}.\, x \rightarrow y$}
   117   }\medskip\\
   144   }\medskip\\
   118   \onslide<3->{\hspace{4cm}\small provided $z$ is fresh for the type}
   145   \onslide<3->{\hspace{4cm}\small provided $z$ is fresh for the type}
   119   \end{tabular}
   146   \end{tabular}
   120   \end{center}
   147   \end{center}
   121   \end{itemize}
   148   \end{itemize}
   129   \begin{tikzpicture}
   156   \begin{tikzpicture}
   130   \draw (0,0) node[inner sep=3mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] 
   157   \draw (0,0) node[inner sep=3mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] 
   131   {\normalsize\color{darkgray}
   158   {\normalsize\color{darkgray}
   132   \begin{minipage}{8cm}\raggedright
   159   \begin{minipage}{8cm}\raggedright
   133   For type-schemes the order of bound names does not matter, and
   160   For type-schemes the order of bound names does not matter, and
   134   alpha-equivalence is preserved under \alert{vacuous} binders.
   161   $\alpha$-equivalence is preserved under \alert{vacuous} binders.
   135   \end{minipage}};
   162   \end{minipage}};
   136   \end{tikzpicture}
   163   \end{tikzpicture}
   137   \end{textblock}}
   164   \end{textblock}}
   138   \end{frame}}
   165   \end{frame}}
   139   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   166   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   148 
   175 
   149   \begin{itemize}
   176   \begin{itemize}
   150   \item alpha-equivalence being preserved under vacuous binders is \underline{not} always
   177   \item alpha-equivalence being preserved under vacuous binders is \underline{not} always
   151   wanted:\bigskip\bigskip\normalsize
   178   wanted:\bigskip\bigskip\normalsize
   152   
   179   
   153   \begin{tabular}{@ {\hspace{-8mm}}l}
   180   \textcolor{blue}{\begin{tabular}{@ {\hspace{-8mm}}l}
   154   $\text{let}\;x = 3\;\text{and}\;y = 2\;\text{in}\;x - y\;\text{end}$\medskip\\
   181   $\text{let}\;x = 3\;\text{and}\;y = 2\;\text{in}\;x - y\;\text{end}$\medskip\\
   155   \onslide<2->{$\;\;\;\only<2>{\approx_\alpha}\only<3>{\alert{\not\approx_\alpha}}
   182   \onslide<2->{$\;\;\;\only<2>{\approx_\alpha}\only<3>{\alert{\not\approx_\alpha}}
   156    \text{let}\;y = 2\;\text{and}\;x = 3\only<3->{\alert{\;\text{and}
   183    \text{let}\;y = 2\;\text{and}\;x = 3\only<3->{\alert{\;\text{and}
   157     \;z = \text{loop}}}\;\text{in}\;x - y\;\text{end}$}
   184     \;z = \text{loop}}}\;\text{in}\;x - y\;\text{end}$}
   158   \end{tabular}
   185   \end{tabular}}
   159   
   186   
   160 
   187 
   161   \end{itemize}
   188   \end{itemize}
   162 
   189 
   163   \end{frame}}
   190   \end{frame}}
   173 
   200 
   174   \begin{itemize}
   201   \begin{itemize}
   175   \item sometimes one wants to abstract more than one name, but the order \underline{does} matter\bigskip
   202   \item sometimes one wants to abstract more than one name, but the order \underline{does} matter\bigskip
   176   
   203   
   177   \begin{center}
   204   \begin{center}
   178   \begin{tabular}{@ {\hspace{-8mm}}l}
   205   \textcolor{blue}{\begin{tabular}{@ {\hspace{-8mm}}l}
   179   $\text{let}\;(x, y) = (3, 2)\;\text{in}\;x - y\;\text{end}$\medskip\\
   206   $\text{let}\;(x, y) = (3, 2)\;\text{in}\;x - y\;\text{end}$\medskip\\
   180   $\;\;\;\not\approx_\alpha
   207   $\;\;\;\not\approx_\alpha
   181    \text{let}\;(y, x) = (3, 2)\;\text{in}\;x - y\;\text{end}$
   208    \text{let}\;(y, x) = (3, 2)\;\text{in}\;x - y\;\text{end}$
   182   \end{tabular}
   209   \end{tabular}}
   183   \end{center}
   210   \end{center}
   184   
   211   
   185 
   212 
   186   \end{itemize}
   213   \end{itemize}
   187 
   214 
   245 
   272 
   246   \end{frame}}
   273   \end{frame}}
   247   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   274   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   248 *}
   275 *}
   249 
   276 
   250 text_raw {*
       
   251   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   252   \mode<presentation>{
       
   253   \begin{frame}<1-5>
       
   254   \frametitle{\begin{tabular}{c}Inspiration from Ott\end{tabular}}
       
   255   \mbox{}\\[-3mm]
       
   256 
       
   257   \begin{itemize}
       
   258   \item this way of specifying binding is inspired by 
       
   259   {\bf Ott}\onslide<2->{, \alert{\bf but} we made some adjustments:}\medskip
       
   260   
       
   261 
       
   262   \only<2>{
       
   263   \begin{itemize}
       
   264   \item Ott allows specifications like\smallskip
       
   265   \begin{center}
       
   266   $t ::= t\;t\; |\;\lambda x.t$
       
   267   \end{center}
       
   268   \end{itemize}}
       
   269 
       
   270   \only<3-4>{
       
   271   \begin{itemize}
       
   272   \item whether something is bound can depend in Ott on other bound things\smallskip
       
   273   \begin{center}
       
   274   \begin{tikzpicture}
       
   275   \node (A) at (-0.5,1) {Foo $(\lambda y. \lambda x. t)$};
       
   276   \node (B) at ( 1.1,1) {$s$};
       
   277   \onslide<4>{\node (C) at (0.5,0) {$\{y, x\}$};}
       
   278   \onslide<4>{\draw[->,red,line width=1mm] (A) -- (C);}
       
   279   \onslide<4>{\draw[->,red,line width=1mm] (C) -- (B);}
       
   280   \end{tikzpicture}
       
   281   \end{center}
       
   282   \onslide<4>{this might make sense for ``raw'' terms, but not at all 
       
   283   for $\alpha$-equated terms}
       
   284   \end{itemize}}
       
   285 
       
   286   \only<5>{
       
   287   \begin{itemize}
       
   288   \item we allow multiple ``binders'' and ``bodies''\smallskip
       
   289   \begin{center}
       
   290   \begin{tabular}{l}
       
   291   \isacommand{bind} a b c \ldots \isacommand{in} x y z \ldots\\
       
   292   \isacommand{bind (set)} a b c \ldots \isacommand{in} x y z \ldots\\
       
   293   \isacommand{bind (set+)} a b c \ldots \isacommand{in} x y z \ldots
       
   294   \end{tabular}
       
   295   \end{center}\bigskip\medskip
       
   296   the reason is that with our definition of $\alpha$-equivalence\medskip
       
   297   \begin{center}
       
   298   \begin{tabular}{l}
       
   299   \isacommand{bind (set+)} as \isacommand{in} x y $\not\Leftrightarrow$\\ 
       
   300   \hspace{8mm}\isacommand{bind (set+)} as \isacommand{in} x, \isacommand{bind (set+)} as \isacommand{in} y
       
   301   \end{tabular}
       
   302   \end{center}\medskip
       
   303 
       
   304   same with \isacommand{bind (set)}
       
   305   \end{itemize}}
       
   306   \end{itemize}
       
   307 
       
   308 
       
   309   \end{frame}}
       
   310   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   311 *}
       
   312 
       
   313 text_raw {*
       
   314   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   315   \mode<presentation>{
       
   316   \begin{frame}<1>
       
   317   \frametitle{\begin{tabular}{c}Alpha-Equivalence\end{tabular}}
       
   318   \mbox{}\\[-3mm]
       
   319 
       
   320   \begin{itemize}
       
   321   \item in the old Nominal Isabelle, we represented single binders as partial functions:\bigskip
       
   322   
       
   323   \begin{center}
       
   324   \begin{tabular}{l}
       
   325   Lam [$a$].\,$t$ $\;{^\text{``}}\!\dn{}\!^{\text{''}}$\\[2mm]
       
   326   \;\;\;\;$\lambda b.$\;$\text{if}\;a = b\;\text{then}\;t\;\text{else}$\\
       
   327   \phantom{\;\;\;\;$\lambda b.$\;\;\;\;\;\;}$\text{if}\;b \fresh t\;
       
   328   \text{then}\;(a\;b)\act t\;\text{else}\;\text{error}$ 
       
   329   \end{tabular}
       
   330   \end{center}
       
   331   \end{itemize}
       
   332 
       
   333   \begin{textblock}{10}(2,14)
       
   334   \footnotesize $^*$ alpha-equality coincides with equality on functions
       
   335   \end{textblock}
       
   336   \end{frame}}
       
   337   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   338 *}
       
   339 
       
   340 text_raw {*
       
   341   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   342   \mode<presentation>{
       
   343   \begin{frame}<1->
       
   344   \frametitle{\begin{tabular}{c}New Design\end{tabular}}
       
   345   \mbox{}\\[4mm]
       
   346 
       
   347   \begin{center}
       
   348   \begin{tikzpicture}
       
   349   {\draw (0,0) node[inner sep=3mm, ultra thick, draw=fg, rounded corners=2mm]
       
   350   (A) {\begin{minipage}{1.1cm}bind.\\spec.\end{minipage}};}
       
   351   
       
   352   {\draw (3,0) node[inner sep=3mm, ultra thick, draw=fg, rounded corners=2mm]
       
   353   (B) {\begin{minipage}{1.1cm}raw\\terms\end{minipage}};}
       
   354 
       
   355   \alt<2>
       
   356   {\draw (6,0) node[inner sep=3mm, ultra thick, draw=red, rounded corners=2mm]
       
   357   (C) {\textcolor{red}{\begin{minipage}{1.1cm}$\alpha$-\\equiv.\end{minipage}}};}
       
   358   {\draw (6,0) node[inner sep=3mm, ultra thick, draw=fg, rounded corners=2mm]
       
   359   (C) {\begin{minipage}{1.1cm}$\alpha$-\\equiv.\end{minipage}};}
       
   360   
       
   361   {\draw (0,-3) node[inner sep=3mm, ultra thick, draw=fg, rounded corners=2mm]
       
   362   (D) {\begin{minipage}{1.1cm}quot.\\type\end{minipage}};}
       
   363 
       
   364   {\draw (3,-3) node[inner sep=3mm, ultra thick, draw=fg, rounded corners=2mm]
       
   365   (E) {\begin{minipage}{1.1cm}lift\\thms\end{minipage}};}
       
   366 
       
   367   {\draw (6,-3) node[inner sep=3mm, ultra thick, draw=fg, rounded corners=2mm]
       
   368   (F) {\begin{minipage}{1.1cm}add.\\thms\end{minipage}};}
       
   369   
       
   370   \draw[->,fg!50,line width=1mm] (A) -- (B);
       
   371   \draw[->,fg!50,line width=1mm] (B) -- (C);
       
   372   \draw[->,fg!50,line width=1mm, line join=round, rounded corners=2mm] 
       
   373   (C) -- (8,0) -- (8,-1.5) -- (-2,-1.5) -- (-2,-3) -- (D);
       
   374   \draw[->,fg!50,line width=1mm] (D) -- (E);
       
   375   \draw[->,fg!50,line width=1mm] (E) -- (F);
       
   376   \end{tikzpicture}
       
   377   \end{center}
       
   378 
       
   379   \end{frame}}
       
   380   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   381 *}
       
   382 
       
   383 
       
   384 
   277 
   385 text_raw {*
   278 text_raw {*
   386   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   279   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   387   \mode<presentation>{
   280   \mode<presentation>{
   388   \begin{frame}<1-8>
   281   \begin{frame}<1-8>
   390   \mbox{}\\[-3mm]
   283   \mbox{}\\[-3mm]
   391 
   284 
   392   \begin{itemize}
   285   \begin{itemize}
   393   \item lets first look at pairs\bigskip\medskip
   286   \item lets first look at pairs\bigskip\medskip
   394 
   287 
   395   \begin{tabular}{@ {\hspace{1cm}}l}
   288   \textcolor{blue}{\begin{tabular}{@ {\hspace{1cm}}l}
   396   $(as, x) \onslide<2->{\approx\!}\makebox[0mm][l]{\only<2-6>{${}_{\text{set}}$}%
   289   $(as, x) \onslide<2->{\approx\!}\makebox[5mm][l]{\only<2-6>{${}_{\text{set}}$}%
   397            \only<7>{${}_{\text{\alert{list}}}$}%
   290            \only<7>{${}_{\text{\alert{list}}}$}%
   398            \only<8>{${}_{\text{\alert{set+}}}$}}%
   291            \only<8>{${}_{\text{\alert{set+}}}$}}%
   399            \onslide<3->{^{R,\text{fv}}}\,\onslide<2->{(bs,y)}$
   292            \,\onslide<2->{(bs,y)}$
   400   \end{tabular}\bigskip
   293   \end{tabular}}\bigskip
   401   \end{itemize}
   294   \end{itemize}
   402 
   295 
   403   \only<1>{
   296   \only<1>{
   404   \begin{textblock}{8}(3,8.5)
   297   \begin{textblock}{8}(3,8.5)
   405   \begin{tabular}{l@ {\hspace{2mm}}p{8cm}}
   298   \begin{tabular}{l@ {\hspace{2mm}}p{8cm}}
   406    & $as$ is a set of names\ldots the binders\\
   299    & \textcolor{blue}{$as$} is a set of names\ldots the binders\\
   407    & $x$ is the body (might be a tuple)\\
   300    & \textcolor{blue}{$x$} is the body (might be a tuple)\\
   408    & $\approx_{\text{set}}$ is where the cardinality 
   301    & \textcolor{blue}{$\approx_{\text{set}}$} is where the cardinality 
   409   of the binders has to be the same\\
   302   of the binders has to be the same\\
   410   \end{tabular}
   303   \end{tabular}
   411   \end{textblock}}
   304   \end{textblock}}
   412 
   305 
   413   \only<4->{
   306   \only<4->{
   414   \begin{textblock}{12}(5,8)
   307   \begin{textblock}{12}(5,8)
       
   308   \textcolor{blue}{
   415   \begin{tabular}{ll@ {\hspace{1mm}}l}
   309   \begin{tabular}{ll@ {\hspace{1mm}}l}
   416   $\dn$ & \onslide<5->{$\exists \pi.\,$} & $\text{fv}(x) - as = \text{fv}(y) - bs$\\[1mm]
   310   $\dn$ & \onslide<5->{$\exists \pi.\,$} & $\text{fv}(x) - as = \text{fv}(y) - bs$\\[1mm]
   417         & \onslide<5->{$\;\;\;\wedge$} & \onslide<5->{$\text{fv}(x) - as \fresh^* \pi$}\\[1mm]
   311         & \onslide<5->{$\;\;\;\wedge$} & \onslide<5->{$\text{fv}(x) - as \fresh^* \pi$}\\[1mm]
   418         & \onslide<5->{$\;\;\;\wedge$} & \onslide<5->{$(\pi \act x)\;R\;y$}\\[1mm]
   312         & \onslide<5->{$\;\;\;\wedge$} & \onslide<5->{$(\pi \act x) = y$}\\[1mm]
   419         & \onslide<6-7>{$\;\;\;\wedge$} & \onslide<6-7>{$\pi \act as = bs$}\\
   313         & \only<6-7>{$\;\;\;\wedge$}\only<8>{\textcolor{gray}{\xout{$\;\;\;\wedge$}}} & 
   420   \end{tabular}
   314           \only<6-7>{$\pi \act as = bs$}\only<8>{\textcolor{gray}{\xout{$\pi \act as = bs$}}}\\
       
   315   \end{tabular}}
   421   \end{textblock}}
   316   \end{textblock}}
   422   
   317   
   423   \only<7>{
   318   \only<7>{
   424   \begin{textblock}{7}(3,13.8)
   319   \begin{textblock}{7}(3,13.8)
   425   \footnotesize $^*$ $as$ and $bs$ are \alert{lists} of names 
   320   \footnotesize $^*$ $as$ and $bs$ are \alert{lists} of names 
   434   \begin{frame}<1-3>
   329   \begin{frame}<1-3>
   435   \frametitle{\begin{tabular}{c}Examples\end{tabular}}
   330   \frametitle{\begin{tabular}{c}Examples\end{tabular}}
   436   \mbox{}\\[-3mm]
   331   \mbox{}\\[-3mm]
   437 
   332 
   438   \begin{itemize}
   333   \begin{itemize}
   439   \item lets look at ``type-schemes'':\medskip\medskip
   334   \item lets look at type-schemes:\medskip\medskip
   440 
   335 
   441   \begin{center}
   336   \begin{center}
   442   $(as, x) \approx\!\makebox[0mm][l]{${}_{\text{set}}$}\only<1>{{}^{R,\text{fv}}}\only<2->{{}^{\alert{=},\alert{\text{fv}}}} (bs, y)$
   337   \textcolor{blue}{$(as, x) \approx\!\makebox[5mm][l]{${}_{\text{set}}$} (bs, y)$}
   443   \end{center}\medskip
   338   \end{center}\medskip
   444 
   339 
   445   \onslide<2->{
   340   \onslide<2->{
   446   \begin{center}
   341   \begin{center}
       
   342   \textcolor{blue}{
   447   \begin{tabular}{l}
   343   \begin{tabular}{l}
   448   $\text{fv}(x) = \{x\}$\\[1mm]
   344   $\text{fv}(x) = \{x\}$\\[1mm]
   449   $\text{fv}(T_1 \rightarrow T_2) = \text{fv}(T_1) \cup \text{fv}(T_2)$\\
   345   $\text{fv}(T_1 \rightarrow T_2) = \text{fv}(T_1) \cup \text{fv}(T_2)$\\
   450   \end{tabular}
   346   \end{tabular}}
   451   \end{center}}
   347   \end{center}}
   452   \end{itemize}
   348   \end{itemize}
   453 
   349 
   454   
   350   
   455   \only<3->{
   351   \only<3->{
   511   \begin{frame}<1-2>
   407   \begin{frame}<1-2>
   512   \frametitle{\begin{tabular}{c}Examples\end{tabular}}
   408   \frametitle{\begin{tabular}{c}Examples\end{tabular}}
   513   \mbox{}\\[-3mm]
   409   \mbox{}\\[-3mm]
   514 
   410 
   515   \begin{center}
   411   \begin{center}
       
   412   \textcolor{blue}{
   516   \only<1>{$(\{x, y\}, x \rightarrow y) \approx_? (\{x, y\}, y \rightarrow x)$}
   413   \only<1>{$(\{x, y\}, x \rightarrow y) \approx_? (\{x, y\}, y \rightarrow x)$}
   517   \only<2>{$([x, y], x \rightarrow y) \approx_? ([x, y], y \rightarrow x)$}
   414   \only<2>{$([x, y], x \rightarrow y) \approx_? ([x, y], y \rightarrow x)$}}
   518   \end{center}
   415   \end{center}
   519 
   416 
   520   \begin{itemize}
   417   \begin{itemize}
   521   \item $\approx_{\text{set+}}$, $\approx_{\text{set}}$% 
   418   \item \textcolor{blue}{$\approx_{\text{set+}}$, $\approx_{\text{set}}$% 
   522   \only<2>{, \alert{$\not\approx_{\text{list}}$}}
   419   \only<2>{, \alert{$\not\approx_{\text{list}}$}}}
   523   \end{itemize}
   420   \end{itemize}
   524 
   421 
   525   
   422   
   526   \only<1->{
   423   \only<1->{
   527   \begin{textblock}{4}(0.3,12)
   424   \begin{textblock}{4}(0.3,12)
   582   \begin{frame}<1-2>
   479   \begin{frame}<1-2>
   583   \frametitle{\begin{tabular}{c}Examples\end{tabular}}
   480   \frametitle{\begin{tabular}{c}Examples\end{tabular}}
   584   \mbox{}\\[-3mm]
   481   \mbox{}\\[-3mm]
   585 
   482 
   586   \begin{center}
   483   \begin{center}
   587   \only<1>{$(\{x\}, x) \approx_? (\{x, y\}, x)$}
   484   \textcolor{blue}{\only<1>{$(\{x\}, x) \approx_? (\{x, y\}, x)$}}
   588   \end{center}
   485   \end{center}
   589 
   486 
   590   \begin{itemize}
   487   \begin{itemize}
   591   \item $\approx_{\text{set+}}$, $\not\approx_{\text{set}}$,
   488   \item \textcolor{blue}{$\approx_{\text{set+}}$, $\not\approx_{\text{set}}$,
   592         $\not\approx_{\text{list}}$
   489         $\not\approx_{\text{list}}$}
   593   \end{itemize}
   490   \end{itemize}
   594 
   491 
   595   
   492   
   596   \only<1->{
   493   \only<1->{
   597   \begin{textblock}{4}(0.3,12)
   494   \begin{textblock}{4}(0.3,12)
   655   \end{itemize}
   552   \end{itemize}
   656   \end{minipage}};
   553   \end{minipage}};
   657   \end{tikzpicture}
   554   \end{tikzpicture}
   658   \end{textblock}}
   555   \end{textblock}}
   659 
   556 
   660   \end{frame}}
       
   661   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   662 *}
       
   663 
       
   664 text_raw {*
       
   665   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   666   \mode<presentation>{
       
   667   \begin{frame}<1-3>
       
   668   \frametitle{\begin{tabular}{c}General Abstractions\end{tabular}}
       
   669   \mbox{}\\[-7mm]
       
   670 
       
   671   \begin{itemize}
       
   672   \item we take $(as, x) \approx\!\makebox[0mm][l]{${}_{{}*{}}$}^{=,\text{supp}} (bs, y)$\medskip
       
   673   \item they are equivalence relations\medskip  
       
   674   \item we can therefore use the quotient package to introduce the 
       
   675   types $\beta\;\text{abs}_*$\bigskip 
       
   676   \begin{center}
       
   677   \only<1>{$[as].\,x$}
       
   678   \only<2>{$\text{supp}([as].x) = \text{supp}(x) - as$}
       
   679   \only<3>{%
       
   680   \begin{tabular}{r@ {\hspace{1mm}}l}
       
   681   \multicolumn{2}{@ {\hspace{-7mm}}l}{$[as]. x \alert{=}  [bs].y\;\;\;\text{if\!f}$}\\[2mm]
       
   682   $\exists \pi.$ & $\text{supp}(x) - as = \text{supp}(y) - bs$\\
       
   683   $\wedge$       & $\text{supp}(x) - as \fresh^* \pi$\\
       
   684   $\wedge$       & $\pi \act x = y $\\
       
   685   $(\wedge$       & $\pi \act as = bs)\;^*$\\
       
   686   \end{tabular}}
       
   687   \end{center}
       
   688   \end{itemize}
       
   689 
       
   690   \only<1->{
       
   691   \begin{textblock}{8}(12,3.8)
       
   692   \footnotesize $^*$ set, set+, list
       
   693   \end{textblock}}
       
   694   
       
   695   \end{frame}}
       
   696   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   697 *}
       
   698 
       
   699 text_raw {*
       
   700   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   701   \mode<presentation>{
       
   702   \begin{frame}<1>
       
   703   \frametitle{\begin{tabular}{c}A Problem\end{tabular}}
       
   704   \mbox{}\\[-3mm]
       
   705 
       
   706   \begin{center}
       
   707   $\text{let}\;x_1=t_1 \ldots x_n=t_n\;\text{in}\;s$
       
   708   \end{center}
       
   709 
       
   710   \begin{itemize}
       
   711   \item we cannot represent this as\medskip
       
   712   \begin{center}
       
   713   $\text{let}\;[x_1,\ldots,x_n]\alert{.}s\;\;[t_1,\ldots,t_n]$
       
   714   \end{center}\bigskip
       
   715 
       
   716   because\medskip
       
   717   \begin{center}
       
   718   $\text{let}\;[x].s\;\;[t_1,t_2]$
       
   719   \end{center}
       
   720   \end{itemize}
       
   721 
       
   722   
       
   723   \end{frame}}
   557   \end{frame}}
   724   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   558   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   725 *}
   559 *}
   726 
   560 
   727 text_raw {*
   561 text_raw {*
   753 *}
   587 *}
   754 
   588 
   755 text_raw {*
   589 text_raw {*
   756   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   590   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   757   \mode<presentation>{
   591   \mode<presentation>{
   758   \begin{frame}<1-2>
   592   \begin{frame}<1>[c]
   759   \frametitle{\begin{tabular}{c}``Raw'' Definitions\end{tabular}}
   593   \frametitle{\begin{tabular}{c}Binding Functions\end{tabular}}
       
   594 
       
   595   \begin{center}
       
   596   \begin{tikzpicture}
       
   597   \node (A) at (-0.5,1) {Foo $(\lambda y. \lambda x. t)$};
       
   598   \node (B) at ( 1.5,1) {$s$};
       
   599   \onslide<1>{\node (C) at (0.5,-0.5) {$\{y, x\}$};}
       
   600   \onslide<1>{\draw[->,red,line width=1mm] (A) -- (C);}
       
   601   \onslide<1>{\draw[->,red,line width=1mm] (C) -- (B);}
       
   602   \end{tikzpicture}
       
   603   \end{center}
       
   604 
       
   605   
       
   606   \end{frame}}
       
   607   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   608 *}
       
   609 
       
   610 text_raw {*
       
   611   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   612   \mode<presentation>{
       
   613   \begin{frame}<1->[t]
       
   614   \frametitle{\begin{tabular}{c}Binder Clauses\end{tabular}}
       
   615 
       
   616   \begin{itemize}
       
   617   \item We need for a bound variable to have a `clear scope', and bound
       
   618   variables should not be free and bound at the same time.\bigskip
       
   619   \end{itemize}
       
   620 
       
   621   \begin{center}
       
   622   \only<1>{
       
   623   \begin{tabular}{@ {\hspace{-5mm}}l}
       
   624   \alert{\bf shallow binders}\\ 
       
   625   \hspace{4mm}Lam x::name t::trm\hspace{4mm} \isacommand{bind} x \isacommand{in} t\\
       
   626   \hspace{4mm}All xs::name set T::ty\hspace{4mm} \isacommand{bind} xs \isacommand{in} T\\
       
   627   \hspace{4mm}Foo x::name t$_1$::trm t$_2$::trm\hspace{4mm} 
       
   628      \isacommand{bind} x \isacommand{in} t$_1$, \isacommand{bind} x \isacommand{in} t$_2$\\
       
   629   \hspace{4mm}Bar x::name t$_1$::trm t$_2$::trm\hspace{4mm} 
       
   630      \isacommand{bind} x \isacommand{in} t$_1$ t$_2$\\
       
   631   \end{tabular}}
       
   632   \only<2>{
       
   633   \begin{tabular}{@ {\hspace{-5mm}}l}
       
   634   \alert{\bf deep binders} \\
       
   635   \hspace{4mm}Let as::assns t::trm\hspace{4mm} \isacommand{bind} bn(as) \isacommand{in} t\\
       
   636   \hspace{4mm}Foo as::assns t$_1$::trm t$_2$::trm\\
       
   637   \hspace{20mm}\isacommand{bind} bn(as) \isacommand{in} t$_1$, \isacommand{bind} bn(as) \isacommand{in} t$_2$\\[4mm]
       
   638   \makebox[0mm][l]{\alert{$\times$}}\hspace{4mm}Bar as::assns t$_1$::trm t$_2$::trm\\
       
   639   \hspace{20mm}\isacommand{bind} bn$_1$(as) \isacommand{in} t$_1$, \isacommand{bind} bn$_2$(as) \isacommand{in} t$_2$\\
       
   640   \end{tabular}}
       
   641   \only<3>{
       
   642   \begin{tabular}{@ {\hspace{-5mm}}l}
       
   643   {\bf deep \alert{recursive} binders} \\
       
   644   \hspace{4mm}Let\_rec as::assns t::trm\hspace{4mm} \isacommand{bind} bn(as) \isacommand{in} t as\\[4mm]
       
   645 
       
   646   \makebox[0mm][l]{\alert{$\times$}}\hspace{4mm}Foo\_rec as::assns t$_1$::trm t$_2$::trm\hspace{4mm}\\ 
       
   647   \hspace{20mm}\isacommand{bind} bn(as) \isacommand{in} t$_1$ as, \isacommand{bind} bn(as) \isacommand{in} t$_2$\\
       
   648 
       
   649   \end{tabular}}
       
   650   \end{center}
       
   651   
       
   652   \end{frame}}
       
   653   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   654 *}
       
   655 
       
   656 text_raw {*
       
   657   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   658   \mode<presentation>{
       
   659   \begin{frame}<2-5>
       
   660   \frametitle{\begin{tabular}{c}Our Work\end{tabular}}
   760   \mbox{}\\[-6mm]
   661   \mbox{}\\[-6mm]
   761 
   662 
   762   \mbox{}\hspace{10mm}
   663     \begin{center}
   763   \begin{tabular}{ll}
   664   \begin{tikzpicture}[scale=1.5]
   764   \multicolumn{2}{l}{\isacommand{datatype} trm $=$}\\
   665   %%%\draw[step=2mm] (-4,-1) grid (4,1);
   765   \hspace{5mm}\phantom{$|$} Var name\\
   666   
   766   \hspace{5mm}$|$ App trm trm\\
   667   \onslide<1>{\draw[very thick] (0.7,0.4) circle (4.25mm);}
   767   \hspace{5mm}$|$ Lam name trm\\
   668   \onslide<1>{\draw[rounded corners=1mm, very thick] ( 0.0,-0.8) rectangle ( 1.8, 0.9);}
   768   \hspace{5mm}$|$ Let assns trm\\
   669   \onslide<1->{\draw[rounded corners=1mm, very thick] (-1.95,0.85) rectangle (-2.85,-0.05);}
   769   \multicolumn{2}{l}{\isacommand{and} assns $=$}\\
   670   
   770   \multicolumn{2}{l}{\hspace{5mm}\phantom{$|$} ANil}\\
   671   \onslide<1>{\draw (-2.0, 0.845) --  (0.7,0.845);}
   771   \multicolumn{2}{l}{\hspace{5mm}$|$ ACons name trm assns}\\[5mm]
   672   \onslide<1>{\draw (-2.0,-0.045)  -- (0.7,-0.045);}
   772   \multicolumn{2}{l}{\isacommand{function} bn \isacommand{where}}\\
   673 
   773   \multicolumn{2}{l}{\hspace{5mm}\phantom{$|$} bn(ANil) $=$ $[]$}\\
   674   \onslide<1>{\alert{\draw ( 0.7, 0.4) node {\footnotesize\begin{tabular}{@ {}c@ {}}$\alpha$-\\[-1mm]classes\end{tabular}};}}
   774   \multicolumn{2}{l}{\hspace{5mm}$|$ bn(ACons a t as) $=$ $[$a$]$ @ bn(as)}\\
   675   \onslide<1->{\alert{\draw (-2.4, 0.4) node {\footnotesize\begin{tabular}{@ {}c@ {}}$\alpha$-eq.\\[-1mm]terms\end{tabular}};}}
   775   \end{tabular}
   676   \onslide<1>{\draw (1.8, 0.48) node[right=-0.1mm]
   776 
   677     {\footnotesize\begin{tabular}{@ {}l@ {}}existing\\[-1mm] type\\ \onslide<1>{\alert{(sets of raw terms)}}\end{tabular}};}
   777   \only<2>{
   678   \onslide<1>{\draw (0.9, -0.35) node {\footnotesize\begin{tabular}{@ {}l@ {}}non-empty\\[-1mm]subset\end{tabular}};}
   778   \begin{textblock}{5}(10,5)
   679   \onslide<1->{\draw (-3.25, 0.55) node {\footnotesize\begin{tabular}{@ {}l@ {}}new\\[-1mm]type\end{tabular}};}
   779   $+$ \begin{tabular}{l}automatically\\ 
   680   
   780   generate fv's\end{tabular}
   681   \onslide<1>{\draw[<->, very thick] (-1.8, 0.3) -- (-0.1,0.3);}
   781   \end{textblock}}
   682   \onslide<1>{\draw (-0.95, 0.3) node[above=0mm] {\footnotesize{}isomorphism};}
   782   \end{frame}}
   683 
   783   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   684   \onslide<1>{\draw[->, line width=2mm, red] (-1.0,-0.4) -- (0.35,0.16);}
   784 *}
   685   \end{tikzpicture}
   785 
   686   \end{center}
   786 text_raw {*
   687   
   787   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   688   \begin{textblock}{9.5}(6,3.5)
   788   \mode<presentation>{
   689   \begin{itemize}
   789   \begin{frame}<1>
   690   \item<1-> defined fv and $\alpha$
   790   \frametitle{\begin{tabular}{c}\LARGE``Raw'' Alpha-Equivalence\end{tabular}}
   691   \item<3-> derived a reasoning infrastructure ($\fresh$, distinctness, injectivity, cases,\ldots) 
   791   \mbox{}\\[6mm]
   692   \item<4-> a (weak) induction principle
   792 
   693   \item<5-> derive a {\bf stronger} induction principle (Barendregt variable convention built in)\\
   793   \begin{center}
   694   \begin{center}
   794   Lam x::name t::trm \hspace{10mm}\isacommand{bind} x \isacommand{in} t\\
   695   \textcolor{blue}{Foo ($\lambda x. \lambda y. t$) ($\lambda u. \lambda v. s$)} 
   795   \end{center}
   696   \end{center}
   796 
   697   \end{itemize}
   797 
   698   \end{textblock}
   798   \[
   699 
   799   \infer[\text{Lam-}\!\approx_\alpha]
   700 
   800   {\text{Lam}\;x\;t \approx_\alpha \text{Lam}\;x'\;t'}
   701   \end{frame}}
   801   {([x], t) \approx\!\makebox[0mm][l]{${}_{\text{list}}$}
   702   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   802     ^{\approx_\alpha,\text{fv}} ([x'], t')}
   703 *}
   803   \]
   704 
   804 
       
   805 
       
   806   \end{frame}}
       
   807   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   808 *}
       
   809 
       
   810 text_raw {*
       
   811   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   812   \mode<presentation>{
       
   813   \begin{frame}<1>
       
   814   \frametitle{\begin{tabular}{c}\LARGE``Raw'' Alpha-Equivalence\end{tabular}}
       
   815   \mbox{}\\[6mm]
       
   816 
       
   817   \begin{center}
       
   818   Lam x::name y::name t::trm s::trm \hspace{5mm}\isacommand{bind} x y \isacommand{in} t s\\
       
   819   \end{center}
       
   820 
       
   821 
       
   822   \[
       
   823   \infer[\text{Lam-}\!\approx_\alpha]
       
   824   {\text{Lam}\;x\;y\;t\;s \approx_\alpha \text{Lam}\;x'\;y'\;t'\;s'}
       
   825   {([x, y], (t, s)) \approx\!\makebox[0mm][l]{${}_{\text{list}}$}
       
   826     ^{R, fv} ([x', y'], (t', s'))}
       
   827   \]
       
   828 
       
   829   \footnotesize
       
   830   where $R =\;\approx_\alpha\times\approx_\alpha$ and $fv = \text{fv}\cup\text{fv}$
       
   831 
       
   832   \end{frame}}
       
   833   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   834 *}
       
   835 
       
   836 text_raw {*
       
   837   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   838   \mode<presentation>{
       
   839   \begin{frame}<1-2>
       
   840   \frametitle{\begin{tabular}{c}\LARGE``Raw'' Alpha-Equivalence\end{tabular}}
       
   841   \mbox{}\\[6mm]
       
   842 
       
   843   \begin{center}
       
   844   Let as::assns t::trm \hspace{10mm}\isacommand{bind} bn(as) \isacommand{in} t\\
       
   845   \end{center}
       
   846 
       
   847 
       
   848   \[
       
   849   \infer[\text{Let-}\!\approx_\alpha]
       
   850   {\text{Let}\;as\;t \approx_\alpha \text{Let}\;as'\;t'}
       
   851   {(\text{bn}(as), t) \approx\!\makebox[0mm][l]{${}_{\text{list}}$}
       
   852     ^{\approx_\alpha,\text{fv}} (\text{bn}(as'), t') &
       
   853    \onslide<2->{as \approx_\alpha^{\text{bn}} as'}}
       
   854   \]\bigskip
       
   855 
       
   856 
       
   857   \onslide<1->{\small{}bn-function $\Rightarrow$ \alert{deep binders}}
       
   858   \end{frame}}
       
   859   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   860 *}
       
   861 
       
   862 
       
   863 text_raw {*
       
   864   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   865   \mode<presentation>{
       
   866   \begin{frame}<1->
       
   867   \frametitle{\begin{tabular}{c}\LARGE{}$\alpha$ for Binding Functions\end{tabular}}
       
   868   \mbox{}\\[-6mm]
       
   869 
       
   870   \mbox{}\hspace{10mm}
       
   871   \begin{tabular}{l}
       
   872   \ldots\\
       
   873   \isacommand{binder} bn \isacommand{where}\\
       
   874   \phantom{$|$} bn(ANil) $=$ $[]$\\
       
   875   $|$ bn(ACons a t as) $=$ $[$a$]$ @ bn(as)\\
       
   876   \end{tabular}\bigskip
       
   877 
       
   878   \begin{center}
       
   879   \mbox{\infer{\text{ANil} \approx_\alpha^{\text{bn}} \text{ANil}}{}}\bigskip
       
   880 
       
   881   \mbox{\infer{\text{ACons}\;a\;t\;as \approx_\alpha^{\text{bn}} \text{ACons}\;a'\;t'\;as'}
       
   882   {t \approx_\alpha t' & as \approx_\alpha^{bn} as'}}
       
   883   \end{center}
       
   884 
       
   885 
       
   886   \end{frame}}
       
   887   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   888 *}
       
   889 
       
   890 
       
   891 text_raw {*
       
   892   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   893   \mode<presentation>{
       
   894   \begin{frame}<1>
       
   895   \frametitle{\begin{tabular}{c}\LARGE``Raw'' Alpha-Equivalence\end{tabular}}
       
   896   \mbox{}\\[6mm]
       
   897 
       
   898   \begin{center}
       
   899   LetRec as::assns t::trm \hspace{10mm}\isacommand{bind} bn(as) \isacommand{in} t \alert{as}\\
       
   900   \end{center}
       
   901 
       
   902 
       
   903   \[\mbox{}\hspace{-4mm}
       
   904   \infer[\text{LetRec-}\!\approx_\alpha]
       
   905   {\text{LetRec}\;as\;t \approx_\alpha \text{LetRec}\;as'\;t'}
       
   906   {(\text{bn}(as), (t, as)) \approx\!\makebox[0mm][l]{${}_{\text{list}}$}
       
   907     ^{R,\text{fv}} (\text{bn}(as'), (t', as'))} 
       
   908   \]\bigskip
       
   909   
       
   910   \onslide<1->{\alert{deep recursive binders}}
       
   911   \end{frame}}
       
   912   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   913 *}
       
   914 
       
   915 text_raw {*
       
   916   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   917   \mode<presentation>{
       
   918   \begin{frame}<1->
       
   919   \frametitle{\begin{tabular}{c}Restrictions\end{tabular}}
       
   920   \mbox{}\\[-6mm]
       
   921 
       
   922   Our restrictions on binding specifications:
       
   923 
       
   924   \begin{itemize}
       
   925   \item a body can only occur once in a list of binding clauses\medskip
       
   926   \item you can only have one binding function for a deep binder\medskip
       
   927   \item binding functions can return: the empty set, singletons, unions (similarly for lists)
       
   928   \end{itemize}
       
   929 
       
   930 
       
   931   \end{frame}}
       
   932   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   933 *}
       
   934 
       
   935 text_raw {*
       
   936   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   937   \mode<presentation>{
       
   938   \begin{frame}<1->
       
   939   \frametitle{\begin{tabular}{c}Automatic Proofs\end{tabular}}
       
   940   \mbox{}\\[-6mm]
       
   941 
       
   942   \begin{itemize}
       
   943   \item we can show that $\alpha$'s are equivalence relations\medskip
       
   944   \item as a result we can use our quotient package to introduce the type(s)
       
   945   of $\alpha$-equated terms
       
   946 
       
   947   \[
       
   948   \infer
       
   949   {\text{Lam}\;x\;t \alert{=} \text{Lam}\;x'\;t'}
       
   950   {\only<1>{([x], t) \approx\!\makebox[0mm][l]{${}_{\text{list}}$}
       
   951     ^{=,\text{supp}} ([x'], t')}%
       
   952    \only<2>{[x].t = [x'].t'}}
       
   953   \]
       
   954 
       
   955 
       
   956   \item the properties for support are implied by the properties of $[\_].\_$
       
   957   \item we can derive strong induction principles
       
   958   \end{itemize}
       
   959 
       
   960 
       
   961   \end{frame}}
       
   962   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   963 *}
       
   964 
       
   965 text_raw {*
       
   966   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   967   \mode<presentation>{
       
   968   \begin{frame}<1>[t]
       
   969   \frametitle{\begin{tabular}{c}Runtime is Acceptable\end{tabular}}
       
   970   \mbox{}\\[-7mm]\mbox{}
       
   971 
       
   972   \footnotesize
       
   973   \begin{center}
       
   974   \begin{tikzpicture}
       
   975   \draw (0,0) node[inner sep=2mm, ultra thick, draw=fg, rounded corners=2mm]
       
   976   (A) {\begin{minipage}{0.8cm}bind.\\spec.\end{minipage}};
       
   977   
       
   978   \draw (2,0) node[inner sep=2mm, ultra thick, draw=fg, rounded corners=2mm]
       
   979   (B) {\begin{minipage}{0.8cm}raw\\terms\end{minipage}};
       
   980 
       
   981   \draw (4,0) node[inner sep=2mm, ultra thick, draw=fg, rounded corners=2mm]
       
   982   (C) {\begin{minipage}{0.8cm}$\alpha$-\\equiv.\end{minipage}};
       
   983   
       
   984   \draw (0,-2) node[inner sep=2mm, ultra thick, draw=fg, rounded corners=2mm]
       
   985   (D) {\begin{minipage}{0.8cm}quot.\\type\end{minipage}};
       
   986 
       
   987   \draw (2,-2) node[inner sep=2mm, ultra thick, draw=fg, rounded corners=2mm]
       
   988   (E) {\begin{minipage}{0.8cm}lift\\thms\end{minipage}};
       
   989 
       
   990   \draw (4,-2) node[inner sep=2mm, ultra thick, draw=fg, rounded corners=2mm]
       
   991   (F) {\begin{minipage}{0.8cm}add.\\thms\end{minipage}};
       
   992   
       
   993   \draw[->,fg!50,line width=1mm] (A) -- (B);
       
   994   \draw[->,fg!50,line width=1mm] (B) -- (C);
       
   995   \draw[->,fg!50,line width=1mm, line join=round, rounded corners=2mm] 
       
   996   (C) -- (5,0) -- (5,-1) -- (-1,-1) -- (-1,-2) -- (D);
       
   997   \draw[->,fg!50,line width=1mm] (D) -- (E);
       
   998   \draw[->,fg!50,line width=1mm] (E) -- (F);
       
   999   \end{tikzpicture}
       
  1000   \end{center}
       
  1001 
       
  1002   \begin{itemize}
       
  1003   \item Core Haskell: 11 types, 49 term-constructors, 7 binding functions
       
  1004   \begin{center}
       
  1005   $\sim$ 2 mins
       
  1006   \end{center}
       
  1007   \end{itemize}
       
  1008 
       
  1009   \end{frame}}
       
  1010   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
  1011 *}
       
  1012 
       
  1013 
       
  1014 text_raw {*
       
  1015   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
  1016   \mode<presentation>{
       
  1017   \begin{frame}<1->
       
  1018   \frametitle{\begin{tabular}{c}Interesting Phenomenon\end{tabular}}
       
  1019   \mbox{}\\[-6mm]
       
  1020 
       
  1021   \small
       
  1022   \mbox{}\hspace{20mm}
       
  1023   \begin{tabular}{ll}
       
  1024   \multicolumn{2}{l}{\isacommand{nominal\_datatype} trm $=$}\\
       
  1025   \hspace{5mm}\phantom{$|$} Var name\\
       
  1026   \hspace{5mm}$|$ App trm trm\\
       
  1027   \hspace{5mm}$|$ Lam x::name t::trm
       
  1028   & \isacommand{bind} x \isacommand{in} t\\
       
  1029   \hspace{5mm}$|$ Let as::assns t::trm
       
  1030   & \isacommand{bind} bn(as) \isacommand{in} t\\
       
  1031   \multicolumn{2}{l}{\isacommand{and} assns $=$}\\
       
  1032   \multicolumn{2}{l}{\hspace{5mm}\phantom{$|$} ANil}\\
       
  1033   \multicolumn{2}{l}{\hspace{5mm}$|$ ACons name trm assns}\\
       
  1034   \multicolumn{2}{l}{\isacommand{binder} bn \isacommand{where}}\\
       
  1035   \multicolumn{2}{l}{\hspace{5mm}\phantom{$|$} bn(ANil) $=$ $[]$}\\
       
  1036   \multicolumn{2}{l}{\hspace{5mm}$|$ bn(ACons a t as) $=$ $[$a$]$ @ bn(as)}\\
       
  1037   \end{tabular}\bigskip\medskip
       
  1038 
       
  1039   we cannot quotient assns: ACons a \ldots $\not\approx_\alpha$ ACons b \ldots
       
  1040 
       
  1041   \only<1->{
       
  1042   \begin{textblock}{8}(0.2,7.3)
       
  1043   \alert{\begin{tabular}{p{2.6cm}}
       
  1044   \raggedright\footnotesize{}Should a ``naked'' assns be quotient?
       
  1045   \end{tabular}\hspace{-3mm}
       
  1046   $\begin{cases}
       
  1047   \mbox{} \\ \mbox{}
       
  1048   \end{cases}$} 
       
  1049   \end{textblock}}
       
  1050   \end{frame}}
       
  1051   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
  1052 *}
       
  1053 
   705 
  1054 text_raw {*
   706 text_raw {*
  1055   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   707   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1056   \mode<presentation>{
   708   \mode<presentation>{
  1057   \begin{frame}<1->
   709   \begin{frame}<1->
  1062   \item the user does not see anything of the raw level\medskip
   714   \item the user does not see anything of the raw level\medskip
  1063   \only<1>{\begin{center}
   715   \only<1>{\begin{center}
  1064   Lam a (Var a) \alert{$=$} Lam b (Var b)
   716   Lam a (Var a) \alert{$=$} Lam b (Var b)
  1065   \end{center}\bigskip}
   717   \end{center}\bigskip}
  1066 
   718 
  1067   \item<2-> we have not yet done function definitions (will come soon and
   719   \item<2-> it took quite some time to get here, but it seems worthwhile 
  1068   we hope to make improvements over the old way there too)\medskip
       
  1069   \item<3-> it took quite some time to get here, but it seems worthwhile 
       
  1070   (Barendregt's variable convention is unsound in general, 
   720   (Barendregt's variable convention is unsound in general, 
  1071   found bugs in two paper proofs, quotient package, POPL 2011 tutorial)\medskip
   721   found bugs in two paper proofs)\bigskip\medskip
  1072   \end{itemize}
   722   
  1073 
   723   \item<3-> \textcolor{blue}{http://isabelle.in.tum.de/nominal/}
  1074 
   724   \end{itemize}
  1075   \end{frame}}
   725 
  1076   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   726   
  1077 *}
   727   \end{frame}}
  1078 
   728   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
  1079 text_raw {*
   729 *}
  1080   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   730 
  1081   \mode<presentation>{
       
  1082   \begin{frame}<1->[c]
       
  1083   \frametitle{\begin{tabular}{c}Future Work\end{tabular}}
       
  1084   \mbox{}\\[-6mm]
       
  1085 
       
  1086   \begin{itemize}
       
  1087   \item Function definitions 
       
  1088   \end{itemize}
       
  1089   
       
  1090   \end{frame}}
       
  1091   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
  1092 *}
       
  1093 
   731 
  1094 
   732 
  1095 text_raw {*
   733 text_raw {*
  1096   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   734   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1097   \mode<presentation>{
   735   \mode<presentation>{
  1114   \mode<presentation>{
   752   \mode<presentation>{
  1115   \begin{frame}<1-2>[c]
   753   \begin{frame}<1-2>[c]
  1116   \frametitle{\begin{tabular}{c}Examples\end{tabular}}
   754   \frametitle{\begin{tabular}{c}Examples\end{tabular}}
  1117   \mbox{}\\[-6mm]
   755   \mbox{}\\[-6mm]
  1118 
   756 
       
   757   \textcolor{blue}{
  1119   \begin{center}
   758   \begin{center}
  1120   $(\{a,b\}, a \rightarrow b) \approx_\alpha (\{a, b\}, a \rightarrow b)$
   759   $(\{a,b\}, a \rightarrow b) \approx_\alpha (\{a, b\}, a \rightarrow b)$
  1121   $(\{a,b\}, a \rightarrow b) \approx_\alpha (\{a, b\}, b \rightarrow a)$
   760   $(\{a,b\}, a \rightarrow b) \approx_\alpha (\{a, b\}, b \rightarrow a)$
  1122   \end{center}
   761   \end{center}}
  1123 
   762 
       
   763   \textcolor{blue}{
  1124   \begin{center}
   764   \begin{center}
  1125   $(\{a,b\}, (a \rightarrow b, a \rightarrow b))$\\ 
   765   $(\{a,b\}, (a \rightarrow b, a \rightarrow b))$\\ 
  1126   \hspace{17mm}$\not\approx_\alpha (\{a, b\}, (a \rightarrow b, b \rightarrow a))$
   766   \hspace{17mm}$\not\approx_\alpha (\{a, b\}, (a \rightarrow b, b \rightarrow a))$
  1127   \end{center}
   767   \end{center}}
  1128   
   768   
  1129   \onslide<2->
   769   \onslide<2->
  1130   {1.) \hspace{3mm}\isacommand{bind (set)} as \isacommand{in} $\tau_1$, 
   770   {1.) \hspace{3mm}\isacommand{bind (set)} as \isacommand{in} $\tau_1$, 
  1131    \isacommand{bind (set)} as \isacommand{in} $\tau_2$\medskip
   771    \isacommand{bind (set)} as \isacommand{in} $\tau_2$\medskip
  1132 
   772 
  1135 
   775 
  1136   \end{frame}}
   776   \end{frame}}
  1137   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   777   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
  1138 *}
   778 *}
  1139 
   779 
       
   780 
       
   781 
  1140 (*<*)
   782 (*<*)
  1141 end
   783 end
  1142 (*>*)
   784 (*>*)