From 5be81fce195f2b45ec57c5422d35e4c03827891d Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Tue, 6 Jan 2009 15:06:31 +0000 Subject: [PATCH] Fixing universe levels for saturations and (partially) basic_topologies. --- .../overlap/basic_topologies.ma | 205 ++++++++++++++++++ .../contribs/formal_topology/overlap/depends | 2 + .../formal_topology/overlap/o-saturations.ma | 4 +- .../formal_topology/overlap/saturations.ma | 40 ++++ 4 files changed, 249 insertions(+), 2 deletions(-) create mode 100644 helm/software/matita/contribs/formal_topology/overlap/basic_topologies.ma create mode 100644 helm/software/matita/contribs/formal_topology/overlap/saturations.ma diff --git a/helm/software/matita/contribs/formal_topology/overlap/basic_topologies.ma b/helm/software/matita/contribs/formal_topology/overlap/basic_topologies.ma new file mode 100644 index 000000000..26562cbb4 --- /dev/null +++ b/helm/software/matita/contribs/formal_topology/overlap/basic_topologies.ma @@ -0,0 +1,205 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "relations.ma". +include "saturations.ma". + +record basic_topology: Type1 ≝ + { carrbt:> REL; + A: unary_morphism1 (Ω \sup carrbt) (Ω \sup carrbt); + J: unary_morphism1 (Ω \sup carrbt) (Ω \sup carrbt); + A_is_saturation: is_saturation ? A; + J_is_reduction: is_reduction ? J; + compatibility: ∀U,V. (A U ≬ J V) = (U ≬ J V) + }. + +lemma hint: basic_topology → objs1 REL. + intro; apply (carrbt b); +qed. +coercion hint. + +record continuous_relation (S,T: basic_topology) : Type1 ≝ + { cont_rel:> arrows1 ? S T; + reduced: ∀U. U = J ? U → image ?? cont_rel U = J ? (image ?? cont_rel U); + saturated: ∀U. U = A ? U → minus_star_image ?? cont_rel U = A ? (minus_star_image ?? cont_rel U) + }. + +definition continuous_relation_setoid: basic_topology → basic_topology → setoid1. + intros (S T); constructor 1; + [ apply (continuous_relation S T) + | constructor 1; + [ apply (λr,s:continuous_relation S T.∀b. A ? (ext ?? r b) = A ? (ext ?? s b)); + | simplify; intros; apply refl1; + | simplify; intros; apply sym1; apply H + | simplify; intros; apply trans1; [2: apply H |3: apply H1; |1: skip]]] +qed. + +definition cont_rel': ∀S,T: basic_topology. continuous_relation_setoid S T → arrows1 ? S T ≝ cont_rel. + +coercion cont_rel'. + +definition cont_rel'': ∀S,T: basic_topology. continuous_relation_setoid S T → binary_relation S T ≝ cont_rel. + +coercion cont_rel''. + +theorem continuous_relation_eq': + ∀o1,o2.∀a,a': continuous_relation_setoid o1 o2. + a = a' → ∀X.minus_star_image ?? a (A o1 X) = minus_star_image ?? a' (A o1 X). + intros; split; intro; unfold minus_star_image; simplify; intros; + [ cut (ext ?? a a1 ⊆ A ? X); [2: intros 2; apply (H1 a2); cases f1; assumption;] + lapply (if ?? (A_is_saturation ???) Hcut); clear Hcut; + cut (A ? (ext ?? a' a1) ⊆ A ? X); [2: apply (. (H ?)‡#); assumption] + lapply (fi ?? (A_is_saturation ???) Hcut); + apply (Hletin1 x); change with (x ∈ ext ?? a' a1); split; simplify; + [ apply I | assumption ] + | cut (ext ?? a' a1 ⊆ A ? X); [2: intros 2; apply (H1 a2); cases f1; assumption;] + lapply (if ?? (A_is_saturation ???) Hcut); clear Hcut; + cut (A ? (ext ?? a a1) ⊆ A ? X); [2: apply (. (H ?)\sup -1‡#); assumption] + lapply (fi ?? (A_is_saturation ???) Hcut); + apply (Hletin1 x); change with (x ∈ ext ?? a a1); split; simplify; + [ apply I | assumption ]] +qed. + +theorem continuous_relation_eq_inv': + ∀o1,o2.∀a,a': continuous_relation_setoid o1 o2. + (∀X.minus_star_image ?? a (A o1 X) = minus_star_image ?? a' (A o1 X)) → a=a'. + intros 6; + cut (∀a,a': continuous_relation_setoid o1 o2. + (∀X.minus_star_image ?? a (A o1 X) = minus_star_image ?? a' (A o1 X)) → + ∀V:o2. A ? (ext ?? a' V) ⊆ A ? (ext ?? a V)); + [2: clear b H a' a; intros; + lapply depth=0 (λV.saturation_expansive ??? (extS ?? a V)); [2: apply A_is_saturation;|skip] + (* fundamental adjunction here! to be taken out *) + cut (∀V:Ω \sup o2.V ⊆ minus_star_image ?? a (A ? (extS ?? a V))); + [2: intro; intros 2; unfold minus_star_image; simplify; intros; + apply (Hletin V1 x); whd; split; [ exact I | exists; [apply a1] split; assumption]] + clear Hletin; + cut (∀V:Ω \sup o2.V ⊆ minus_star_image ?? a' (A ? (extS ?? a V))); + [2: intro; apply (. #‡(H ?)); apply Hcut] clear H Hcut; + (* second half of the fundamental adjunction here! to be taken out too *) + intro; lapply (Hcut1 (singleton ? V)); clear Hcut1; + unfold minus_star_image in Hletin; unfold singleton in Hletin; simplify in Hletin; + whd in Hletin; whd in Hletin:(?→?→%); simplify in Hletin; + apply (if ?? (A_is_saturation ???)); + intros 2 (x H); lapply (Hletin V ? x ?); + [ apply refl | cases H; assumption; ] + change with (x ∈ A ? (ext ?? a V)); + apply (. #‡(†(extS_singleton ????))); + assumption;] + split; apply Hcut; [2: assumption | intro; apply sym1; apply H] +qed. + +definition continuous_relation_comp: + ∀o1,o2,o3. + continuous_relation_setoid o1 o2 → + continuous_relation_setoid o2 o3 → + continuous_relation_setoid o1 o3. + intros (o1 o2 o3 r s); constructor 1; + [ apply (s ∘ r) + | intros; + apply sym1; + apply (.= †(image_comp ??????)); + apply (.= (reduced ?????)\sup -1); + [ apply (.= (reduced ?????)); [ assumption | apply refl1 ] + | apply (.= (image_comp ??????)\sup -1); + apply refl1] + | intros; + apply sym1; + apply (.= †(minus_star_image_comp ??????)); + apply (.= (saturated ?????)\sup -1); + [ apply (.= (saturated ?????)); [ assumption | apply refl1 ] + | apply (.= (minus_star_image_comp ??????)\sup -1); + apply refl1]] +qed. + +definition BTop: category1. + constructor 1; + [ apply basic_topology + | apply continuous_relation_setoid + | intro; constructor 1; + [ apply id1 + | intros; + apply (.= (image_id ??)); + apply sym1; + apply (.= †(image_id ??)); + apply sym1; + assumption + | intros; + apply (.= (minus_star_image_id ??)); + apply sym1; + apply (.= †(minus_star_image_id ??)); + apply sym1; + assumption] + | intros; constructor 1; + [ apply continuous_relation_comp; + | intros; simplify; intro x; simplify; + lapply depth=0 (continuous_relation_eq' ???? H) as H'; + lapply depth=0 (continuous_relation_eq' ???? H1) as H1'; + letin K ≝ (λX.H1' (minus_star_image ?? a (A ? X))); clearbody K; + cut (∀X:Ω \sup o1. + minus_star_image o2 o3 b (A o2 (minus_star_image o1 o2 a (A o1 X))) + = minus_star_image o2 o3 b' (A o2 (minus_star_image o1 o2 a' (A o1 X)))); + [2: intro; apply sym1; apply (.= #‡(†((H' ?)\sup -1))); apply sym1; apply (K X);] + clear K H' H1'; + cut (∀X:Ω \sup o1. + minus_star_image o1 o3 (b ∘ a) (A o1 X) = minus_star_image o1 o3 (b'∘a') (A o1 X)); + [2: intro; + apply (.= (minus_star_image_comp ??????)); + apply (.= #‡(saturated ?????)); + [ apply ((saturation_idempotent ????) \sup -1); apply A_is_saturation ] + apply sym1; + apply (.= (minus_star_image_comp ??????)); + apply (.= #‡(saturated ?????)); + [ apply ((saturation_idempotent ????) \sup -1); apply A_is_saturation ] + apply ((Hcut X) \sup -1)] + clear Hcut; generalize in match x; clear x; + apply (continuous_relation_eq_inv'); + apply Hcut1;] + | intros; simplify; intro; do 2 (unfold continuous_relation_comp); simplify; + apply (.= †(ASSOC1‡#)); + apply refl1 + | intros; simplify; intro; unfold continuous_relation_comp; simplify; + apply (.= †((id_neutral_right1 ????)‡#)); + apply refl1 + | intros; simplify; intro; simplify; + apply (.= †((id_neutral_left1 ????)‡#)); + apply refl1] +qed. + +(* +(*CSC: unused! *) +(* this proof is more logic-oriented than set/lattice oriented *) +theorem continuous_relation_eqS: + ∀o1,o2:basic_topology.∀a,a': continuous_relation_setoid o1 o2. + a = a' → ∀X. A ? (extS ?? a X) = A ? (extS ?? a' X). + intros; + cut (∀a: arrows1 ? o1 ?.∀x. x ∈ extS ?? a X → ∃y:o2.y ∈ X ∧ x ∈ ext ?? a y); + [2: intros; cases f; clear f; cases H1; exists [apply w] cases x1; split; + try assumption; split; assumption] + cut (∀a,a':continuous_relation_setoid o1 o2.eq1 ? a a' → ∀x. x ∈ extS ?? a X → ∃y:o2. y ∈ X ∧ x ∈ A ? (ext ?? a' y)); + [2: intros; cases (Hcut ?? f); exists; [apply w] cases x1; split; try assumption; + apply (. #‡(H1 ?)); + apply (saturation_expansive ?? (A_is_saturation o1) (ext ?? a1 w) x); + assumption;] clear Hcut; + split; apply (if ?? (A_is_saturation ???)); intros 2; + [lapply (Hcut1 a a' H a1 f) | lapply (Hcut1 a' a (H \sup -1) a1 f)] + cases Hletin; clear Hletin; cases x; clear x; + cut (∀a: arrows1 ? o1 ?. ext ?? a w ⊆ extS ?? a X); + [2,4: intros 3; cases f3; clear f3; simplify in f5; split; try assumption; + exists [1,3: apply w] split; assumption;] + cut (∀a. A ? (ext o1 o2 a w) ⊆ A ? (extS o1 o2 a X)); + [2,4: intros; apply saturation_monotone; try (apply A_is_saturation); apply Hcut;] + apply Hcut2; assumption. +qed. +*) \ No newline at end of file diff --git a/helm/software/matita/contribs/formal_topology/overlap/depends b/helm/software/matita/contribs/formal_topology/overlap/depends index 4875f5928..bd6cd4d14 100644 --- a/helm/software/matita/contribs/formal_topology/overlap/depends +++ b/helm/software/matita/contribs/formal_topology/overlap/depends @@ -2,10 +2,12 @@ o-basic_pairs.ma o-algebra.ma o-concrete_spaces.ma o-basic_pairs.ma o-saturations.ma o-saturations.ma o-algebra.ma basic_pairs.ma o-basic_pairs.ma relations.ma +saturations.ma relations.ma o-algebra.ma categories.ma o-formal_topologies.ma o-basic_topologies.ma categories.ma cprop_connectives.ma subsets.ma categories.ma o-algebra.ma +basic_topologies.ma relations.ma saturations.ma relations.ma o-algebra.ma subsets.ma o-basic_topologies.ma o-algebra.ma o-saturations.ma cprop_connectives.ma logic/connectives.ma diff --git a/helm/software/matita/contribs/formal_topology/overlap/o-saturations.ma b/helm/software/matita/contribs/formal_topology/overlap/o-saturations.ma index 0511edd34..bd4e18777 100644 --- a/helm/software/matita/contribs/formal_topology/overlap/o-saturations.ma +++ b/helm/software/matita/contribs/formal_topology/overlap/o-saturations.ma @@ -15,11 +15,11 @@ include "o-algebra.ma". alias symbol "eq" = "setoid1 eq". -definition is_saturation ≝ +definition is_saturation: ∀C:OA. unary_morphism1 C C → CProp1 ≝ λC:OA.λA:unary_morphism1 C C. ∀U,V. (U ≤ A V) = (A U ≤ A V). -definition is_reduction ≝ +definition is_reduction: ∀C:OA. unary_morphism1 C C → CProp1 ≝ λC:OA.λJ:unary_morphism1 C C. ∀U,V. (J U ≤ V) = (J U ≤ J V). diff --git a/helm/software/matita/contribs/formal_topology/overlap/saturations.ma b/helm/software/matita/contribs/formal_topology/overlap/saturations.ma new file mode 100644 index 000000000..b78952fdb --- /dev/null +++ b/helm/software/matita/contribs/formal_topology/overlap/saturations.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "relations.ma". + +definition is_saturation: ∀C:REL. unary_morphism1 (Ω \sup C) (Ω \sup C) → CProp1 ≝ + λC:REL.λA:unary_morphism1 (Ω \sup C) (Ω \sup C). + ∀U,V. (U ⊆ A V) = (A U ⊆ A V). + +definition is_reduction: ∀C:REL. unary_morphism1 (Ω \sup C) (Ω \sup C) → CProp1 ≝ + λC:REL.λJ:unary_morphism1 (Ω \sup C) (Ω \sup C). + ∀U,V. (J U ⊆ V) = (J U ⊆ J V). + +theorem saturation_expansive: ∀C,A. is_saturation C A → ∀U. U ⊆ A U. + intros; apply (fi ?? (i ??)); apply subseteq_refl. +qed. + +theorem saturation_monotone: + ∀C,A. is_saturation C A → + ∀U,V. U ⊆ V → A U ⊆ A V. + intros; apply (if ?? (i ??)); apply subseteq_trans; [apply V|3: apply saturation_expansive ] + assumption. +qed. + +theorem saturation_idempotent: ∀C,A. is_saturation C A → ∀U. A (A U) = A U. + intros; split; + [ apply (if ?? (i ??)); apply subseteq_refl + | apply saturation_expansive; assumption] +qed. -- 2.39.2