# HG changeset patch # User Christian Urban # Date 1273845745 -3600 # Node ID 4648bd6930e45cd1010b616f622042a969e1263a # Parent d74e08799b63b5ef4463d9e3d45311015f72114d tuned a bit the paper diff -r d74e08799b63 -r 4648bd6930e4 Paper/Paper.thy --- a/Paper/Paper.thy Fri May 14 10:28:42 2010 +0200 +++ b/Paper/Paper.thy Fri May 14 15:02:25 2010 +0100 @@ -939,11 +939,11 @@ For binders we distinguish between \emph{shallow} and \emph{deep} binders. Shallow binders are of the form \isacommand{bind}\; {\it labels}\; \isacommand{in}\; {\it labels'} (similar for the other two modes). The - restriction we impose on shallow binders is that in case of + restrictions we impose on shallow binders are that in case of \isacommand{bind\_set} and \isacommand{bind\_res} the {\it labels} must either refer to atom types or to sets of atom types; in case of - \isacommand{bind} we allow labels to refer to atom types or lists of atom types. Two - examples for the use of shallow binders are the specification of + \isacommand{bind} we allow labels to refer to atom types or lists of atom types. + Two examples for the use of shallow binders are the specification of lambda-terms, where a single name is bound, and type-schemes, where a finite set of names is bound: @@ -967,15 +967,14 @@ \end{center} \noindent - Note that for @{text lam} we have a choice which mode we use. The reason is that - we bind only a single @{text name}. Having \isacommand{bind\_set} in the second + Note that for @{text lam} it does not matter which binding mode we use. The reason is that + we bind only a single @{text name}. However, having \isacommand{bind\_set}, or even + \isacommand{bind}, in the second case changes the semantics of the specification. Note also that in these specifications @{text "name"} refers to an atom type, and @{text "fset"} to the type of finite sets. - The restrictions are as follows: - Shallow binders can occur in the binding part of several binding clauses. - A \emph{deep} binder, on the other hand, uses an auxiliary binding function that ``picks'' out + A \emph{deep} binder uses an auxiliary binding function that ``picks'' out the atoms in one argument of the term-constructor, which can be bound in other arguments and also in the same argument (we will call such binders \emph{recursive}, see below). @@ -1011,11 +1010,12 @@ In this specification the function @{text "bn"} determines which atoms of @{text p} are bound in the argument @{text "t"}. Note that in the second-last @{text bn}-clause the function @{text "atom"} - coerces a name into the generic atom type of Nominal Isabelle \cite{HuffmanUrban10}. This allows + coerces a name into the generic atom type of Nominal Isabelle \cite{HuffmanUrban10}. + This allows us to treat binders of different atom type uniformly. The most drastic restriction we have to impose on deep binders is that - we cannot have ``overlapping'' deep binders. Consider for example the + we cannot have more than one binding function for one binder. Consider for example the term-constructors: \begin{center} @@ -1540,17 +1540,17 @@ induction principles that establish \begin{center} - @{text "P\<^bsub>ty\\<^isub>1\<^esub> y\<^isub>1 \ P\<^bsub>ty\\<^isub>n\<^esub> y\<^isub>n "} + @{text "P\<^bsub>ty\\<^esub>\<^isub>1 y\<^isub>1 \ P\<^bsub>ty\\<^esub>\<^isub>n y\<^isub>n "} \end{center} \noindent - for all @{text "y\<^isub>i"} wherby the variables @{text "P\<^bsub>ty\\<^isub>i\<^esub>"} stand for properties + for all @{text "y\<^isub>i"} wherby the variables @{text "P\<^bsub>ty\\<^esub>\<^isub>i"} stand for properties defined over the types @{text "ty\\<^isub>1 \ ty\\<^isub>n"}. The premises of these induction principles look as follows \begin{center} - @{text "\x\<^isub>1\x\<^isub>n. P\<^bsub>ty\\<^isub>i\<^esub> x\<^isub>i \ \ \ P\<^bsub>ty\\<^isub>j\<^esub> x\<^isub>j \ P\<^bsub>ty\\<^esub> (C\<^sup>\ x\<^isub>1 \ x\<^isub>n)"} + @{text "\x\<^isub>1\x\<^isub>n. P\<^bsub>ty\\<^esub>\<^isub>i x\<^isub>i \ \ \ P\<^bsub>ty\\<^esub>\<^isub>j x\<^isub>j \ P\<^bsub>ty\\<^esub> (C\<^sup>\ x\<^isub>1 \ x\<^isub>n)"} \end{center} \noindent @@ -1796,8 +1796,8 @@ \begin{lemma}\label{permutebn} Given a binding function @{text "bn\<^sup>\"} then for all @{text p} - {\it i)} @{text "p \ (bn\<^sup>\ x) = bn\<^sup>\ (p \\<^bsub>bn\<^sup>\\<^esub> x)"} and {\it ii)} - @{text "fv_bn\<^isup>\ x = fv_bn\<^isup>\ (p \\<^bsub>bn\<^sup>\\<^esub> x)"}. + {\it i)} @{text "p \ (bn\<^sup>\ x) = bn\<^sup>\ (p \\<^bsub>bn\<^esub>\<^sup>\ x)"} and {\it ii)} + @{text "fv_bn\<^isup>\ x = fv_bn\<^isup>\ (p \\<^bsub>bn\<^esub>\<^sup>\ x)"}. \end{lemma} \begin{proof} @@ -1819,7 +1819,7 @@ \begin{equation}\label{renaming} \begin{array}{l} \mbox{if @{term "supp (Abs_lst (bn p) t\<^isub>2) \* r"}}\\ - \qquad\mbox{then @{text "Let p t\<^isub>1 t\<^isub>2 = Let (r \\<^bsub>bn\<^bsub>pat\<^esub>\<^esub> p) t\<^isub>1 (r \ t\<^isub>2)"}} + \qquad\mbox{then @{text "Let p t\<^isub>1 t\<^isub>2 = Let (r \\<^bsub>bnpat\<^esub> p) t\<^isub>1 (r \ t\<^isub>2)"}} \end{array} \end{equation}