equal
deleted
inserted
replaced
5 *) |
5 *) |
6 |
6 |
7 Relation = Prod + |
7 Relation = Prod + |
8 |
8 |
9 consts |
9 consts |
10 O :: "[('b * 'c)set, ('a * 'b)set] => ('a * 'c)set" (infixr 60) |
10 O :: "[('b * 'c)set, ('a * 'b)set] => ('a * 'c)set" (infixr 60) |
11 converse :: "('a*'b) set => ('b*'a) set" ("(_^-1)" [1000] 999) |
11 converse :: "('a*'b) set => ('b*'a) set" ("(_^-1)" [1000] 999) |
12 "^^" :: "[('a*'b) set,'a set] => 'b set" (infixl 90) |
12 "^^" :: "[('a*'b) set,'a set] => 'b set" (infixl 90) |
13 |
13 |
14 defs |
14 defs |
15 comp_def "r O s == {(x,z). ? y. (x,y):s & (y,z):r}" |
15 comp_def "r O s == {(x,z). ? y. (x,y):s & (y,z):r}" |
16 converse_def "r^-1 == {(y,x). (x,y):r}" |
16 converse_def "r^-1 == {(y,x). (x,y):r}" |
17 Image_def "r ^^ s == {y. ? x:s. (x,y):r}" |
17 Image_def "r ^^ s == {y. ? x:s. (x,y):r}" |
18 |
18 |
19 constdefs |
19 constdefs |
20 Id :: "('a * 'a)set" (*the identity relation*) |
20 Id :: "('a * 'a)set" (*the identity relation*) |
21 "Id == {p. ? x. p = (x,x)}" |
21 "Id == {p. ? x. p = (x,x)}" |
22 |
22 |
42 "trans(r) == (!x y z. (x,y):r --> (y,z):r --> (x,z):r)" |
42 "trans(r) == (!x y z. (x,y):r --> (y,z):r --> (x,z):r)" |
43 |
43 |
44 Univalent :: "('a * 'b)set => bool" |
44 Univalent :: "('a * 'b)set => bool" |
45 "Univalent r == !x y. (x,y):r --> (!z. (x,z):r --> y=z)" |
45 "Univalent r == !x y. (x,y):r --> (!z. (x,z):r --> y=z)" |
46 |
46 |
|
47 fun_rel_comp :: "['a => 'b, ('b * 'c) set] => ('a => 'c) set" |
|
48 "fun_rel_comp f R == {g. !x. (f x, g x) : R}" |
|
49 |
47 syntax |
50 syntax |
48 reflexive :: "('a * 'a)set => bool" (*reflexivity over a type*) |
51 reflexive :: "('a * 'a)set => bool" (*reflexivity over a type*) |
49 |
52 |
50 translations |
53 translations |
51 "reflexive" == "refl UNIV" |
54 "reflexive" == "refl UNIV" |