TFL/examples/Subst/Unifier.thy
author paulson
Fri, 18 Oct 1996 12:54:19 +0200
changeset 2113 21266526ac42
permissions -rw-r--r--
Subst as modified by Konrad Slind
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2113
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
     1
(*  Title:      Subst/unifier.thy
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
     2
    Author:     Martin Coen, Cambridge University Computer Laboratory
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
     3
    Copyright   1993  University of Cambridge
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
     4
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
     5
Definition of most general unifier
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
     6
*)
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
     7
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
     8
Unifier = Subst + 
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
     9
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    10
consts
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    11
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    12
  Unifier    :: "[('a*('a uterm))list,'a uterm,'a uterm] => bool"
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    13
  ">>"       :: "[('a*('a uterm))list,('a*('a uterm))list] => bool" (infixr 52)
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    14
  MGUnifier  :: "[('a*('a uterm))list,'a uterm,'a uterm] => bool"
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    15
  Idem       :: "('a*('a uterm))list => bool"
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    16
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    17
rules  (*Definitions*)
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    18
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    19
  Unifier_def      "Unifier s t u == t <| s = u <| s"
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    20
  MoreGeneral_def  "r >> s == ? q. s =s= r <> q"
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    21
  MGUnifier_def    "MGUnifier s t u == Unifier s t u & 
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    22
                                       (!r. Unifier r t u --> s >> r)"
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    23
  Idem_def         "Idem(s) == s <> s =s= s"
21266526ac42 Subst as modified by Konrad Slind
paulson
parents:
diff changeset
    24
end