src/HOL/Relation.thy
author berghofe
Tue, 30 Jun 1998 20:51:15 +0200
changeset 5102 8c782c25a11e
parent 4746 a5dcd7e4a37d
child 5608 a82a038a3e7a
permissions -rw-r--r--
Adapted to new inductive definition package.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1475
7f5a4cd08209 expanded tabs; renamed subtype to typedef;
clasohm
parents: 1454
diff changeset
     1
(*  Title:      Relation.thy
1128
64b30e3cc6d4 Trancl is now based on Relation which used to be in Integ.
nipkow
parents:
diff changeset
     2
    ID:         $Id$
1983
f3f7bf0079fa Simplification and tidying of definitions
paulson
parents: 1695
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
f3f7bf0079fa Simplification and tidying of definitions
paulson
parents: 1695
diff changeset
     4
    Copyright   1996  University of Cambridge
1128
64b30e3cc6d4 Trancl is now based on Relation which used to be in Integ.
nipkow
parents:
diff changeset
     5
*)
64b30e3cc6d4 Trancl is now based on Relation which used to be in Integ.
nipkow
parents:
diff changeset
     6
64b30e3cc6d4 Trancl is now based on Relation which used to be in Integ.
nipkow
parents:
diff changeset
     7
Relation = Prod +
64b30e3cc6d4 Trancl is now based on Relation which used to be in Integ.
nipkow
parents:
diff changeset
     8
consts
1475
7f5a4cd08209 expanded tabs; renamed subtype to typedef;
clasohm
parents: 1454
diff changeset
     9
    id          :: "('a * 'a)set"               (*the identity relation*)
7f5a4cd08209 expanded tabs; renamed subtype to typedef;
clasohm
parents: 1454
diff changeset
    10
    O           :: "[('b * 'c)set, ('a * 'b)set] => ('a * 'c)set" (infixr 60)
4746
a5dcd7e4a37d inverse -> converse
paulson
parents: 4528
diff changeset
    11
    converse    :: "('a*'b) set => ('b*'a) set"     ("(_^-1)" [1000] 999)
1695
0f9b9eda2a2c Generalized types of some of the operators (thanks to Norbert Voelker)
nipkow
parents: 1475
diff changeset
    12
    "^^"        :: "[('a*'b) set,'a set] => 'b set" (infixl 90)
0f9b9eda2a2c Generalized types of some of the operators (thanks to Norbert Voelker)
nipkow
parents: 1475
diff changeset
    13
    Domain      :: "('a*'b) set => 'a set"
0f9b9eda2a2c Generalized types of some of the operators (thanks to Norbert Voelker)
nipkow
parents: 1475
diff changeset
    14
    Range       :: "('a*'b) set => 'b set"
4528
ff22e16c5f2f added Univalent
oheimb
parents: 3499
diff changeset
    15
    trans       :: "('a * 'a)set => bool"       (*transitivity predicate*)
ff22e16c5f2f added Univalent
oheimb
parents: 3499
diff changeset
    16
    Univalent   :: "('a * 'b)set => bool"
1128
64b30e3cc6d4 Trancl is now based on Relation which used to be in Integ.
nipkow
parents:
diff changeset
    17
defs
1983
f3f7bf0079fa Simplification and tidying of definitions
paulson
parents: 1695
diff changeset
    18
    id_def        "id == {p. ? x. p = (x,x)}"
f3f7bf0079fa Simplification and tidying of definitions
paulson
parents: 1695
diff changeset
    19
    comp_def      "r O s == {(x,z). ? y. (x,y):s & (y,z):r}"
4746
a5dcd7e4a37d inverse -> converse
paulson
parents: 4528
diff changeset
    20
    converse_def   "r^-1 == {(y,x). (x,y):r}"
1454
d0266c81a85e Streamlined defs in Relation and added new intro/elim rules to do with
nipkow
parents: 1128
diff changeset
    21
    Domain_def    "Domain(r) == {x. ? y. (x,y):r}"
3439
54785105178c converse -> ^-1
nipkow
parents: 1983
diff changeset
    22
    Range_def     "Range(r) == Domain(r^-1)"
1983
f3f7bf0079fa Simplification and tidying of definitions
paulson
parents: 1695
diff changeset
    23
    Image_def     "r ^^ s == {y. ? x:s. (x,y):r}"
4528
ff22e16c5f2f added Univalent
oheimb
parents: 3499
diff changeset
    24
    trans_def     "trans(r) == (!x y z. (x,y):r --> (y,z):r --> (x,z):r)"
ff22e16c5f2f added Univalent
oheimb
parents: 3499
diff changeset
    25
    Univalent_def "Univalent r == !x y. (x,y):r --> (!z. (x,z):r --> y=z)"
1128
64b30e3cc6d4 Trancl is now based on Relation which used to be in Integ.
nipkow
parents:
diff changeset
    26
end