src/CCL/Trancl.thy
author wenzelm
Sat Sep 17 17:35:26 2005 +0200 (2005-09-17)
changeset 17456 bcf7544875b2
parent 1474 3f7d67927fe2
child 20140 98acc6d0fab6
permissions -rw-r--r--
converted to Isar theory format;
wenzelm@17456
     1
(*  Title:      CCL/Trancl.thy
clasohm@0
     2
    ID:         $Id$
clasohm@1474
     3
    Author:     Martin Coen, Cambridge University Computer Laboratory
clasohm@0
     4
    Copyright   1993  University of Cambridge
clasohm@0
     5
*)
clasohm@0
     6
wenzelm@17456
     7
header {* Transitive closure of a relation *}
wenzelm@17456
     8
wenzelm@17456
     9
theory Trancl
wenzelm@17456
    10
imports CCL
wenzelm@17456
    11
begin
clasohm@0
    12
clasohm@0
    13
consts
wenzelm@17456
    14
  trans   :: "i set => o"                   (*transitivity predicate*)
wenzelm@17456
    15
  id      :: "i set"
wenzelm@17456
    16
  rtrancl :: "i set => i set"               ("(_^*)" [100] 100)
wenzelm@17456
    17
  trancl  :: "i set => i set"               ("(_^+)" [100] 100)
wenzelm@17456
    18
  O       :: "[i set,i set] => i set"       (infixr 60)
clasohm@0
    19
wenzelm@17456
    20
axioms
wenzelm@17456
    21
  trans_def:       "trans(r) == (ALL x y z. <x,y>:r --> <y,z>:r --> <x,z>:r)"
wenzelm@17456
    22
  comp_def:        (*composition of relations*)
wenzelm@17456
    23
                   "r O s == {xz. EX x y z. xz = <x,z> & <x,y>:s & <y,z>:r}"
wenzelm@17456
    24
  id_def:          (*the identity relation*)
wenzelm@17456
    25
                   "id == {p. EX x. p = <x,x>}"
wenzelm@17456
    26
  rtrancl_def:     "r^* == lfp(%s. id Un (r O s))"
wenzelm@17456
    27
  trancl_def:      "r^+ == r O rtrancl(r)"
wenzelm@17456
    28
wenzelm@17456
    29
ML {* use_legacy_bindings (the_context ()) *}
clasohm@0
    30
clasohm@0
    31
end