From: Claudio Sacerdoti Coen Date: Wed, 8 Jul 2009 03:30:52 +0000 (+0000) Subject: Hmmmm. This way we need "canonical structures" also for local definitions => BAD X-Git-Tag: make_still_working~3733 X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=commitdiff_plain;h=4e7271a14ed69938803a64a67e8c8bb61ff6d89e Hmmmm. This way we need "canonical structures" also for local definitions => BAD --- diff --git a/helm/software/matita/nlibrary/algebra/magmas.ma b/helm/software/matita/nlibrary/algebra/magmas.ma index 3424944be..f58270a38 100644 --- a/helm/software/matita/nlibrary/algebra/magmas.ma +++ b/helm/software/matita/nlibrary/algebra/magmas.ma @@ -15,7 +15,41 @@ include "sets/sets.ma". nrecord magma (A: Type) : Type[1] ≝ - { carr: Ω \sup A; + { mcarr: Ω \sup A; op: A → A → A; - op_closed: ∀x,y. x ∈ carr → y ∈ carr → op x y ∈ carr - }. \ No newline at end of file + op_closed: ∀x,y. x ∈ mcarr → y ∈ mcarr → op x y ∈ mcarr + }. +(* this is a projection *) +ndefinition mcarr ≝ λA.λM: magma A. match M with [ mk_magma mcarr _ _ ⇒ mcarr ]. +ndefinition op ≝ λA.λM: magma A. match M with [ mk_magma _ op _ ⇒ op ]. + +(* to be splitted *) +nrecord magma_morphism (A,B: Type) (Ma: magma A) (Mb: magma B) : Type ≝ + { mmcarr: A → B; + mmclosed: ∀x. x ∈ mcarr ? Ma → mmcarr x ∈ mcarr ? Mb; + (* need a canonical structure in next line? *) + mmprop: ∀x,y:A. x ∈ mcarr ? Ma → y ∈ mcarr ? Ma → mmcarr (op ? Ma x y) = op B Mb (mmcarr x) (mmcarr y) + }. +(* this is a projection *) +ndefinition mmcarr ≝ + λA,B,Ma,Mb.λf: magma_morphism A B Ma Mb. match f with [ mk_magma_morphism f _ _ ⇒ f ]. + +ndefinition sub_magma ≝ + λA.λM1,M2: magma A. ∀x. x ∈ mcarr ? M1 → x ∈ mcarr ? M2. + +ndefinition image: ∀A,B. (A → B) → Ω \sup A → Ω \sup B ≝ + λA,B,f,Sa. {y | ∃x. x ∈ Sa ∧ f x = y}. + +naxiom daemon: False. + +ndefinition mm_image: + ∀A,B. ∀Ma: magma A. ∀Mb: magma B. magma_morphism ?? Ma Mb → magma B. + #A; #B; #Ma; #Mb; #f; + napply (mk_magma ????) + [ napply (image ?? (mmcarr ???? f) (mcarr ? Ma)) + | napply (op ? Mb) + | #x; #y; *; #x0; #Hx0; *; #y0; #Hy0; nwhd; + napply (ex_intro ????) + [ napply (op ? Ma x0 y0) (* BAD HERE! need a canonical structure? *) + | nelim daemon ]] +nqed. \ No newline at end of file