src/HOL/Relation.thy
author paulson
Mon Mar 16 16:50:50 1998 +0100 (1998-03-16)
changeset 4746 a5dcd7e4a37d
parent 4528 ff22e16c5f2f
child 5608 a82a038a3e7a
permissions -rw-r--r--
inverse -> converse
[It is standard terminology and also used in ZF]
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
clasohm@1475
     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
paulson@1983
    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