From: Claudio Sacerdoti Coen Date: Mon, 18 Jan 2010 12:00:31 +0000 (+0000) Subject: // used everywhere! X-Git-Tag: make_still_working~3108 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=661403facfb7ca53b58635a95904787ae393bde5;p=helm.git // used everywhere! --- diff --git a/helm/software/matita/nlibrary/sets/sets.ma b/helm/software/matita/nlibrary/sets/sets.ma index 113654ad3..241282c1a 100644 --- a/helm/software/matita/nlibrary/sets/sets.ma +++ b/helm/software/matita/nlibrary/sets/sets.ma @@ -41,22 +41,19 @@ ndefinition big_intersection ≝ λA,B.λT:Ω^A.λf:A → Ω^B.{ x | ∀i. i ∈ ndefinition full_set: ∀A. Ω^A ≝ λA.{ x | True }. nlemma subseteq_refl: ∀A.∀S: Ω^A. S ⊆ S. - #A; #S; #x; #H; nassumption. -nqed. +//.nqed. nlemma subseteq_trans: ∀A.∀S,T,U: Ω^A. S ⊆ T → T ⊆ U → S ⊆ U. - #A; #S; #T; #U; #H1; #H2; #x; #P; napply H2; napply H1; nassumption. -nqed. +/3/.nqed. include "properties/relations1.ma". ndefinition seteq: ∀A. equivalence_relation1 (Ω^A). #A; @ [ napply (λS,S'. S ⊆ S' ∧ S' ⊆ S) - | #S; @; napply subseteq_refl - | #S; #S'; *; #H1; #H2; @; nassumption - | #S; #T; #U; *; #H1; #H2; *; #H3; #H4; @; napply subseteq_trans; - ##[##2,5: nassumption |##1,4: ##skip |##*: nassumption]##] + | /2/ + | #S; #S'; *; /2/ + | #S; #T; #U; *; #H1; #H2; *; /3/] nqed. include "sets/setoids1.ma". @@ -65,7 +62,7 @@ include "sets/setoids1.ma". ncoercion full_set : ∀A:Type[0]. Ω^A ≝ full_set on A: Type[0] to (Ω^?). ndefinition powerclass_setoid: Type[0] → setoid1. - #A; @[ napply (Ω^A)| napply seteq ] + #A; @(Ω^A);//. nqed. include "hints_declaration.ma". @@ -98,17 +95,11 @@ nqed. ncoercion Full_set: ∀A. ext_powerclass A ≝ Full_set on A: setoid to ext_powerclass ?. ndefinition ext_seteq: ∀A. equivalence_relation1 (𝛀^A). - #A; @ - [ napply (λS,S'. S = S') - | #S; napply (refl1 ? (seteq A)) - | #S; #S'; napply (sym1 ? (seteq A)) - | #S; #T; #U; napply (trans1 ? (seteq A))] + #A; @ [ napply (λS,S'. S = S') ] /2/. nqed. ndefinition ext_powerclass_setoid: setoid → setoid1. - #A; @ - [ napply (ext_powerclass A) - | napply (ext_seteq A) ] + #A; @ (ext_seteq A). nqed. unification hint 0 ≔ A; @@ -126,7 +117,7 @@ on _x : (carr1 (ext_powerclass_setoid ?)) to (Ω^?). nlemma mem_ext_powerclass_setoid_is_morph: ∀A. binary_morphism1 (setoid1_of_setoid A) (ext_powerclass_setoid A) CPROP. #A; @ - [ napply (λx,S. x ∈ S) + [ napply (λx,S. x ∈ S) | #a; #a'; #b; #b'; #Ha; *; #Hb1; #Hb2; @; #H; ##[ napply Hb1; napply (. (ext_prop … Ha^-1)); nassumption; ##| napply Hb2; napply (. (ext_prop … Ha)); nassumption; @@ -147,11 +138,7 @@ unification hint 0 ≔ A:setoid, x, S; nlemma subseteq_is_morph: ∀A. binary_morphism1 (ext_powerclass_setoid A) (ext_powerclass_setoid A) CPROP. #A; @ [ napply (λS,S'. S ⊆ S') - | #a; #a'; #b; #b'; *; #Ha1; #Ha2; *; #Hb1; #Hb2; @; #H - [ napply (subseteq_trans … a) - [ nassumption | napply (subseteq_trans … b); nassumption ] - ##| napply (subseteq_trans … a') - [ nassumption | napply (subseteq_trans … b'); nassumption ] ##] + | #a; #a'; #b; #b'; *; #Ha1; #Ha2; *;/4/] nqed. unification hint 0 ≔ A,a,a' @@ -176,11 +163,7 @@ unification hint 0 ≔ nlemma intersect_is_morph: ∀A. binary_morphism1 (powerclass_setoid A) (powerclass_setoid A) (powerclass_setoid A). #A; @ (λS,S'. S ∩ S'); - #a; #a'; #b; #b'; *; #Ha1; #Ha2; *; #Hb1; #Hb2; @; #x; nnormalize; *; #Ka; #Kb; @ - [ napply Ha1; nassumption - | napply Hb1; nassumption - | napply Ha2; nassumption - | napply Hb2; nassumption] + #a; #a'; #b; #b'; *; #Ha1; #Ha2; *; #Hb1; #Hb2; @; #x; nnormalize; *;/3/. nqed. alias symbol "hint_decl" = "hint_decl_Type1". @@ -298,30 +281,26 @@ nqed. ndefinition eqrel_of_morphism: ∀A,B. unary_morphism A B → compatible_equivalence_relation A. #A; #B; #f; @ - [ @ - [ napply (λx,y. f x = f y) - | #x; napply refl | #x; #y; napply sym | #x; #y; #z; napply trans] + [ @ [ napply (λx,y. f x = f y) ] /2/; ##| #x; #x'; #H; nwhd; alias symbol "prop1" = "prop1". -napply (.= (†H)); napply refl ] +napply (.= (†H)); // ] nqed. ndefinition canonical_proj: ∀A,R. unary_morphism A (quotient A R). #A; #R; @ - [ napply (λx.x) | #a; #a'; #H; napply (compatibility … R … H) ] + [ napply (λx.x) | #a; #a'; #H; napply (compatibility … R … H) ] nqed. ndefinition quotiented_mor: ∀A,B.∀f:unary_morphism A B. unary_morphism (quotient … (eqrel_of_morphism … f)) B. - #A; #B; #f; @ - [ napply f | #a; #a'; #H; nassumption] + #A; #B; #f; @ [ napply f ] //. nqed. nlemma first_omomorphism_theorem_functions1: ∀A,B.∀f: unary_morphism A B. ∀x. f x = quotiented_mor … (canonical_proj … (eqrel_of_morphism … f) x). - #A; #B; #f; #x; napply refl; -nqed. +//. nqed. alias symbol "eq" = "setoid eq". ndefinition surjective ≝ @@ -335,9 +314,7 @@ ndefinition injective ≝ nlemma first_omomorphism_theorem_functions2: ∀A,B.∀f: unary_morphism A B. surjective … (Full_set ?) (Full_set ?) (canonical_proj ? (eqrel_of_morphism … f)). - #A; #B; #f; nwhd; #y; #Hy; @ y; @ I ; napply refl; - (* bug, prova @ I refl *) -nqed. +/3/. nqed. nlemma first_omomorphism_theorem_functions3: ∀A,B.∀f: unary_morphism A B. @@ -353,16 +330,15 @@ nrecord isomorphism (A, B : setoid) (S: ext_powerclass A) (T: ext_powerclass B) }. nlemma subseteq_intersection_l: ∀A.∀U,V,W:Ω^A.U ⊆ W ∨ V ⊆ W → U ∩ V ⊆ W. -#A; #U; #V; #W; *; #H; #x; *; #xU; #xV; napply H; nassumption; +#A; #U; #V; #W; *; #H; #x; *; /2/. nqed. nlemma subseteq_union_l: ∀A.∀U,V,W:Ω^A.U ⊆ W → V ⊆ W → U ∪ V ⊆ W. -#A; #U; #V; #W; #H; #H1; #x; *; #Hx; ##[ napply H; ##| napply H1; ##] nassumption; -nqed. +#A; #U; #V; #W; #H; #H1; #x; *; /2/. +nqed. nlemma subseteq_intersection_r: ∀A.∀U,V,W:Ω^A.W ⊆ U → W ⊆ V → W ⊆ U ∩ V. -#A; #U; #V; #W; #H1; #H2; #x; #Hx; @; ##[ napply H1; ##| napply H2; ##] nassumption; -nqed. +/3/. nqed. (* nrecord isomorphism (A, B : setoid) (S: qpowerclass A) (T: qpowerclass B) : CProp[0] ≝