-(*
-notation "hvbox(a break = \sub \ID b)" non associative with precedence 45
-for @{ 'eqID $a $b }.
-
-notation > "hvbox(a break =_\ID b)" non associative with precedence 45
-for @{ cic:/matita/logic/equality/eq.ind#xpointer(1/1) ? $a $b }.
-
-interpretation "ID eq" 'eqID x y = (cic:/matita/logic/equality/eq.ind#xpointer(1/1) ? x y).
-*)
-
-nrecord setoid : Type[1] ≝
- { carr:> Type[0];
- eq: equivalence_relation carr
- }.
-
-interpretation "setoid eq" 'eq t x y = (eq_rel ? (eq t) x y).
+nrecord setoid : Type[1] ≝ {
+ carr:> Type[0];
+ eq0: equivalence_relation carr
+}.
+
+(* activate non uniform coercions on: Type → setoid *)
+unification hint 0 ≔ R : setoid;
+ MR ≟ carr R,
+ lock ≟ mk_lock1 Type[0] MR setoid R
+(* ---------------------------------------- *) ⊢
+ setoid ≡ force1 ? MR lock.
+
+notation < "[\setoid\ensp\of term 19 x]" non associative with precedence 90 for @{'mk_setoid $x}.
+interpretation "mk_setoid" 'mk_setoid x = (mk_setoid x ?).
+
+interpretation "setoid eq" 'eq t x y = (eq_rel ? (eq0 t) x y).
+(* single = is for the abstract equality of setoids, == is for concrete
+ equalities (that may be lifted to the setoid level when needed *)
+notation < "hvbox(a break mpadded width -50% (=)= b)" non associative with precedence 45 for @{ 'eq_low $a $b }.
+notation > "a == b" non associative with precedence 45 for @{ 'eq_low $a $b }.