src/HOL/Relation.thy
 changeset 5978 fa2c2dd74f8c parent 5608 a82a038a3e7a child 6806 43c081a0858d
```     1.1 --- a/src/HOL/Relation.thy	Thu Nov 26 17:40:10 1998 +0100
1.2 +++ b/src/HOL/Relation.thy	Fri Nov 27 10:40:29 1998 +0100
1.3 @@ -5,22 +5,34 @@
1.4  *)
1.5
1.6  Relation = Prod +
1.7 +
1.8  consts
1.9 -    Id          :: "('a * 'a)set"               (*the identity relation*)
1.10 -    O           :: "[('b * 'c)set, ('a * 'b)set] => ('a * 'c)set" (infixr 60)
1.11 -    converse    :: "('a*'b) set => ('b*'a) set"     ("(_^-1)" [1000] 999)
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 -    trans       :: "('a * 'a)set => bool"       (*transitivity predicate*)
1.16 -    Univalent   :: "('a * 'b)set => bool"
1.17 +  O           :: "[('b * 'c)set, ('a * 'b)set] => ('a * 'c)set" (infixr 60)
1.18 +  converse    :: "('a*'b) set => ('b*'a) set"     ("(_^-1)" [1000] 999)
1.19 +  "^^"        :: "[('a*'b) set,'a set] => 'b set" (infixl 90)
1.20 +
1.21  defs
1.22 -    Id_def        "Id == {p. ? x. p = (x,x)}"
1.23 -    comp_def      "r O s == {(x,z). ? y. (x,y):s & (y,z):r}"
1.24 -    converse_def   "r^-1 == {(y,x). (x,y):r}"
1.25 -    Domain_def    "Domain(r) == {x. ? y. (x,y):r}"
1.26 -    Range_def     "Range(r) == Domain(r^-1)"
1.27 -    Image_def     "r ^^ s == {y. ? x:s. (x,y):r}"
1.28 -    trans_def     "trans(r) == (!x y z. (x,y):r --> (y,z):r --> (x,z):r)"
1.29 -    Univalent_def "Univalent r == !x y. (x,y):r --> (!z. (x,z):r --> y=z)"
1.30 +  comp_def      "r O s == {(x,z). ? y. (x,y):s & (y,z):r}"
1.31 +  converse_def  "r^-1 == {(y,x). (x,y):r}"
1.32 +  Image_def     "r ^^ s == {y. ? x:s. (x,y):r}"
1.33 +
1.34 +constdefs
1.35 +  Id          :: "('a * 'a)set"               (*the identity relation*)
1.36 +      "Id == {p. ? x. p = (x,x)}"
1.37 +
1.38 +  diag   :: "'a set => ('a * 'a)set"
1.39 +    "diag(A) == UN x:A. {(x,x)}"
1.40 +
1.41 +  Domain      :: "('a*'b) set => 'a set"
1.42 +    "Domain(r) == {x. ? y. (x,y):r}"
1.43 +
1.44 +  Range       :: "('a*'b) set => 'b set"
1.45 +    "Range(r) == Domain(r^-1)"
1.46 +
1.47 +  trans       :: "('a * 'a)set => bool"       (*transitivity predicate*)
1.48 +    "trans(r) == (!x y z. (x,y):r --> (y,z):r --> (x,z):r)"
1.49 +
1.50 +  Univalent   :: "('a * 'b)set => bool"
1.51 +    "Univalent r == !x y. (x,y):r --> (!z. (x,z):r --> y=z)"
1.52 +
1.53  end
```