diff -r 5d145fe77ec1 -r 8146b0ad8212 LMCS-Paper/Paper.thy --- a/LMCS-Paper/Paper.thy Wed Aug 17 09:43:37 2011 +0200 +++ b/LMCS-Paper/Paper.thy Wed Aug 17 21:08:48 2011 +0200 @@ -124,7 +124,7 @@ that can be used to faithfully represent this kind of binding in Nominal Isabelle. The difficulty of finding the right notion for alpha-equivalence can be appreciated in this case by considering that the definition given by - Leroy in \cite[Page ???]{Leroy92} is incorrect (it omits a side-condition). + Leroy in \cite[Page 18--19]{Leroy92} is incorrect (it omits a side-condition). However, the notion of alpha-equivalence that is preserved by vacuous binders is not always wanted. For example in terms like @@ -319,6 +319,7 @@ system. This package allows us to lift definitions and theorems involving raw terms to definitions and theorems involving alpha-equated terms. For example if we define the free-variable function over raw lambda-terms + as follows \[ \mbox{\begin{tabular}{l@ {\hspace{1mm}}r@ {\hspace{1mm}}l} @@ -356,12 +357,12 @@ infrastructure for alpha-equated terms.\smallskip The examples we have in mind where our reasoning infrastructure will be - helpful includes the term language of Core-Haskell. This term language - involves patterns that have lists of type-, coercion- and term-variables, - all of which are bound in @{text "\"}-expressions. In these - patterns we do not know in advance how many variables need to - be bound. Another example is the specification of SML, which includes - includes bindings as in type-schemes.\medskip + helpful includes the term language of Core-Haskell (see + Figure~\ref{corehas}). This term language involves patterns that have lists + of type-, coercion- and term-variables, all of which are bound in @{text + "\"}-expressions. In these patterns we do not know in advance how many + variables need to be bound. Another example is the specification of SML, + which includes includes bindings as in type-schemes.\medskip \noindent {\bf Contributions:} We provide three new definitions for when terms @@ -380,47 +381,45 @@ for our specifications from ``first principles''. - %\begin{figure} - %\begin{boxedminipage}{\linewidth} - %%\begin{center} - %\begin{tabular}{r@ {\hspace{1mm}}r@ {\hspace{2mm}}l} - %\multicolumn{3}{@ {}l}{Type Kinds}\\ - %@{text "\"} & @{text "::="} & @{text "\ | \\<^isub>1 \ \\<^isub>2"}\smallskip\\ - %\multicolumn{3}{@ {}l}{Coercion Kinds}\\ - %@{text "\"} & @{text "::="} & @{text "\\<^isub>1 \ \\<^isub>2"}\smallskip\\ - %\multicolumn{3}{@ {}l}{Types}\\ - %@{text "\"} & @{text "::="} & @{text "a | T | \\<^isub>1 \\<^isub>2 | S\<^isub>n"}$\;\overline{@{text "\"}}$@{text "\<^sup>n"} - %@{text "| \a:\. \ | \ \ \"}\smallskip\\ - %\multicolumn{3}{@ {}l}{Coercion Types}\\ - %@{text "\"} & @{text "::="} & @{text "c | C | \\<^isub>1 \\<^isub>2 | S\<^isub>n"}$\;\overline{@{text "\"}}$@{text "\<^sup>n"} - %@{text "| \c:\. \ | \ \ \ "}\\ - %& @{text "|"} & @{text "refl \ | sym \ | \\<^isub>1 \ \\<^isub>2 | \ @ \ | left \ | right \"}\\ - %& @{text "|"} & @{text "\\<^isub>1 \ \\<^isub>2 | rightc \ | leftc \ | \\<^isub>1 \ \\<^isub>2"}\smallskip\\ - %\multicolumn{3}{@ {}l}{Terms}\\ - %@{text "e"} & @{text "::="} & @{text "x | K | \a:\. e | \c:\. e | e \ | e \"}\\ - %& @{text "|"} & @{text "\x:\. e | e\<^isub>1 e\<^isub>2 | \ x:\ = e\<^isub>1 \ e\<^isub>2"}\\ - %& @{text "|"} & @{text "\ e\<^isub>1 \"}$\;\overline{@{text "p \ e\<^isub>2"}}$ @{text "| e \ \"}\smallskip\\ - %\multicolumn{3}{@ {}l}{Patterns}\\ - %@{text "p"} & @{text "::="} & @{text "K"}$\;\overline{@{text "a:\"}}\;\overline{@{text "c:\"}}\;\overline{@{text "x:\"}}$\smallskip\\ - %\multicolumn{3}{@ {}l}{Constants}\\ - %& @{text C} & coercion constants\\ - %& @{text T} & value type constructors\\ - %& @{text "S\<^isub>n"} & n-ary type functions (which need to be fully applied)\\ - %& @{text K} & data constructors\smallskip\\ - %\multicolumn{3}{@ {}l}{Variables}\\ - %& @{text a} & type variables\\ - %& @{text c} & coercion variables\\ - %& @{text x} & term variables\\ - %\end{tabular} - %\end{center} - %\end{boxedminipage} - %\caption{The System @{text "F\<^isub>C"} - %\cite{CoreHaskell}, also often referred to as \emph{Core-Haskell}. In this - %version of @{text "F\<^isub>C"} we made a modification by separating the - %grammars for type kinds and coercion kinds, as well as for types and coercion - %types. For this paper the interesting term-constructor is @{text "\"}, - %which binds multiple type-, coercion- and term-variables.\label{corehas}} - %\end{figure} + \begin{figure} + \begin{boxedminipage}{\linewidth} + \begin{center} + \begin{tabular}{@ {\hspace{8mm}}r@ {\hspace{2mm}}r@ {\hspace{2mm}}l} + \multicolumn{3}{@ {}l}{Type Kinds}\\ + @{text "\"} & @{text "::="} & @{text "\ | \\<^isub>1 \ \\<^isub>2"}\smallskip\\ + \multicolumn{3}{@ {}l}{Coercion Kinds}\\ + @{text "\"} & @{text "::="} & @{text "\\<^isub>1 \ \\<^isub>2"}\smallskip\\ + \multicolumn{3}{@ {}l}{Types}\\ + @{text "\"} & @{text "::="} & @{text "a | T | \\<^isub>1 \\<^isub>2 | S\<^isub>n"}$\;\overline{@{text "\"}}$@{text "\<^sup>n"} + @{text "| \a:\. \ | \ \ \"}\smallskip\\ + \multicolumn{3}{@ {}l}{Coercion Types}\\ + @{text "\"} & @{text "::="} & @{text "c | C | \\<^isub>1 \\<^isub>2 | S\<^isub>n"}$\;\overline{@{text "\"}}$@{text "\<^sup>n"} + @{text "| \c:\. \ | \ \ \ | refl \ | sym \ | \\<^isub>1 \ \\<^isub>2"}\\ + & @{text "|"} & @{text "\ @ \ | left \ | right \ | \\<^isub>1 \ \\<^isub>2 | rightc \ | leftc \ | \\<^isub>1 \ \\<^isub>2"}\smallskip\\ + \multicolumn{3}{@ {}l}{Terms}\\ + @{text "e"} & @{text "::="} & @{text "x | K | \a:\. e | \c:\. e | e \ | e \ | \x:\. e | e\<^isub>1 e\<^isub>2"}\\ + & @{text "|"} & @{text "\ x:\ = e\<^isub>1 \ e\<^isub>2 | \ e\<^isub>1 \"}$\;\overline{@{text "p \ e\<^isub>2"}}$ @{text "| e \ \"}\smallskip\\ + \multicolumn{3}{@ {}l}{Patterns}\\ + @{text "p"} & @{text "::="} & @{text "K"}$\;\overline{@{text "a:\"}}\;\overline{@{text "c:\"}}\;\overline{@{text "x:\"}}$\smallskip\\ + \multicolumn{3}{@ {}l}{Constants}\\ + & @{text C} & coercion constants\\ + & @{text T} & value type constructors\\ + & @{text "S\<^isub>n"} & n-ary type functions (which need to be fully applied)\\ + & @{text K} & data constructors\smallskip\\ + \multicolumn{3}{@ {}l}{Variables}\\ + & @{text a} & type variables\\ + & @{text c} & coercion variables\\ + & @{text x} & term variables\\ + \end{tabular} + \end{center} + \end{boxedminipage} + \caption{The System @{text "F\<^isub>C"} + \cite{CoreHaskell}, also often referred to as \emph{Core-Haskell}. In this + version of @{text "F\<^isub>C"} we made a modification by separating the + grammars for type kinds and coercion kinds, as well as for types and coercion + types. For this paper the interesting term-constructor is @{text "\"}, + which binds multiple type-, coercion- and term-variables.\label{corehas}} + \end{figure} *} section {* A Short Review of the Nominal Logic Work *} @@ -490,7 +489,7 @@ Concrete permutations in Nominal Isabelle are built up from swappings, written as \mbox{@{text "(a b)"}}, which are permutations that behave as follows: - % + \begin{center} @{text "(a b) = \c. if a = c then b else if b = c then a else c"} \end{center} @@ -502,7 +501,7 @@ products, sets and even functions. The definition depends only on the permutation operation and on the notion of equality defined for the type of @{text x}, namely: - % + \begin{equation}\label{suppdef} @{thm supp_def[no_vars, THEN eq_reflection]} \end{equation}