Slides/Slides2.thy
author Christian Urban <urbanc@in.tum.de>
Sun, 10 Apr 2011 04:07:15 +0800
changeset 2759 aeda59ca0d4c
parent 2748 6f38e357b337
child 3224 cf451e182bf0
permissions -rw-r--r--
more paper
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
(*<*)
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
theory Slides2
2748
6f38e357b337 rearranged directories and updated to new Isabelle
Christian Urban <urbanc@in.tum.de>
parents: 2356
diff changeset
     3
imports "~~/src/HOL/Library/LaTeXsugar" "Nominal"
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
begin
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
notation (latex output)
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
  set ("_") and
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
  Cons  ("_::/_" [66,65] 65) 
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
(*>*)
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
text_raw {*
2352
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    14
  \renewcommand{\slidecaption}{Edinburgh, 11.~July 2010}
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
  \mode<presentation>{
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
  \begin{frame}<1>[t]
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
  \frametitle{%
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
  \begin{tabular}{@ {\hspace{-3mm}}c@ {}}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
  \\
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    21
  \LARGE Proof Pearl:\\[-0mm]
2352
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    22
  \LARGE A New Foundation for\\[-2mm] 
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    23
  \LARGE Nominal Isabelle\\[12mm]
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
  \end{tabular}}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
  \begin{center}
2352
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    26
  Brian Huf\!fman and {\bf Christian Urban}\\[0mm] 
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
  \end{center}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
  \end{frame}}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
*}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
text_raw {*
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
  \mode<presentation>{
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    36
  \begin{frame}<1-2>[c]
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    37
  \frametitle{Nominal Isabelle}
2352
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    38
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    39
  \begin{itemize}
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    40
  \item \ldots is a definitional extension of Isabelle/HOL
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    41
  (let-polymorphism and type classes)\medskip
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    42
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    43
  \item \ldots provides a convenient reasoning infrastructure for
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    44
  terms involving binders (e.g.~lambda calculus, variable convention)\medskip
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    45
  
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    46
  \item<2-> \ldots mainly used to find errors in my own 
2355
Christian Urban <urbanc@in.tum.de>
parents: 2354
diff changeset
    47
  (published) paper proofs and in those of others \alert{\bf ;o)}
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    48
  \end{itemize}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    49
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    50
  \end{frame}}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    51
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    52
*}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    53
 
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    54
text_raw {*
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    55
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    56
  \mode<presentation>{
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    57
  \begin{frame}<1-3>[c]
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    58
  \frametitle{Nominal Theory}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    59
  
2355
Christian Urban <urbanc@in.tum.de>
parents: 2354
diff changeset
    60
  \ldots by Pitts; at its core are:\bigskip
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    61
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    62
  \begin{itemize}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    63
  \item sorted atoms and 
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    64
  \item sort-respecting permutations
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    65
  \end{itemize}
2352
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    66
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    67
  \onslide<2->{
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    68
  \begin{textblock}{8}(4,11)
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    69
  \onslide<3->{$\text{inv\_of\_}\pi \,\act\, ($}\onslide<2->{$\pi \,\act\, x$}%
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    70
  \onslide<3->{$) \,=\, x$}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    71
  \end{textblock}}
2352
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    72
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    73
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    74
  \end{frame}}
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    75
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    76
*}
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    77
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    78
text_raw {*
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    79
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f961a32eb0d9 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2351
diff changeset
    80
  \mode<presentation>{
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    81
  \begin{frame}<1-4>[t]
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    82
  \frametitle{The ``Old Way''}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    83
  
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
  \begin{itemize}
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    85
  \item sorted atoms\\ \alert{$\quad\mapsto$ separate types}\; (``copies'' of nat)\bigskip 
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    86
  \item sort-respecting permutations\\ \alert{$\quad\mapsto$ lists of pairs of atoms (list swappings)}
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
  \onslide<2->{
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    88
  \begin{center} 
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
  \begin{tabular}{c@ {\hspace{7mm}}c}
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    90
  $\text{[]} \,\act\, c = c$ &
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    91
  $\swap{a}{b}\!::\!\pi \,\act\, c =
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    92
  \begin{cases}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    93
  b & \text{if}\, \pi\act c = a\\
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    94
  a & \text{if}\, \pi\act c = b\\
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
    95
  \pi\act c & \text{otherwise}
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
  \end{cases}$
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
  \end{tabular}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
  \end{center}}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
  \end{itemize}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   101
  \only<3>{
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   102
  \begin{textblock}{14}(1,12.5)
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   103
  \alert{The big benefit:} the type system takes care of the sort-respecting requirement.
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   104
  \end{textblock}}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   105
  \only<4>{
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   106
  \begin{textblock}{14}(1,12.5)
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   107
  \alert{A small benefit:} permutation composition is \alert{list append} 
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   108
  and permutation inversion is \alert{list reversal}.
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   109
  \end{textblock}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   110
  }
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   111
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
  \end{frame}}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   114
*}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
text_raw {*
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
  \mode<presentation>{
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   119
  \begin{frame}<1-4>
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   120
  \frametitle{Problems}
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
  \begin{itemize}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   123
  \item @{text "_ \<bullet> _ :: \<alpha> perm \<Rightarrow> \<beta> \<Rightarrow> \<beta>"}\bigskip
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   124
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
  \item @{text "supp _ :: \<beta> \<Rightarrow> \<alpha> set"}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   126
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   127
  \begin{center}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   128
  $\text{finite} (\text{supp}\;x)_{\,\alpha_1\,\text{set}}$ \ldots 
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   129
  $\text{finite} (\text{supp}\;x)_{\,\alpha_n\,\text{set}}$
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   130
  \end{center}\bigskip
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   131
  
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   132
  \item $\forall \pi_{\alpha_1} \ldots \pi_{\alpha_n}\;.\; P$\bigskip
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   133
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   134
  \item type-classes 
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   135
  \onslide<3>{\small\hspace{5mm}can only have \alert{\bf one} type parameter}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   136
  \begin{itemize}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   137
  \item<2-> $\text{[]}\,\act\, x = x$
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   138
  \item<2-> $(\pi_1 @  \pi_2) \,\act \, x = \pi_1 \,\act\,(\pi_2 \,\act\, x)$
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   139
  \item<2-> if $\pi_1 \sim \pi_2$ then $\pi_1 \,\act\, x = \pi_2 \,\act\, x$
2355
Christian Urban <urbanc@in.tum.de>
parents: 2354
diff changeset
   140
  \item<2-> if $\pi_1$, $\pi_2$ have dif$\!$f.~type, then
Christian Urban <urbanc@in.tum.de>
parents: 2354
diff changeset
   141
    $\pi_1 \act (\pi_2 \act x) = \pi_2 \act (\pi_1 \act x)$
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   142
  \end{itemize}
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
  \end{itemize}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   144
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   145
  \only<4->{
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   146
  \begin{textblock}{9}(3,7)\begin{tikzpicture}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   147
  \draw (0,0) node[inner sep=3mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] 
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   148
  {\normalsize\color{darkgray}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   149
  \begin{quote}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   150
  \begin{itemize}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   151
  \item \alert{lots} of ML-code 
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   152
  \item \alert{not} pretty 
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   153
  \item \alert{not a {\bf proof pearl}} :o( 
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   154
  \end{itemize}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   155
  \end{quote}};
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   156
  \end{tikzpicture}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   157
  \end{textblock}}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   158
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   159
  \end{frame}}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   160
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   161
*}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   162
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   163
text_raw {*
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   164
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   165
  \mode<presentation>{
2355
Christian Urban <urbanc@in.tum.de>
parents: 2354
diff changeset
   166
  \begin{frame}<1-4>
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   167
  \frametitle{A Better Way}
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   168
*}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   169
datatype atom = Atom string nat
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   170
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   171
text_raw {*
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   172
  \mbox{}\bigskip
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   173
  \begin{itemize}
2355
Christian Urban <urbanc@in.tum.de>
parents: 2354
diff changeset
   174
  \item<2-> permutations are (restricted) bijective functions from @{text "atom \<Rightarrow> atom"}
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   175
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   176
     \begin{itemize}
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   177
     \item sort-respecting \hspace{5mm}($\,\forall a.\;\text{sort}(\pi a) = \text{sort}(a)$)
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   178
     \item finite domain \hspace{5mm}($\text{finite} \{a.\;\pi a \not= a\}$)
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   179
     \end{itemize}\medskip
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   180
     
2355
Christian Urban <urbanc@in.tum.de>
parents: 2354
diff changeset
   181
  \item<3-> \alert{What about {\bf swappings}?}
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   182
     \small
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   183
     \[
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   184
     \begin{array}{l@ {\hspace{1mm}}l}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   185
     (a\;b) \dn & \text{if}\;\text{sort}(a) = \text{sort}(b)\\
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   186
        & \text{then}\;\lambda  c. \text{if}\;a = c\;\text{then}\;b\;\text{else}\;
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   187
          \text{if}\;b = c\;\text{then}\;a\;\text{else}\;c\\
2355
Christian Urban <urbanc@in.tum.de>
parents: 2354
diff changeset
   188
        & \text{else}\;\only<3>{\raisebox{-5mm}{\textcolor{red}{\huge\bf $?$}}}
Christian Urban <urbanc@in.tum.de>
parents: 2354
diff changeset
   189
          \only<4->{\text{\alert{\bf id}}}
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   190
     \end{array}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   191
     \]
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   192
  \end{itemize}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   193
2355
Christian Urban <urbanc@in.tum.de>
parents: 2354
diff changeset
   194
  \only<2>{
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   195
  \begin{textblock}{7}(4,11)
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   196
  @{text "_ \<bullet> _ :: perm \<Rightarrow> \<beta> \<Rightarrow> \<beta>"}
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   197
  \end{textblock}}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   198
  
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   199
  \end{frame}}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   200
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   201
*}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   202
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   203
text_raw {*
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   204
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   205
  \mode<presentation>{
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   206
  \begin{frame}<1-7>
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   207
  \frametitle{A Smoother Nominal Theory}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   208
  
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   209
  From there it is essentially plain sailing:\bigskip
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   210
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   211
  \begin{itemize}
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   212
  \item<2-> $(a\;b) = (b\;a) \onslide<4->{= (a\;c) + (b\;c) + (a\;c)}$\bigskip  
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   213
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   214
  \item<3-> permutations are an instance of Isabelle's\\  
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   215
  group\_add ($0$, $\pi_1 + \pi_2$, $- \pi$)\bigskip
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   216
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   217
  \item<6-> $\_\;\act\;\_ :: \text{perm} \Rightarrow \alpha \Rightarrow \alpha$\medskip
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   218
  
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   219
   \begin{itemize}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   220
   \item $0\;\act\;x = x$\\
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   221
   \item $(\pi_1 + \pi_2)\;\act\;x = \pi_1\;\act\;(\pi_2\;\act\;x)$
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   222
   \end{itemize}\medskip
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   223
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   224
   \onslide<7->{\alert{$\;\mapsto\;$}only one type class needed, $\text{finite}(\text{supp}\;x)$,\\
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   225
   \hspace{9mm}$\forall \pi. P$}
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   226
  \end{itemize}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   227
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   228
  \only<5>{
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   229
  \begin{textblock}{6}(2.5,11)
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   230
  \begin{tikzpicture}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   231
  \draw (0,0) node[inner sep=3mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] 
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   232
  {\normalsize\color{darkgray}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   233
  \begin{minipage}{8cm}\raggedright
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   234
  This is slightly odd, since in general: 
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   235
  \begin{center}$\pi_1 + \pi_2 \alert{\not=} \pi_2 + \pi_1$\end{center}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   236
  \end{minipage}};
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   237
  \end{tikzpicture}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   238
  \end{textblock}}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   239
2356
840a857354f2 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2355
diff changeset
   240
  
840a857354f2 more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2355
diff changeset
   241
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   242
  \end{frame}}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   243
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   244
*}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   245
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   246
text_raw {*
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   247
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   248
  \mode<presentation>{
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   249
  \begin{frame}<1>[c]
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   250
  \frametitle{One Snatch}
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   251
*}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   252
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   253
datatype \<iota>atom = \<iota>Atom string nat
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   254
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   255
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   256
text_raw {*
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   257
  \isanewline\isanewline
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   258
  \begin{itemize}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   259
  \item You like to get the advantages of the old way back: you 
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   260
  \alert{cannot mix} atoms of dif$\!$ferent sort:\bigskip
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   261
  
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   262
  \small
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   263
  e.g.~LF-objects:
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   264
  \begin{center}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   265
  $\quad M ::= c \mid x \mid \lambda x\!:\!A. M \mid M_1\;M_2$
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   266
  \end{center}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   267
  \end{itemize}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   268
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   269
  \end{frame}}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   270
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   271
*}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   272
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   273
text_raw {*
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   274
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   275
  \mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   276
  \begin{frame}<1-2>
2355
Christian Urban <urbanc@in.tum.de>
parents: 2354
diff changeset
   277
  \frametitle{Our Solution}
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   278
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   279
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   280
  \begin{itemize}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   281
  \item \underline{concrete} atoms:
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   282
  \end{itemize}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   283
*}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   284
(*<*)
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   285
consts sort :: "atom \<Rightarrow> string"
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   286
(*>*)
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   287
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   288
typedef name = "{a :: atom. sort a = ''name''}" (*<*)sorry(*>*)
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   289
typedef ident = "{a :: atom. sort a = ''ident''}" (*<*)sorry(*>*)
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   290
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   291
text_raw {*
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   292
  \mbox{}\bigskip\bigskip
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   293
  \begin{itemize}
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   294
  \item they are a ``subtype'' of the generic atom type
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   295
  \item there is an overloaded  function \alert{\bf atom}, which injects concrete 
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   296
  atoms into generic ones\medskip 
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   297
  \begin{center}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   298
  \begin{tabular}{l}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   299
  $\text{atom}(a) \fresh x$\\
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   300
  $(a \leftrightarrow b) \dn (\text{atom}(a)\;\;\text{atom}(b))$
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   301
  \end{tabular}
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   302
  \end{center}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   303
  \pause
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   304
  One would like to have $a \fresh x$, $\swap{a}{b}$, \ldots
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   305
  \end{itemize}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   306
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   307
  \end{frame}}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   308
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   309
*}
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   310
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   311
text_raw {*
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   312
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   313
  \mode<presentation>{
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   314
  \begin{frame}<1-4>
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   315
  \frametitle{Sorts Reloaded}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   316
*}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   317
datatype atom\<iota> = Atom\<iota> string nat
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   318
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   319
text_raw {*
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   320
  \isanewline\isanewline
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   321
  \pause
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   322
  \alert{Problem}: HOL-binders or Church-style lambda-terms
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   323
  \begin{center}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   324
  $\lambda x_\alpha.\, x_\alpha\;x_\beta$
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   325
  \end{center}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   326
  \pause
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   327
  \isanewline\isanewline
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   328
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   329
\isacommand{datatype} ty = TVar string $\mid$ ty $\rightarrow$ ty\\
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   330
\isacommand{datatype} var = Var name ty\\
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   331
\pause
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   332
$(x \leftrightarrow y) \,\act\, (x_\alpha, x_\beta) = (y_\alpha, y_\beta)$
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   333
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   334
  \end{frame}}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   335
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   336
*}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   337
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   338
text_raw {*
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   339
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   340
  \mode<presentation>{
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   341
  \begin{frame}<1-2>
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   342
  \frametitle{Non-Working Solution}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   343
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   344
Instead of\isanewline\isanewline
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   345
*}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   346
    datatype atom\<iota>\<iota> = Atom\<iota>\<iota> string nat
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   347
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   348
text_raw {*
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   349
\isanewline\isanewline
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   350
have
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   351
\isanewline\isanewline
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   352
*}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   353
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   354
    datatype 'a atom\<iota>\<iota>\<iota> = Atom\<iota>\<iota>\<iota> 'a nat
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   355
text_raw {*
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   356
  \pause
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   357
  \isanewline\isanewline
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   358
  But then
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   359
  \begin{center}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   360
  @{text "_ \<bullet> _ :: \<alpha> perm \<Rightarrow> \<beta> \<Rightarrow> \<beta>"}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   361
  \end{center}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   362
  \end{frame}}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   363
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   364
*}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   365
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   366
(*<*)
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   367
hide_const sort
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   368
(*>*)
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   369
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   370
text_raw {*
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   371
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   372
  \mode<presentation>{
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   373
  \begin{frame}<1-4>
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   374
  \frametitle{A Working Solution}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   375
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   376
*}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   377
    datatype sort = Sort string "sort list"
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   378
    datatype atom\<iota>\<iota>\<iota>\<iota> = Atom\<iota>\<iota>\<iota>\<iota> sort nat
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   379
(*<*)
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   380
consts sort_ty :: "nat \<Rightarrow> sort"
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   381
(*>*)
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   382
text_raw {*
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   383
  \pause
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   384
  \isanewline
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   385
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   386
  {\small\begin{tabular}{rcl}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   387
  @{text "sort_ty (TVar x)"}  & @{text "\<equiv>"} & @{text "Sort ''TVar'' [Sort x []]"} \\
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   388
  @{text "sort_ty (\<tau>\<^isub>1 \<rightarrow> \<tau>\<^isub>2)"} & @{text "\<equiv>"} & @{text "Sort ''Fun'' [sort_ty \<tau>\<^isub>1, sort_ty \<tau>\<^isub>2]"}\\
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   389
  \end{tabular}}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   390
  \pause
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   391
  \isanewline\isanewline
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   392
  \isacommand{typedef} @{text "var = {a :: atom. sort a \<in> range sort_ty}"}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   393
  \pause
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   394
  \isanewline\isanewline
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   395
  \small
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   396
  \begin{minipage}{12cm}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   397
  @{text "Var x \<tau> \<equiv> \<lceil> Atom (sort_ty \<tau>) x \<rceil>"}\isanewline
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   398
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   399
  @{text "(Var x \<tau> \<leftrightarrow> Var y \<tau>) \<bullet> Var x \<tau> = Var y \<tau>"}\\
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   400
  @{text "(Var x \<tau> \<leftrightarrow> Var y \<tau>) \<bullet> Var x \<tau>' = Var x \<tau>'"}\\
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   401
  \end{minipage}
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   402
  \end{frame}}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   403
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   404
*}
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   405
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   406
text_raw {*
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   407
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   408
  \mode<presentation>{
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   409
  \begin{frame}<1-4>[c]
2353
ac064c47138b more on slides
Christian Urban <urbanc@in.tum.de>
parents: 2352
diff changeset
   410
  \frametitle{Conclusion}
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   411
  \mbox{}\\[-3mm]
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   412
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   413
  \begin{itemize}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   414
  \item the formalised version of the nominal theory is now much nicer to 
2355
Christian Urban <urbanc@in.tum.de>
parents: 2354
diff changeset
   415
  work with (sorts are occasionally explicit, \alert{$\forall \pi. P$})\medskip
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   416
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   417
  \item permutations: ``be as abstract as you can'' (group\_add is a slight oddity)\medskip
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   418
2355
Christian Urban <urbanc@in.tum.de>
parents: 2354
diff changeset
   419
  \item the crucial insight: allow sort-disrespecting swappings%
Christian Urban <urbanc@in.tum.de>
parents: 2354
diff changeset
   420
  \onslide<2->{ \ldots just define them as the identity}\\%
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   421
  \onslide<3->{ (a referee called this a \alert{``hack''})}\medskip
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   422
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   423
  \item<4-> there will be a hands-on tutorial about Nominal Isabelle at \alert{POPL'11}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   424
  in Austin Texas
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   425
  \end{itemize}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   426
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   427
  
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   428
  \end{frame}}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   429
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   430
*}
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   431
2354
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   432
text_raw {*
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   433
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   434
  \mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   435
  \begin{frame}<1>[c]
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   436
  \frametitle{
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   437
  \begin{tabular}{c}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   438
  \mbox{}\\[23mm]
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   439
  \alert{\LARGE Thank you very much}\\
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   440
  \alert{\Large Questions?}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   441
  \end{tabular}}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   442
  
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   443
  \end{frame}}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   444
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   445
*}
Christian Urban <urbanc@in.tum.de>
parents: 2353
diff changeset
   446
2351
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   447
(*<*)
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   448
end
842969a598f2 added material for slides
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   449
(*>*)