Skip to content

Commit c599759

Browse files
mcdollBergschaf
authored andcommitted
feat(Topology): lemmas about nhdsSet filter (leanprover-community#39350)
1 parent c5008cf commit c599759

4 files changed

Lines changed: 50 additions & 8 deletions

File tree

Mathlib/Order/Filter/Tendsto.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ theorem Tendsto.frequently_map {l₁ : Filter α} {l₂ : Filter β} {p : α →
6464
@[simp]
6565
theorem tendsto_bot {f : α → β} {l : Filter β} : Tendsto f ⊥ l := by simp [Tendsto]
6666

67+
@[simp]
68+
theorem tendsto_bot_right_iff {f : α → β} {l : Filter α} : Tendsto f l ⊥ ↔ l = ⊥ := by
69+
simp [Tendsto]
70+
6771
theorem Tendsto.of_neBot_imp {f : α → β} {la : Filter α} {lb : Filter β}
6872
(h : NeBot la → Tendsto f la lb) : Tendsto f la lb := by
6973
rcases eq_or_neBot la with rfl | hla

Mathlib/Topology/Compactness/Compact.lean

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,39 @@ theorem isCompact_iff_ultrafilter_le_nhds' :
146146

147147
alias ⟨IsCompact.ultrafilter_le_nhds', _⟩ := isCompact_iff_ultrafilter_le_nhds'
148148

149+
/-- If a compact set belongs to a filter and all cluster points in this set and in the filter
150+
lie in a set `s'` then the filter is less than or equal to `𝓝ˢ s'`. -/
151+
lemma IsCompact.le_nhdsSet_of_clusterPt (hs : IsCompact s) {l : Filter X} {s' : Set X}
152+
(hmem : s ∈ l) (h : ∀ x ∈ s, ClusterPt x l → x ∈ s') : l ≤ 𝓝ˢ s' := by
153+
refine le_iff_ultrafilter.2 fun f hf ↦ ?_
154+
rcases hs.ultrafilter_le_nhds' f (hf hmem) with ⟨x, hxs, hx⟩
155+
grw [hx]
156+
refine nhds_le_nhdsSet ?_
157+
exact h x hxs (.mono (.of_le_nhds hx) hf)
158+
149159
/-- If a compact set belongs to a filter and this filter has a unique cluster point `y` in this set,
150160
then the filter is less than or equal to `𝓝 y`. -/
151161
lemma IsCompact.le_nhds_of_unique_clusterPt (hs : IsCompact s) {l : Filter X} {y : X}
152162
(hmem : s ∈ l) (h : ∀ x ∈ s, ClusterPt x l → x = y) : l ≤ 𝓝 y := by
153-
refine le_iff_ultrafilter.2 fun f hf ↦ ?_
154-
rcases hs.ultrafilter_le_nhds' f (hf hmem) with ⟨x, hxs, hx⟩
155-
convert ← hx
156-
exact h x hxs (.mono (.of_le_nhds hx) hf)
163+
rw [← nhdsSet_singleton]
164+
exact hs.le_nhdsSet_of_clusterPt hmem h
165+
166+
/-- If values of `f : Y → X` belong to a compact set `s` eventually along a filter `l`
167+
and `s'` is the set of `MapClusterPt` for `f` along `l` in `s`,
168+
then `f` tends to `𝓝ˢ s'` along `l`. -/
169+
lemma IsCompact.tendsto_nhdsSet_of_mapClusterPt {Y} {l : Filter Y} {s' : Set X} {f : Y → X}
170+
(hs : IsCompact s) (hmem : ∀ᶠ x in l, f x ∈ s) (h : ∀ x ∈ s, MapClusterPt x l f → x ∈ s') :
171+
Tendsto f l (𝓝ˢ s') :=
172+
hs.le_nhdsSet_of_clusterPt (mem_map.2 hmem) h
157173

158174
/-- If values of `f : Y → X` belong to a compact set `s` eventually along a filter `l`
159175
and `y` is a unique `MapClusterPt` for `f` along `l` in `s`,
160176
then `f` tends to `𝓝 y` along `l`. -/
161177
lemma IsCompact.tendsto_nhds_of_unique_mapClusterPt {Y} {l : Filter Y} {y : X} {f : Y → X}
162178
(hs : IsCompact s) (hmem : ∀ᶠ x in l, f x ∈ s) (h : ∀ x ∈ s, MapClusterPt x l f → x = y) :
163-
Tendsto f l (𝓝 y) :=
164-
hs.le_nhds_of_unique_clusterPt (mem_map.2 hmem) h
179+
Tendsto f l (𝓝 y) := by
180+
rw [← nhdsSet_singleton]
181+
exact hs.tendsto_nhdsSet_of_mapClusterPt hmem h
165182

166183
/-- For every open directed cover of a compact set, there exists a single element of the
167184
cover which itself includes the set. -/

Mathlib/Topology/MetricSpace/Thickening.lean

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,11 +672,27 @@ theorem frontier_cthickening_disjoint (A : Set α) :
672672

673673
end Cthickening
674674

675-
theorem thickening_ball [PseudoMetricSpace α] (x : α) (ε δ : ℝ) :
675+
section PseudoMetricSpace
676+
677+
variable {α β E : Type*} [PseudoMetricSpace α] {l : Filter β} {s : Set α}
678+
679+
theorem thickening_ball (x : α) (ε δ : ℝ) :
676680
thickening ε (ball x δ) ⊆ ball x (ε + δ) := by
677681
rw [← thickening_singleton, ← thickening_singleton]
678682
apply thickening_thickening_subset
679683

684+
theorem tendsto_nhdsSet {f : β → α} (hs₁ : IsCompact s) (hs₂ : Set.Nonempty s) :
685+
Tendsto f l (𝓝ˢ s) ↔ ∀ ε > 0, ∀ᶠ x in l, infDist (f x) s < ε := by
686+
rw [(hasBasis_nhdsSet_thickening hs₁).tendsto_right_iff]
687+
congrm (∀ ε hε, ?_)
688+
simp [mem_thickening_iff_infDist_lt hs₂]
689+
690+
theorem mem_nhdsSet_iff {t : Set α} (hs : IsCompact s) :
691+
t ∈ 𝓝ˢ s ↔ ∃ ε > 0, Metric.thickening ε s ⊆ t := by
692+
rw [(hasBasis_nhdsSet_thickening hs).mem_iff]
693+
694+
end PseudoMetricSpace
695+
680696
end Metric
681697

682698
section Clopen

Mathlib/Topology/NhdsSet.lean

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public section
3131

3232
open Set Filter Topology
3333

34-
variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X}
34+
variable {α X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X}
3535
{s t s₁ s₂ t₁ t₂ : Set X} {x : X}
3636

3737
theorem nhdsSet_diagonal (X) [TopologicalSpace (X × X)] :
@@ -147,6 +147,11 @@ theorem monotone_nhdsSet : Monotone (𝓝ˢ : Set X → Filter X) := fun _ _ =>
147147
theorem nhds_le_nhdsSet (h : x ∈ s) : 𝓝 x ≤ 𝓝ˢ s :=
148148
le_sSup <| mem_image_of_mem _ h
149149

150+
theorem tendsto_nhdsSet_of_tendsto_nhds {f : α → X} {l : Filter α} {x : X} (hx : x ∈ s)
151+
(hf : Tendsto f l (𝓝 x)) :
152+
Tendsto f l (𝓝ˢ s) :=
153+
hf.trans (nhds_le_nhdsSet hx)
154+
150155
@[simp]
151156
theorem nhdsSet_union (s t : Set X) : 𝓝ˢ (s ∪ t) = 𝓝ˢ s ⊔ 𝓝ˢ t := by
152157
simp only [nhdsSet, image_union, sSup_union]

0 commit comments

Comments
 (0)