X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fmatita%2Fcontribs%2Fformal_topology%2Foverlap%2Frelations_to_o-algebra.ma;h=2368affe0fca9711d74ff0395518b28483f10a4b;hb=071d7a246190074c97e78192839e4bb5d5a1eef4;hp=7f327c4972130fcb143b5aa1eb45f2eafb6bbc60;hpb=d87c05ef2d706cc9b69454c191568028134138ea;p=helm.git diff --git a/helm/software/matita/contribs/formal_topology/overlap/relations_to_o-algebra.ma b/helm/software/matita/contribs/formal_topology/overlap/relations_to_o-algebra.ma index 7f327c497..2368affe0 100644 --- a/helm/software/matita/contribs/formal_topology/overlap/relations_to_o-algebra.ma +++ b/helm/software/matita/contribs/formal_topology/overlap/relations_to_o-algebra.ma @@ -48,6 +48,9 @@ definition SUBSETS: objs1 SET → OAlgebra. assumption]] qed. +definition powerset_of_SUBSETS: ∀A.oa_P (SUBSETS A) → Ω \sup A ≝ λA,x.x. +coercion powerset_of_SUBSETS. + definition orelation_of_relation: ∀o1,o2:REL. arrows1 ? o1 o2 → arrows2 OA (SUBSETS o1) (SUBSETS o2). intros; constructor 1; @@ -165,9 +168,7 @@ definition SUBSETS': carr3 (arrows3 CAT2 (category2_of_category1 REL) OA). [ apply (orelation_of_relation S T); | intros; apply (orelation_of_relation_preserves_equality S T a a' e); ] | apply orelation_of_relation_preserves_identity; - | simplify; intros; - apply (.= (orelation_of_relation_preserves_composition o1 o2 o4 f1 (f3∘f2))); - apply (#‡(orelation_of_relation_preserves_composition o2 o3 o4 f2 f3)); ] + | apply orelation_of_relation_preserves_composition; ] qed. theorem SUBSETS_faithful: @@ -179,4 +180,68 @@ theorem SUBSETS_faithful: split; intro; [ lapply (s y); | lapply (s1 y); ] [2,4: exists; [1,3:apply x] split; [1,3: assumption |*: change with (x=x); apply rule #] |*: cases Hletin1; cases x1; change in f3 with (eq1 ? x w); apply (. f3‡#); assumption;] +qed. + +inductive exT2 (A:Type2) (P:A→CProp2) : CProp2 ≝ + ex_introT2: ∀w:A. P w → exT2 A P. + +theorem SUBSETS_full: ∀S,T.∀f. exT2 ? (λg. map_arrows2 ?? SUBSETS' S T g = f). + intros; exists; + [ constructor 1; constructor 1; + [ apply (λx:carr S.λy:carr T. y ∈ f (singleton S x)); + | intros; unfold FunClass_1_OF_carr2; lapply (.= e1‡#); + [4: apply mem; |6: apply Hletin;|1,2,3,5: skip] + lapply (#‡prop11 ?? f ?? (†e)); [6: apply Hletin; |*:skip ]] + | whd; split; whd; intro; simplify; unfold map_arrows2; simplify; + [ split; + [ change with (∀a1.(∀x. a1 ∈ f (singleton S x) → x ∈ a) → a1 ∈ f⎻* a); + | change with (∀a1.a1 ∈ f⎻* a → (∀x.a1 ∈ f (singleton S x) → x ∈ a)); ] + | split; + [ change with (∀a1.(∃y:carr T. y ∈ f (singleton S a1) ∧ y ∈ a) → a1 ∈ f⎻ a); + | change with (∀a1.a1 ∈ f⎻ a → (∃y:carr T.y ∈ f (singleton S a1) ∧ y ∈ a)); ] + | split; + [ change with (∀a1.(∃x:carr S. a1 ∈ f (singleton S x) ∧ x ∈ a) → a1 ∈ f a); + | change with (∀a1.a1 ∈ f a → (∃x:carr S. a1 ∈ f (singleton S x) ∧ x ∈ a)); ] + | split; + [ change with (∀a1.(∀y. y ∈ f (singleton S a1) → y ∈ a) → a1 ∈ f* a); + | change with (∀a1.a1 ∈ f* a → (∀y. y ∈ f (singleton S a1) → y ∈ a)); ]] + [ intros; apply ((. (or_prop2 ?? f (singleton ? a1) a)^-1) ? a1); + [ intros 2; apply (f1 a2); change in f2 with (a2 ∈ f⎻ (singleton ? a1)); + lapply (. (or_prop3 ?? f (singleton ? a2) (singleton ? a1))); + [ cases Hletin; change in x1 with (eq1 ? a1 w); + apply (. x1‡#); assumption; + | exists; [apply a2] [change with (a2=a2); apply rule #; | assumption]] + | change with (a1 = a1); apply rule #; ] + | intros; apply ((. (or_prop2 ?? f (singleton ? a1) a)) ? x); + [ intros 2; change in f3 with (eq1 ? a1 a2); change with (a2 ∈ f⎻* a); apply (. f3^-1‡#); + assumption; + | lapply (. (or_prop3 ?? f (singleton ? x) (singleton ? a1))^-1); + [ cases Hletin; change in x1 with (eq1 ? x w); + change with (x ∈ f⎻ (singleton ? a1)); apply (. x1‡#); assumption; + | exists; [apply a1] [assumption | change with (a1=a1); apply rule #; ]]] + | intros; cases e; cases x; clear e x; + lapply (. (or_prop3 ?? f (singleton ? a1) a)^-1); + [ cases Hletin; change in x with (eq1 ? a1 w1); apply (. x‡#); assumption; + | exists; [apply w] assumption ] + | intros; lapply (. (or_prop3 ?? f (singleton ? a1) a)); + [ cases Hletin; exists; [apply w] split; assumption; + | exists; [apply a1] [change with (a1=a1); apply rule #; | assumption ]] + | intros; cases e; cases x; clear e x; + apply (f_image_monotone ?? f (singleton ? w) a ? a1); + [ intros 2; change in f3 with (eq1 ? w a2); change with (a2 ∈ a); + apply (. f3^-1‡#); assumption; + | assumption; ] + | intros; lapply (. (or_prop3 ?? f a (singleton ? a1))^-1); + [ cases Hletin; exists; [apply w] split; + [ lapply (. (or_prop3 ?? f (singleton ? w) (singleton ? a1))); + [ cases Hletin1; change in x3 with (eq1 ? a1 w1); apply (. x3‡#); assumption; + | exists; [apply w] [change with (w=w); apply rule #; | assumption ]] + | assumption ] + | exists; [apply a1] [ assumption; | change with (a1=a1); apply rule #;]] + | intros; apply ((. (or_prop1 ?? f (singleton ? a1) a)^-1) ? a1); + [ apply f1; | change with (a1=a1); apply rule #; ] + | intros; apply ((. (or_prop1 ?? f (singleton ? a1) a)) ? y); + [ intros 2; change in f3 with (eq1 ? a1 a2); change with (a2 ∈ f* a); + apply (. f3^-1‡#); assumption; + | assumption ]]] qed. \ No newline at end of file