X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fcontribs%2Fformal_topology%2Foverlap%2Fbasic_pairs.ma;h=1ce789ed3b86e184ae9b050e7410dc1f354f8ab3;hb=be0ca791abbf1084b7218f2d17ab48462fbb3049;hp=84f48c894282c7a1971ed4f52c63d9ab6f0a0a20;hpb=13114a0147a28f8c7359c9c19ee254716eb5f55a;p=helm.git diff --git a/helm/software/matita/contribs/formal_topology/overlap/basic_pairs.ma b/helm/software/matita/contribs/formal_topology/overlap/basic_pairs.ma index 84f48c894..1ce789ed3 100644 --- a/helm/software/matita/contribs/formal_topology/overlap/basic_pairs.ma +++ b/helm/software/matita/contribs/formal_topology/overlap/basic_pairs.ma @@ -21,7 +21,7 @@ record basic_pair: Type1 ≝ rel: arrows1 ? concr form }. -interpretation "basic pair relation" 'Vdash2 x y c = (fun21 ___ (rel c) x y). +interpretation "basic pair relation" 'Vdash2 x y c = (fun21 ??? (rel c) x y). interpretation "basic pair relation (non applied)" 'Vdash c = (rel c). alias symbol "eq" = "setoid1 eq". @@ -33,8 +33,8 @@ record relation_pair (BP1,BP2: basic_pair): Type1 ≝ }. -interpretation "concrete relation" 'concr_rel r = (concr_rel __ r). -interpretation "formal relation" 'form_rel r = (form_rel __ r). +interpretation "concrete relation" 'concr_rel r = (concr_rel ?? r). +interpretation "formal relation" 'form_rel r = (form_rel ?? r). definition relation_pair_equality: ∀o1,o2. equivalence_relation1 (relation_pair o1 o2). @@ -88,11 +88,11 @@ definition id_relation_pair: ∀o:basic_pair. relation_pair o o. apply (H1 \sup -1);] qed. -definition relation_pair_composition: - ∀o1,o2,o3. binary_morphism1 (relation_pair_setoid o1 o2) (relation_pair_setoid o2 o3) (relation_pair_setoid o1 o3). - intros; - constructor 1; - [ intros (r r1); +lemma relation_pair_composition: + ∀o1,o2,o3: basic_pair. + relation_pair_setoid o1 o2 → relation_pair_setoid o2 o3 → relation_pair_setoid o1 o3. +intros 3 (o1 o2 o3); + intros (r r1); constructor 1; [ apply (r1 \sub\c ∘ r \sub\c) | apply (r1 \sub\f ∘ r \sub\f) @@ -106,7 +106,17 @@ definition relation_pair_composition: apply (.= ASSOC ^ -1); apply (.= H‡#); apply ASSOC] - | intros; +qed. + +lemma relation_pair_composition_is_morphism: + ∀o1,o2,o3: basic_pair. + ∀a,a':relation_pair_setoid o1 o2. + ∀b,b':relation_pair_setoid o2 o3. + a=a' → b=b' → + relation_pair_composition o1 o2 o3 a b + = relation_pair_composition o1 o2 o3 a' b'. +intros 3 (o1 o2 o3); + intros; change with (⊩ ∘ (b\sub\c ∘ a\sub\c) = ⊩ ∘ (b'\sub\c ∘ a'\sub\c)); change in e with (⊩ ∘ a \sub\c = ⊩ ∘ a' \sub\c); change in e1 with (⊩ ∘ b \sub\c = ⊩ ∘ b' \sub\c); @@ -117,29 +127,64 @@ definition relation_pair_composition: apply (.= e‡#); apply (.= ASSOC); apply (.= #‡(commute ?? b')\sup -1); - apply (ASSOC ^ -1)] + apply (ASSOC ^ -1); qed. - -definition BP: category1. + +definition relation_pair_composition_morphism: + ∀o1,o2,o3. binary_morphism1 (relation_pair_setoid o1 o2) (relation_pair_setoid o2 o3) (relation_pair_setoid o1 o3). + intros; constructor 1; - [ apply basic_pair - | apply relation_pair_setoid - | apply id_relation_pair - | apply relation_pair_composition - | intros; + [ apply relation_pair_composition; + | apply relation_pair_composition_is_morphism;] +qed. + +lemma relation_pair_composition_morphism_assoc: +Πo1:basic_pair +.Πo2:basic_pair + .Πo3:basic_pair + .Πo4:basic_pair + .Πa12:relation_pair_setoid o1 o2 + .Πa23:relation_pair_setoid o2 o3 + .Πa34:relation_pair_setoid o3 o4 + .relation_pair_composition_morphism o1 o3 o4 + (relation_pair_composition_morphism o1 o2 o3 a12 a23) a34 + =relation_pair_composition_morphism o1 o2 o4 a12 + (relation_pair_composition_morphism o2 o3 o4 a23 a34). + intros; change with (⊩ ∘ (a34\sub\c ∘ (a23\sub\c ∘ a12\sub\c)) = ⊩ ∘ ((a34\sub\c ∘ a23\sub\c) ∘ a12\sub\c)); alias symbol "refl" = "refl1". alias symbol "prop2" = "prop21". apply (ASSOC‡#); - | intros; +qed. + +lemma relation_pair_composition_morphism_respects_id: + ∀o1,o2:basic_pair.∀a:relation_pair_setoid o1 o2. + relation_pair_composition_morphism o1 o1 o2 (id_relation_pair o1) a=a. + intros; change with (⊩ ∘ (a\sub\c ∘ (id_relation_pair o1)\sub\c) = ⊩ ∘ a\sub\c); - apply ((id_neutral_right1 ????)‡#); - | intros; + apply ((id_neutral_right1 ????)‡#); +qed. + +lemma relation_pair_composition_morphism_respects_id_r: + ∀o1,o2:basic_pair.∀a:relation_pair_setoid o1 o2. + relation_pair_composition_morphism o1 o2 o2 a (id_relation_pair o2)=a. + intros; change with (⊩ ∘ ((id_relation_pair o2)\sub\c ∘ a\sub\c) = ⊩ ∘ a\sub\c); - apply ((id_neutral_left1 ????)‡#);] + apply ((id_neutral_left1 ????)‡#); qed. +definition BP: category1. + constructor 1; + [ apply basic_pair + | apply relation_pair_setoid + | apply id_relation_pair + | apply relation_pair_composition_morphism + | apply relation_pair_composition_morphism_assoc; + | apply relation_pair_composition_morphism_respects_id; + | apply relation_pair_composition_morphism_respects_id_r;] +qed. + definition basic_pair_of_BP : objs1 BP → basic_pair ≝ λx.x. coercion basic_pair_of_BP. @@ -170,7 +215,7 @@ definition fintersects: ∀o: BP. binary_morphism1 (form o) (form o) (Ω \sup (f | apply (. #‡((†e)‡(†e1))); assumption]] qed. -interpretation "fintersects" 'fintersects U V = (fun21 ___ (fintersects _) U V). +interpretation "fintersects" 'fintersects U V = (fun21 ??? (fintersects ?) U V). definition fintersectsS: ∀o:BP. binary_morphism1 (Ω \sup (form o)) (Ω \sup (form o)) (Ω \sup (form o)). @@ -182,15 +227,15 @@ definition fintersectsS: | apply (. #‡((†e)‡(†e1))); assumption]] qed. -interpretation "fintersectsS" 'fintersects U V = (fun21 ___ (fintersectsS _) U V). +interpretation "fintersectsS" 'fintersects U V = (fun21 ??? (fintersectsS ?) U V). definition relS: ∀o: BP. binary_morphism1 (concr o) (Ω \sup (form o)) CPROP. intros (o); constructor 1; - [ apply (λx:concr o.λS: Ω \sup (form o).∃y:form o.y ∈ S ∧ x ⊩_o y); + [ apply (λx:concr o.λS: Ω \sup (form o).∃y:form o.y ∈ S ∧ x ⊩⎽o y); | intros; split; intros; cases e2; exists [1,3: apply w] [ apply (. (#‡e1^-1)‡(e^-1‡#)); assumption | apply (. (#‡e1)‡(e‡#)); assumption]] qed. -interpretation "basic pair relation for subsets" 'Vdash2 x y c = (fun21 (concr _) __ (relS c) x y). -interpretation "basic pair relation for subsets (non applied)" 'Vdash c = (fun21 ___ (relS c)). +interpretation "basic pair relation for subsets" 'Vdash2 x y c = (fun21 (concr ?) ?? (relS c) x y). +interpretation "basic pair relation for subsets (non applied)" 'Vdash c = (fun21 ??? (relS c)).