From 40afbcc473baf6de47012181f2b14356d4b8d23a Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Fri, 24 Jul 2009 22:05:44 +0000 Subject: [PATCH] No more hand-made coercions. --- helm/software/matita/nlibrary/algebra/magmas.ma | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/helm/software/matita/nlibrary/algebra/magmas.ma b/helm/software/matita/nlibrary/algebra/magmas.ma index 22289b3c2..1c829997a 100644 --- a/helm/software/matita/nlibrary/algebra/magmas.ma +++ b/helm/software/matita/nlibrary/algebra/magmas.ma @@ -15,32 +15,24 @@ include "sets/sets.ma". nrecord pre_magma : Type[1] ≝ - { carr: Type; + { carr:> Type; op: carr → carr → carr }. -ncoercion carr: ∀M:pre_magma. Type ≝ carr on _M: pre_magma to Type. nrecord magma (A: pre_magma) : Type[1] ≝ - { mcarr: Ω \sup A; + { mcarr:> Ω \sup A; op_closed: ∀x,y. x ∈ mcarr → y ∈ mcarr → op A x y ∈ mcarr }. -ncoercion mcarr: ∀A.∀M: magma A. Ω \sup A ≝ mcarr - on _M: magma ? to Ω \sup ?. nrecord pre_magma_morphism (A,B: pre_magma) : Type ≝ - { mmcarr: A → B; + { mmcarr:1> A → B; mmprop: ∀x,y. mmcarr (op ? x y) = op ? (mmcarr x) (mmcarr y) }. -ncoercion mmcarr: ∀A,B.∀M: pre_magma_morphism A B. A → B ≝ mmcarr - on _M: pre_magma_morphism ? ? to ∀_.?. nrecord magma_morphism (A) (B) (Ma: magma A) (Mb: magma B) : Type ≝ - { mmmcarr: pre_magma_morphism A B; + { mmmcarr:> pre_magma_morphism A B; mmclosed: ∀x. x ∈ Ma → mmmcarr x ∈ Mb }. -ncoercion mmmcarr : ∀A,B,Ma,Mb.∀f: magma_morphism A B Ma Mb. pre_magma_morphism A B - ≝ mmmcarr - on _f: magma_morphism ???? to pre_magma_morphism ??. ndefinition sub_magma ≝ λA.λM1,M2: magma A. M1 ⊆ M2. -- 2.39.2