From: Claudio Sacerdoti Coen Date: Thu, 6 Aug 2009 13:45:55 +0000 (+0000) Subject: Hmmm: I don't see much gain here. X-Git-Tag: make_still_working~3560 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=857a0fc157e903b1475ad6c76b03914e342fe8f6;p=helm.git Hmmm: I don't see much gain here. --- diff --git a/helm/software/matita/nlibrary/algebra/magmas.ma b/helm/software/matita/nlibrary/algebra/magmas.ma index 103d17557..24203f209 100644 --- a/helm/software/matita/nlibrary/algebra/magmas.ma +++ b/helm/software/matita/nlibrary/algebra/magmas.ma @@ -20,19 +20,24 @@ nrecord magma_type : Type[1] ≝ }. 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. @@ -68,7 +73,7 @@ nqed. 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