461 over which the permutation |
461 over which the permutation |
462 acts. In Nominal Isabelle, the identity permutation is written as @{term "0::perm"}, |
462 acts. In Nominal Isabelle, the identity permutation is written as @{term "0::perm"}, |
463 the composition of two permutations @{term "\<pi>\<^isub>1"} and @{term "\<pi>\<^isub>2"} as \mbox{@{term "\<pi>\<^isub>1 + \<pi>\<^isub>2"}}, |
463 the composition of two permutations @{term "\<pi>\<^isub>1"} and @{term "\<pi>\<^isub>2"} as \mbox{@{term "\<pi>\<^isub>1 + \<pi>\<^isub>2"}}, |
464 and the inverse permutation of @{term "\<pi>"} as @{text "- \<pi>"}. The permutation |
464 and the inverse permutation of @{term "\<pi>"} as @{text "- \<pi>"}. The permutation |
465 operation is defined over Isabelle/HOL's type-hierarchy \cite{HuffmanUrban10}; |
465 operation is defined over Isabelle/HOL's type-hierarchy \cite{HuffmanUrban10}; |
466 for example permutations acting on products, lists, sets, functions and booleans are |
466 for example permutations acting on atoms, products, lists, permutations, sets, |
467 given by: |
467 functions and booleans are given by: |
468 |
468 |
469 \begin{equation}\label{permute} |
469 \begin{equation}\label{permute} |
470 \mbox{\begin{tabular}{@ {}c@ {\hspace{10mm}}c@ {}} |
470 \mbox{\begin{tabular}{@ {}c@ {\hspace{10mm}}c@ {}} |
471 \begin{tabular}{@ {}l@ {}} |
471 \begin{tabular}{@ {}l@ {}} |
|
472 @{text "\<pi> \<bullet> a \<equiv> \<pi> a"}\\ |
472 @{thm permute_prod.simps[where p="\<pi>", no_vars, THEN eq_reflection]}\\[2mm] |
473 @{thm permute_prod.simps[where p="\<pi>", no_vars, THEN eq_reflection]}\\[2mm] |
473 @{thm permute_list.simps(1)[where p="\<pi>", no_vars, THEN eq_reflection]}\\ |
474 @{thm permute_list.simps(1)[where p="\<pi>", no_vars, THEN eq_reflection]}\\ |
474 @{thm permute_list.simps(2)[where p="\<pi>", no_vars, THEN eq_reflection]}\\ |
475 @{thm permute_list.simps(2)[where p="\<pi>", no_vars, THEN eq_reflection]}\\ |
475 \end{tabular} & |
476 \end{tabular} & |
476 \begin{tabular}{@ {}l@ {}} |
477 \begin{tabular}{@ {}l@ {}} |
|
478 @{thm permute_perm_def[where p="\<pi>" and q="\<pi>'", no_vars, THEN eq_reflection]}\\ |
477 @{thm permute_set_eq[where p="\<pi>", no_vars, THEN eq_reflection]}\\ |
479 @{thm permute_set_eq[where p="\<pi>", no_vars, THEN eq_reflection]}\\ |
478 @{text "\<pi> \<bullet> f \<equiv> \<lambda>x. \<pi> \<bullet> (f (- \<pi> \<bullet> x))"}\\ |
480 @{text "\<pi> \<bullet> f \<equiv> \<lambda>x. \<pi> \<bullet> (f (- \<pi> \<bullet> x))"}\\ |
479 @{thm permute_bool_def[where p="\<pi>", no_vars, THEN eq_reflection]} |
481 @{thm permute_bool_def[where p="\<pi>", no_vars, THEN eq_reflection]} |
480 \end{tabular} |
482 \end{tabular} |
481 \end{tabular}} |
483 \end{tabular}} |
621 assumption @{term "as \<sharp>* x"}), then there exists a permutation @{text "\<pi>"} such that |
623 assumption @{term "as \<sharp>* x"}), then there exists a permutation @{text "\<pi>"} such that |
622 the renamed binders @{term "\<pi> \<bullet> as"} avoid @{text c} (which can be arbitrarily chosen |
624 the renamed binders @{term "\<pi> \<bullet> as"} avoid @{text c} (which can be arbitrarily chosen |
623 as long as it is finitely supported) and also @{text "\<pi>"} does not affect anything |
625 as long as it is finitely supported) and also @{text "\<pi>"} does not affect anything |
624 in the support of @{text x} (that is @{term "supp x \<sharp>* \<pi>"}). The last |
626 in the support of @{text x} (that is @{term "supp x \<sharp>* \<pi>"}). The last |
625 fact and Property~\ref{supppermeq} allow us to ``rename'' just the binders |
627 fact and Property~\ref{supppermeq} allow us to ``rename'' just the binders |
626 @{text as} in @{text x}, because @{term "\<pi> \<bullet> x = x"}. Note that @{term "supp x \<sharp>* \<pi>"} |
628 @{text as} in @{text x}, because @{term "\<pi> \<bullet> x = x"}. |
|
629 |
|
630 Note that @{term "supp x \<sharp>* \<pi>"} |
627 is equivalent with @{term "supp \<pi> \<sharp>* x"}, which means we could also formulate |
631 is equivalent with @{term "supp \<pi> \<sharp>* x"}, which means we could also formulate |
628 Propositions \ref{supppermeq} and \ref{avoiding} in the other `direction', however the |
632 Propositions \ref{supppermeq} and \ref{avoiding} in the other `direction', however the |
629 reasoning infrastructure of Nominal Isabelle is set up so that it provides more |
633 reasoning infrastructure of Nominal Isabelle is set up so that it provides more |
630 automation for the original formulation. |
634 automation for the formulation given above. |
631 |
635 |
632 Most properties given in this section are described in detail in \cite{HuffmanUrban10} |
636 Most properties given in this section are described in detail in \cite{HuffmanUrban10} |
633 and all are formalised in Isabelle/HOL. In the next sections we will make |
637 and all are formalised in Isabelle/HOL. In the next sections we will make |
634 use of these properties in order to define alpha-equivalence in |
638 use of these properties in order to define alpha-equivalence in |
635 the presence of multiple binders. |
639 the presence of multiple binders. |
705 where @{term set} is the function that coerces a list of atoms into a set of atoms. |
709 where @{term set} is the function that coerces a list of atoms into a set of atoms. |
706 Now the last clause ensures that the order of the binders matters (since @{text as} |
710 Now the last clause ensures that the order of the binders matters (since @{text as} |
707 and @{text bs} are lists of atoms). |
711 and @{text bs} are lists of atoms). |
708 |
712 |
709 If we do not want to make any difference between the order of binders \emph{and} |
713 If we do not want to make any difference between the order of binders \emph{and} |
710 also allow vacuous binders, that means \emph{restrict} names, then we keep sets of binders, but drop |
714 also allow vacuous binders, that means according to Pitts \emph{restrict} names |
|
715 \cite{Pitts04}, then we keep sets of binders, but drop |
711 condition {\it (iv)} in Definition~\ref{alphaset}: |
716 condition {\it (iv)} in Definition~\ref{alphaset}: |
712 |
717 |
713 \begin{defi}[Alpha-Equivalence for Set+-Bindings]\label{alphares}\mbox{}\\ |
718 \begin{defi}[Alpha-Equivalence for Set+-Bindings]\label{alphares}\mbox{}\\ |
714 \begin{tabular}{@ {\hspace{10mm}}l@ {\hspace{5mm}}rl} |
719 \begin{tabular}{@ {\hspace{10mm}}l@ {\hspace{5mm}}rl} |
715 @{term "alpha_res_ex (as, x) R fa (bs, y)"}\hspace{2mm}@{text "\<equiv>"} & |
720 @{term "alpha_res_ex (as, x) R fa (bs, y)"}\hspace{2mm}@{text "\<equiv>"} & |
754 support). For this we are going to introduce |
759 support). For this we are going to introduce |
755 three abstraction types that are quotients of the relations |
760 three abstraction types that are quotients of the relations |
756 |
761 |
757 \begin{equation} |
762 \begin{equation} |
758 \begin{array}{r} |
763 \begin{array}{r} |
759 @{term "alpha_abs_set (as, x) (bs, y)"}~~@{text "\<equiv>"}~~@{term "alpha_set_ex (as, x) equal supp (bs, y)"}\\ |
764 @{term "alpha_set_ex (as, x) equal supp (bs, y)"}\smallskip\\ |
760 @{term "alpha_abs_res (as, x) (bs, y)"}~~@{text "\<equiv>"}~~@{term "alpha_res_ex (as, x) equal supp (bs, y)"}\\ |
765 @{term "alpha_res_ex (as, x) equal supp (bs, y)"}\smallskip\\ |
761 @{term "alpha_abs_lst (as, x) (bs, y)"}~~@{text "\<equiv>"}~~@{term "alpha_lst_ex (as, x) equal supp (bs, y)"}\\ |
766 @{term "alpha_lst_ex (as, x) equal supp (bs, y)"}\\ |
762 \end{array} |
767 \end{array} |
763 \end{equation}\smallskip |
768 \end{equation}\smallskip |
764 |
769 |
765 \noindent |
770 \noindent |
766 Note that in these relation we replaced the free-atom function @{text "fa"} |
771 Note that in these relation we replaced the free-atom function @{text "fa"} |
767 with @{term "supp"} and the relation @{text R} with equality. We can show |
772 with @{term "supp"} and the relation @{text R} with equality. We can show |
768 the following properties: |
773 the following properties: |
769 |
774 |
770 \begin{lem}\label{alphaeq} |
775 \begin{lem}\label{alphaeq} |
771 The relations $\approx_{\,\textit{abs\_set}}$, $\approx_{\,\textit{abs\_set+}}$ |
776 The relations $\approx_{\,\textit{set}}^{=, \textit{supp}}$, |
772 and $\approx_{\,\textit{abs\_list}}$ are equivalence relations and equivariant. |
777 $\approx_{\,\textit{set+}}^{=, \textit{supp}}$ |
|
778 and $\approx_{\,\textit{list}}^{=, \textit{supp}}$ are |
|
779 equivalence relations and equivariant. |
773 \end{lem} |
780 \end{lem} |
774 |
781 |
775 \begin{proof} |
782 \begin{proof} |
776 Reflexivity is by taking @{text "\<pi>"} to be @{text "0"}. For symmetry we have |
783 Reflexivity is by taking @{text "\<pi>"} to be @{text "0"}. For symmetry we have |
777 a permutation @{text "\<pi>"} and for the proof obligation take @{term "- \<pi>"}. In case |
784 a permutation @{text "\<pi>"} and for the proof obligation take @{term "- |
778 of transitivity, we have two permutations @{text "\<pi>\<^isub>1"} and @{text "\<pi>\<^isub>2"}, and for the |
785 \<pi>"}. In case of transitivity, we have two permutations @{text "\<pi>\<^isub>1"} |
779 proof obligation use @{text "\<pi>\<^isub>1 + \<pi>\<^isub>2"}. Equivariance means |
786 and @{text "\<pi>\<^isub>2"}, and for the proof obligation use @{text |
780 @{term "abs_set (\<pi> \<bullet> as, \<pi> \<bullet> x) (\<pi> \<bullet> bs, \<pi> \<bullet> y)"} holds provided |
787 "\<pi>\<^isub>1 + \<pi>\<^isub>2"}. Equivariance means @{term "alpha_set_ex (\<pi> \<bullet> as, |
781 \mbox{@{term "abs_set (as, x) (bs, y)"}} holds. To show this, we need to unfold the |
788 \<pi> \<bullet> x) equal supp (\<pi> \<bullet> bs, \<pi> \<bullet> y)"} holds provided \mbox{@{term |
782 definitions and `pull out' the permutations, which is possible since all |
789 "alpha_set_ex (as, x) equal supp(bs, y)"}} holds. To show this, we need to |
783 operators, such as @{text "#\<^sup>*, -, set"} and @{text "supp"}, are equivariant |
790 unfold the definitions and `pull out' the permutations, which is possible |
784 (see \cite{HuffmanUrban10}). Finally we apply the permutation operation on booleans. |
791 since all operators, such as @{text "#\<^sup>*, -, set"} and @{text "supp"}, |
|
792 are equivariant (see \cite{HuffmanUrban10}). Finally we apply the |
|
793 permutation operation on booleans. |
785 \end{proof} |
794 \end{proof} |
786 |
795 |
787 \noindent |
796 \noindent |
788 Recall the picture shown in \eqref{picture} about new types in HOL. |
797 Recall the picture shown in \eqref{picture} about new types in HOL. |
789 The lemma above allows us to use our quotient package for introducing |
798 The lemma above allows us to use our quotient package for introducing |
1078 expected to return either a set of atoms (for \isacommand{binds (set)} and |
1087 expected to return either a set of atoms (for \isacommand{binds (set)} and |
1079 \isacommand{binds (set+)}) or a list of atoms (for \isacommand{binds}). They need |
1088 \isacommand{binds (set+)}) or a list of atoms (for \isacommand{binds}). They need |
1080 to be defined by recursion over the corresponding type; the equations |
1089 to be defined by recursion over the corresponding type; the equations |
1081 must be given in the binding function part of the scheme shown in |
1090 must be given in the binding function part of the scheme shown in |
1082 \eqref{scheme}. For example a term-calculus containing @{text "Let"}s with |
1091 \eqref{scheme}. For example a term-calculus containing @{text "Let"}s with |
1083 tuple patterns might be specified as: |
1092 tuple patterns may be specified as: |
1084 |
1093 |
1085 \begin{equation}\label{letpat} |
1094 \begin{equation}\label{letpat} |
1086 \mbox{% |
1095 \mbox{% |
1087 \begin{tabular}{l} |
1096 \begin{tabular}{l} |
1088 \isacommand{nominal\_datatype} @{text trm} $=$\\ |
1097 \isacommand{nominal\_datatype} @{text trm} $=$\\ |
1189 \hspace{5mm}$\mid$~@{text "bn(ACons' x y t as) = [atom x] @ bn(as)"}\\ |
1198 \hspace{5mm}$\mid$~@{text "bn(ACons' x y t as) = [atom x] @ bn(as)"}\\ |
1190 \end{tabular}} |
1199 \end{tabular}} |
1191 \end{equation}\smallskip |
1200 \end{equation}\smallskip |
1192 |
1201 |
1193 \noindent |
1202 \noindent |
1194 In this example the term constructor @{text "ACons'"} has four arguments and |
1203 In this example the term constructor @{text "ACons'"} has four arguments with |
1195 contains a binding clause. This constructor is also used in the definition |
1204 a binding clause for two of them. This constructor is also used in the definition |
1196 of the binding function. The restriction we have to impose is that the |
1205 of the binding function. The restriction we have to impose is that the |
1197 binding function can only return free atoms, that is the ones that are not |
1206 binding function can only return free atoms, that is the ones that are not |
1198 mentioned in a binding clause. Therefore @{text "y"} cannot be used in the |
1207 mentioned in a binding clause. Therefore @{text "y"} cannot be used in the |
1199 binding function @{text "bn"} (since it is bound in @{text "ACons'"} by the |
1208 binding function @{text "bn"} (since it is bound in @{text "ACons'"} by the |
1200 binding clause), but @{text x} can (since it is a free atom). This |
1209 binding clause), but @{text x} can (since it is a free atom). This |
1272 \begin{equation}\label{ceqvt} |
1281 \begin{equation}\label{ceqvt} |
1273 @{text "\<pi> \<bullet> (C z\<^isub>1 \<dots> z\<^isub>n) = C (\<pi> \<bullet> z\<^isub>1) \<dots> (\<pi> \<bullet> z\<^isub>n)"} |
1282 @{text "\<pi> \<bullet> (C z\<^isub>1 \<dots> z\<^isub>n) = C (\<pi> \<bullet> z\<^isub>1) \<dots> (\<pi> \<bullet> z\<^isub>n)"} |
1274 \end{equation}\smallskip |
1283 \end{equation}\smallskip |
1275 |
1284 |
1276 The first non-trivial step we have to perform is the generation of |
1285 The first non-trivial step we have to perform is the generation of |
1277 \emph{free-atom functions} from the specification.\footnote{Admittedly, the |
1286 \emph{free-atom functions} from the specifications.\footnote{Admittedly, the |
1278 details of our definitions will be somewhat involved. However they are still |
1287 details of our definitions will be somewhat involved. However they are still |
1279 conceptually simple in comparison with the ``positional'' approach taken in |
1288 conceptually simple in comparison with the ``positional'' approach taken in |
1280 Ott \cite[Pages 88--95]{ott-jfp}, which uses \emph{occurences} and |
1289 Ott \cite[Pages 88--95]{ott-jfp}, which uses the notions of \emph{occurences} and |
1281 \emph{partial equivalence relations} over sets of occurences.} For the |
1290 \emph{partial equivalence relations} over sets of occurences.} For the |
1282 \emph{raw} types @{text "ty"}$_{1..n}$ we define the free-atom functions |
1291 \emph{raw} types @{text "ty"}$_{1..n}$ we define the free-atom functions |
1283 |
1292 |
1284 \begin{equation}\label{fvars} |
1293 \begin{equation}\label{fvars} |
1285 \mbox{@{text "fa_ty"}$_{1..n}$} |
1294 \mbox{@{text "fa_ty"}$_{1..n}$} |
1560 \mbox{\isacommand{binds (set)} @{text "b\<^isub>1\<dots>b\<^isub>p"} \isacommand{in} @{text "d\<^isub>1\<dots>d\<^isub>q"}.} |
1569 \mbox{\isacommand{binds (set)} @{text "b\<^isub>1\<dots>b\<^isub>p"} \isacommand{in} @{text "d\<^isub>1\<dots>d\<^isub>q"}.} |
1561 \end{equation}\smallskip |
1570 \end{equation}\smallskip |
1562 |
1571 |
1563 \noindent |
1572 \noindent |
1564 In this case we define a premise @{text P} using the relation |
1573 In this case we define a premise @{text P} using the relation |
1565 $\approx_{\,\textit{set}}$ given in Section~\ref{sec:binders} (similarly |
1574 $\approx_{\,\textit{set}}^{\textit{R}, \textit{fa}}$ given in Section~\ref{sec:binders} (similarly |
1566 $\approx_{\,\textit{set+}}$ and $\approx_{\,\textit{list}}$ for the other |
1575 $\approx_{\,\textit{set+}}^{\textit{R}, \textit{fa}}$ and |
|
1576 $\approx_{\,\textit{list}}^{\textit{R}, \textit{fa}}$ for the other |
1567 binding modes). This premise defines alpha-equivalence of two abstractions |
1577 binding modes). This premise defines alpha-equivalence of two abstractions |
1568 involving multiple binders. As above, we first build the tuples @{text "D"} and |
1578 involving multiple binders. As above, we first build the tuples @{text "D"} and |
1569 @{text "D'"} for the bodies @{text "d"}$_{1..q}$, and the corresponding |
1579 @{text "D'"} for the bodies @{text "d"}$_{1..q}$, and the corresponding |
1570 compound alpha-relation @{text "R"} (shown in \eqref{rempty}). |
1580 compound alpha-relation @{text "R"} (shown in \eqref{rempty}). |
1571 For $\approx_{\,\textit{set}}$ we also need |
1581 For $\approx_{\,\textit{set}}^{R, fa}$ we also need |
1572 a compound free-atom function for the bodies defined as |
1582 a compound free-atom function for the bodies defined as |
1573 |
1583 |
1574 \[ |
1584 \[ |
1575 \mbox{@{text "fa \<equiv> (fa_ty\<^isub>1,\<dots>, fa_ty\<^isub>q)"}} |
1585 \mbox{@{text "fa \<equiv> (fa_ty\<^isub>1,\<dots>, fa_ty\<^isub>q)"}} |
1576 \]\smallskip |
1586 \]\smallskip |
1649 \]\smallskip |
1659 \]\smallskip |
1650 |
1660 |
1651 \noindent |
1661 \noindent |
1652 This completes the definition of alpha-equivalence. As a sanity check, we can show |
1662 This completes the definition of alpha-equivalence. As a sanity check, we can show |
1653 that the premises of empty binding clauses are a special case of the clauses for |
1663 that the premises of empty binding clauses are a special case of the clauses for |
1654 non-empty ones (we just have to unfold the definition of $\approx_{\,\textit{set}}$ and take @{text "0"} |
1664 non-empty ones (we just have to unfold the definition of |
|
1665 $\approx_{\,\textit{set}}^{\textit{R}, \textit{fa}}$ and take @{text "0"} |
1655 for the existentially quantified permutation). |
1666 for the existentially quantified permutation). |
1656 |
1667 |
1657 Again let us take a look at a concrete example for these definitions. For \eqref{letrecs} |
1668 Again let us take a look at a concrete example for these definitions. For |
|
1669 teh specification given in \eqref{letrecs} |
1658 we have three relations $\approx_{\textit{trm}}$, $\approx_{\textit{assn}}$ and |
1670 we have three relations $\approx_{\textit{trm}}$, $\approx_{\textit{assn}}$ and |
1659 $\approx_{\textit{bn}}$ with the following clauses: |
1671 $\approx_{\textit{bn}}$ with the following clauses: |
1660 |
1672 |
1661 \[\mbox{ |
1673 \[\mbox{ |
1662 \begin{tabular}{@ {}c @ {}} |
1674 \begin{tabular}{@ {}c @ {}} |
1682 \end{tabular} |
1694 \end{tabular} |
1683 \end{tabular}} |
1695 \end{tabular}} |
1684 \]\smallskip |
1696 \]\smallskip |
1685 |
1697 |
1686 \noindent |
1698 \noindent |
1687 Note the difference between $\approx_{\textit{assn}}$ and |
1699 Notice the difference between $\approx_{\textit{assn}}$ and |
1688 $\approx_{\textit{bn}}$: the latter only ``tracks'' alpha-equivalence of |
1700 $\approx_{\textit{bn}}$: the latter only ``tracks'' alpha-equivalence of |
1689 the components in an assignment that are \emph{not} bound. This is needed in the |
1701 the components in an assignment that are \emph{not} bound. This is needed in the |
1690 clause for @{text "Let"} (which has |
1702 clause for @{text "Let"} (which has |
1691 a non-recursive binder). |
1703 a non-recursive binder). |
1692 The underlying reason is that the terms inside an assignment are not meant |
1704 The underlying reason is that the terms inside an assignment are not meant |
1693 to be ``under'' the binder. Such a premise is \emph{not} needed in @{text "Let_rec"}, |
1705 to be ``under'' the binder. Such a premise is \emph{not} needed in @{text "Let_rec"}, |
1694 because there all components of an assignment are ``under'' the binder. |
1706 because there all components of an assignment are ``under'' the binder. |
|
1707 Note also that in case of more than one body (e.g.~@{text "Let_rec"}-case) |
|
1708 we need to parametrise the relation $\approx_{\textit{list}}$ with compound |
|
1709 equivalence relations and compund free-atom functions. |
1695 *} |
1710 *} |
1696 |
1711 |
1697 section {* Establishing the Reasoning Infrastructure *} |
1712 section {* Establishing the Reasoning Infrastructure *} |
1698 |
1713 |
1699 text {* |
1714 text {* |
2369 any nominal techniques. To our knowledge there is no concrete mathematical |
2384 any nominal techniques. To our knowledge there is no concrete mathematical |
2370 result concerning this notion of alpha-equivalence and free variables. We |
2385 result concerning this notion of alpha-equivalence and free variables. We |
2371 have proved that our definitions lead to alpha-equated terms, whose support |
2386 have proved that our definitions lead to alpha-equated terms, whose support |
2372 is as expected (that means bound names are removed from the support). We |
2387 is as expected (that means bound names are removed from the support). We |
2373 also showed that our specifications lift from a raw type to a type of |
2388 also showed that our specifications lift from a raw type to a type of |
2374 alpha-equivalence classes. For this we were able to establish then every |
2389 alpha-equivalence classes. For this we had to establish (automatically) that every |
2375 term-constructor and function is repectful w.r.t.~alpha-equivalence. |
2390 term-constructor and function is repectful w.r.t.~alpha-equivalence. |
2376 |
2391 |
2377 Although we were heavily inspired by the syntax of Ott, its definition of |
2392 Although we were heavily inspired by the syntax of Ott, its definition of |
2378 alpha-equi\-valence is unsuitable for our extension of Nominal |
2393 alpha-equi\-valence is unsuitable for our extension of Nominal |
2379 Isabelle. First, it is far too complicated to be a basis for automated |
2394 Isabelle. First, it is far too complicated to be a basis for automated |
2399 \noindent |
2414 \noindent |
2400 In the first term-constructor we have a single body that happens to be |
2415 In the first term-constructor we have a single body that happens to be |
2401 ``spread'' over two arguments; in the second term-constructor we have two |
2416 ``spread'' over two arguments; in the second term-constructor we have two |
2402 independent bodies in which the same variables are bound. As a result we |
2417 independent bodies in which the same variables are bound. As a result we |
2403 have\footnote{Assuming @{term "a \<noteq> b"}, there is no permutation that can |
2418 have\footnote{Assuming @{term "a \<noteq> b"}, there is no permutation that can |
2404 make @{text "(a, b)"} equal with @{text "(a, b)"} and @{text "(b, a)"}, but |
2419 make @{text "(a, b)"} equal with both @{text "(a, b)"} and @{text "(b, a)"}, but |
2405 there are two permutations so that we can make @{text "(a, b)"} and @{text |
2420 there are two permutations so that we can make @{text "(a, b)"} and @{text |
2406 "(a, b)"} equal with one permutation, and @{text "(a, b)"} and @{text "(b, |
2421 "(a, b)"} equal with one permutation, and @{text "(a, b)"} and @{text "(b, |
2407 a)"} with the other.} |
2422 a)"} with the other.} |
2408 |
2423 |
2409 |
2424 |
2443 alpha-equivalence, which also uses a permutation operation (like ours). |
2458 alpha-equivalence, which also uses a permutation operation (like ours). |
2444 Still, this definition is rather different from ours and he only proves that |
2459 Still, this definition is rather different from ours and he only proves that |
2445 it defines an equivalence relation. A complete reasoning infrastructure is |
2460 it defines an equivalence relation. A complete reasoning infrastructure is |
2446 well beyond the purposes of his language. Similar work for Haskell with |
2461 well beyond the purposes of his language. Similar work for Haskell with |
2447 similar results was reported by Cheney \cite{Cheney05a} and more recently |
2462 similar results was reported by Cheney \cite{Cheney05a} and more recently |
2448 by ??? |
2463 by Weirich et al \cite{WeirichYorgeySheard11}. |
2449 |
2464 |
2450 In a slightly different domain (programming with dependent types), |
2465 In a slightly different domain (programming with dependent types), |
2451 Altenkirch et al present a calculus with a notion of alpha-equivalence |
2466 Altenkirch et al \cite{Altenkirch10} present a calculus with a notion of |
2452 related to our binding mode \isacommand{binds (set+)} \cite{Altenkirch10}. |
2467 alpha-equivalence related to our binding mode \isacommand{binds (set+)}. |
2453 Their definition is similar to the one by Pottier, except that it has a more |
2468 Their definition is similar to the one by Pottier, except that it has a more |
2454 operational flavour and calculates a partial (renaming) map. In this way, |
2469 operational flavour and calculates a partial (renaming) map. In this way, |
2455 the definition can deal with vacuous binders. However, to our best |
2470 the definition can deal with vacuous binders. However, to our best |
2456 knowledge, no concrete mathematical result concerning this definition of |
2471 knowledge, no concrete mathematical result concerning this definition of |
2457 alpha-equivalence has been proved. |
2472 alpha-equivalence has been proved. |
2472 terms. We also introduced two binding modes (set and set+) that do not exist |
2487 terms. We also introduced two binding modes (set and set+) that do not exist |
2473 in Ott. We have tried out the extension with calculi such as Core-Haskell, |
2488 in Ott. We have tried out the extension with calculi such as Core-Haskell, |
2474 type-schemes and approximately a dozen of other typical examples from |
2489 type-schemes and approximately a dozen of other typical examples from |
2475 programming language research~\cite{SewellBestiary}. The code will |
2490 programming language research~\cite{SewellBestiary}. The code will |
2476 eventually become part of the next Isabelle distribution.\footnote{It |
2491 eventually become part of the next Isabelle distribution.\footnote{It |
2477 can be downloaded already from the Mercurial repository linked at |
2492 can be downloaded from \href{http://isabelle.in.tum.de/nominal/download} |
2478 \href{http://isabelle.in.tum.de/nominal/download} |
|
2479 {http://isabelle.in.tum.de/nominal/download}.} |
2493 {http://isabelle.in.tum.de/nominal/download}.} |
2480 |
2494 |
2481 We have left out a discussion about how functions can be defined over |
2495 We have left out a discussion about how functions can be defined over |
2482 alpha-equated terms involving general binders. In earlier versions of Nominal |
2496 alpha-equated terms involving general binders. In earlier versions of Nominal |
2483 Isabelle this turned out to be a thorny issue. We |
2497 Isabelle this turned out to be a thorny issue. We |