Skip to content

Commit 946eb8c

Browse files
committed
chore: rename second_countable -> secondCountable in lemma and instance names (#18911)
While at it, also renames `sigma_compact`, `first_countable` and `locally_compact`, in the same way.
1 parent 85ec5bf commit 946eb8c

File tree

12 files changed

+61
-26
lines changed

12 files changed

+61
-26
lines changed

Counterexamples/SorgenfreyLine.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ theorem not_metrizableSpace : ¬MetrizableSpace ℝₗ := by
324324

325325
/-- Topology on the Sorgenfrey line is not second countable. -/
326326
theorem not_secondCountableTopology : ¬SecondCountableTopology ℝₗ :=
327-
fun _ ↦ not_metrizableSpace (metrizableSpace_of_t3_second_countable _)
327+
fun _ ↦ not_metrizableSpace (metrizableSpace_of_t3_secondCountable _)
328328

329329
end SorgenfreyLine
330330

Mathlib/Analysis/Distribution/AEEqOfIntegralContDiff.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ theorem ae_eq_zero_of_integral_smooth_smul_eq_zero [SigmaCompactSpace M]
4646
have := I.locallyCompactSpace
4747
have := ChartedSpace.locallyCompactSpace H M
4848
have := I.secondCountableTopology
49-
have := ChartedSpace.secondCountable_of_sigma_compact H M
49+
have := ChartedSpace.secondCountable_of_sigmaCompact H M
5050
have := Manifold.metrizableSpace I M
5151
let _ : MetricSpace M := TopologicalSpace.metrizableSpaceMetric M
5252
-- it suffices to show that the integral of the function vanishes on any compact set `s`
@@ -152,7 +152,7 @@ theorem IsOpen.ae_eq_zero_of_integral_smooth_smul_eq_zero {U : Set M} (hU : IsOp
152152
haveI := ChartedSpace.locallyCompactSpace H M
153153
haveI := hU.locallyCompactSpace
154154
haveI := I.secondCountableTopology
155-
haveI := ChartedSpace.secondCountable_of_sigma_compact H M
155+
haveI := ChartedSpace.secondCountable_of_sigmaCompact H M
156156
hU.ae_eq_zero_of_integral_smooth_smul_eq_zero' _
157157
(isSigmaCompact_iff_sigmaCompactSpace.mpr inferInstance) hf h
158158

Mathlib/Analysis/Distribution/SchwartzSpace.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ instance instLocallyConvexSpace : LocallyConvexSpace ℝ 𝓢(E, F) :=
510510
(schwartz_withSeminorms ℝ E F).toLocallyConvexSpace
511511

512512
instance instFirstCountableTopology : FirstCountableTopology 𝓢(E, F) :=
513-
(schwartz_withSeminorms ℝ E F).first_countable
513+
(schwartz_withSeminorms ℝ E F).firstCountableTopology
514514

515515
end Topology
516516

Mathlib/Analysis/LocallyConvex/WithSeminorms.lean

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ variable [TopologicalSpace E]
906906

907907
/-- If the topology of a space is induced by a countable family of seminorms, then the topology
908908
is first countable. -/
909-
theorem WithSeminorms.first_countable (hp : WithSeminorms p) :
909+
theorem WithSeminorms.firstCountableTopology (hp : WithSeminorms p) :
910910
FirstCountableTopology E := by
911911
have := hp.topologicalAddGroup
912912
let _ : UniformSpace E := TopologicalAddGroup.toUniformSpace E
@@ -917,4 +917,7 @@ theorem WithSeminorms.first_countable (hp : WithSeminorms p) :
917917
have : (uniformity E).IsCountablyGenerated := UniformAddGroup.uniformity_countably_generated
918918
exact UniformSpace.firstCountableTopology E
919919

920+
@[deprecated (since := "2024-11-13")] alias
921+
WithSeminorms.first_countable := WithSeminorms.firstCountableTopology
922+
920923
end TopologicalProperties

Mathlib/Geometry/Manifold/ChartedSpace.lean

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,12 +658,15 @@ theorem ChartedSpace.secondCountable_of_countable_cover [SecondCountableTopology
658658

659659
variable (M)
660660

661-
theorem ChartedSpace.secondCountable_of_sigma_compact [SecondCountableTopology H]
661+
theorem ChartedSpace.secondCountable_of_sigmaCompact [SecondCountableTopology H]
662662
[SigmaCompactSpace M] : SecondCountableTopology M := by
663663
obtain ⟨s, hsc, hsU⟩ : ∃ s, Set.Countable s ∧ ⋃ (x) (_ : x ∈ s), (chartAt H x).source = univ :=
664-
countable_cover_nhds_of_sigma_compact fun x : M ↦ chart_source_mem_nhds H x
664+
countable_cover_nhds_of_sigmaCompact fun x : M ↦ chart_source_mem_nhds H x
665665
exact ChartedSpace.secondCountable_of_countable_cover H hsU hsc
666666

667+
@[deprecated (since := "2024-11-13")] alias
668+
ChartedSpace.secondCountable_of_sigma_compact := ChartedSpace.secondCountable_of_sigmaCompact
669+
667670
/-- If a topological space admits an atlas with locally compact charts, then the space itself
668671
is locally compact. -/
669672
theorem ChartedSpace.locallyCompactSpace [LocallyCompactSpace H] : LocallyCompactSpace M := by

Mathlib/Geometry/Manifold/Metrizable.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ theorem Manifold.metrizableSpace {E : Type*} [NormedAddCommGroup E] [NormedSpace
2525
MetrizableSpace M := by
2626
haveI := I.locallyCompactSpace; haveI := ChartedSpace.locallyCompactSpace H M
2727
haveI := I.secondCountableTopology
28-
haveI := ChartedSpace.secondCountable_of_sigma_compact H M
29-
exact metrizableSpace_of_t3_second_countable M
28+
haveI := ChartedSpace.secondCountable_of_sigmaCompact H M
29+
exact metrizableSpace_of_t3_secondCountable M
3030
@[deprecated (since := "2024-11-11")] alias ManifoldWithCorners.metrizableSpace :=
3131
Manifold.metrizableSpace

Mathlib/Topology/Algebra/Group/OpenMapping.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ theorem smul_singleton_mem_nhds_of_sigmaCompact
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
4848
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
49+
countable_cover_nhds_of_sigmaCompact fun _ ↦ by simpa
5050
let K : ℕ → Set G := compactCovering G
5151
let F : ℕ × s → Set X := fun p ↦ (K p.1 ∩ (p.2 : G) • V) • ({x} : Set X)
5252
obtain ⟨⟨n, ⟨g, hg⟩⟩, hi⟩ : ∃ i, (interior (F i)).Nonempty := by

Mathlib/Topology/Category/LightProfinite/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ instance {X : LightDiagram} : T2Space ((forget LightDiagram).obj X) :=
286286
namespace LightProfinite
287287

288288
instance (S : LightProfinite) : Countable (Clopens S) := by
289-
rw [TopologicalSpace.Clopens.countable_iff_second_countable]
289+
rw [TopologicalSpace.Clopens.countable_iff_secondCountable]
290290
infer_instance
291291

292292
instance instCountableDiscreteQuotient (S : LightProfinite) :
@@ -310,7 +310,7 @@ noncomputable def lightProfiniteToLightDiagram : LightProfinite.{u} ⥤ LightDia
310310

311311
open scoped Classical in
312312
instance (S : LightDiagram.{u}) : SecondCountableTopology S.cone.pt := by
313-
rw [← TopologicalSpace.Clopens.countable_iff_second_countable]
313+
rw [← TopologicalSpace.Clopens.countable_iff_secondCountable]
314314
refine @Countable.of_equiv _ _ ?_ (LocallyConstant.equivClopens (X := S.cone.pt))
315315
refine @Function.Surjective.countable
316316
(Σ (n : ℕ), LocallyConstant ((S.diagram ⋙ FintypeCat.toProfinite).obj ⟨n⟩) (Fin 2)) _ ?_ ?_ ?_

Mathlib/Topology/ClopenBox.lean

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ open scoped Topology
3333

3434
variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] [CompactSpace Y]
3535

36-
theorem TopologicalSpace.Clopens.exists_prod_subset (W : Clopens (X × Y)) {a : X × Y} (h : a ∈ W) :
36+
namespace TopologicalSpace.Clopens
37+
38+
theorem exists_prod_subset (W : Clopens (X × Y)) {a : X × Y} (h : a ∈ W) :
3739
∃ U : Clopens X, a.1 ∈ U ∧ ∃ V : Clopens Y, a.2 ∈ V ∧ U ×ˢ V ≤ W := by
3840
have hp : Continuous (fun y : Y ↦ (a.1, y)) := Continuous.Prod.mk _
3941
let V : Set Y := {y | (a.1, y) ∈ W}
@@ -47,7 +49,7 @@ variable [CompactSpace X]
4749

4850
/-- Every clopen set in a product of two compact spaces
4951
is a union of finitely many clopen boxes. -/
50-
theorem TopologicalSpace.Clopens.exists_finset_eq_sup_prod (W : Clopens (X × Y)) :
52+
theorem exists_finset_eq_sup_prod (W : Clopens (X × Y)) :
5153
∃ (I : Finset (Clopens X × Clopens Y)), W = I.sup fun i ↦ i.1 ×ˢ i.2 := by
5254
choose! U hxU V hxV hUV using fun x ↦ W.exists_prod_subset (a := x)
5355
rcases W.2.1.isCompact.elim_nhds_subcover (fun x ↦ U x ×ˢ V x) (fun x hx ↦
@@ -60,21 +62,21 @@ theorem TopologicalSpace.Clopens.exists_finset_eq_sup_prod (W : Clopens (X × Y)
6062
exact SetLike.le_def.1 (Finset.le_sup hi) hxi
6163
· exact hUV _ <| hIW _ hx
6264

63-
lemma TopologicalSpace.Clopens.surjective_finset_sup_prod :
65+
lemma surjective_finset_sup_prod :
6466
Surjective fun I : Finset (Clopens X × Clopens Y) ↦ I.sup fun i ↦ i.1 ×ˢ i.2 := fun W ↦
6567
let ⟨I, hI⟩ := W.exists_finset_eq_sup_prod; ⟨I, hI.symm⟩
6668

67-
instance TopologicalSpace.Clopens.countable_prod [Countable (Clopens X)]
69+
instance countable_prod [Countable (Clopens X)]
6870
[Countable (Clopens Y)] : Countable (Clopens (X × Y)) :=
6971
surjective_finset_sup_prod.countable
7072

71-
instance TopologicalSpace.Clopens.finite_prod [Finite (Clopens X)] [Finite (Clopens Y)] :
73+
instance finite_prod [Finite (Clopens X)] [Finite (Clopens Y)] :
7274
Finite (Clopens (X × Y)) := by
7375
cases nonempty_fintype (Clopens X)
7476
cases nonempty_fintype (Clopens Y)
7577
exact .of_surjective _ surjective_finset_sup_prod
7678

77-
lemma TopologicalSpace.Clopens.countable_iff_second_countable [T2Space X]
79+
lemma countable_iff_secondCountable [T2Space X]
7880
[TotallyDisconnectedSpace X] : Countable (Clopens X) ↔ SecondCountableTopology X := by
7981
refine ⟨fun h ↦ ⟨{s : Set X | IsClopen s}, ?_, ?_⟩, fun h ↦ ?_⟩
8082
· let f : {s : Set X | IsClopen s} → Clopens X := fun s ↦ ⟨s.1, s.2
@@ -90,3 +92,8 @@ lemma TopologicalSpace.Clopens.countable_iff_second_countable [T2Space X]
9092
ext1; change s.carrier = t.carrier
9193
rw [(this s).choose_spec, (this t).choose_spec, h]
9294
exact hf.countable
95+
96+
@[deprecated (since := "2024-11-12")]
97+
alias countable_iff_second_countable := countable_iff_secondCountable
98+
99+
end TopologicalSpace.Clopens

Mathlib/Topology/Compactness/SigmaCompact.lean

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,21 +175,30 @@ lemma isSigmaCompact_iff_sigmaCompactSpace {s : Set X} :
175175
isSigmaCompact_iff_isSigmaCompact_univ.trans isSigmaCompact_univ_iff
176176

177177
-- see Note [lower instance priority]
178-
instance (priority := 200) CompactSpace.sigma_compact [CompactSpace X] : SigmaCompactSpace X :=
178+
instance (priority := 200) CompactSpace.sigmaCompact [CompactSpace X] : SigmaCompactSpace X :=
179179
⟨⟨fun _ => univ, fun _ => isCompact_univ, iUnion_const _⟩⟩
180180

181+
-- The `alias` command creates a definition, triggering the defLemma linter.
182+
@[nolint defLemma, deprecated (since := "2024-11-13")] alias
183+
CompactSpace.sigma_compact := CompactSpace.sigmaCompact
184+
181185
theorem SigmaCompactSpace.of_countable (S : Set (Set X)) (Hc : S.Countable)
182186
(Hcomp : ∀ s ∈ S, IsCompact s) (HU : ⋃₀ S = univ) : SigmaCompactSpace X :=
183187
⟨(exists_seq_cover_iff_countable ⟨_, isCompact_empty⟩).2 ⟨S, Hc, Hcomp, HU⟩⟩
184188

185189
-- see Note [lower instance priority]
186-
instance (priority := 100) sigmaCompactSpace_of_locally_compact_second_countable
190+
instance (priority := 100) sigmaCompactSpace_of_locallyCompact_secondCountable
187191
[LocallyCompactSpace X] [SecondCountableTopology X] : SigmaCompactSpace X := by
188192
choose K hKc hxK using fun x : X => exists_compact_mem_nhds x
189193
rcases countable_cover_nhds hxK with ⟨s, hsc, hsU⟩
190194
refine SigmaCompactSpace.of_countable _ (hsc.image K) (forall_mem_image.2 fun x _ => hKc x) ?_
191195
rwa [sUnion_image]
192196

197+
-- The `alias` command creates a definition, triggering the defLemma linter.
198+
@[nolint defLemma, deprecated (since := "2024-11-13")]
199+
alias sigmaCompactSpace_of_locally_compact_second_countable :=
200+
sigmaCompactSpace_of_locallyCompact_secondCountable
201+
193202
section
194203
-- Porting note: doesn't work on the same line
195204
variable (X)
@@ -289,7 +298,7 @@ protected noncomputable def LocallyFinite.encodable {ι : Type*} {f : ι → Set
289298
/-- In a topological space with sigma compact topology, if `f` is a function that sends each point
290299
`x` of a closed set `s` to a neighborhood of `x` within `s`, then for some countable set `t ⊆ s`,
291300
the neighborhoods `f x`, `x ∈ t`, cover the whole set `s`. -/
292-
theorem countable_cover_nhdsWithin_of_sigma_compact {f : X → Set X} {s : Set X} (hs : IsClosed s)
301+
theorem countable_cover_nhdsWithin_of_sigmaCompact {f : X → Set X} {s : Set X} (hs : IsClosed s)
293302
(hf : ∀ x ∈ s, f x ∈ 𝓝[s] x) : ∃ t ⊆ s, t.Countable ∧ s ⊆ ⋃ x ∈ t, f x := by
294303
simp only [nhdsWithin, mem_inf_principal] at hf
295304
choose t ht hsub using fun n =>
@@ -301,17 +310,22 @@ theorem countable_cover_nhdsWithin_of_sigma_compact {f : X → Set X} {s : Set X
301310
rcases mem_iUnion₂.1 (hsub n ⟨hn, hx⟩) with ⟨y, hyt : y ∈ t n, hyf : x ∈ s → x ∈ f y⟩
302311
exact ⟨y, mem_iUnion.2 ⟨n, hyt⟩, hyf hx⟩
303312

313+
@[deprecated (since := "2024-11-13")] alias
314+
countable_cover_nhdsWithin_of_sigma_compact := countable_cover_nhdsWithin_of_sigmaCompact
315+
304316
/-- In a topological space with sigma compact topology, if `f` is a function that sends each
305317
point `x` to a neighborhood of `x`, then for some countable set `s`, the neighborhoods `f x`,
306318
`x ∈ s`, cover the whole space. -/
307-
theorem countable_cover_nhds_of_sigma_compact {f : X → Set X} (hf : ∀ x, f x ∈ 𝓝 x) :
319+
theorem countable_cover_nhds_of_sigmaCompact {f : X → Set X} (hf : ∀ x, f x ∈ 𝓝 x) :
308320
∃ s : Set X, s.Countable ∧ ⋃ x ∈ s, f x = univ := by
309321
simp only [← nhdsWithin_univ] at hf
310-
rcases countable_cover_nhdsWithin_of_sigma_compact isClosed_univ fun x _ => hf x with
322+
rcases countable_cover_nhdsWithin_of_sigmaCompact isClosed_univ fun x _ => hf x with
311323
⟨s, -, hsc, hsU⟩
312324
exact ⟨s, hsc, univ_subset_iff.1 hsU⟩
313325
end
314326

327+
@[deprecated (since := "2024-11-13")] alias
328+
countable_cover_nhds_of_sigma_compact := countable_cover_nhds_of_sigmaCompact
315329

316330

317331
/-- An [exhaustion by compact sets](https://en.wikipedia.org/wiki/Exhaustion_by_compact_sets) of a

0 commit comments

Comments
 (0)