src/CCL/trancl.thy
author oheimb
Fri Jun 02 20:38:28 2000 +0200 (2000-06-02)
changeset 9028 8a1ec8f05f14
parent 0 a5a9c433f639
permissions -rw-r--r--
added HOL/Prolog
clasohm@0
     1
(*  Title: 	CCL/trancl.thy
clasohm@0
     2
    ID:         $Id$
clasohm@0
     3
    Author: 	Martin Coen, Cambridge University Computer Laboratory
clasohm@0
     4
    Copyright   1993  University of Cambridge
clasohm@0
     5
clasohm@0
     6
Transitive closure of a relation
clasohm@0
     7
*)
clasohm@0
     8
clasohm@0
     9
Trancl = CCL +
clasohm@0
    10
clasohm@0
    11
consts
clasohm@0
    12
    trans   :: "i set => o" 	              (*transitivity predicate*)
clasohm@0
    13
    id	    :: "i set"
clasohm@0
    14
    rtrancl :: "i set => i set"	              ("(_^*)" [100] 100)
clasohm@0
    15
    trancl  :: "i set => i set"	              ("(_^+)" [100] 100)  
clasohm@0
    16
    O	    :: "[i set,i set] => i set"       (infixr 60)
clasohm@0
    17
clasohm@0
    18
rules   
clasohm@0
    19
clasohm@0
    20
trans_def	"trans(r) == (ALL x y z. <x,y>:r --> <y,z>:r --> <x,z>:r)"
clasohm@0
    21
comp_def	(*composition of relations*)
clasohm@0
    22
		"r O s == {xz. EX x y z. xz = <x,z> & <x,y>:s & <y,z>:r}"
clasohm@0
    23
id_def		(*the identity relation*)
clasohm@0
    24
		"id == {p. EX x. p = <x,x>}"
clasohm@0
    25
rtrancl_def	"r^* == lfp(%s. id Un (r O s))"
clasohm@0
    26
trancl_def	"r^+ == r O rtrancl(r)"
clasohm@0
    27
clasohm@0
    28
end