diff --git a/Mathlib/Topology/UniformSpace/Ascoli.lean b/Mathlib/Topology/UniformSpace/Ascoli.lean index d56ca122f174a..85a33eeb55b36 100644 --- a/Mathlib/Topology/UniformSpace/Ascoli.lean +++ b/Mathlib/Topology/UniformSpace/Ascoli.lean @@ -218,7 +218,7 @@ theorem EquicontinuousOn.comap_uniformOnFun_eq {𝔖 : Set (Set X)} (𝔖_compac -- `K.restrict ∘ F : ΞΉ β†’ (K β†’α΅€ Ξ±)` for `K ∈ 𝔖`. have H1 : (UniformOnFun.uniformSpace X Ξ± 𝔖).comap F = β¨… (K ∈ 𝔖), (UniformFun.uniformSpace _ _).comap (K.restrict ∘ F) := by - simp_rw [UniformOnFun.uniformSpace, UniformSpace.comap_iInf, UniformSpace.comap_comap] + simp_rw [UniformOnFun.uniformSpace, UniformSpace.comap_iInf, ← UniformSpace.comap_comap]; rfl -- Now, note that a similar fact is true for the uniform structure on `X β†’ Ξ±` induced by -- the map `(⋃₀ 𝔖).restrict : (X β†’ Ξ±) β†’ ((⋃₀ 𝔖) β†’ Ξ±)`: it is equal to the one induced by -- all maps `K.restrict : (X β†’ Ξ±) β†’ (K β†’ Ξ±)` for `K ∈ 𝔖`, which means that the RHS of our diff --git a/Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean b/Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean index ed9dfb472f78f..2389e25ab80ba 100644 --- a/Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean +++ b/Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean @@ -596,7 +596,8 @@ declared as an instance on `Ξ± β†’α΅€[𝔖] Ξ²`. It is defined as the infimum, f by `S.restrict`, the map of restriction to `S`, of the uniform structure `𝒰(s, Ξ², uΞ²)` on `β†₯S β†’α΅€ Ξ²`. We will denote it `𝒱(Ξ±, Ξ², 𝔖, uΞ²)`, where `uΞ²` is the uniform structure on `Ξ²`. -/ instance uniformSpace : UniformSpace (Ξ± β†’α΅€[𝔖] Ξ²) := - β¨… (s : Set Ξ±) (_ : s ∈ 𝔖), UniformSpace.comap s.restrict 𝒰(s, Ξ², _) + β¨… (s : Set Ξ±) (_ : s ∈ 𝔖), + .comap (UniformFun.ofFun ∘ s.restrict ∘ UniformOnFun.toFun 𝔖) 𝒰(s, Ξ², _) local notation "𝒱(" Ξ± ", " Ξ² ", " 𝔖 ", " u ")" => @UniformOnFun.uniformSpace Ξ± Ξ² u 𝔖 @@ -735,6 +736,47 @@ protected theorem uniformContinuous_restrict (h : s ∈ 𝔖) : variable {Ξ±} +/-- A version of `UniformOnFun.hasBasis_uniformity_of_basis` +with weaker conclusion and weaker assumptions. + +We make no assumptions about the set `𝔖` +but conclude only that the uniformity is equal to some indexed infimum. -/ +protected theorem uniformity_eq_of_basis {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {V : ΞΉ β†’ Set (Ξ² Γ— Ξ²)} + (h : (𝓀 Ξ²).HasBasis p V) : + 𝓀 (Ξ± β†’α΅€[𝔖] Ξ²) = β¨… s ∈ 𝔖, β¨… (i) (_ : p i), π“Ÿ (UniformOnFun.gen 𝔖 s (V i)) := by + simp_rw [iInf_uniformity, uniformity_comap, + (UniformFun.hasBasis_uniformity_of_basis _ _ h).eq_biInf, comap_iInf, comap_principal, + Function.comp_apply, UniformFun.gen, Subtype.forall] + rfl + +protected theorem uniformity_eq : 𝓀 (Ξ± β†’α΅€[𝔖] Ξ²) = β¨… s ∈ 𝔖, β¨… V ∈ 𝓀 Ξ², π“Ÿ (UniformOnFun.gen 𝔖 s V) := + UniformOnFun.uniformity_eq_of_basis _ _ (𝓀 Ξ²).basis_sets + +protected theorem gen_mem_uniformity (hs : s ∈ 𝔖) {V : Set (Ξ² Γ— Ξ²)} (hV : V ∈ 𝓀 Ξ²) : + UniformOnFun.gen 𝔖 s V ∈ 𝓀 (Ξ± β†’α΅€[𝔖] Ξ²) := by + rw [UniformOnFun.uniformity_eq] + apply_rules [mem_iInf_of_mem, mem_principal_self] + +/-- A version of `UniformOnFun.hasBasis_nhds_of_basis` +with weaker conclusion and weaker assumptions. + +We make no assumptions about the set `𝔖` +but conclude only that the neighbourhoods filter is equal to some indexed infimum. -/ +protected theorem nhds_eq_of_basis {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {V : ΞΉ β†’ Set (Ξ² Γ— Ξ²)} + (h : (𝓀 Ξ²).HasBasis p V) (f : Ξ± β†’α΅€[𝔖] Ξ²) : + 𝓝 f = β¨… s ∈ 𝔖, β¨… (i) (_ : p i), π“Ÿ {g | βˆ€ x ∈ s, (toFun 𝔖 f x, toFun 𝔖 g x) ∈ V i} := by + simp_rw [nhds_eq_comap_uniformity, UniformOnFun.uniformity_eq_of_basis _ _ h, comap_iInf, + comap_principal]; rfl + +protected theorem nhds_eq (f : Ξ± β†’α΅€[𝔖] Ξ²) : + 𝓝 f = β¨… s ∈ 𝔖, β¨… V ∈ 𝓀 Ξ², π“Ÿ {g | βˆ€ x ∈ s, (toFun 𝔖 f x, toFun 𝔖 g x) ∈ V} := + UniformOnFun.nhds_eq_of_basis _ _ (𝓀 Ξ²).basis_sets f + +protected theorem gen_mem_nhds (f : Ξ± β†’α΅€[𝔖] Ξ²) (hs : s ∈ 𝔖) {V : Set (Ξ² Γ— Ξ²)} (hV : V ∈ 𝓀 Ξ²) : + {g | βˆ€ x ∈ s, (toFun 𝔖 f x, toFun 𝔖 g x) ∈ V} ∈ 𝓝 f := by + rw [UniformOnFun.nhds_eq] + apply_rules [mem_iInf_of_mem, mem_principal_self] + /-- Let `u₁`, `uβ‚‚` be two uniform structures on `Ξ³` and `𝔖₁ 𝔖₂ : Set (Set Ξ±)`. If `u₁ ≀ uβ‚‚` and `𝔖₂ βŠ† 𝔖₁` then `𝒱(Ξ±, Ξ³, 𝔖₁, u₁) ≀ 𝒱(Ξ±, Ξ³, 𝔖₂, uβ‚‚)`. -/ protected theorem mono ⦃u₁ uβ‚‚ : UniformSpace γ⦄ (hu : u₁ ≀ uβ‚‚) ⦃𝔖₁ 𝔖₂ : Set (Set Ξ±)⦄ @@ -828,30 +870,13 @@ Note that one can easily see that assuming `βˆ€ T ∈ 𝔗, βˆƒ S ∈ 𝔖, f '' we will get this for free when we prove that `𝒱(Ξ±, Ξ², 𝔖, uΞ²) = 𝒱(Ξ±, Ξ², 𝔖', uΞ²)` where `𝔖'` is the ***noncovering*** bornology generated by `𝔖`. -/ protected theorem precomp_uniformContinuous {𝔗 : Set (Set Ξ³)} {f : Ξ³ β†’ Ξ±} - (hf : 𝔗 βŠ† image f ⁻¹' 𝔖) : - UniformContinuous fun g : Ξ± β†’α΅€[𝔖] Ξ² => ofFun 𝔗 (g ∘ f) := by - -- Since `comap` distributes on `iInf`, it suffices to prove that - -- `β¨… s ∈ 𝔖, comap s.restrict 𝒰(β†₯s, Ξ², uΞ²) ≀ β¨… t ∈ 𝔗, comap (t.restrict ∘ (β€” ∘ f)) 𝒰(β†₯t, Ξ², uΞ²)`. - simp_rw [uniformContinuous_iff, UniformOnFun.uniformSpace, UniformSpace.comap_iInf, ← - UniformSpace.comap_comap] - -- For any `t ∈ 𝔗`, note `s := f '' t ∈ 𝔖`. - -- We will show that `comap s.restrict 𝒰(β†₯s, Ξ², uΞ²) ≀ comap (t.restrict ∘ (β€” ∘ f)) 𝒰(β†₯t, Ξ², uΞ²)`. - refine' le_iInfβ‚‚ fun t ht => iInf_le_of_le (f '' t) <| iInf_le_of_le (hf ht) _ - -- Let `f'` be the map from `t` to `f '' t` induced by `f`. - let f' : t β†’ f '' t := (mapsTo_image f t).restrict f t (f '' t) - -- By definition `t.restrict ∘ (β€” ∘ f) = (β€” ∘ f') ∘ (f '' t).restrict`. - have : - (t.restrict ∘ fun g : Ξ± β†’α΅€[𝔖] Ξ² => ofFun 𝔗 (g ∘ f)) = - (fun g : f '' t β†’ Ξ² => g ∘ f') ∘ (f '' t).restrict := - rfl - -- Thus, we have to show `comap (f '' t).restrict 𝒰(β†₯(f '' t), Ξ², uΞ²) ≀` - -- `comap (f '' t).restrict (comap (β€” ∘ f') 𝒰(β†₯t, Ξ², uΞ²))`. - rw [this, @UniformSpace.comap_comap (Ξ± β†’α΅€[𝔖] Ξ²) (f '' t β†’α΅€ Ξ²)] - -- But this is exactly monotonicity of `comap` applied to - -- `UniformFun.precomp_continuous`. - refine' UniformSpace.comap_mono _ - rw [← uniformContinuous_iff] - exact UniformFun.precomp_uniformContinuous + (hf : MapsTo (f '' Β·) 𝔗 𝔖) : + UniformContinuous fun g : Ξ± β†’α΅€[𝔖] Ξ² => ofFun 𝔗 (toFun 𝔖 g ∘ f) := by + -- This follows from the fact that `(Β· ∘ f) Γ— (Β· ∘ f)` maps `gen (f '' t) V` to `gen t V`. + simp_rw [UniformContinuous, UniformOnFun.uniformity_eq, tendsto_iInf] + refine fun t ht V hV ↦ tendsto_iInf' (f '' t) <| tendsto_iInf' (hf ht) <| + tendsto_iInf' V <| tendsto_iInf' hV ?_ + simpa only [tendsto_principal_principal, UniformOnFun.gen] using fun _ ↦ forall_mem_image.1 #align uniform_on_fun.precomp_uniform_continuous UniformOnFun.precomp_uniformContinuous /-- Turn a bijection `e : Ξ³ ≃ Ξ±` such that we have both `βˆ€ T ∈ 𝔗, e '' T ∈ 𝔖` and @@ -899,12 +924,7 @@ protected theorem uniformContinuous_toFun (h : ⋃₀ 𝔖 = univ) : of `TendstoUniformlyOn`) for all `S ∈ 𝔖`. -/ protected theorem tendsto_iff_tendstoUniformlyOn {F : ΞΉ β†’ Ξ± β†’α΅€[𝔖] Ξ²} {f : Ξ± β†’α΅€[𝔖] Ξ²} : Tendsto F p (𝓝 f) ↔ βˆ€ s ∈ 𝔖, TendstoUniformlyOn (toFun 𝔖 ∘ F) (toFun 𝔖 f) p s := by - rw [UniformOnFun.topologicalSpace_eq, nhds_iInf, tendsto_iInf] - refine' forall_congr' fun s => _ - rw [nhds_iInf, tendsto_iInf] - refine' forall_congr' fun hs => _ - rw [nhds_induced (T := _), tendsto_comap_iff, tendstoUniformlyOn_iff_tendstoUniformly_comp_coe, - UniformFun.tendsto_iff_tendstoUniformly] + simp only [UniformOnFun.nhds_eq, tendsto_iInf, tendsto_principal] rfl #align uniform_on_fun.tendsto_iff_tendsto_uniformly_on UniformOnFun.tendsto_iff_tendstoUniformlyOn