98 \end{center}} |
98 \end{center}} |
99 \end{itemize} |
99 \end{itemize} |
100 |
100 |
101 \only<3>{ |
101 \only<3>{ |
102 \begin{textblock}{14}(1,12.5) |
102 \begin{textblock}{14}(1,12.5) |
103 \alert{The big benefit:} the type system takes care of the sort-respecting part. |
103 \alert{The big benefit:} the type system takes care of the sort-respecting requirement. |
104 \end{textblock}} |
104 \end{textblock}} |
105 \only<4>{ |
105 \only<4>{ |
106 \begin{textblock}{14}(1,12.5) |
106 \begin{textblock}{14}(1,12.5) |
107 \alert{A small benefit:} permutation composition is \alert{list append} |
107 \alert{A small benefit:} permutation composition is \alert{list append} |
108 and permutation inversion is \alert{list reversal}. |
108 and permutation inversion is \alert{list reversal}. |
174 \begin{itemize} |
174 \begin{itemize} |
175 \item sort-respecting \hspace{5mm}($\,\forall a.\;\text{sort}(\pi a) = \text{sort}(a)$) |
175 \item sort-respecting \hspace{5mm}($\,\forall a.\;\text{sort}(\pi a) = \text{sort}(a)$) |
176 \item finite domain \hspace{5mm}($\text{finite} \{a.\;\pi a \not= a\}$) |
176 \item finite domain \hspace{5mm}($\text{finite} \{a.\;\pi a \not= a\}$) |
177 \end{itemize}\medskip |
177 \end{itemize}\medskip |
178 |
178 |
179 \item<4-> \alert{What about swappings?} |
179 \item<4-> \alert{What about {\bf swappings}?} |
180 \small |
180 \small |
181 \[ |
181 \[ |
182 \begin{array}{l@ {\hspace{1mm}}l} |
182 \begin{array}{l@ {\hspace{1mm}}l} |
183 (a\;b) \dn & \text{if}\;\text{sort}(a) = \text{sort}(b)\\ |
183 (a\;b) \dn & \text{if}\;\text{sort}(a) = \text{sort}(b)\\ |
184 & \text{then}\;\lambda c. \text{if}\;a = c\;\text{then}\;b\;\text{else}\; |
184 & \text{then}\;\lambda c. \text{if}\;a = c\;\text{then}\;b\;\text{else}\; |
217 \begin{itemize} |
217 \begin{itemize} |
218 \item $0\;\act\;x = x$\\ |
218 \item $0\;\act\;x = x$\\ |
219 \item $(\pi_1 + \pi_2)\;\act\;x = \pi_1\;\act\;(\pi_2\;\act\;x)$ |
219 \item $(\pi_1 + \pi_2)\;\act\;x = \pi_1\;\act\;(\pi_2\;\act\;x)$ |
220 \end{itemize}\medskip |
220 \end{itemize}\medskip |
221 |
221 |
222 \onslide<7->{\alert{$\;\mapsto\;$}only one type class, $\text{finite}(\text{supp}\;x)$, $\forall \pi. P$} |
222 \onslide<7->{\alert{$\;\mapsto\;$}only one type class needed, $\text{finite}(\text{supp}\;x)$,\\ |
|
223 \hspace{9mm}$\forall \pi. P$} |
223 \end{itemize} |
224 \end{itemize} |
224 |
225 |
225 \only<5>{ |
226 \only<5>{ |
226 \begin{textblock}{6}(2.5,11) |
227 \begin{textblock}{6}(2.5,11) |
227 \begin{tikzpicture} |
228 \begin{tikzpicture} |
239 *} |
240 *} |
240 |
241 |
241 text_raw {* |
242 text_raw {* |
242 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
243 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
243 \mode<presentation>{ |
244 \mode<presentation>{ |
244 \begin{frame}<1-3> |
245 \begin{frame}<1>[c] |
245 \frametitle{One Snatch} |
246 \frametitle{One Snatch} |
|
247 *} |
|
248 |
|
249 datatype \<iota>atom = \<iota>Atom string nat |
|
250 |
|
251 |
|
252 text_raw {* |
|
253 \isanewline\isanewline |
|
254 \begin{itemize} |
|
255 \item You like to get the advantages of the old way back: you |
|
256 \alert{cannot mix} atoms of dif$\!$ferent sort:\bigskip |
|
257 |
|
258 \small |
|
259 e.g.~LF-objects: |
|
260 \begin{center} |
|
261 $\quad M ::= c \mid x \mid \lambda x\!:\!A. M \mid M_1\;M_2$ |
|
262 \end{center} |
|
263 \end{itemize} |
|
264 |
|
265 \end{frame}} |
|
266 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
267 *} |
|
268 |
|
269 text_raw {* |
|
270 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
271 \mode<presentation>{ |
|
272 \begin{frame}<1-2> |
|
273 \frametitle{Solution} |
246 |
274 |
247 |
275 |
248 \begin{itemize} |
276 \begin{itemize} |
249 \item \underline{concrete} atoms: |
277 \item \underline{concrete} atoms: |
250 \end{itemize} |
278 \end{itemize} |
257 typedef ident = "{a :: atom. sort a = ''ident''}" (*<*)sorry(*>*) |
285 typedef ident = "{a :: atom. sort a = ''ident''}" (*<*)sorry(*>*) |
258 |
286 |
259 text_raw {* |
287 text_raw {* |
260 \mbox{}\bigskip\bigskip |
288 \mbox{}\bigskip\bigskip |
261 \begin{itemize} |
289 \begin{itemize} |
262 \item<2-> there is an overloaded function \alert{\bf atom}, which injects concrete |
290 \item they are a ``subtype'' of the generic atom type |
|
291 \item there is an overloaded function \alert{\bf atom}, which injects concrete |
263 atoms into generic ones\medskip |
292 atoms into generic ones\medskip |
264 \begin{center} |
293 \begin{center} |
265 \begin{tabular}{l} |
294 \begin{tabular}{l} |
266 $\text{atom}(a) \fresh x$\\ |
295 $\text{atom}(a) \fresh x$\\ |
267 $(a \leftrightarrow b) \dn (\text{atom}(a)\;\;\text{atom}(b))$ |
296 $(a \leftrightarrow b) \dn (\text{atom}(a)\;\;\text{atom}(b))$ |
268 \end{tabular} |
297 \end{tabular} |
269 \end{center}\bigskip\medskip |
|
270 |
|
271 \onslide<3-> |
|
272 {One would like to have $a \fresh x$, $(a\; b)$, \ldots} |
|
273 \end{itemize} |
|
274 |
|
275 \only<1>{ |
|
276 \begin{textblock}{11}(2.5,8.5) |
|
277 You like to get the advantages of the old way back: you \alert{cannot mix} atoms |
|
278 of dif$\!$ferent sort:\bigskip |
|
279 |
|
280 \small |
|
281 e.g.~LF-objects:\\[-9mm]\mbox{} |
|
282 \begin{center}$\quad M ::= c \mid x \mid \lambda x\!:\!A. M \mid M_1\;M_2$ |
|
283 \end{center} |
298 \end{center} |
284 \end{textblock}} |
299 \pause |
|
300 One would like to have $a \fresh x$, $\swap{a}{b}$, \ldots |
|
301 \end{itemize} |
285 |
302 |
286 \end{frame}} |
303 \end{frame}} |
287 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
304 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
288 *} |
305 *} |
289 |
306 |
340 \end{center} |
357 \end{center} |
341 \end{frame}} |
358 \end{frame}} |
342 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
359 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
343 *} |
360 *} |
344 |
361 |
345 text_raw {* |
362 (*<*) |
346 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
363 hide_const sort |
347 \mode<presentation>{ |
364 (*>*) |
348 \begin{frame}<1-3> |
365 |
|
366 text_raw {* |
|
367 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
368 \mode<presentation>{ |
|
369 \begin{frame}<1-4> |
349 \frametitle{A Working Solution} |
370 \frametitle{A Working Solution} |
350 |
371 |
351 *} |
372 *} |
352 datatype sort = Sort string "sort list" |
373 datatype sort = Sort string "sort list" |
353 datatype atom\<iota>\<iota> = Atom\<iota>\<iota> string nat |
374 datatype atom\<iota>\<iota>\<iota>\<iota> = Atom\<iota>\<iota>\<iota>\<iota> sort nat |
354 |
375 (*<*) |
355 text_raw {* |
376 consts sort_ty :: "nat \<Rightarrow> sort" |
356 \isanewline\isanewline |
377 (*>*) |
357 have |
378 text_raw {* |
358 \isanewline\isanewline |
379 \pause |
359 *} |
380 \isanewline |
360 |
381 |
361 datatype 'a atom\<iota>\<iota>\<iota> = Atom\<iota>\<iota> 'a nat |
382 {\small\begin{tabular}{rcl} |
362 text_raw {* |
383 @{text "sort_ty (TVar x)"} & @{text "\<equiv>"} & @{text "Sort ''TVar'' [Sort x []]"} \\ |
363 \pause |
384 @{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]"}\\ |
364 \isanewline\isanewline |
385 \end{tabular}} |
365 But then |
386 \pause |
366 \begin{center} |
387 \isanewline\isanewline |
367 @{text "_ \<bullet> _ :: \<alpha> perm \<Rightarrow> \<beta> \<Rightarrow> \<beta>"} |
388 \isacommand{typedef} @{text "var = {a :: atom. sort a \<in> range sort_ty}"} |
368 \end{center} |
389 \pause |
369 \end{frame}} |
390 \isanewline\isanewline |
370 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
391 \small |
371 *} |
392 \begin{minipage}{12cm} |
372 |
393 @{text "Var x \<tau> \<equiv> \<lceil> Atom (sort_ty \<tau>) x \<rceil>"}\isanewline |
373 text_raw {* |
394 |
374 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
395 @{text "(Var x \<tau> \<leftrightarrow> Var y \<tau>) \<bullet> Var x \<tau> = Var y \<tau>"}\\ |
375 \mode<presentation>{ |
396 @{text "(Var x \<tau> \<leftrightarrow> Var y \<tau>) \<bullet> Var x \<tau>' = Var x \<tau>'"}\\ |
376 \begin{frame}<1-2>[c] |
397 \end{minipage} |
|
398 \end{frame}} |
|
399 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
400 *} |
|
401 |
|
402 text_raw {* |
|
403 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
404 \mode<presentation>{ |
|
405 \begin{frame}<1-4>[c] |
377 \frametitle{Conclusion} |
406 \frametitle{Conclusion} |
378 \mbox{}\\[-3mm] |
407 \mbox{}\\[-3mm] |
379 |
408 |
380 \begin{itemize} |
409 \begin{itemize} |
381 \item the formalised version of the nominal theory is now much nicer to |
410 \item the formalised version of the nominal theory is now much nicer to |
382 work with (sorts are occasionally explicit)\bigskip |
411 work with (sorts are occasionally explicit, \alert{@{text "\<forall>\<pi>. P"}})\medskip |
383 |
412 |
384 \item permutations: ``be as abstract as you can'' (group\_add is a slight oddity)\bigskip |
413 \item permutations: ``be as abstract as you can'' (group\_add is a slight oddity)\medskip |
385 |
414 |
386 \item allow sort-disrespecting swappings\onslide<2->{: just define them as the identity} |
415 \item crucial insight: allow sort-disrespecting swappings% |
387 \end{itemize} |
416 \onslide<2->{ just define them as the identity}% |
388 |
417 \onslide<3->{ (a referee called this a \alert{``hack''})}\medskip |
|
418 |
|
419 \item<4-> there will be a hands-on tutorial about Nominal Isabelle at \alert{POPL'11} |
|
420 in Austin Texas |
|
421 \end{itemize} |
|
422 |
|
423 |
|
424 \end{frame}} |
|
425 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
426 *} |
|
427 |
|
428 text_raw {* |
|
429 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
430 \mode<presentation>{ |
|
431 \begin{frame}<1>[c] |
|
432 \frametitle{ |
|
433 \begin{tabular}{c} |
|
434 \mbox{}\\[23mm] |
|
435 \alert{\LARGE Thank you very much}\\ |
|
436 \alert{\Large Questions?} |
|
437 \end{tabular}} |
389 |
438 |
390 \end{frame}} |
439 \end{frame}} |
391 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
440 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
392 *} |
441 *} |
393 |
442 |