From de1ac2d7795925edb488e4fac30d5e80537bfe33 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Tue, 4 Aug 2009 19:47:46 +0000 Subject: [PATCH] Hmmm, quite broken now. --- .../matita/nlibrary/algebra/magmas.ma | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/helm/software/matita/nlibrary/algebra/magmas.ma b/helm/software/matita/nlibrary/algebra/magmas.ma index a879679a9..f3d3fe352 100644 --- a/helm/software/matita/nlibrary/algebra/magmas.ma +++ b/helm/software/matita/nlibrary/algebra/magmas.ma @@ -15,27 +15,33 @@ include "sets/sets.ma". nrecord magma_type : Type[1] ≝ - { mcarr:> setoid; - op: mcarr → mcarr → mcarr + { mtcarr:> setoid; + op: binary_morphism mtcarr mtcarr mtcarr }. nrecord magma (A: magma_type) : Type[1] ≝ { mcarr:> powerset_setoid1 A; op_closed: ∀x,y. x ∈ mcarr → y ∈ mcarr → op A x y ∈ mcarr }. - -nrecord magma_morphism_type (A,B: magma_type) : Type ≝ - { mmcarr:1> A → B; - mmprop: ∀x,y. mmcarr (op … x y) = op … (mmcarr x) (mmcarr y) +(* le coercion non vanno; sospetto setoid1_of_setoid *) +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) }. - -nrecord magma_morphism (A) (B) (Ma: magma A) (Mb: magma B) : Type ≝ +(* 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. x ∈ Ma → mmmcarr x ∈ Mb + mmclosed: ∀x:carr A. x ∈ mcarr ? Ma → mmmcarr x ∈ mcarr ? Mb }. - -ndefinition image: ∀A,B. (A → B) → Ω \sup A → Ω \sup B ≝ - λA,B,f,Sa. {y | ∃x. x ∈ Sa ∧ f x = y}. +(* +(* qui non funziona una cippa *) +ndefinition image: ∀A,B. (carr A → carr B) → Ω \sup A → Ω \sup B ≝ + λA,B:setoid.λf:carr A → carr B.λSa:Ω \sup A. + {y | ∃x. x ∈ Sa ∧ eq_rel (carr B) (eq B) ? ?(*(f x) y*)}. + ##[##2: napply (f x); ##|##3: napply y] + #a; #a'; #H; nwhd; nnormalize; (* per togliere setoid1_of_setoid *) napply (mk_iff ????); + *; #x; #Hx; napply (ex_intro … x) + [ napply (. (#‡(#‡#))); ndefinition mm_image: ∀A,B. ∀Ma: magma A. ∀Mb: magma B. magma_morphism … Ma Mb → magma B. @@ -76,4 +82,5 @@ ndefinition m_intersect: ∀A. magma A → magma A → magma A. [ napply (M1 ∩ M2) | #x; #y; nwhd in ⊢ (% → % → %); *; #Hx1; #Hx2; *; #Hy1; #Hy2; napply conj; napply op_closed; nassumption ] -nqed. \ No newline at end of file +nqed. +*) \ No newline at end of file -- 2.39.2