Skip to content

Commit 1339db1

Browse files
committed
feat(Topology/Algebra): add smul_mem_nhds_smul (#15563)
- add `smul_mem_nhds_smul_iff` and `smul_mem_nhds_smul`, deprecate `smul_mem_nhds`; - move 3 lemmas up in the import graph; - add `smul_mem_nhds_self`; - rename `set_smul_mem_nhds_smul_iff` to `smul_mem_nhds_smul_iff₀`, deprecate the old lemma; - similarly with `set_smul_mem_nhds_smul` and `smul_mem_nhds_smul₀`;
1 parent 8a8bd68 commit 1339db1

6 files changed

Lines changed: 64 additions & 57 deletions

File tree

Mathlib/Analysis/LocallyConvex/ContinuousOfBounded.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ def LinearMap.clmOfExistsBoundedImage (f : E →ₗ[𝕜] F)
6363
_ ⊆ f ⁻¹' U := by rw [inv_smul_smul₀ x_ne _]
6464
-- Using this inclusion, it suffices to show that `x⁻¹ • V` is in `𝓝 0`, which is trivial.
6565
refine mem_of_superset ?_ this
66-
convert set_smul_mem_nhds_smul hV (inv_ne_zero x_ne)
67-
exact (smul_zero _).symm⟩
66+
rwa [set_smul_mem_nhds_zero_iff (inv_ne_zero x_ne)]⟩
6867

6968
theorem LinearMap.clmOfExistsBoundedImage_coe {f : E →ₗ[𝕜] F}
7069
{h : ∃ V ∈ 𝓝 (0 : E), Bornology.IsVonNBounded 𝕜 (f '' V)} :

Mathlib/MeasureTheory/Measure/Haar/Unique.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,9 +776,9 @@ theorem measure_isHaarMeasure_eq_smul_of_isEverywherePos [LocallyCompactSpace G]
776776
have C : Set.Countable (support fun (i : m) ↦ ρ (s ∩ (i : G) • k)) :=
777777
Summable.countable_support_ennreal this.ne
778778
have : support (fun (i : m) ↦ ρ (s ∩ (i : G) • k)) = univ := by
779-
apply eq_univ_iff_forall.2 (fun i ↦ ?_)
780-
apply ne_of_gt (hρ (i : G) (hms i.2) _ _)
781-
exact inter_mem_nhdsWithin s (by simpa using smul_mem_nhds (i : G) k_mem)
779+
refine eq_univ_iff_forall.2 fun i ↦ ?_
780+
refine ne_of_gt (hρ (i : G) (hms i.2) _ ?_)
781+
exact inter_mem_nhdsWithin s (by simpa)
782782
rw [this] at C
783783
have : Countable m := countable_univ_iff.mp C
784784
exact to_countable m

Mathlib/Topology/Algebra/ConstMulAction.lean

Lines changed: 49 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ theorem continuous_const_smul_iff (c : G) : (Continuous fun x => c • f x) ↔
202202

203203
/-- The homeomorphism given by scalar multiplication by a given element of a group `Γ` acting on
204204
`T` is a homeomorphism from `T` to itself. -/
205-
@[to_additive]
205+
@[to_additive (attr := simps!)]
206206
def Homeomorph.smul (γ : G) : α ≃ₜ α where
207207
toEquiv := MulAction.toPerm γ
208208
continuous_toFun := continuous_const_smul γ
@@ -240,6 +240,29 @@ theorem Dense.smul (c : G) {s : Set α} (hs : Dense s) : Dense (c • s) := by
240240
theorem interior_smul (c : G) (s : Set α) : interior (c • s) = c • interior s :=
241241
((Homeomorph.smul c).image_interior s).symm
242242

243+
@[to_additive]
244+
theorem IsOpen.smul_left {s : Set G} {t : Set α} (ht : IsOpen t) : IsOpen (s • t) := by
245+
rw [← iUnion_smul_set]
246+
exact isOpen_biUnion fun a _ => ht.smul _
247+
248+
@[to_additive]
249+
theorem subset_interior_smul_right {s : Set G} {t : Set α} : s • interior t ⊆ interior (s • t) :=
250+
interior_maximal (Set.smul_subset_smul_left interior_subset) isOpen_interior.smul_left
251+
252+
@[to_additive (attr := simp)]
253+
theorem smul_mem_nhds_smul_iff {t : Set α} (g : G) {a : α} : g • t ∈ 𝓝 (g • a) ↔ t ∈ 𝓝 a :=
254+
(Homeomorph.smul g).openEmbedding.image_mem_nhds
255+
256+
@[to_additive] alias ⟨_, smul_mem_nhds_smul⟩ := smul_mem_nhds_smul_iff
257+
258+
@[to_additive (attr := deprecated (since := "2024-08-06"))]
259+
alias smul_mem_nhds := smul_mem_nhds_smul
260+
261+
@[to_additive (attr := simp)]
262+
theorem smul_mem_nhds_self [TopologicalSpace G] [ContinuousConstSMul G G] {g : G} {s : Set G} :
263+
g • s ∈ 𝓝 g ↔ s ∈ 𝓝 1 := by
264+
rw [← smul_mem_nhds_smul_iff g⁻¹]; simp
265+
243266
end Group
244267

245268
section GroupWithZero
@@ -346,38 +369,35 @@ variable [Monoid M] [TopologicalSpace α] [MulAction M α] [ContinuousConstSMul
346369

347370
nonrec theorem tendsto_const_smul_iff {f : β → α} {l : Filter β} {a : α} {c : M} (hc : IsUnit c) :
348371
Tendsto (fun x => c • f x) l (𝓝 <| c • a) ↔ Tendsto f l (𝓝 a) :=
349-
let ⟨u, hu⟩ := hc
350-
hu ▸ tendsto_const_smul_iff u
372+
tendsto_const_smul_iff hc.unit
351373

352374
variable [TopologicalSpace β] {f : β → α} {b : β} {c : M} {s : Set β}
353375

354376
nonrec theorem continuousWithinAt_const_smul_iff (hc : IsUnit c) :
355377
ContinuousWithinAt (fun x => c • f x) s b ↔ ContinuousWithinAt f s b :=
356-
let ⟨u, hu⟩ := hc
357-
hu ▸ continuousWithinAt_const_smul_iff u
378+
continuousWithinAt_const_smul_iff hc.unit
358379

359380
nonrec theorem continuousOn_const_smul_iff (hc : IsUnit c) :
360381
ContinuousOn (fun x => c • f x) s ↔ ContinuousOn f s :=
361-
let ⟨u, hu⟩ := hc
362-
hu ▸ continuousOn_const_smul_iff u
382+
continuousOn_const_smul_iff hc.unit
363383

364384
nonrec theorem continuousAt_const_smul_iff (hc : IsUnit c) :
365385
ContinuousAt (fun x => c • f x) b ↔ ContinuousAt f b :=
366-
let ⟨u, hu⟩ := hc
367-
hu ▸ continuousAt_const_smul_iff u
386+
continuousAt_const_smul_iff hc.unit
368387

369388
nonrec theorem continuous_const_smul_iff (hc : IsUnit c) :
370389
(Continuous fun x => c • f x) ↔ Continuous f :=
371-
let ⟨u, hu⟩ := hc
372-
hu ▸ continuous_const_smul_iff u
390+
continuous_const_smul_iff hc.unit
373391

374392
nonrec theorem isOpenMap_smul (hc : IsUnit c) : IsOpenMap fun x : α => c • x :=
375-
let ⟨u, hu⟩ := hc
376-
hu ▸ isOpenMap_smul u
393+
isOpenMap_smul hc.unit
377394

378395
nonrec theorem isClosedMap_smul (hc : IsUnit c) : IsClosedMap fun x : α => c • x :=
379-
let ⟨u, hu⟩ := hc
380-
hu ▸ isClosedMap_smul u
396+
isClosedMap_smul hc.unit
397+
398+
nonrec theorem smul_mem_nhds_smul_iff (hc : IsUnit c) {s : Set α} {a : α} :
399+
c • s ∈ 𝓝 (c • a) ↔ s ∈ 𝓝 a :=
400+
smul_mem_nhds_smul_iff hc.unit
381401

382402
end IsUnit
383403

@@ -474,19 +494,20 @@ section MulAction
474494
variable {G₀ : Type*} [GroupWithZero G₀] [MulAction G₀ α] [TopologicalSpace α]
475495
[ContinuousConstSMul G₀ α]
476496

477-
-- Porting note: generalize to a group action + `IsUnit`
478-
/-- Scalar multiplication preserves neighborhoods. -/
479-
theorem set_smul_mem_nhds_smul {c : G₀} {s : Set α} {x : α} (hs : s ∈ 𝓝 x) (hc : c ≠ 0) :
480-
c • s ∈ 𝓝 (c • x : α) := by
481-
rw [mem_nhds_iff] at hs ⊢
482-
obtain ⟨U, hs', hU, hU'⟩ := hs
483-
exact ⟨c • U, Set.smul_set_mono hs', hU.smul₀ hc, Set.smul_mem_smul_set hU'⟩
497+
/-- Scalar multiplication by a nonzero scalar preserves neighborhoods. -/
498+
theorem smul_mem_nhds_smul_iff₀ {c : G₀} {s : Set α} {x : α} (hc : c ≠ 0) :
499+
c • s ∈ 𝓝 (c • x : α) ↔ s ∈ 𝓝 x :=
500+
smul_mem_nhds_smul_iff (Units.mk0 c hc)
484501

485-
theorem set_smul_mem_nhds_smul_iff {c : G₀} {s : Set α} {x : α} (hc : c ≠ 0) :
486-
c • s ∈ 𝓝 (c • x : α) ↔ s ∈ 𝓝 x := by
487-
refine ⟨fun h => ?_, fun h => set_smul_mem_nhds_smul h hc⟩
488-
rw [← inv_smul_smul₀ hc x, ← inv_smul_smul₀ hc s]
489-
exact set_smul_mem_nhds_smul h (inv_ne_zero hc)
502+
@[deprecated (since := "2024-08-06")]
503+
alias set_smul_mem_nhds_smul_iff := smul_mem_nhds_smul_iff₀
504+
505+
alias ⟨_, smul_mem_nhds_smul₀⟩ := smul_mem_nhds_smul_iff₀
506+
507+
@[deprecated smul_mem_nhds_smul₀ (since := "2024-08-06")]
508+
theorem set_smul_mem_nhds_smul {c : G₀} {s : Set α} {x : α} (hs : s ∈ 𝓝 x) (hc : c ≠ 0) :
509+
c • s ∈ 𝓝 (c • x : α) :=
510+
smul_mem_nhds_smul₀ hc hs
490511

491512
end MulAction
492513

@@ -497,7 +518,7 @@ variable {G₀ : Type*} [GroupWithZero G₀] [AddMonoid α] [DistribMulAction G
497518

498519
theorem set_smul_mem_nhds_zero_iff {s : Set α} {c : G₀} (hc : c ≠ 0) :
499520
c • s ∈ 𝓝 (0 : α) ↔ s ∈ 𝓝 (0 : α) := by
500-
refine Iff.trans ?_ (set_smul_mem_nhds_smul_iff hc)
521+
refine Iff.trans ?_ (smul_mem_nhds_smul_iff₀ hc)
501522
rw [smul_zero]
502523

503524
end DistribMulAction

Mathlib/Topology/Algebra/Group/Basic.lean

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,20 +1047,6 @@ section ContinuousConstSMul
10471047
variable [TopologicalSpace β] [Group α] [MulAction α β] [ContinuousConstSMul α β] {s : Set α}
10481048
{t : Set β}
10491049

1050-
@[to_additive]
1051-
theorem IsOpen.smul_left (ht : IsOpen t) : IsOpen (s • t) := by
1052-
rw [← iUnion_smul_set]
1053-
exact isOpen_biUnion fun a _ => ht.smul _
1054-
1055-
@[to_additive]
1056-
theorem subset_interior_smul_right : s • interior t ⊆ interior (s • t) :=
1057-
interior_maximal (Set.smul_subset_smul_left interior_subset) isOpen_interior.smul_left
1058-
1059-
@[to_additive]
1060-
theorem smul_mem_nhds (a : α) {x : β} (ht : t ∈ 𝓝 x) : a • t ∈ 𝓝 (a • x) := by
1061-
rcases mem_nhds_iff.1 ht with ⟨u, ut, u_open, hu⟩
1062-
exact mem_nhds_iff.2 ⟨a • u, smul_set_mono ut, u_open.smul a, smul_mem_smul_set hu⟩
1063-
10641050
variable [TopologicalSpace α]
10651051

10661052
@[to_additive]
@@ -1138,8 +1124,7 @@ theorem subset_interior_mul : interior s * interior t ⊆ interior (s * t) :=
11381124

11391125
@[to_additive]
11401126
theorem singleton_mul_mem_nhds (a : α) {b : α} (h : s ∈ 𝓝 b) : {a} * s ∈ 𝓝 (a * b) := by
1141-
have := smul_mem_nhds a h
1142-
rwa [← singleton_smul] at this
1127+
rwa [← smul_eq_mul, ← smul_eq_mul, singleton_smul, smul_mem_nhds_smul_iff]
11431128

11441129
@[to_additive]
11451130
theorem singleton_mul_mem_nhds_of_nhds_one (a : α) (h : s ∈ 𝓝 (1 : α)) : {a} * s ∈ 𝓝 a := by
@@ -1153,8 +1138,8 @@ variable [TopologicalSpace α] [Group α] [ContinuousConstSMul αᵐᵒᵖ α] {
11531138

11541139
@[to_additive]
11551140
theorem IsOpen.mul_right (hs : IsOpen s) : IsOpen (s * t) := by
1156-
rw [← iUnion_op_smul_set]
1157-
exact isOpen_biUnion fun a _ => hs.smul _
1141+
rw [← image_op_smul]
1142+
exact hs.smul_left
11581143

11591144
@[to_additive]
11601145
theorem subset_interior_mul_left : interior s * t ⊆ interior (s * t) :=
@@ -1166,8 +1151,8 @@ theorem subset_interior_mul' : interior s * interior t ⊆ interior (s * t) :=
11661151

11671152
@[to_additive]
11681153
theorem mul_singleton_mem_nhds (a : α) {b : α} (h : s ∈ 𝓝 b) : s * {a} ∈ 𝓝 (b * a) := by
1169-
simp only [← iUnion_op_smul_set, mem_singleton_iff, iUnion_iUnion_eq_left]
1170-
exact smul_mem_nhds _ h
1154+
rw [mul_singleton]
1155+
exact smul_mem_nhds_smul (op a) h
11711156

11721157
@[to_additive]
11731158
theorem mul_singleton_mem_nhds_of_nhds_one (a : α) (h : s ∈ 𝓝 (1 : α)) : s * {a} ∈ 𝓝 a := by

Mathlib/Topology/Algebra/Group/OpenMapping.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,8 @@ theorem smul_singleton_mem_nhds_of_sigmaCompact
4545
if `V` is small enough. -/
4646
obtain ⟨V, V_mem, V_closed, V_symm, VU⟩ : ∃ V ∈ 𝓝 (1 : G), IsClosed V ∧ V⁻¹ = V ∧ V * V ⊆ U :=
4747
exists_closed_nhds_one_inv_eq_mul_subset hU
48-
obtain ⟨s, s_count, hs⟩ : ∃ (s : Set G), s.Countable ∧ ⋃ g ∈ s, g • V = univ := by
49-
apply countable_cover_nhds_of_sigma_compact (fun g ↦ ?_)
50-
convert smul_mem_nhds g V_mem
51-
simp only [smul_eq_mul, mul_one]
48+
obtain ⟨s, s_count, hs⟩ : ∃ (s : Set G), s.Countable ∧ ⋃ g ∈ s, g • V = univ :=
49+
countable_cover_nhds_of_sigma_compact fun _ ↦ by simpa
5250
let K : ℕ → Set G := compactCovering G
5351
let F : ℕ × s → Set X := fun p ↦ (K p.1 ∩ (p.2 : G) • V) • ({x} : Set X)
5452
obtain ⟨⟨n, ⟨g, hg⟩⟩, hi⟩ : ∃ i, (interior (F i)).Nonempty := by

Mathlib/Topology/Maps/Basic.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,10 @@ theorem of_comp (f : X → Y) (hg : OpenEmbedding g)
559559
theorem of_isEmpty [IsEmpty X] (f : X → Y) : OpenEmbedding f :=
560560
openEmbedding_of_embedding_open (.of_subsingleton f) (IsOpenMap.of_isEmpty f)
561561

562+
theorem image_mem_nhds {f : X → Y} (hf : OpenEmbedding f) {s : Set X} {x : X} :
563+
f '' s ∈ 𝓝 (f x) ↔ s ∈ 𝓝 x := by
564+
rw [← hf.map_nhds_eq, mem_map, preimage_image_eq _ hf.inj]
565+
562566
end OpenEmbedding
563567

564568
end OpenEmbedding

0 commit comments

Comments
 (0)