1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "properties/relations2.ma".
16 include "sets/setoids1.ma".
18 record setoid2: Type[3] ≝
20 eq2: equivalence_relation2 carr2
23 definition setoid2_of_setoid1: setoid1 → setoid2.
24 #s @(mk_setoid2 … (carr1 s))
25 @(mk_equivalence_relation2 … (carr1 s) (eq1 ?))
29 (*ncoercion setoid1_of_setoid : ∀s:setoid. setoid1 ≝ setoid1_of_setoid
30 on _s: setoid to setoid1.*)
31 (*prefer coercion Type_OF_setoid.*)
33 interpretation "setoid2 eq" 'eq t x y = (eq_rel2 ? (eq2 t) x y).
34 interpretation "setoid1 eq" 'eq t x y = (eq_rel1 ? (eq1 t) x y).
35 interpretation "setoid eq" 'eq t x y = (eq_rel ? (eq0 t) x y).
38 notation > "hvbox(a break =_12 b)" non associative with precedence 45
39 for @{ eq_rel2 (carr2 (setoid2_of_setoid1 ?)) (eq2 (setoid2_of_setoid1 ?)) $a $b }.
41 notation > "hvbox(a break =_0 b)" non associative with precedence 45
42 for @{ eq_rel ? (eq0 ?) $a $b }.
43 notation > "hvbox(a break =_1 b)" non associative with precedence 45
44 for @{ eq_rel1 ? (eq1 ?) $a $b }.
45 notation > "hvbox(a break =_2 b)" non associative with precedence 45
46 for @{ eq_rel2 ? (eq2 ?) $a $b }.
48 interpretation "setoid2 symmetry" 'invert r = (sym2 ???? r).
49 interpretation "setoid1 symmetry" 'invert r = (sym1 ???? r).
50 interpretation "setoid symmetry" 'invert r = (sym ???? r).
51 notation ".= r" with precedence 50 for @{'trans $r}.
52 interpretation "trans2" 'trans r = (trans2 ????? r).
53 interpretation "trans1" 'trans r = (trans1 ????? r).
54 interpretation "trans" 'trans r = (trans ????? r).
56 record unary_morphism2 (A,B: setoid2) : Type[2] ≝
58 prop12: ∀a,a'. eq2 ? a a' → eq2 ? (fun12 a) (fun12 a')
61 record binary_morphism2 (A,B,C:setoid2) : Type[2] ≝
63 prop22: ∀a,a',b,b'. eq2 ? a a' → eq2 ? b b' → eq2 ? (fun22 a b) (fun22 a' b')
66 interpretation "prop12" 'prop1 c = (prop12 ????? c).
67 interpretation "prop22" 'prop2 l r = (prop22 ???????? l r).
68 interpretation "refl2" 'refl = (refl2 ???).