@@ -4,11 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Yury Kudryashov
5
5
6
6
! This file was ported from Lean 3 source module topology.locally_finite
7
- ! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
7
+ ! leanprover-community/mathlib commit 55d771df074d0dd020139ee1cd4b95521422df9f
8
8
! Please do not edit these lines, except to modify the commit id
9
9
! if you have ported upstream changes.
10
10
-/
11
- import Mathlib.Topology.Basic
11
+ import Mathlib.Topology.ContinuousOn
12
12
import Mathlib.Order.Filter.SmallSets
13
13
14
14
/-!
@@ -77,36 +77,68 @@ theorem exists_mem_basis {ι' : Sort _} (hf : LocallyFinite f) {p : ι' → Prop
77
77
⟨i, hpi, hi Subset.rfl⟩
78
78
#align locally_finite.exists_mem_basis LocallyFinite.exists_mem_basis
79
79
80
+ protected theorem nhdsWithin_unionᵢ (hf : LocallyFinite f) (a : X) :
81
+ 𝓝[⋃ i, f i] a = ⨆ i, 𝓝[f i] a := by
82
+ rcases hf a with ⟨U, haU, hfin⟩
83
+ refine le_antisymm ?_ (Monotone.le_map_supᵢ fun _ _ ↦ nhdsWithin_mono _)
84
+ calc
85
+ 𝓝[⋃ i, f i] a = 𝓝[⋃ i, f i ∩ U] a := by
86
+ rw [← unionᵢ_inter, ← nhdsWithin_inter_of_mem' (nhdsWithin_le_nhds haU)]
87
+ _ = 𝓝[⋃ i ∈ {j | (f j ∩ U).Nonempty}, (f i ∩ U)] a := by
88
+ simp only [mem_setOf_eq, unionᵢ_nonempty_self]
89
+ _ = ⨆ i ∈ {j | (f j ∩ U).Nonempty}, 𝓝[f i ∩ U] a := nhdsWithin_bunionᵢ hfin _ _
90
+ _ ≤ ⨆ i, 𝓝[f i ∩ U] a := supᵢ₂_le_supᵢ _ _
91
+ _ ≤ ⨆ i, 𝓝[f i] a := supᵢ_mono fun i ↦ nhdsWithin_mono _ <| inter_subset_left _ _
92
+ #align locally_finite.nhds_within_Union LocallyFinite.nhdsWithin_unionᵢ
93
+
94
+ theorem continuousOn_unionᵢ' {g : X → Y} (hf : LocallyFinite f)
95
+ (hc : ∀ i x, x ∈ closure (f i) → ContinuousWithinAt g (f i) x) :
96
+ ContinuousOn g (⋃ i, f i) := by
97
+ rintro x -
98
+ rw [ContinuousWithinAt, hf.nhdsWithin_unionᵢ, tendsto_supᵢ]
99
+ intro i
100
+ by_cases hx : x ∈ closure (f i)
101
+ · exact hc i _ hx
102
+ · rw [mem_closure_iff_nhdsWithin_neBot, not_neBot] at hx
103
+ rw [hx]
104
+ exact tendsto_bot
105
+ #align locally_finite.continuous_on_Union' LocallyFinite.continuousOn_unionᵢ'
106
+
107
+ theorem continuousOn_unionᵢ {g : X → Y} (hf : LocallyFinite f) (h_cl : ∀ i, IsClosed (f i))
108
+ (h_cont : ∀ i, ContinuousOn g (f i)) : ContinuousOn g (⋃ i, f i) :=
109
+ hf.continuousOn_unionᵢ' fun i x hx ↦ h_cont i x <| (h_cl i).closure_subset hx
110
+ #align locally_finite.continuous_on_Union LocallyFinite.continuousOn_unionᵢ
111
+
112
+ protected theorem continuous' {g : X → Y} (hf : LocallyFinite f) (h_cov : (⋃ i, f i) = univ)
113
+ (hc : ∀ i x, x ∈ closure (f i) → ContinuousWithinAt g (f i) x) :
114
+ Continuous g :=
115
+ continuous_iff_continuousOn_univ.2 <| h_cov ▸ hf.continuousOn_unionᵢ' hc
116
+ #align locally_finite.continuous' LocallyFinite.continuous'
117
+
118
+ protected theorem continuous {g : X → Y} (hf : LocallyFinite f) (h_cov : (⋃ i, f i) = univ)
119
+ (h_cl : ∀ i, IsClosed (f i)) (h_cont : ∀ i, ContinuousOn g (f i)) :
120
+ Continuous g :=
121
+ continuous_iff_continuousOn_univ.2 <| h_cov ▸ hf.continuousOn_unionᵢ h_cl h_cont
122
+ #align locally_finite.continuous LocallyFinite.continuous
123
+
80
124
protected theorem closure (hf : LocallyFinite f) : LocallyFinite fun i => closure (f i) := by
81
125
intro x
82
126
rcases hf x with ⟨s, hsx, hsf⟩
83
127
refine' ⟨interior s, interior_mem_nhds.2 hsx, hsf.subset fun i hi => _⟩
84
- exact
85
- (hi.mono isOpen_interior.closure_inter).of_closure.mono
86
- (inter_subset_inter_right _ interior_subset)
128
+ exact (hi.mono isOpen_interior.closure_inter).of_closure.mono
129
+ (inter_subset_inter_right _ interior_subset)
87
130
#align locally_finite.closure LocallyFinite.closure
88
131
132
+ theorem closure_unionᵢ (h : LocallyFinite f) : closure (⋃ i, f i) = ⋃ i, closure (f i) := by
133
+ ext x
134
+ simp only [mem_closure_iff_nhdsWithin_neBot, h.nhdsWithin_unionᵢ, supᵢ_neBot, mem_unionᵢ]
135
+ #align locally_finite.closure_Union LocallyFinite.closure_unionᵢ
136
+
89
137
theorem isClosed_unionᵢ (hf : LocallyFinite f) (hc : ∀ i, IsClosed (f i)) :
90
138
IsClosed (⋃ i, f i) := by
91
- simp only [← isOpen_compl_iff, compl_unionᵢ, isOpen_iff_mem_nhds, mem_interᵢ]
92
- intro a ha
93
- replace ha : ∀ i, f iᶜ ∈ 𝓝 a := fun i => (hc i).compl_mem_nhds (ha i)
94
- rcases hf a with ⟨t, h_nhds, h_fin⟩
95
- have : (t ∩ ⋂ i ∈ { i | (f i ∩ t).Nonempty }, f iᶜ) ∈ 𝓝 a :=
96
- inter_mem h_nhds ((binterᵢ_mem h_fin).2 fun i _ => ha i)
97
- filter_upwards [this]
98
- simp only [mem_inter_iff, mem_interᵢ]
99
- rintro b ⟨hbt, hn⟩ i hfb
100
- exact hn i ⟨b, hfb, hbt⟩ hfb
139
+ simp only [← closure_eq_iff_isClosed, hf.closure_unionᵢ, (hc _).closure_eq]
101
140
#align locally_finite.is_closed_Union LocallyFinite.isClosed_unionᵢ
102
141
103
- theorem closure_unionᵢ (h : LocallyFinite f) : closure (⋃ i, f i) = ⋃ i, closure (f i) :=
104
- Subset.antisymm
105
- (closure_minimal (unionᵢ_mono fun _ => subset_closure) <|
106
- h.closure.isClosed_unionᵢ fun _ => isClosed_closure)
107
- (unionᵢ_subset fun _ => closure_mono <| subset_unionᵢ _ _)
108
- #align locally_finite.closure_Union LocallyFinite.closure_unionᵢ
109
-
110
142
/-- If `f : β → set α` is a locally finite family of closed sets, then for any `x : α`, the
111
143
intersection of the complements to `f i`, `x ∉ f i`, is a neighbourhood of `x`. -/
112
144
theorem interᵢ_compl_mem_nhds (hf : LocallyFinite f) (hc : ∀ i, IsClosed (f i)) (x : X) :
0 commit comments