src/HOL/Relation.thy
author nipkow
Fri Oct 02 14:28:39 1998 +0200 (1998-10-02)
changeset 5608 a82a038a3e7a
parent 4746 a5dcd7e4a37d
child 5978 fa2c2dd74f8c
permissions -rw-r--r--
id <-> Id
clasohm@1475
     1
(*  Title:      Relation.thy
nipkow@1128
     2
    ID:         $Id$
paulson@1983
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
paulson@1983
     4
    Copyright   1996  University of Cambridge
nipkow@1128
     5
*)
nipkow@1128
     6
nipkow@1128
     7
Relation = Prod +
nipkow@1128
     8
consts
nipkow@5608
     9
    Id          :: "('a * 'a)set"               (*the identity relation*)
clasohm@1475
    10
    O           :: "[('b * 'c)set, ('a * 'b)set] => ('a * 'c)set" (infixr 60)
paulson@4746
    11
    converse    :: "('a*'b) set => ('b*'a) set"     ("(_^-1)" [1000] 999)
nipkow@1695
    12
    "^^"        :: "[('a*'b) set,'a set] => 'b set" (infixl 90)
nipkow@1695
    13
    Domain      :: "('a*'b) set => 'a set"
nipkow@1695
    14
    Range       :: "('a*'b) set => 'b set"
oheimb@4528
    15
    trans       :: "('a * 'a)set => bool"       (*transitivity predicate*)
oheimb@4528
    16
    Univalent   :: "('a * 'b)set => bool"
nipkow@1128
    17
defs
nipkow@5608
    18
    Id_def        "Id == {p. ? x. p = (x,x)}"
paulson@1983
    19
    comp_def      "r O s == {(x,z). ? y. (x,y):s & (y,z):r}"
paulson@4746
    20
    converse_def   "r^-1 == {(y,x). (x,y):r}"
nipkow@1454
    21
    Domain_def    "Domain(r) == {x. ? y. (x,y):r}"
nipkow@3439
    22
    Range_def     "Range(r) == Domain(r^-1)"
paulson@1983
    23
    Image_def     "r ^^ s == {y. ? x:s. (x,y):r}"
oheimb@4528
    24
    trans_def     "trans(r) == (!x y z. (x,y):r --> (y,z):r --> (x,z):r)"
oheimb@4528
    25
    Univalent_def "Univalent r == !x y. (x,y):r --> (!z. (x,z):r --> y=z)"
nipkow@1128
    26
end