From: Enrico Tassi Date: Thu, 10 Sep 2009 14:45:46 +0000 (+0000) Subject: it starts to work X-Git-Tag: make_still_working~3482 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=90d29632ac1705a0d217d54623a63fdf6f013e28;p=helm.git it starts to work --- diff --git a/helm/software/matita/nlibrary/sets/sets.ma b/helm/software/matita/nlibrary/sets/sets.ma index 348332441..8553c0fd1 100644 --- a/helm/software/matita/nlibrary/sets/sets.ma +++ b/helm/software/matita/nlibrary/sets/sets.ma @@ -28,30 +28,30 @@ interpretation "subseteq" 'subseteq U V = (subseteq ? U V). ndefinition overlaps ≝ λA.λU,V.∃x:A.x ∈ U ∧ x ∈ V. interpretation "overlaps" 'overlaps U V = (overlaps ? U V). -ndefinition intersect ≝ λA.λU,V:Ω \sup A.{ x | x ∈ U ∧ x ∈ V }. +ndefinition intersect ≝ λA.λU,V:Ω^A.{ x | x ∈ U ∧ x ∈ V }. interpretation "intersect" 'intersects U V = (intersect ? U V). -ndefinition union ≝ λA.λU,V:Ω \sup A.{ x | x ∈ U ∨ x ∈ V }. +ndefinition union ≝ λA.λU,V:Ω^A.{ x | x ∈ U ∨ x ∈ V }. interpretation "union" 'union U V = (union ? U V). -ndefinition big_union ≝ λA,B.λT:Ω \sup A.λf:A → Ω \sup B.{ x | ∃i. i ∈ T ∧ x ∈ f i }. +ndefinition big_union ≝ λA,B.λT:Ω^A.λf:A → Ω^B.{ x | ∃i. i ∈ T ∧ x ∈ f i }. -ndefinition big_intersection ≝ λA,B.λT:Ω \sup A.λf:A → Ω \sup B.{ x | ∀i. i ∈ T → x ∈ f i }. +ndefinition big_intersection ≝ λA,B.λT:Ω^A.λf:A → Ω^B.{ x | ∀i. i ∈ T → x ∈ f i }. -ndefinition full_set: ∀A. Ω \sup A ≝ λA.{ x | True }. -ncoercion full_set : ∀A:Type[0]. Ω \sup A ≝ full_set on A: Type[0] to (Ω \sup ?). +ndefinition full_set: ∀A. Ω^A ≝ λA.{ x | True }. +ncoercion full_set : ∀A:Type[0]. Ω^A ≝ full_set on A: Type[0] to (Ω^?). -nlemma subseteq_refl: ∀A.∀S: Ω \sup A. S ⊆ S. +nlemma subseteq_refl: ∀A.∀S: Ω^A. S ⊆ S. #A; #S; #x; #H; nassumption. nqed. -nlemma subseteq_trans: ∀A.∀S,T,U: Ω \sup A. S ⊆ T → T ⊆ U → S ⊆ U. +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. include "properties/relations1.ma". -ndefinition seteq: ∀A. equivalence_relation1 (Ω \sup A). +ndefinition seteq: ∀A. equivalence_relation1 (Ω^A). #A; napply mk_equivalence_relation1 [ napply (λS,S'. S ⊆ S' ∧ S' ⊆ S) | #S; napply conj; napply subseteq_refl @@ -104,7 +104,8 @@ ndefinition qpowerclass_setoid: setoid → setoid1. | napply (qseteq A) ] nqed. -unification hint 0 ≔ A : ? ⊢ carr1 (qpowerclass_setoid A) ≡ qpowerclass A. +unification hint 0 ≔ A : ? ⊢ + carr1 (qpowerclass_setoid A) ≡ qpowerclass A. nlemma mem_ok: ∀A. binary_morphism1 (setoid1_of_setoid A) (qpowerclass_setoid A) CPROP. #A; napply mk_binary_morphism1 @@ -145,37 +146,34 @@ nqed. alias symbol "hint_decl" = "hint_decl_Type1". unification hint 0 ≔ A : setoid, B : qpowerclass A, C : qpowerclass A ⊢ - pc A (fun21 ??? (intersect_ok A) B C) ≡ intersect ? (pc ? B) (pc ? C). + pc A (intersect_ok A B C) ≡ intersect ? (pc ? B) (pc ? C). -(* hints can pass under mem *) -unification hint 0 ( - ∀A,B,x. - let C ≝ B in - (λa,b.Prop) (mem A B x) (mem A C x)). +(* hints can pass under mem *) (* ??? XXX why is it needed? *) +unification hint 0 ≔ A:?, B:?, x:?; + C ≟ B + (*---------------------*) ⊢ + mem A B x ≡ mem A C x. nlemma test: ∀A:setoid. ∀U,V:qpowerclass A. ∀x,x':setoid1_of_setoid A. x=x' → x ∈ U ∩ V → x' ∈ U ∩ V. #A; #U; #V; #x; #x'; #H; #p; napply (. (H^-1‡#)); nassumption. nqed. -(* -(* 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 image: ∀A,B. (carr A → carr B) → Ω^A → Ω^B ≝ + λA,B:setoid.λf:carr A → carr B.λSa:Ω^A. + {y | ∃x. x ∈ Sa ∧ eq_rel (carr B) (eq B) (f x) y}. -ndefinition counter_image: ∀A,B. (A → B) → Ω \sup B → Ω \sup A ≝ +ndefinition counter_image: ∀A,B. (carr A → carr B) → Ω^B → Ω^A ≝ λA,B,f,Sb. {x | ∃y. y ∈ Sb ∧ f x = y}. -*) (******************* compatible equivalence relations **********************) nrecord compatible_equivalence_relation (A: setoid) : Type[1] ≝ { rel:> equivalence_relation A; - compatibility: ∀x,x':A. x=x' → eq_rel ? rel x x' (* coercion qui non va *) + compatibility: ∀x,x':A. x=x' → rel x x' + (* coercion qui non andava per via di un Failure invece di Uncertain + ritornato dall'unificazione per il problema: + ?[] A =?= ?[Γ]->?[Γ+1] + *) }. ndefinition quotient: ∀A. compatible_equivalence_relation A → setoid. @@ -197,19 +195,19 @@ nqed. ndefinition canonical_proj: ∀A,R. unary_morphism A (quotient A R). #A; #R; napply mk_unary_morphism - [ 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. + unary_morphism (quotient … (eqrel_of_morphism … f)) B. #A; #B; #f; napply mk_unary_morphism [ napply f | #a; #a'; #H; nassumption] 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). + ∀x. f x = quotiented_mor … (canonical_proj … (eqrel_of_morphism … f) x). #A; #B; #f; #x; napply refl; nqed. @@ -222,19 +220,21 @@ ndefinition injective ≝ ∀x,x'. x ∈ S → x' ∈ S → f x = f x' → x = x'. 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: unary_morphism A B. + surjective … (Full_set ?) (Full_set ?) (canonical_proj ? (eqrel_of_morphism … f)). #A; #B; #f; nwhd; #y; #Hy; napply (ex_intro … y); napply conj [ napply I | napply refl] nqed. nlemma first_omomorphism_theorem_functions3: - ∀A,B.∀f: unary_morphism A B. injective ?? (Full_set ?) (quotiented_mor ?? f). + ∀A,B.∀f: unary_morphism A B. + injective … (Full_set ?) (quotiented_mor … f). #A; #B; #f; nwhd; #x; #x'; #Hx; #Hx'; #K; nassumption. nqed. nrecord isomorphism (A) (B) (S: qpowerclass A) (T: qpowerclass B) : CProp[0] ≝ { iso_f:> unary_morphism A B; f_closed: ∀x. x ∈ S → iso_f x ∈ T; - f_sur: surjective ?? S T iso_f; - f_inj: injective ?? S iso_f + f_sur: surjective … S T iso_f; + f_inj: injective … S iso_f }. diff --git a/helm/software/matita/nlibrary/topology/igft.ma b/helm/software/matita/nlibrary/topology/igft.ma index 6628e36ef..b7818372b 100644 --- a/helm/software/matita/nlibrary/topology/igft.ma +++ b/helm/software/matita/nlibrary/topology/igft.ma @@ -1,4 +1,4 @@ -include "logic/connectives.ma". +include "sets/sets.ma". nrecord powerset (X : Type[0]) : Type[1] ≝ { char : X → CProp[0] }.