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 nrecord setoid2: Type[3] ≝
20 eq2: equivalence_relation2 carr2
23 ndefinition setoid2_of_setoid1: setoid1 → setoid2.
24 #s; @ (carr1 s); @ (carr1 s) (eq1 ?)
30 (*ncoercion setoid1_of_setoid : ∀s:setoid. setoid1 ≝ setoid1_of_setoid
31 on _s: setoid to setoid1.*)
32 (*prefer coercion Type_OF_setoid.*)
34 interpretation "setoid2 eq" 'eq t x y = (eq_rel2 ? (eq2 t) x y).
35 interpretation "setoid1 eq" 'eq t x y = (eq_rel1 ? (eq1 t) x y).
36 interpretation "setoid eq" 'eq t x y = (eq_rel ? (eq t) x y).
39 notation > "hvbox(a break =_12 b)" non associative with precedence 45
40 for @{ eq_rel2 (carr2 (setoid2_of_setoid1 ?)) (eq2 (setoid2_of_setoid1 ?)) $a $b }.
42 notation > "hvbox(a break =_0 b)" non associative with precedence 45
43 for @{ eq_rel ? (eq ?) $a $b }.
44 notation > "hvbox(a break =_1 b)" non associative with precedence 45
45 for @{ eq_rel1 ? (eq1 ?) $a $b }.
46 notation > "hvbox(a break =_2 b)" non associative with precedence 45
47 for @{ eq_rel2 ? (eq2 ?) $a $b }.
49 interpretation "setoid2 symmetry" 'invert r = (sym2 ???? r).
50 interpretation "setoid1 symmetry" 'invert r = (sym1 ???? r).
51 interpretation "setoid symmetry" 'invert r = (sym ???? r).
52 notation ".= r" with precedence 50 for @{'trans $r}.
53 interpretation "trans2" 'trans r = (trans2 ????? r).
54 interpretation "trans1" 'trans r = (trans1 ????? r).
55 interpretation "trans" 'trans r = (trans ????? r).
57 nrecord unary_morphism2 (A,B: setoid2) : Type[2] ≝
59 prop12: ∀a,a'. eq2 ? a a' → eq2 ? (fun12 a) (fun12 a')
62 nrecord binary_morphism2 (A,B,C:setoid2) : Type[2] ≝
64 prop22: ∀a,a',b,b'. eq2 ? a a' → eq2 ? b b' → eq2 ? (fun22 a b) (fun22 a' b')
67 interpretation "prop12" 'prop1 c = (prop12 ????? c).
68 interpretation "prop22" 'prop2 l r = (prop22 ???????? l r).
69 interpretation "refl2" 'refl = (refl2 ???).