X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Flibrary%2Fformal_topology%2Frelations_to_o-algebra.ma;h=bc5153d5db66532004203625260f99767955eea9;hb=c821924472ab07f543c0e4acd0b808715de7a934;hp=3a908657bb05f7d7fec3bd6c05572f5773eaaf16;hpb=1ed4fe0f28d3b0b915387330cd722bfb80fb1063;p=helm.git diff --git a/helm/software/matita/library/formal_topology/relations_to_o-algebra.ma b/helm/software/matita/library/formal_topology/relations_to_o-algebra.ma index 3a908657b..bc5153d5d 100644 --- a/helm/software/matita/library/formal_topology/relations_to_o-algebra.ma +++ b/helm/software/matita/library/formal_topology/relations_to_o-algebra.ma @@ -54,36 +54,20 @@ coercion powerset_of_POW'. definition orelation_of_relation: ∀o1,o2:REL. o1 ⇒_\r1 o2 → (POW' o1) ⇒_\o2 (POW' o2). intros; constructor 1; - [ constructor 1; - [ apply (λU.image ?? c U); - | intros; apply (#‡e); ] - | constructor 1; - [ apply (λU.minus_star_image ?? c U); - | intros; apply (#‡e); ] - | constructor 1; - [ apply (λU.star_image ?? c U); - | intros; apply (#‡e); ] - | constructor 1; - [ apply (λU.minus_image ?? c U); - | intros; apply (#‡e); ] + [ apply rule c; + | apply rule (c⎻* ); + | apply rule (c* ); + | apply rule (c⎻); | intros; split; intro; - [ change in f with (∀a. a ∈ image ?? c p → a ∈ q); - change with (∀a:o1. a ∈ p → a ∈ star_image ?? c q); - intros 4; apply f; exists; [apply a] split; assumption; - | change in f with (∀a:o1. a ∈ p → a ∈ star_image ?? c q); - change with (∀a. a ∈ image ?? c p → a ∈ q); - intros; cases f1; cases x; clear f1 x; apply (f ? f3); assumption; ] - | intros; split; intro; - [ change in f with (∀a. a ∈ minus_image ?? c p → a ∈ q); - change with (∀a:o2. a ∈ p → a ∈ minus_star_image ?? c q); - intros 4; apply f; exists; [apply a] split; assumption; - | change in f with (∀a:o2. a ∈ p → a ∈ minus_star_image ?? c q); - change with (∀a. a ∈ minus_image ?? c p → a ∈ q); - intros; cases f1; cases x; clear f1 x; apply (f ? f3); assumption; ] - | intros; split; intro; cases f; clear f; + [ intros 2; intros 2; apply (f y); exists[apply a] split; assumption; + | intros 2; change with (a ∈ q); cases f1; cases x; clear f1 x; + apply (f w f3); assumption; ] + | unfold foo; intros; split; intro; + [ intros 2; intros 2; apply (f x); exists [apply a] split; assumption; + | intros 2; change with (a ∈ q); cases f1; cases x; apply (f w f3); assumption;] + | intros; split; unfold foo; unfold image_coercion; simplify; intro; cases f; clear f; [ cases x; cases x2; clear x x2; exists; [apply w1] - [ assumption; - | exists; [apply w] split; assumption] + [ assumption | exists; [apply w] split; assumption] | cases x1; cases x2; clear x1 x2; exists; [apply w1] [ exists; [apply w] split; assumption; | assumption; ]]] @@ -92,29 +76,36 @@ qed. lemma orelation_of_relation_preserves_equality: ∀o1,o2:REL.∀t,t': o1 ⇒_\r1 o2. t = t' → orelation_of_relation ?? t =_2 orelation_of_relation ?? t'. - intros; split; unfold orelation_of_relation; simplify; intro; split; intro; - simplify; whd in o1 o2; - [ change with (a1 ∈ minus_star_image ?? t a → a1 ∈ minus_star_image ?? t' a); - apply (. #‡(e^-1‡#)); - | change with (a1 ∈ minus_star_image ?? t' a → a1 ∈ minus_star_image ?? t a); - apply (. #‡(e‡#)); - | change with (a1 ∈ minus_image ?? t a → a1 ∈ minus_image ?? t' a); - apply (. #‡(e ^ -1‡#)); - | change with (a1 ∈ minus_image ?? t' a → a1 ∈ minus_image ?? t a); - apply (. #‡(e‡#)); - | change with (a1 ∈ image ?? t a → a1 ∈ image ?? t' a); - apply (. #‡(e ^ -1‡#)); - | change with (a1 ∈ image ?? t' a → a1 ∈ image ?? t a); - apply (. #‡(e‡#)); - | change with (a1 ∈ star_image ?? t a → a1 ∈ star_image ?? t' a); - apply (. #‡(e ^ -1‡#)); - | change with (a1 ∈ star_image ?? t' a → a1 ∈ star_image ?? t a); - apply (. #‡(e‡#)); ] + intros; split; unfold orelation_of_relation; unfold foo; simplify; + change in e with (t =_2 t'); unfold image_coercion; apply (†e); +qed. + +lemma minus_image_id : ∀o:REL.((id1 REL o))⎻ =_1 (id2 SET1 Ω^o). +unfold foo; intro o; intro; unfold minus_image; simplify; split; simplify; intros; +[ cases e; cases x; change with (a1 ∈ a); change in f with (a1 =_1 w); + apply (. f‡#); assumption; +| change in f with (a1 ∈ a); exists [ apply a1] split; try assumption; + change with (a1 =_1 a1); apply refl1;] qed. +lemma star_image_id : ∀o:REL. ((id1 REL o))* =_1 (id2 SET1 Ω^o). +unfold foo; intro o; intro; unfold star_image; simplify; split; simplify; intros; +[ change with (a1 ∈ a); apply f; change with (a1 =_1 a1); apply rule refl1; +| change in f1 with (a1 =_1 y); apply (. f1^-1‡#); apply f;] +qed. + lemma orelation_of_relation_preserves_identity: ∀o1:REL. orelation_of_relation ?? (id1 ? o1) =_2 id2 OA (POW' o1). - intros; split; intro; split; whd; intro; + intros; split; + (unfold orelation_of_relation; unfold OA; unfold foo; simplify); + [ apply (minus_star_image_id o1); + | apply (minus_image_id o1); + | apply (image_id o1); + | apply (star_image_id o1) ] +qed. + +(* + split; whd; intro; [ change with ((∀x. x ♮(id1 REL o1) a1→x∈a) → a1 ∈ a); intros; apply (f a1); change with (a1 = a1); apply refl1; | change with (a1 ∈ a → ∀x. x ♮(id1 REL o1) a1→x∈a); intros; @@ -135,6 +126,7 @@ lemma orelation_of_relation_preserves_identity: | change with (a1 ∈ a → ∀y.a1 ♮(id1 REL o1) y→y∈a); intros; change in f1 with (a1 = y); apply (. f1^-1‡#); apply f;] qed. +*) (* CSC: ???? forse un uncertain mancato *) alias symbol "eq" = "setoid2 eq". @@ -170,42 +162,43 @@ definition POW: carr3 (arrows3 CAT2 (category2_of_category1 REL) OA). | apply orelation_of_relation_preserves_composition; ] qed. -theorem POW_faithful: - ∀S,T.∀f,g:arrows2 (category2_of_category1 REL) S T. - POW⎽⇒ f =_2 POW⎽⇒ g → f =_2 g. - intros; unfold POW in e; simplify in e; cases e; +theorem POW_faithful: faithful2 ?? POW. + intros 5; unfold POW in e; simplify in e; cases e; unfold orelation_of_relation in e3; simplify in e3; clear e e1 e2 e4; - intros 2; cases (e3 {(x)}); + intros 2; simplify; unfold image_coercion in e3; cases (e3 {(x)}); 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 Hletin; cases x1; change in f3 with (x =_1 w); apply (. f3‡#); assumption;] qed. +(* lemma currify: ∀A,B,C. (A × B ⇒_1 C) → A → (B ⇒_1 C). intros; constructor 1; [ apply (b c); | intros; apply (#‡e);] qed. +*) + +include "formal_topology/notation.ma". -theorem POW_full: ∀S,T.∀f: (POW S) ⇒_\o2 (POW T) . exT22 ? (λg. POW⎽⇒ g = f). - intros; exists; +theorem POW_full: full2 ?? POW. + intros 3 (S T); exists; [ constructor 1; constructor 1; [ apply (λx:carr S.λy:carr T. y ∈ f {(x)}); - | intros; unfold FunClass_1_OF_carr2; lapply (.= e1‡#); + | apply hide; 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; + | (split; intro; split; simplify); [ change with (∀a1.(∀x. a1 ∈ (f {(x):S}) → x ∈ a) → a1 ∈ f⎻* a); - | change with (∀a1.a1 ∈ f⎻* a → (∀x.a1 ∈ f {(x):S} → x ∈ a)); ] - | split; - [ change with (∀a1.(∃y:carr T. y ∈ f {(a1):S} ∧ y ∈ a) → a1 ∈ f⎻ a); - | change with (∀a1.a1 ∈ f⎻ a → (∃y:carr T.y ∈ f {(a1):S} ∧ y ∈ a)); ] - | split; - [ change with (∀a1.(∃x:carr S. a1 ∈ f {(x):S} ∧ x ∈ a) → a1 ∈ f a); - | change with (∀a1.a1 ∈. f a → (∃x:carr S. a1 ∈ f {(x):S} ∧ x ∈ a)); ] - | split; - [ change with (∀a1.(∀y. y ∈ f {(a1):S} → y ∈ a) → a1 ∈ f* a); - | change with (∀a1.a1 ∈ f* a → (∀y. y ∈ f {(a1):S} → y ∈ a)); ]] + | change with (∀a1.a1 ∈ f⎻* a → (∀x.a1 ∈ f {(x):S} → x ∈ a)); + | alias symbol "and" (instance 4) = "and_morphism". +change with (∀a1.(∃y:carr T. y ∈ f {(a1):S} ∧ y ∈ a) → a1 ∈ f⎻ a); + | alias symbol "and" (instance 2) = "and_morphism". +change with (∀a1.a1 ∈ f⎻ a → (∃y:carr T.y ∈ f {(a1):S} ∧ y ∈ a)); + | alias symbol "and" (instance 3) = "and_morphism". +change with (∀a1.(∃x:carr S. a1 ∈ f {(x):S} ∧ x ∈ a) → a1 ∈ f a); + | change with (∀a1.a1 ∈. f a → (∃x:carr S. a1 ∈ f {(x):S} ∧ x ∈ a)); + | change with (∀a1.(∀y. y ∈ f {(a1):S} → y ∈ a) → a1 ∈ f* a); + | change with (∀a1.a1 ∈ f* a → (∀y. y ∈ f {(a1):S} → 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)));