author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
Thu, 07 Apr 2016 23:24:27 +0100 | |
changeset 426 | 7142fb929d24 |
parent 107 | 5c816239deaa |
permissions | -rw-r--r-- |
107
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
2 |
"http://www.w3.org/TR/REC-html40/loose.dtd"> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
3 |
<HEAD> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
4 |
<TITLE>Nominal Unification</TITLE> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
5 |
<BASE HREF="http://www4.in.tum.de/~urbanc/Unification"> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
6 |
</HEAD> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
7 |
|
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
8 |
<BODY TEXT="#000000" |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
9 |
BGCOLOR="#4169E1" |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
10 |
LINK="#0000EF" |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
11 |
VLINK="#51188E" |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
12 |
ALINK="#FF0000"> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
13 |
|
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
14 |
<TABLE WIDTH="100%" |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
15 |
BGCOLOR="#4169E1" |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
16 |
BORDER="0" |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
17 |
FRAME="border" |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
18 |
CELLPADDING="10" |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
19 |
CELLSPACING="2" |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
20 |
RULES="all"> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
21 |
|
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
22 |
<!-- right column --> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
23 |
<TR> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
24 |
<TD BGCOLOR="#FFFFFF" WIDTH="75%"> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
25 |
<H2>Nominal Unification [<a HREF="http://www4.in.tum.de/~urbanc/Unification/nomu-tcs.ps">ps</a>]</H2> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
26 |
|
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
27 |
<A HREF="http://www4.in.tum.de/~urbanc/">Christian Urban</A>, |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
28 |
<A HREF="http://www.cl.cam.ac.uk/~amp12/">Andrew Pitts</A>, |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
29 |
Murdoch Gabbay |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
30 |
<p> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
31 |
We present a generalisation of first-order unification to the |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
32 |
practically important case of equations between terms involving |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
33 |
<i>binding operations</i>. A substitution of terms for variables |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
34 |
solves such an equation if it makes the equated terms |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
35 |
<i>alpha-equivalent</i>, i.e. equal up to renaming bound names. |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
36 |
For the applications we have in mind, we must consider the simple, |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
37 |
textual form of substitution in which names occurring in terms may |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
38 |
be captured within the scope of binders upon substitution. We are |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
39 |
able to take a "nominal" approach to binding in which bound |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
40 |
entities are explicitly named (rather than using nameless, |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
41 |
de Bruijn-style representations) and yet get a version of this |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
42 |
form of substitution that respects alpha-equivalence and |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
43 |
possesses good algorithmic properties. We achieve this by adapting |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
44 |
an existing idea and introducing a key new idea. The existing |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
45 |
idea is terms involving explicit substitutions of names for names, |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
46 |
except that here we only use <i>explicit permutations</i> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
47 |
|
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
48 |
(bijective substitutions). The key new idea is that the |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
49 |
unification algorithm should solve not only equational problems, |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
50 |
but also problems about the <i>freshness</i> of names for |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
51 |
terms. There is a simple generalisation of the classical |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
52 |
first-order unification algorithm to this setting which retains |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
53 |
the latter's pleasant properties: unification problems involving |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
54 |
alpha-equivalence and freshness are decidable; and solvable |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
55 |
problems possess most general solutions. |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
56 |
<BR><BR> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
57 |
|
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
58 |
In an <a HREF="http://www4.in.tum.de/~urbanc/Unification/app-nomu.ps">appendix</a> we |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
59 |
discuss some issues about the relationship between nominal unification and higher-order |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
60 |
pattern unification. |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
61 |
|
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
62 |
<BR><BR><BR><BR> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
63 |
All results in the paper have been verified in |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
64 |
<A HREF="http://www.cl.cam.ac.uk/Research/HVG/Isabelle/">Isabelle</A> (2004 version). |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
65 |
Below are the theory files. |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
66 |
|
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
67 |
<ul> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
68 |
<li><A HREF="Unification/Swap.thy">Swap.thy</A> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
69 |
<br /> amongst other facts proves that swapping is a bijection (on atoms) |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
70 |
<li><A HREF="Unification/Atoms.thy">Atoms.thy</A> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
71 |
<br /> facts about atoms occurring in swappings |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
72 |
<li><A HREF="Unification/Terms.thy">Terms.thy</A> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
73 |
<br /> defines terms, occurs check and the notion of subterms |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
74 |
<li><A HREF="Unification/Disagreement.thy">Disagreement.thy</A> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
75 |
<br /> proves various facts about disagreement sets |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
76 |
<li><A HREF="Unification/Fresh.thy">Fresh.thy</A> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
77 |
<br /> defines the freshness relation and shows facts about its behaviour under swapping |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
78 |
<li><A HREF="Unification/PreEqu.thy">PreEqu.thy</A> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
79 |
<br /> defines the relation capturing the notion of alpha-equivalence (on open terms) |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
80 |
and proves a long lemma by mutual induction over the depth of terms which |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
81 |
is needed to show that the relation is an equivalence relation |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
82 |
<li><A HREF="Unification/Equ.thy">Equ.thy</A> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
83 |
<br /> proves various facts about the equivalence relations |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
84 |
<li><A HREF="Unification/Substs.thy">Substs.thy</A> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
85 |
<br /> defines substitutions and composition of substitutions, and establishes |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
86 |
some facts of substitution and our equivalence relation |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
87 |
<li><A HREF="Unification/Mgu.thy">Mgu.thy</A> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
88 |
<br /> defines the notion of unification problems and reduction rules over sets |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
89 |
of such problems; proves that every reduction leading to the empty set |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
90 |
produces an mgu |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
91 |
<li><A HREF="Unification/Termination.thy">Termination.thy</A> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
92 |
<br /> shows that every reduction reduces a (well-founded) measure, thus |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
93 |
proves that every reduction sequence must terminate |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
94 |
<li><A HREF="Unification/Unification.thy">Unification.thy</A> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
95 |
<br /> proves that all solvable problems reduce only to the empty set |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
96 |
(the "ok" configuration which provides an mgu) and all unsolvable |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
97 |
problems reduce to a "fail" configuration |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
98 |
(for which no unifier exists) |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
99 |
</uL><BR> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
100 |
The old Isabelle-2002 files can be downloaded |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
101 |
<A HREF="http://www4.in.tum.de/~urbanc/Unification/nomu-2002.tgz">here</A>. |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
102 |
<BR><BR> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
103 |
A "quick and dirty" implementation of nominal unification in |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
104 |
<A HREF="http://caml.inria.fr/">Ocaml</A> can be |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
105 |
downloaded |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
106 |
<A HREF="http://www4.in.tum.de/~urbanc/Unification/unification.ml">elsewhere</A>. |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
107 |
|
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
108 |
|
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
109 |
<BR><BR><BR><BR> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
110 |
|
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
111 |
</TABLE> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
112 |
<P><!-- Created: Tue Mar 4 00:23:25 GMT 1997 --> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
113 |
<!-- hhmts start --> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
114 |
Last modified: Thu Feb 28 20:24:23 CET 2008 |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
115 |
<!-- hhmts end --> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
116 |
<a href="http://validator.w3.org/check/referer">[Validate this page.]</a> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
117 |
</BODY> |
5c816239deaa
added Unification subdirectory
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
118 |
</HTML> |