From eb2c8affb16ba2a21b2979da7882e7582795d7b1 Mon Sep 17 00:00:00 2001 From: mkerjean Date: Sun, 21 Jun 2026 14:45:55 +0900 Subject: [PATCH 1/9] initial_topology --- CHANGELOG_UNRELEASED.md | 12 + theories/topology_theory/initial_topology.v | 278 +++++++++++++++++- theories/topology_theory/topology_structure.v | 1 - 3 files changed, 282 insertions(+), 9 deletions(-) diff --git a/CHANGELOG_UNRELEASED.md b/CHANGELOG_UNRELEASED.md index 98265323d1..52220d5d86 100644 --- a/CHANGELOG_UNRELEASED.md +++ b/CHANGELOG_UNRELEASED.md @@ -209,10 +209,22 @@ + lemmas `nondecreasing_esum_Efn`, `esum_pmf_lim_r`, `esum_pmf_lim_r_r`, `esum_pmf_lim` + lemma `pmf_lim_limn` - new file `uniform_metrizable.v` +- in `functions.v`: + + lemmas `zerofctE`, `onefctE` +- in `initial_topology.v`: + + lemmas `cvg_image` `continuous_initial_topology` `bigsetI_open` + `initial_fam_continuous` `cvg_init_fam` `cvg_image_init_fam` + `continuous_init_fam` + + definition `initial_fam_topology` + + instance of `Topological` on `initial_fam_topology` + +### Changed - new subdirectory `derive` + new files `differential.v`, `derivable.v`, `directional_derive_lemmas.v`, `derive_matrix.v` +- in `initial_topology.v`: + + lemma `cvg_image` renamed `cvg_initial` ### Changed - in `lebesgue_integral_nonneg.v`, generalized and deprecated: diff --git a/theories/topology_theory/initial_topology.v b/theories/topology_theory/initial_topology.v index 45b280f215..f30c2ba0c6 100644 --- a/theories/topology_theory/initial_topology.v +++ b/theories/topology_theory/initial_topology.v @@ -36,6 +36,10 @@ From mathcomp Require Import pseudometric_structure. (* `sub_initial_display V S U` *) (* : display for `sub_initial_topology V S U` *) (* *) +(* `initial_fam_topology f` *) +(* : initial topology by a family of functions F : (I -> (S -> T). *) +(* I must be a pointedType, S a choiceType and T a topologicalType. *) +(* ``` *) (* `initial_topology` is equipped with the structures of: *) (* - uniform space *) (* - pseudometric space (the metric space for initial topologies) *) @@ -91,27 +95,50 @@ HB.instance Definition _ := Lemma initial_continuous : continuous (f : W -> T). Proof. by apply/continuousP => A ?; exists A. Qed. -Lemma cvg_image (F : set_system S) (s : S) : - Filter F -> f @` setT = setT -> - F --> (s : W) <-> ([set f @` A | A in F] : set_system _) --> f s. +(* TODO : use image_set_system to be imported from measure theory *) +Lemma cvg_initial (F : set_system S) (s : S) : + Filter F -> + ([set f @` A | A in F] : set_system _) --> f s -> F --> (s : W). Proof. -move=> FF fsurj; split=> [cvFs|cvfFfs]. - move=> A /initial_continuous [B [Bop Bs sBAf]]. - have /cvFs FB : nbhs (s : W) B by exact: open_mem_nbhs. - rewrite nbhs_simpl; exists (f @^-1` A); first exact: filterS FB. - exact: image_preimage. +move=> FF cvfFfs. move=> A /= [_ [[B Bop <-] Bfs sBfA]]. have /cvfFfs [C FC fCeB] : nbhs (f s) B by rewrite nbhsE; exists B. rewrite nbhs_filterE; apply: filterS FC. by apply: subset_trans sBfA; rewrite -fCeB; apply: preimage_image. Qed. +Lemma cvg_image (F : set_system S) (s : S) : + Filter F -> f @` setT = setT -> + F --> (s : W) <-> ([set f @` A | A in F] : set_system _) --> f s. +Proof. +move=> FF fsurj; split=> [cvFs|/cvg_initial //]. +move=> A /initial_continuous [B] [/= Bop Bs sBAf]. +have /cvFs FB : nbhs (s : W) B by exact: open_mem_nbhs. +rewrite nbhs_simpl; exists (f @^-1` A); first exact: filterS FB. +by exact: image_preimage. +Qed. + +Lemma continuous_initial_topology e (U : topologicalType e) (g : U -> W): + continuous g <-> (continuous (f \o g)). +Proof. +split => cont x. + apply: continuous_comp; first by exact: cont. + exact: initial_continuous. +move => /= A [B/=]; rewrite /initial_topology /= => -[[C] oC fBC] Bgx BA. +apply: filterS; first by exact: BA. +rewrite -fBC /nbhs -comp_preimage. +apply: cont; apply: open_mem_nbhs => //. +have : f @` B `<=` C by move => z /= [t]; rewrite -fBC //= => ? <-. +by apply; exists (g x). +Qed. + Lemma initial_nbhs_preimage (w : W) A : nbhs (f w) A -> nbhs w (f @^-1` A). Proof. rewrite nbhsE /= => -[B [oB Bfx]] BA. by exists (f @^-1` B); split => //= ; [exists B|move=> z /= /BA]. Qed. + End Initial_Topology. (*#[deprecated(since="mathcomp-analysis 1.17.0", note="renamed `initial_open`")] Notation wopen := initial_open (only parsing).*) @@ -310,3 +337,238 @@ Proof. move=> cf z U [?/= [[W oW <-]]] /= Wsfz /filterS; apply; apply: cf. exact: open_mem_nbhs. Qed. + +Lemma bigsetI_open e (U : topologicalType e) (I: Type) (s : seq I) (P : pred I) (f : I -> set U) : + (forall i, P i -> open (f i)) -> open (\big[setI/setT]_(i<- s | P i) f i). +Proof. +move=> Pf. apply: big_ind => //. by apply: openT. exact: openI. +Qed. + +Definition initial_fam_topology {S : Type} {T : Type} {I : pointedType} + (F : I -> (S -> T)) : Type := S. + +Section initial_fam_topology. +Context d (S : choiceType) (T : topologicalType d) (I : pointedType) (F : I -> (S -> T)). +Local Notation W := (initial_fam_topology F). + +Definition init_fam_subbase := [set O | exists i, exists2 A, (O = (F i) @^-1` A) & open A ]. + +HB.instance Definition _ := Choice.on W. +HB.instance Definition _ := isSubBaseTopological.Build d W init_fam_subbase id. + +Lemma initial_fam_continuous : forall i, continuous ((F i) : W -> T). +Proof. move=> i; apply/continuousP => A oA. +exists [set (F i @^-1` A)]; last by rewrite bigcup_set1. +move=> /= O /= -> /= . rewrite /finI_from /=. +exists [fset (F i @^-1` A)]%fset; last by rewrite set_fset1 bigcap_set1. +by move => ? /=; rewrite inE; move/eqP ->; rewrite /init_fam_subbase in_setE /=; exists i; exists A. +Qed. + +Lemma cvg_init_fam (G : set_system W) (s : W) : + Filter G -> + (forall i, ([set (F i) @` A | A in G] : set_system _) --> F i s) -> G --> (s : W) . +Proof. +move=> FG cvfFfs. +move => A -[] /=. +move => _ [[]] H Hop <- [B HB Bs] sBfA/=; rewrite nbhs_filterE. +have BA : B `<=` A. + apply: subset_trans; last by exact: sBfA. + by move => y /= By; exists B =>//. +apply: (@filterS _ G _ B) => //; move /(_ B HB): Hop => /= [] /= C CO Bcap. +(* can´t apply fsubsetP or subsetP on CO to obtain the following *) +have Ci : forall (O : set S) , O \in C -> + exists i : I, exists2 A : set T, O = F i @^-1` A & open A. + by move => O /CO /set_mem //=. +move => {CO} {sBfA} {BA} {A}. +have GC: forall (O : set S), O \in C -> G O. + move => O OC; move: (OC) => /Ci [i [D OD openD]]. + have : nbhs (F i s) D. + rewrite nbhsE; exists D => //; split => //. + by move: Bs; rewrite -Bcap /bigcap /= => /(_ O OC); rewrite OD. + move/(cvfFfs i D); rewrite nbhs_filterE => //= [[O']] GO' /= O'D. + apply: filterS; last by exact: GO'. + by rewrite OD -O'D; apply: preimage_image. +by rewrite -Bcap; apply: filter_bigI => /= O OC; apply: GC. +Qed. + +Lemma cvg_image_init_fam (G : set_system W) (s : W) : + Filter G -> (forall i, (F i) @` setT = setT) -> + G --> (s : W) <-> (forall i, ([set (F i) @` A | A in G] : set_system _) --> F i s). +Proof. +move=> FG fsurj; split=> [cvFs|/cvg_init_fam] //. +move=> i A /initial_fam_continuous [B [//= Bop Bs sBAf]]. +have /cvFs FB : nbhs (s : W) B by apply: open_mem_nbhs. +rewrite nbhs_simpl; exists ((F i) @^-1` A); first exact: filterS FB. +by exact: image_preimage. +Qed. + +Lemma continuous_init_fam e (V : topologicalType e) (f : V -> W) : + (forall i, continuous ((F i) \o (f : V -> S))) <-> continuous f. +Proof. +split=> cont; last first. + move=> i x; apply: (continuous_comp); first by apply: cont. + by apply: initial_fam_continuous. +move => x /= A; rewrite /nbhs /= => -[/= B] [Bfrom Bfx BA] /=. +apply: filterS; first by apply: preimage_subset BA. +apply: open_mem_nbhs => //. +have:= Bfrom => -[] C CO <-; rewrite preimage_bigcup. +apply: bigcup_open => i /CO [] /= D Dsub <-; rewrite preimage_bigcap /=. +rewrite bigcap_fset /= big_seq; apply: bigsetI_open => /= E /Dsub. +move/set_mem; rewrite /init_fam_subbase /= => -[j [A0 -> oA]]. +by rewrite -comp_preimage; have /continuousP := cont j; apply. +Qed. + +End initial_fam_topology. + + +HB.instance Definition _ d (S : pointedType) (T : topologicalType d) + (I : pointedType) (F : I -> (S -> T)) := Pointed.on (initial_fam_topology F). +HB.instance Definition _ d (S : pointedType) (T : topologicalType d) + (I : pointedType) (F : I -> (S -> T)) := Filtered.on (initial_fam_topology F). + + +Section initial_fam_topology_uniform. +Context d (S : choiceType) (T : uniformType d) (I : pointedType) (F : I -> (S -> T)). + +Local Open Scope relation_scope. + +Let W := initial_fam_topology F. + +Definition initial_fam_ent : set_system (W * W) := + filter_from (@entourage _ T) (fun V => \bigcap_i (map_pair (F i))@^-1` V). + +Let initial_fam_ent_filter : Filter initial_fam_ent. +Proof. +apply: filter_from_filter; first by exists setT; exact: entourageT. +move=> P Q eP eQ; exists (P `&` Q); first by exact: filterI. +by move=> [a b]; rewrite /bigcap /= => H; split => i _; have [] := H i. +Qed. + +Let initial_fam_ent_refl A : initial_fam_ent A -> diagonal `<=` A. +Proof. +move=> [B ? sBA] [x y]/diagonalP ->; apply/sBA; rewrite /bigcap /= => i _. +exact: entourage_refl. +Qed. + +Let initial_fam_ent_inv A : initial_fam_ent A -> initial_fam_ent A^-1. +Proof. +move=> [B ? sBA]; exists B^-1; first exact: entourage_inv. +by move=> ??; exact/sBA. +Qed. + +Let initial_fam_ent_split A : initial_fam_ent A -> exists2 B, initial_fam_ent B & B \; B `<=` A. +Proof. +move=> [B entB sBA]; have : exists C, entourage C /\ C \; C `<=` B. + exact/exists2P/entourage_split_ex. +case=> C [entC CsubB]. +exists (\bigcap_i map_pair (F i) @^-1` C); first by exists C. +case=> x y [a /= P Q]. apply/sBA => i /= _. +apply: CsubB. exists ((F i) a) => /=; first by apply: P. +by apply: Q. +Qed. + +Let initial_fam_ent_nbhs : nbhs = nbhs_ initial_fam_ent. +Proof. +rewrite predeq2E => x V; split. + case=> [P [[/= B Q <-] Bx BsubV]]. + have: nbhs ( x) (\bigcup_(i in B) i). + apply: open_nbhs_nbhs; split => //. +(* move/nbhsP. [W ? WsubB]; exists ((map_pair f) @^-1` W); first by exists W. + by move=> ? ?; exact/BsubV/WsubB. +case=> W [V' entV' V'subW] /filterS; apply. +have : nbhs (f x) (xsection V' (f x)) by apply/nbhsP; exists V'. +rewrite (@nbhsE U) => [[O [openU Ofx Osub]]]. +(exists (f @^-1` O); repeat split => //); first by exists O => //. +by move=> w ?; apply/mem_set; apply: V'subW; apply/set_mem; exact: Osub. +Qed.*) +Admitted. + +HB.instance Definition _ := @Nbhs_isUniform.Build d (initial_fam_topology F) + initial_fam_ent initial_fam_ent_filter initial_fam_ent_refl initial_fam_ent_inv + initial_fam_ent_split initial_fam_ent_nbhs. +End initial_fam_topology_uniform. + + +(* THIS IS A TENTATIVE AND one should choose between the above construction and the following. Because of forgetful inheritance this seems to fail *) +From mathcomp Require Import supremum_topology. + +Section initial_fam_Topology_with_sup. +Context d (S : choiceType) (I : pointedType) (T : I -> topologicalType d) (F : forall i :I, (S -> T i)). + +Definition Fc := fun i => Topological.class (initial_topology (F i)). + +Definition initial_sup_topology := (sup_topology Fc). + +Local Notation W := (initial_sup_topology). + +Lemma initial_sup_continuous : forall i, continuous ((F i) : W -> T i). +Proof. move=> i; apply/continuousP => A oA. +exists [set (F i @^-1` A)]; last by rewrite bigcup_set1. +move=> /= O /= -> /= . rewrite /finI_from /=. +exists [fset (F i @^-1` A)]%fset; last by rewrite set_fset1 bigcap_set1. +by move => ? /=; rewrite inE; move/eqP ->; apply/mem_set; exists i => //; exists A. +Qed. + +Lemma cvg_init_sup (G : set_system W) (s : W) : + Filter G -> + (forall i, ([set (F i) @` A | A in G] : set_system _) --> F i s) -> G --> (s : W) . +Proof. +move=> FG cvfFfs. +move => A -[] /=. +move => _ [[]] H Hop <- [B HB Bs] sBfA/=; rewrite nbhs_filterE. +have BA : B `<=` A. + apply: subset_trans; last by exact: sBfA. + by move => y /= By; exists B =>//. +apply: (@filterS _ G _ B) => //; move /(_ B HB): Hop => /= [] /= C CO Bcap. +(* can´t apply fsubsetP or subsetP on CO to obtain the following *) +have Ci : forall (O : set S) , O \in C -> + exists i : I, exists2 A : set (T i), O = F i @^-1` A & open A. + by move => O /CO /set_mem //= [i] _ -[O' oO' <-]; exists i; exists O'. +move => {CO} {sBfA} {BA} {A}. +have GC: forall (O : set S), O \in C -> G O. + move => O OC; move: (OC) => /Ci [i [D OD openD]]. + have : nbhs (F i s) D. + rewrite nbhsE; exists D => //; split => //. + by move: Bs; rewrite -Bcap /bigcap /= => /(_ O OC); rewrite OD. + move/(cvfFfs i D); rewrite nbhs_filterE => //= [[O']] GO' /= O'D. + apply: filterS; last by exact: GO'. + by rewrite OD -O'D; apply: preimage_image. +by rewrite -Bcap; apply: filter_bigI => /= O OC; apply: GC. +Qed. + +Lemma cvg_image_init_sup (G : set_system W) (s : W) : + Filter G -> (forall i, (F i) @` setT = setT) -> + G --> (s : W) <-> (forall i, ([set (F i) @` A | A in G] : set_system _) --> F i s). +Proof. +move=> FG fsurj; split=> [cvFs|/cvg_init_sup] //. +move=> i A /initial_sup_continuous [B [//= Bop Bs sBAf]]. +have /cvFs FB : nbhs (s : W) B by apply: open_mem_nbhs. +rewrite nbhs_simpl; exists ((F i) @^-1` A); first exact: filterS FB. +by exact: image_preimage. +Qed. + +Lemma continuous_init_sup e (V : topologicalType e) (f : V -> W) : + (forall i, continuous ((F i) \o (f : V -> S))) <-> continuous f. +Proof. +split=> cont; last first. + move=> i x; apply: continuous_comp; first by apply: cont. + by apply: initial_sup_continuous. +move => x A; rewrite /nbhs /= => -[/= B] [Bfrom Bfx BA] /=. +apply: filterS; first by apply: preimage_subset BA. +apply: open_mem_nbhs => //. +have:= Bfrom => -[] C CO <-; rewrite preimage_bigcup. +apply: bigcup_open => i /CO [] /= D Dsub <-; rewrite preimage_bigcap /=. +rewrite bigcap_fset /= big_seq; apply: bigsetI_open => /= E /Dsub. +move/set_mem => -[j _ [E' oE' <-]]; rewrite -comp_preimage. +by have /continuousP := cont j; apply. +Qed. + +End initial_fam_Topology_with_sup. + +Section initial_fam_sup_uniform. +Context d (S : choiceType) (I : pointedType) (T : I -> uniformType d) (F : forall i :I, (S -> T i)). + +Local Notation W := (@initial_sup_topology S I T F). + +Fail Check (W : uniformType). +End initial_fam_sup_uniform. diff --git a/theories/topology_theory/topology_structure.v b/theories/topology_theory/topology_structure.v index 7c62fab6dc..4f8e5a378d 100644 --- a/theories/topology_theory/topology_structure.v +++ b/theories/topology_theory/topology_structure.v @@ -597,7 +597,6 @@ Definition openU_from (T : Type) (I : Type) (D : set I) (b : I -> set T) := #[deprecated(since="mathcomp-analysis 1.17.0", use=openU_from)] Notation open_from := openU_from (only parsing). - (** Topology defined by a base of open sets *) HB.factory Record isBaseTopological (d : filter_display) T & Choice T := { From 415a2128599393b1fb272ce4d54c7bdc88b3ed68 Mon Sep 17 00:00:00 2001 From: mkerjean Date: Thu, 26 Nov 2026 23:15:03 +0100 Subject: [PATCH 2/9] weird fix --- theories/topology_theory/initial_topology.v | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/theories/topology_theory/initial_topology.v b/theories/topology_theory/initial_topology.v index f30c2ba0c6..3739bc5ad1 100644 --- a/theories/topology_theory/initial_topology.v +++ b/theories/topology_theory/initial_topology.v @@ -122,6 +122,7 @@ Lemma continuous_initial_topology e (U : topologicalType e) (g : U -> W): continuous g <-> (continuous (f \o g)). Proof. split => cont x. + apply: continuous_comp => //. apply: continuous_comp; first by exact: cont. exact: initial_continuous. move => /= A [B/=]; rewrite /initial_topology /= => -[[C] oC fBC] Bgx BA. @@ -406,7 +407,8 @@ Lemma continuous_init_fam e (V : topologicalType e) (f : V -> W) : (forall i, continuous ((F i) \o (f : V -> S))) <-> continuous f. Proof. split=> cont; last first. - move=> i x; apply: (continuous_comp); first by apply: cont. + move=> i x; apply: continuous_comp => //. + apply: continuous_comp ; first by apply: cont. by apply: initial_fam_continuous. move => x /= A; rewrite /nbhs /= => -[/= B] [Bfrom Bfx BA] /=. apply: filterS; first by apply: preimage_subset BA. @@ -551,7 +553,8 @@ Lemma continuous_init_sup e (V : topologicalType e) (f : V -> W) : (forall i, continuous ((F i) \o (f : V -> S))) <-> continuous f. Proof. split=> cont; last first. - move=> i x; apply: continuous_comp; first by apply: cont. + move=> i x; apply: continuous_comp => //. + apply: continuous_comp ; first by apply: cont. by apply: initial_sup_continuous. move => x A; rewrite /nbhs /= => -[/= B] [Bfrom Bfx BA] /=. apply: filterS; first by apply: preimage_subset BA. From b3b3c55cd0f36f14c563f83712bfc5102271038e Mon Sep 17 00:00:00 2001 From: mkerjean Date: Fri, 27 Nov 2026 14:03:55 +0100 Subject: [PATCH 3/9] clean initial_fam_top_sup --- theories/topology_theory/initial_topology.v | 86 --------------------- 1 file changed, 86 deletions(-) diff --git a/theories/topology_theory/initial_topology.v b/theories/topology_theory/initial_topology.v index 3739bc5ad1..09fa9bccfd 100644 --- a/theories/topology_theory/initial_topology.v +++ b/theories/topology_theory/initial_topology.v @@ -489,89 +489,3 @@ HB.instance Definition _ := @Nbhs_isUniform.Build d (initial_fam_topology F) initial_fam_ent initial_fam_ent_filter initial_fam_ent_refl initial_fam_ent_inv initial_fam_ent_split initial_fam_ent_nbhs. End initial_fam_topology_uniform. - - -(* THIS IS A TENTATIVE AND one should choose between the above construction and the following. Because of forgetful inheritance this seems to fail *) -From mathcomp Require Import supremum_topology. - -Section initial_fam_Topology_with_sup. -Context d (S : choiceType) (I : pointedType) (T : I -> topologicalType d) (F : forall i :I, (S -> T i)). - -Definition Fc := fun i => Topological.class (initial_topology (F i)). - -Definition initial_sup_topology := (sup_topology Fc). - -Local Notation W := (initial_sup_topology). - -Lemma initial_sup_continuous : forall i, continuous ((F i) : W -> T i). -Proof. move=> i; apply/continuousP => A oA. -exists [set (F i @^-1` A)]; last by rewrite bigcup_set1. -move=> /= O /= -> /= . rewrite /finI_from /=. -exists [fset (F i @^-1` A)]%fset; last by rewrite set_fset1 bigcap_set1. -by move => ? /=; rewrite inE; move/eqP ->; apply/mem_set; exists i => //; exists A. -Qed. - -Lemma cvg_init_sup (G : set_system W) (s : W) : - Filter G -> - (forall i, ([set (F i) @` A | A in G] : set_system _) --> F i s) -> G --> (s : W) . -Proof. -move=> FG cvfFfs. -move => A -[] /=. -move => _ [[]] H Hop <- [B HB Bs] sBfA/=; rewrite nbhs_filterE. -have BA : B `<=` A. - apply: subset_trans; last by exact: sBfA. - by move => y /= By; exists B =>//. -apply: (@filterS _ G _ B) => //; move /(_ B HB): Hop => /= [] /= C CO Bcap. -(* can´t apply fsubsetP or subsetP on CO to obtain the following *) -have Ci : forall (O : set S) , O \in C -> - exists i : I, exists2 A : set (T i), O = F i @^-1` A & open A. - by move => O /CO /set_mem //= [i] _ -[O' oO' <-]; exists i; exists O'. -move => {CO} {sBfA} {BA} {A}. -have GC: forall (O : set S), O \in C -> G O. - move => O OC; move: (OC) => /Ci [i [D OD openD]]. - have : nbhs (F i s) D. - rewrite nbhsE; exists D => //; split => //. - by move: Bs; rewrite -Bcap /bigcap /= => /(_ O OC); rewrite OD. - move/(cvfFfs i D); rewrite nbhs_filterE => //= [[O']] GO' /= O'D. - apply: filterS; last by exact: GO'. - by rewrite OD -O'D; apply: preimage_image. -by rewrite -Bcap; apply: filter_bigI => /= O OC; apply: GC. -Qed. - -Lemma cvg_image_init_sup (G : set_system W) (s : W) : - Filter G -> (forall i, (F i) @` setT = setT) -> - G --> (s : W) <-> (forall i, ([set (F i) @` A | A in G] : set_system _) --> F i s). -Proof. -move=> FG fsurj; split=> [cvFs|/cvg_init_sup] //. -move=> i A /initial_sup_continuous [B [//= Bop Bs sBAf]]. -have /cvFs FB : nbhs (s : W) B by apply: open_mem_nbhs. -rewrite nbhs_simpl; exists ((F i) @^-1` A); first exact: filterS FB. -by exact: image_preimage. -Qed. - -Lemma continuous_init_sup e (V : topologicalType e) (f : V -> W) : - (forall i, continuous ((F i) \o (f : V -> S))) <-> continuous f. -Proof. -split=> cont; last first. - move=> i x; apply: continuous_comp => //. - apply: continuous_comp ; first by apply: cont. - by apply: initial_sup_continuous. -move => x A; rewrite /nbhs /= => -[/= B] [Bfrom Bfx BA] /=. -apply: filterS; first by apply: preimage_subset BA. -apply: open_mem_nbhs => //. -have:= Bfrom => -[] C CO <-; rewrite preimage_bigcup. -apply: bigcup_open => i /CO [] /= D Dsub <-; rewrite preimage_bigcap /=. -rewrite bigcap_fset /= big_seq; apply: bigsetI_open => /= E /Dsub. -move/set_mem => -[j _ [E' oE' <-]]; rewrite -comp_preimage. -by have /continuousP := cont j; apply. -Qed. - -End initial_fam_Topology_with_sup. - -Section initial_fam_sup_uniform. -Context d (S : choiceType) (I : pointedType) (T : I -> uniformType d) (F : forall i :I, (S -> T i)). - -Local Notation W := (@initial_sup_topology S I T F). - -Fail Check (W : uniformType). -End initial_fam_sup_uniform. From c5e2d95bd5cfd80a5cbd2b24c8e73569d5600062 Mon Sep 17 00:00:00 2001 From: mkerjean Date: Fri, 27 Nov 2026 15:54:30 +0100 Subject: [PATCH 4/9] wip nbhs entourage --- theories/topology_theory/initial_topology.v | 35 ++++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/theories/topology_theory/initial_topology.v b/theories/topology_theory/initial_topology.v index 09fa9bccfd..033220ced3 100644 --- a/theories/topology_theory/initial_topology.v +++ b/theories/topology_theory/initial_topology.v @@ -207,7 +207,7 @@ Qed. Let initial_ent_nbhs : nbhs = nbhs_ initial_ent. Proof. rewrite predeq2E => x V; split. - case=> [? [[B ? <-] ? BsubV]]; have: nbhs (f x) B by exact: open_mem_nbhs. + case=> [? [[B ? <-] ? BsubV]]; have: nbhs (f x) B by exact: open_mem_nbhs. move=> /nbhsP [W ? WsubB]; exists ((map_pair f) @^-1` W); first by exists W. by move=> ? ?; exact/BsubV/WsubB. case=> W [V' entV' V'subW] /filterS; apply. @@ -472,18 +472,37 @@ Qed. Let initial_fam_ent_nbhs : nbhs = nbhs_ initial_fam_ent. Proof. rewrite predeq2E => x V; split. - case=> [P [[/= B Q <-] Bx BsubV]]. - have: nbhs ( x) (\bigcup_(i in B) i). - apply: open_nbhs_nbhs; split => //. -(* move/nbhsP. [W ? WsubB]; exists ((map_pair f) @^-1` W); first by exists W. + case=> [P [[/= B Q <-]]] [b /[dup] Bb /Q] [/= J]. rewrite /init_fam_subbase /= => JF. + move=> <- Jx BV. + (* TODO : show that we have for every O such that J O and O = (F i) @^-1` A : nbhs (F ) x A, and thenuse /nbhsP on it to deduce the entourage to put in the proof *) admit. +case=> A [V' entV' V'subW] /filterS; apply. +have : forall i, nbhs (F i x) (xsection V' (F i x)). by move=> i; apply/nbhsP; exists V'. +move=> H. +exists (\bigcap_i (F i) @^-1` (xsection V' (F i x))); split => /=. + - rewrite /openU_from /=. admit. + - move=> /= i _; apply: nbhs_singleton; apply: H. + - move=> a /= biga; apply/mem_set/V'subW => i /= _; rewrite /map_pair /=. + by have:= biga i => /=; rewrite /xsection /= => VF; apply/set_mem/VF. +rewrite (@nbhsE _ T) => [[O [openU Ofx Osub]]]. +(exists (f @^-1` O); repeat split => //); first by exists O => //. +by move=> w ?; apply/mem_set; apply: V'subW; apply/set_mem; exact: Osub. +Admitted. + + +(* proof in the initial case : +Let initial_ent_nbhs : nbhs = nbhs_ initial_ent. +Proof. +rewrite predeq2E => x V; split. + case=> [? [[B ? <-] ? BsubV]]; have: nbhs (f x) B by exact: open_mem_nbhs. + move=> /nbhsP [W ? WsubB]; exists ((map_pair f) @^-1` W); first by exists W. by move=> ? ?; exact/BsubV/WsubB. case=> W [V' entV' V'subW] /filterS; apply. have : nbhs (f x) (xsection V' (f x)) by apply/nbhsP; exists V'. -rewrite (@nbhsE U) => [[O [openU Ofx Osub]]]. +rewrite (@nbhsE _ U) => [[O [openU Ofx Osub]]]. (exists (f @^-1` O); repeat split => //); first by exists O => //. by move=> w ?; apply/mem_set; apply: V'subW; apply/set_mem; exact: Osub. -Qed.*) -Admitted. +Qed. +*) HB.instance Definition _ := @Nbhs_isUniform.Build d (initial_fam_topology F) initial_fam_ent initial_fam_ent_filter initial_fam_ent_refl initial_fam_ent_inv From 9b4fa7d2385f5621fdc21013017465fef3239117 Mon Sep 17 00:00:00 2001 From: mkerjean Date: Fri, 27 Nov 2026 22:20:48 +0100 Subject: [PATCH 5/9] wip nbhs entourage --- theories/topology_theory/initial_topology.v | 68 ++++++++++++++++++++- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/theories/topology_theory/initial_topology.v b/theories/topology_theory/initial_topology.v index 033220ced3..2a9ccc9e17 100644 --- a/theories/topology_theory/initial_topology.v +++ b/theories/topology_theory/initial_topology.v @@ -434,6 +434,20 @@ Context d (S : choiceType) (T : uniformType d) (I : pointedType) (F : I -> (S -> Local Open Scope relation_scope. +(* For sup topology : + +Local Open Scope relation_scope. +Context {Ii : Type} {d : Ii -> _} {T : choiceType} + (Tc : forall i, Uniform (d i) T). + +Let I : choiceType := {classic I}. +Let TS := fun i => Uniform.Pack (Tc i). +Notation Tt := (sup_topology Tc). +Let ent_of (p : I * set (T * T)) := `[< @entourage _ (TS p.1) p.2 >]. +Let IEntType := {p : (I * set (T * T)) | ent_of p}. +Let IEnt : choiceType := IEntType. +*) + Let W := initial_fam_topology F. Definition initial_fam_ent : set_system (W * W) := @@ -469,17 +483,67 @@ apply: CsubB. exists ((F i) a) => /=; first by apply: P. by apply: Q. Qed. +Local Open Scope fset_scope. + + Let initial_fam_ent_nbhs : nbhs = nbhs_ initial_fam_ent. Proof. +(* Adapting the proof of sup topo *) +(* +rewrite predeq2E => x V; split. + move=> [/= X [[/= B + <-] [W' BW' W'x BV]]] => /(_ W' BW') [] /=. + move=> G Gsup W'eq; move: W'eq W'x BW' => <- Gx BG. + case (pselect ([set: I] = set0)) => [ I0 | /eqP/set0P [i0 _]]. + suff -> : V = setT by exists setT; apply: filterT. + rewrite -subTset => ??; apply: BV; exists (\bigcap_(i in [set` G]) i) => //. + move=> w /Gsup/set_mem; rewrite /init_fam_subbase. + by move=> /= [i]; have := (in_setT i); rewrite I0 => /set_mem. +(* have f : forall w, {p : IEnt | w \in G -> xsection ((projT1 p).2) x `<=` w}. + move=> /= v; apply: cid; case (pselect (v \in F)); first last. + by move=> ?; exists (exist ent_of _ (IEnt_pointT i0)). + move=> /[dup] /Fx vx /Fsup/set_mem [i _]; rewrite openE => /(_ x vx). + by move=> /(@nbhsP _ (TS i)) [w /asboolP ent]; exists (exist _ (i, w) ent). + exists (\bigcap_(w in [set` F]) (projT1 (projT1 (f w))).2); first last. + move=> v /= /xsectionP Fgw; apply: BV; exists (\bigcap_(i in [set` F]) i) => //. + by move=> w /[dup] ? /Fgw /= /mem_set/(projT2 (f w)); exact. + exists (\bigcap_(w in [set` F]) (projT1 (projT1 (f w))).2) => //. + exists [fset (fun i => projT1 (f i)) w | w in F]%fset. + by move=> u ?; exact: in_setT. + rewrite eqEsubset; split => y + z. + by move=>/(_ (projT1 (f z))) => + ?; apply; apply/imfsetP; exists z. + by move=> Fgy /imfsetP [/= u uF ->]; exact: Fgy. +case=> E [D [/= F FsubEnt <-] FsubE EsubV]. +have F_nbhs_x : Filter (nbhs x) by typeclasses eauto. +apply: (filterS EsubV). +pose f : IEnt -> set T := fun w => + @interior _ (TS (projT1 w).1) (xsection (projT1 w).2 x). +exists (\bigcap_(w in [set` F]) f w); repeat split. +- exists [set \bigcap_(w in [set` F]) f w]; last by rewrite bigcup_set1. + move=> ? ->; exists [fset f w | w in F]%fset. + move=> /= ? /imfsetP [[[/= i w /[dup] /asboolP entw ? Fiw ->]]]. + by apply/mem_set; rewrite /f /=; exists i => //; exact: open_interior. + by rewrite set_imfset bigcap_image //=. +- IEntP=> cI1 E7 /open_nbhs_entourage entw ent_of_cI1 ?. + exact: (nbhs_singleton (entw _).2). +- move=> t /= Ifwt. + by apply/mem_set/FsubE => it /Ifwt/interior_subset => /set_mem. +Qed.v *) +*) rewrite predeq2E => x V; split. case=> [P [[/= B Q <-]]] [b /[dup] Bb /Q] [/= J]. rewrite /init_fam_subbase /= => JF. move=> <- Jx BV. (* TODO : show that we have for every O such that J O and O = (F i) @^-1` A : nbhs (F ) x A, and thenuse /nbhsP on it to deduce the entourage to put in the proof *) admit. case=> A [V' entV' V'subW] /filterS; apply. have : forall i, nbhs (F i x) (xsection V' (F i x)). by move=> i; apply/nbhsP; exists V'. -move=> H. +move=> H. exists (\bigcap_i (F i) @^-1` (xsection V' (F i x))); split => /=. - - rewrite /openU_from /=. admit. + - rewrite /openU_from /=. + exists [set ( \bigcap_i F i @^-1` xsection V' (F i x))]. + + move => z -> /=. rewrite /open_finI_from /=. + exists [fset ( \bigcap_i F i @^-1` xsection V' (F i x))]. + * admit. (* look at above proof for sup*) + * rewrite set_imfset bigcap_image //=. rewrite /bigcap /=. + + by rewrite bigcup_set1. - move=> /= i _; apply: nbhs_singleton; apply: H. - move=> a /= biga; apply/mem_set/V'subW => i /= _; rewrite /map_pair /=. by have:= biga i => /=; rewrite /xsection /= => VF; apply/set_mem/VF. From f2f44292b66e2aa0008d420e09a87d59e0c5b06b Mon Sep 17 00:00:00 2001 From: mkerjean Date: Mon, 30 Nov 2026 15:08:01 +0100 Subject: [PATCH 6/9] wip --- theories/topology_theory/initial_topology.v | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/theories/topology_theory/initial_topology.v b/theories/topology_theory/initial_topology.v index 2a9ccc9e17..71a2f72f18 100644 --- a/theories/topology_theory/initial_topology.v +++ b/theories/topology_theory/initial_topology.v @@ -485,7 +485,6 @@ Qed. Local Open Scope fset_scope. - Let initial_fam_ent_nbhs : nbhs = nbhs_ initial_fam_ent. Proof. (* Adapting the proof of sup topo *) @@ -540,9 +539,12 @@ exists (\bigcap_i (F i) @^-1` (xsection V' (F i x))); split => /=. - rewrite /openU_from /=. exists [set ( \bigcap_i F i @^-1` xsection V' (F i x))]. + move => z -> /=. rewrite /open_finI_from /=. - exists [fset ( \bigcap_i F i @^-1` xsection V' (F i x))]. - * admit. (* look at above proof for sup*) - * rewrite set_imfset bigcap_image //=. rewrite /bigcap /=. + exists [fset ( \bigcap_i F i @^-1` xsection V' (F i x))]. + * move=> /= B /imfsetP [/= C]; rewrite inE => /eqP /[dup] BC -> /[dup] entw ->; apply/mem_set. + rewrite /init_fam_subbase /=. [[[/= i w /[dup] /asboolP entw ? Fiw ->]]]. + by apply/mem_set; rewrite /f /=; exists i => //; exact: open_interior. admit. ( +* look at above proof for sup*) + * rewrite set_imfset bigcap_image //=; rewrite /bigcap /=. + by rewrite bigcup_set1. - move=> /= i _; apply: nbhs_singleton; apply: H. - move=> a /= biga; apply/mem_set/V'subW => i /= _; rewrite /map_pair /=. From 6a661c6d840f55d17bd9a3d4d278bcb3a5c9e787 Mon Sep 17 00:00:00 2001 From: mkerjean Date: Tue, 1 Dec 2026 09:53:39 +0100 Subject: [PATCH 7/9] initial_fam_topology_uniform by Reynald Affeldt @affeldt-aist --- theories/topology_theory/initial_topology.v | 191 ++++++++------------ 1 file changed, 79 insertions(+), 112 deletions(-) diff --git a/theories/topology_theory/initial_topology.v b/theories/topology_theory/initial_topology.v index 71a2f72f18..abeb930fc8 100644 --- a/theories/topology_theory/initial_topology.v +++ b/theories/topology_theory/initial_topology.v @@ -434,143 +434,110 @@ Context d (S : choiceType) (T : uniformType d) (I : pointedType) (F : I -> (S -> Local Open Scope relation_scope. -(* For sup topology : +Let W := initial_fam_topology F. -Local Open Scope relation_scope. -Context {Ii : Type} {d : Ii -> _} {T : choiceType} - (Tc : forall i, Uniform (d i) T). - -Let I : choiceType := {classic I}. -Let TS := fun i => Uniform.Pack (Tc i). -Notation Tt := (sup_topology Tc). -Let ent_of (p : I * set (T * T)) := `[< @entourage _ (TS p.1) p.2 >]. -Let IEntType := {p : (I * set (T * T)) | ent_of p}. +Let ent_of (p : I * set (W * W)) := + `[< @entourage _ (@initial_topology S T (F p.1)) p.2 >]. +Let IEntType := {p : I * set (W * W) | ent_of p}. Let IEnt : choiceType := IEntType. -*) - -Let W := initial_fam_topology F. Definition initial_fam_ent : set_system (W * W) := - filter_from (@entourage _ T) (fun V => \bigcap_i (map_pair (F i))@^-1` V). + filter_from (open_finI_from [set: IEnt] (fun p => (projT1 p).2)) id. Let initial_fam_ent_filter : Filter initial_fam_ent. Proof. -apply: filter_from_filter; first by exists setT; exact: entourageT. -move=> P Q eP eQ; exists (P `&` Q); first by exact: filterI. -by move=> [a b]; rewrite /bigcap /= => H; split => i _; have [] := H i. +apply: filter_from_filter. + by exists setT => //; exists fset0 => //; rewrite set_fset0 bigcap_set0. +by move=> P Q eP eQ; exists (P `&` Q) => //; exact: open_finI_fromI. Qed. +Let IEntP (p : IEnt) : + @entourage _ (@initial_topology S T (F (projT1 p).1)) (projT1 p).2. +Proof. by case: p => /= -[i U] /asboolP. Qed. + Let initial_fam_ent_refl A : initial_fam_ent A -> diagonal `<=` A. Proof. -move=> [B ? sBA] [x y]/diagonalP ->; apply/sBA; rewrite /bigcap /= => i _. -exact: entourage_refl. +move=> [B IB BA] [_ y] /diagonalP ->; apply: BA. +case: IB => J/= _ <- => p /= _. +exact: entourage_refl (IEntP p). +Qed. + +Let mkIEnt {i : I} {E : set (W * W)} + (H : @entourage _ (@initial_topology S T (F i)) E) : IEnt := + exist _ (i, E) (asboolT H). + +Let init_IEnt (p : IEnt) : initial_fam_ent (projT1 p).2. +Proof. +exists (projT1 p).2 => //. +exists [fset p]%fset => /=; first by move=> ? _; rewrite in_setT. +by rewrite set_fset1 bigcap_set1. Qed. Let initial_fam_ent_inv A : initial_fam_ent A -> initial_fam_ent A^-1. Proof. -move=> [B ? sBA]; exists B^-1; first exact: entourage_inv. -by move=> ??; exact/sBA. +move=> [_ [D _ <-] DA]. +apply: (@filterS _ _ _ (\bigcap_(p in [set` D]) (projT1 p).2)^-1). +- exact: initial_fam_ent_filter. +- by move=> xy H; apply: DA => p Dp; exact: H. +apply: filter_bigI => // p Dp. +exact: (init_IEnt (mkIEnt (entourage_inv (IEntP p)))). Qed. -Let initial_fam_ent_split A : initial_fam_ent A -> exists2 B, initial_fam_ent B & B \; B `<=` A. +Let initial_fam_ent_split A : + initial_fam_ent A -> exists2 B, initial_fam_ent B & B \; B `<=` A. Proof. -move=> [B entB sBA]; have : exists C, entourage C /\ C \; C `<=` B. - exact/exists2P/entourage_split_ex. -case=> C [entC CsubB]. -exists (\bigcap_i map_pair (F i) @^-1` C); first by exists C. -case=> x y [a /= P Q]. apply/sBA => i /= _. -apply: CsubB. exists ((F i) a) => /=; first by apply: P. -by apply: Q. +have fam_split (p : IEnt) : + exists B, initial_fam_ent B /\ B \; B `<=` (projT1 p).2. + have [C entC CU] := entourage_split_ex (IEntP p). + by exists C; split => //; exact: (init_IEnt (mkIEnt entC)). +have /choice[Es HEs] := fam_split. +move=> [_ [D _ <-] DA]. +exists (\bigcap_(p in [set` D]) Es p). + apply: filter_bigI; first exact: initial_fam_ent_filter. + by move=> p pD; apply HEs. +move=> xy [z Bxz Bzy]; apply: DA => p Dp. +by apply HEs; exists z; [exact: Bxz|exact: Bzy]. Qed. Local Open Scope fset_scope. Let initial_fam_ent_nbhs : nbhs = nbhs_ initial_fam_ent. Proof. -(* Adapting the proof of sup topo *) -(* -rewrite predeq2E => x V; split. - move=> [/= X [[/= B + <-] [W' BW' W'x BV]]] => /(_ W' BW') [] /=. - move=> G Gsup W'eq; move: W'eq W'x BW' => <- Gx BG. - case (pselect ([set: I] = set0)) => [ I0 | /eqP/set0P [i0 _]]. - suff -> : V = setT by exists setT; apply: filterT. - rewrite -subTset => ??; apply: BV; exists (\bigcap_(i in [set` G]) i) => //. - move=> w /Gsup/set_mem; rewrite /init_fam_subbase. - by move=> /= [i]; have := (in_setT i); rewrite I0 => /set_mem. -(* have f : forall w, {p : IEnt | w \in G -> xsection ((projT1 p).2) x `<=` w}. - move=> /= v; apply: cid; case (pselect (v \in F)); first last. - by move=> ?; exists (exist ent_of _ (IEnt_pointT i0)). - move=> /[dup] /Fx vx /Fsup/set_mem [i _]; rewrite openE => /(_ x vx). - by move=> /(@nbhsP _ (TS i)) [w /asboolP ent]; exists (exist _ (i, w) ent). - exists (\bigcap_(w in [set` F]) (projT1 (projT1 (f w))).2); first last. - move=> v /= /xsectionP Fgw; apply: BV; exists (\bigcap_(i in [set` F]) i) => //. - by move=> w /[dup] ? /Fgw /= /mem_set/(projT2 (f w)); exact. - exists (\bigcap_(w in [set` F]) (projT1 (projT1 (f w))).2) => //. - exists [fset (fun i => projT1 (f i)) w | w in F]%fset. - by move=> u ?; exact: in_setT. - rewrite eqEsubset; split => y + z. - by move=>/(_ (projT1 (f z))) => + ?; apply; apply/imfsetP; exists z. - by move=> Fgy /imfsetP [/= u uF ->]; exact: Fgy. -case=> E [D [/= F FsubEnt <-] FsubE EsubV]. -have F_nbhs_x : Filter (nbhs x) by typeclasses eauto. -apply: (filterS EsubV). -pose f : IEnt -> set T := fun w => - @interior _ (TS (projT1 w).1) (xsection (projT1 w).2 x). -exists (\bigcap_(w in [set` F]) f w); repeat split. -- exists [set \bigcap_(w in [set` F]) f w]; last by rewrite bigcup_set1. - move=> ? ->; exists [fset f w | w in F]%fset. - move=> /= ? /imfsetP [[[/= i w /[dup] /asboolP entw ? Fiw ->]]]. - by apply/mem_set; rewrite /f /=; exists i => //; exact: open_interior. - by rewrite set_imfset bigcap_image //=. -- IEntP=> cI1 E7 /open_nbhs_entourage entw ent_of_cI1 ?. - exact: (nbhs_singleton (entw _).2). -- move=> t /= Ifwt. - by apply/mem_set/FsubE => it /Ifwt/interior_subset => /set_mem. -Qed.v *) -*) -rewrite predeq2E => x V; split. - case=> [P [[/= B Q <-]]] [b /[dup] Bb /Q] [/= J]. rewrite /init_fam_subbase /= => JF. - move=> <- Jx BV. - (* TODO : show that we have for every O such that J O and O = (F i) @^-1` A : nbhs (F ) x A, and thenuse /nbhsP on it to deduce the entourage to put in the proof *) admit. -case=> A [V' entV' V'subW] /filterS; apply. -have : forall i, nbhs (F i x) (xsection V' (F i x)). by move=> i; apply/nbhsP; exists V'. -move=> H. -exists (\bigcap_i (F i) @^-1` (xsection V' (F i x))); split => /=. - - rewrite /openU_from /=. - exists [set ( \bigcap_i F i @^-1` xsection V' (F i x))]. - + move => z -> /=. rewrite /open_finI_from /=. - exists [fset ( \bigcap_i F i @^-1` xsection V' (F i x))]. - * move=> /= B /imfsetP [/= C]; rewrite inE => /eqP /[dup] BC -> /[dup] entw ->; apply/mem_set. - rewrite /init_fam_subbase /=. [[[/= i w /[dup] /asboolP entw ? Fiw ->]]]. - by apply/mem_set; rewrite /f /=; exists i => //; exact: open_interior. admit. ( -* look at above proof for sup*) - * rewrite set_imfset bigcap_image //=; rewrite /bigcap /=. - + by rewrite bigcup_set1. - - move=> /= i _; apply: nbhs_singleton; apply: H. - - move=> a /= biga; apply/mem_set/V'subW => i /= _; rewrite /map_pair /=. - by have:= biga i => /=; rewrite /xsection /= => VF; apply/set_mem/VF. -rewrite (@nbhsE _ T) => [[O [openU Ofx Osub]]]. -(exists (f @^-1` O); repeat split => //); first by exists O => //. -by move=> w ?; apply/mem_set; apply: V'subW; apply/set_mem; exact: Osub. -Admitted. - - -(* proof in the initial case : -Let initial_ent_nbhs : nbhs = nbhs_ initial_ent. -Proof. -rewrite predeq2E => x V; split. - case=> [? [[B ? <-] ? BsubV]]; have: nbhs (f x) B by exact: open_mem_nbhs. - move=> /nbhsP [W ? WsubB]; exists ((map_pair f) @^-1` W); first by exists W. - by move=> ? ?; exact/BsubV/WsubB. -case=> W [V' entV' V'subW] /filterS; apply. -have : nbhs (f x) (xsection V' (f x)) by apply/nbhsP; exists V'. -rewrite (@nbhsE _ U) => [[O [openU Ofx Osub]]]. -(exists (f @^-1` O); repeat split => //); first by exists O => //. -by move=> w ?; apply/mem_set; apply: V'subW; apply/set_mem; exact: Osub. +apply/funext => x; apply/seteqP; split=> A. +- move=> -[] /= _ [[G GF <-] [B GB Bx] GA]. + have BA : (B `<=` A)%classic by move=> y By; apply: GA; exists B. + have Fx : Filter (nbhs_ initial_fam_ent x). + apply: filter_from_filter; first by exists setT; exact: filterT. + move=> P Q entP entQ; exists (P `&` Q)%classic; first exact: filterI. + by move=> y /xsectionP[Pxy Qxy]; split; exact/xsectionP. + apply: (filterS BA). + have [/= H HF HB] := GF _ GB. + rewrite -{}HB in GB Bx BA *. + apply: filter_bigI => /= O OC. + have /HF /set_mem [i [D OD oD]] := OC. + have /nbhsP [V entV VD] : nbhs (F i x) D. + apply: open_mem_nbhs => //. + rewrite -[D (F i x)]/((F i @^-1` D) x). + apply: Bx. + by rewrite -OD. + exists (map_pair (F i) @^-1` V). + by apply: (init_IEnt (mkIEnt _)); exists V => //; exact: subset_refl. + by move=> y /xsectionP Hy; rewrite OD; apply: VD; exact/xsectionP. +- move=> [E [_ [D _ <-] DE]]. + move/filterS; apply. + apply: (@filterS _ _ _ (\bigcap_(p in [set` D]) xsection (projT1 p).2 x)). + by move=> y Dy; apply/xsectionP; apply: DE => p /Dy /xsectionP. + apply: filter_bigI => p Dp. + have [V entV FV] := IEntP p. + have : nbhs (F (projT1 p).1 x) (xsection V (F (projT1 p).1 x)). + by apply/nbhsP; exists V. + move/initial_fam_continuous => h. + apply: filterS; last exact: h. + by move=> y /= /xsectionP Vy; apply/xsectionP; exact: FV. Qed. -*) HB.instance Definition _ := @Nbhs_isUniform.Build d (initial_fam_topology F) - initial_fam_ent initial_fam_ent_filter initial_fam_ent_refl initial_fam_ent_inv - initial_fam_ent_split initial_fam_ent_nbhs. + initial_fam_ent initial_fam_ent_filter initial_fam_ent_refl + initial_fam_ent_inv initial_fam_ent_split initial_fam_ent_nbhs. + End initial_fam_topology_uniform. From e4e9f7393482634d19f1674d9df4b601dbae0ab9 Mon Sep 17 00:00:00 2001 From: mkerjean Date: Tue, 1 Dec 2026 11:28:28 +0100 Subject: [PATCH 8/9] wip --- theories/normedtype_theory/urysohn.v | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/theories/normedtype_theory/urysohn.v b/theories/normedtype_theory/urysohn.v index 9de4760750..e29492c154 100644 --- a/theories/normedtype_theory/urysohn.v +++ b/theories/normedtype_theory/urysohn.v @@ -441,6 +441,17 @@ Module completely_regular_uniformity. Section completely_regular_uniformity. Context {d} {R : realType} {X : topologicalType d}. Hypothesis crs : completely_regular_space X. +(* +Definition zero_continuous : {f : X -> R | continuous f} := + exist _ (fun=> 0) (@cst_continuous _ X _ R (0 : R)). + +HB.instance Definition _ := + @isPointed.Build {f : X -> R | continuous f} zero_continuous. +Check ( X -> R : pointedType). +Fail Check ({f : X -> R | continuous f} : pointedType). + +Let X' : uniformType _ := @initial_fam_topology X R ({f : X -> R | continuous f} : pointedType) (fun g : {f : X -> R | continuous f} => (g : X ->R)). *) + Let X' : uniformType _ := @sup_topology {f : X -> R | continuous f} _ X (fun f => Uniform.class (initial_topology (projT1 f))). From 5037503d29d8a99873af761fbc36373f9efa86b8 Mon Sep 17 00:00:00 2001 From: mkerjean Date: Tue, 1 Dec 2026 14:08:16 +0100 Subject: [PATCH 9/9] wip --- theories/normedtype_theory/urysohn.v | 6 +++++- theories/topology_theory/function_spaces.v | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/theories/normedtype_theory/urysohn.v b/theories/normedtype_theory/urysohn.v index e29492c154..1306ba2b94 100644 --- a/theories/normedtype_theory/urysohn.v +++ b/theories/normedtype_theory/urysohn.v @@ -441,13 +441,17 @@ Module completely_regular_uniformity. Section completely_regular_uniformity. Context {d} {R : realType} {X : topologicalType d}. Hypothesis crs : completely_regular_space X. + +HB.about sigT. + +(* Issue here to replace sup @ initial with initial_fam_topology : see https://rocq-prover.zulipchat.com/#narrow/channel/237666-math-comp-analysis/topic/pointed.20Type.20on.20continuous.20functions *) (* Definition zero_continuous : {f : X -> R | continuous f} := exist _ (fun=> 0) (@cst_continuous _ X _ R (0 : R)). HB.instance Definition _ := @isPointed.Build {f : X -> R | continuous f} zero_continuous. -Check ( X -> R : pointedType). +Check ( X -> R : pointedType). Fail Check ({f : X -> R | continuous f} : pointedType). Let X' : uniformType _ := @initial_fam_topology X R ({f : X -> R | continuous f} : pointedType) (fun g : {f : X -> R | continuous f} => (g : X ->R)). *) diff --git a/theories/topology_theory/function_spaces.v b/theories/topology_theory/function_spaces.v index 1bec4f6cd1..65cda3a99c 100644 --- a/theories/topology_theory/function_spaces.v +++ b/theories/topology_theory/function_spaces.v @@ -167,6 +167,8 @@ Proof. by []. Qed. Section Product_Topology. +(* cannot be instantiated by initial_fam_topology because of dependant product *) + Definition product_topology_def I d (T : forall i : I, topologicalType (d i)) := sup_topology (fun i => Topological.class (initial_topology (fun f : (forall i, T i) => f i))). @@ -191,6 +193,8 @@ HB.instance Definition _ (Ii : countType) d (R : realType) End Product_Topology. +(* NB : equivalent to initial_fam_topology (fun x : U -> (f : (U -> V) -> f x ) *) + Notation "{ 'ptws' U -> V }" := (prod_topology (fun _ : U => V)) : type_scope. Notation "{ 'ptws' , F --> f }" := (cvg_to F (nbhs (f : {ptws _ -> _}))) : classical_set_scope.