src/HOL/Relation.thy
changeset 1454 d0266c81a85e
parent 1128 64b30e3cc6d4
child 1475 7f5a4cd08209
     1.1 --- a/src/HOL/Relation.thy	Fri Jan 26 13:43:36 1996 +0100
     1.2 +++ b/src/HOL/Relation.thy	Fri Jan 26 20:25:39 1996 +0100
     1.3 @@ -11,17 +11,16 @@
     1.4      id	        :: "('a * 'a)set"               (*the identity relation*)
     1.5      O	        :: "[('b * 'c)set, ('a * 'b)set] => ('a * 'c)set" (infixr 60)
     1.6      trans       :: "('a * 'a)set => bool" 	(*transitivity predicate*)
     1.7 -    converse    :: "('a*'a) set => ('a*'a) set"
     1.8 -    "^^"        :: "[('a*'a) set,'a set] => 'a set" (infixl 90)
     1.9 -    Domain      :: "('a*'a) set => 'a set"
    1.10 -    Range       :: "('a*'a) set => 'a set"
    1.11 +    converse    :: "('a * 'b)set => ('b * 'a)set"
    1.12 +    "^^"        :: "[('a * 'b) set, 'a set] => 'b set" (infixl 90)
    1.13 +    Domain      :: "('a * 'b) set => 'a set"
    1.14 +    Range       :: "('a * 'b) set => 'b set"
    1.15  defs
    1.16      id_def	"id == {p. ? x. p = (x,x)}"
    1.17 -    comp_def	(*composition of relations*)
    1.18 -		"r O s == {xz. ? x y z. xz = (x,z) & (x,y):s & (y,z):r}"
    1.19 +    comp_def	"r O s == {(x,z). ? y. (x,y):s & (y,z):r}"
    1.20      trans_def	  "trans(r) == (!x y z. (x,y):r --> (y,z):r --> (x,z):r)"
    1.21 -    converse_def  "converse(r) == {z. (? w:r. ? x y. w=(x,y) & z=(y,x))}"
    1.22 -    Domain_def    "Domain(r) == {z. ! x. (z=x --> (? y. (x,y):r))}"
    1.23 +    converse_def  "converse(r) == {(y,x). (x,y):r}"
    1.24 +    Domain_def    "Domain(r) == {x. ? y. (x,y):r}"
    1.25      Range_def     "Range(r) == Domain(converse(r))"
    1.26      Image_def     "r ^^ s == {y. y:Range(r) &  (? x:s. (x,y):r)}"
    1.27  end