}.
nrecord magma (A: magma_type) : Type[1] ≝
- { mcarr:> Ω \sup A;
+ { mcarr:> qpowerclass A;
op_closed: ∀x,y. x ∈ mcarr → y ∈ mcarr → op A x y ∈ mcarr
}.
-(* le coercion non vanno; sospetto setoid1_of_setoid *)
+
+ncoercion mcarr' : ∀A. ∀M: magma A. carr1 (qpowerclass_setoid (mtcarr A))
+ ≝ λA.λM: magma A.mcarr ? M
+ on _M: magma ? to carr1 (qpowerclass_setoid (mtcarr ?)).
+
nrecord magma_morphism_type (A,B: magma_type) : Type[0] ≝
{ mmcarr:> unary_morphism A B;
- mmprop: ∀x,y:carr A. mmcarr (op ? x y) = op … (mmcarr x) (mmcarr y)
+ mmprop: ∀x,y:A. mmcarr (op ? x y) = op … (mmcarr x) (mmcarr y)
}.
-(* le coercion non vanno *)
+
nrecord magma_morphism (A) (B) (Ma: magma A) (Mb: magma B) : Type[0] ≝
{ mmmcarr:> magma_morphism_type A B;
- mmclosed: ∀x:carr A. x ∈ mcarr ? Ma → mmmcarr x ∈ mcarr ? Mb
+ mmclosed: ∀x:A. x ∈ mcarr ? Ma → mmmcarr x ∈ mcarr ? Mb
}.
+
(*
ndefinition mm_image:
∀A,B. ∀Ma: magma A. ∀Mb: magma B. magma_morphism … Ma Mb → magma B.
ndefinition m_intersect: ∀A. magma A → magma A → magma A.
#A; #M1; #M2;
napply (mk_magma …)
- [ napply (intersects_ok ? M1 M2)
+ [ napply (intersect_ok ? M1 M2)
| #x; #y; nwhd in ⊢ (% → % → %); *; #Hx1; #Hx2; *; #Hy1; #Hy2;
napply conj; napply op_closed; nassumption ]
nqed.
\ No newline at end of file