Skip to content

Commit bd789b8

Browse files
committed
chore(SetTheory/Ordinal/Topology): generalize theorems to SuccOrder (#20491)
This takes care of some easy targets, though other theorems in this file should generalize as well.
1 parent 447722b commit bd789b8

File tree

3 files changed

+41
-11
lines changed

3 files changed

+41
-11
lines changed

Mathlib/SetTheory/Ordinal/Topology.lean

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,26 @@ theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ ¬IsLimit a := by
5050
exact isOpen_Ioo
5151
· exact (ha ha').elim
5252

53+
@[deprecated SuccOrder.nhdsGT (since := "2025-01-05")]
5354
protected theorem nhdsGT (a : Ordinal) : 𝓝[>] a = ⊥ := SuccOrder.nhdsGT
5455

5556
@[deprecated (since := "2024-12-22")] alias nhds_right' := Ordinal.nhdsGT
5657

57-
-- todo: generalize to a `SuccOrder`
58-
theorem nhdsLT_eq_nhdsNE (a : Ordinal) : 𝓝[<] a = 𝓝[≠] a := by
59-
rw [← nhdsLT_sup_nhdsGT, Ordinal.nhdsGT, sup_bot_eq]
58+
@[deprecated SuccOrder.nhdsLT_eq_nhdsNE (since := "2025-01-05")]
59+
theorem nhdsLT_eq_nhdsNE (a : Ordinal) : 𝓝[<] a = 𝓝[≠] a :=
60+
SuccOrder.nhdsLT_eq_nhdsNE a
6061

6162
@[deprecated (since := "2024-12-22")] alias nhds_left'_eq_nhds_ne := nhdsLT_eq_nhdsNE
6263

63-
-- todo: generalize to a `SuccOrder`
64-
theorem nhdsLE_eq_nhds (a : Ordinal) : 𝓝[≤] a = 𝓝 a := by
65-
rw [← nhdsLE_sup_nhdsGT, SuccOrder.nhdsGT, sup_bot_eq]
64+
@[deprecated SuccOrder.nhdsLE_eq_nhds (since := "2025-01-05")]
65+
theorem nhdsLE_eq_nhds (a : Ordinal) : 𝓝[≤] a = 𝓝 a :=
66+
SuccOrder.nhdsLE_eq_nhds a
6667

6768
@[deprecated (since := "2024-12-22")] alias nhds_left_eq_nhds := nhdsLE_eq_nhds
6869

69-
-- todo: generalize to a `SuccOrder`
70+
@[deprecated SuccOrder.hasBasis_nhds_Ioc_of_exists_lt (since := "2025-01-05")]
7071
theorem hasBasis_nhds_Ioc (h : a ≠ 0) : (𝓝 a).HasBasis (· < a) (Set.Ioc · a) :=
71-
nhdsLE_eq_nhds a ▸ nhdsLE_basis_of_exists_lt 0, h.bot_lt
72+
SuccOrder.hasBasis_nhds_Ioc_of_exists_lt 0, Ordinal.pos_iff_ne_zero.2 h
7273

7374
@[deprecated (since := "2024-12-22")] alias nhdsBasis_Ioc := hasBasis_nhds_Ioc
7475

@@ -80,7 +81,7 @@ theorem nhds_eq_pure : 𝓝 a = pure a ↔ ¬IsLimit a :=
8081
theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo a o ⊆ s := by
8182
refine isOpen_iff_mem_nhds.trans <| forall₂_congr fun o ho => ?_
8283
by_cases ho' : IsLimit o
83-
· simp only [(hasBasis_nhds_Ioc ho'.ne_zero).mem_iff, ho', true_implies]
84+
· simp only [(SuccOrder.hasBasis_nhds_Ioc_of_exists_lt ⟨0, ho'.pos⟩).mem_iff, ho', true_implies]
8485
refine exists_congr fun a => and_congr_right fun ha => ?_
8586
simp only [← Set.Ioo_insert_right ha, Set.insert_subset_iff, ho, true_and]
8687
· simp [nhds_eq_pure.2 ho', ho, ho']
@@ -95,8 +96,8 @@ theorem mem_closure_tfae (a : Ordinal.{u}) (s : Set Ordinal) :
9596
(∀ x hx, f x hx ∈ s) ∧ bsup.{u, u} o f = a,
9697
∃ (ι : Type u), Nonempty ι ∧ ∃ f : ι → Ordinal, (∀ i, f i ∈ s) ∧ ⨆ i, f i = a] := by
9798
tfae_have 12 := by
98-
simp only [mem_closure_iff_nhdsWithin_neBot, inter_comm s, nhdsWithin_inter', nhdsLE_eq_nhds]
99-
exact id
99+
simpa only [mem_closure_iff_nhdsWithin_neBot, inter_comm s, nhdsWithin_inter',
100+
SuccOrder.nhdsLE_eq_nhds] using id
100101
tfae_have 23
101102
| h => by
102103
rcases (s ∩ Iic a).eq_empty_or_nonempty with he | hne

Mathlib/Topology/Order/Basic.lean

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,22 @@ theorem Dense.topology_eq_generateFrom [OrderTopology α] [DenselyOrdered α] {s
489489
let _ := generateFrom (Ioi '' s ∪ Iio '' s)
490490
exact isOpen_iUnion fun x ↦ isOpen_iUnion fun h ↦ .basic _ <| .inr <| mem_image_of_mem _ h.1
491491

492+
theorem PredOrder.hasBasis_nhds_Ioc_of_exists_gt [OrderTopology α] [PredOrder α] {a : α}
493+
(ha : ∃ u, a < u) : (𝓝 a).HasBasis (a < ·) (Set.Ico a ·) :=
494+
PredOrder.nhdsGE_eq_nhds a ▸ nhdsGE_basis_of_exists_gt ha
495+
496+
theorem PredOrder.hasBasis_nhds_Ioc [OrderTopology α] [PredOrder α] [NoMaxOrder α] {a : α} :
497+
(𝓝 a).HasBasis (a < ·) (Set.Ico a ·) :=
498+
PredOrder.hasBasis_nhds_Ioc_of_exists_gt (exists_gt a)
499+
500+
theorem SuccOrder.hasBasis_nhds_Ioc_of_exists_lt [OrderTopology α] [SuccOrder α] {a : α}
501+
(ha : ∃ l, l < a) : (𝓝 a).HasBasis (· < a) (Set.Ioc · a) :=
502+
SuccOrder.nhdsLE_eq_nhds a ▸ nhdsLE_basis_of_exists_lt ha
503+
504+
theorem SuccOrder.hasBasis_nhds_Ioc [OrderTopology α] [SuccOrder α] {a : α} [NoMinOrder α] :
505+
(𝓝 a).HasBasis (· < a) (Set.Ioc · a) :=
506+
SuccOrder.hasBasis_nhds_Ioc_of_exists_lt (exists_lt a)
507+
492508
variable (α)
493509

494510
/-- Let `α` be a densely ordered linear order with order topology. If `α` is a separable space, then

Mathlib/Topology/Order/OrderClosed.lean

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Copyright (c) 2017 Johannes Hölzl. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Johannes Hölzl, Mario Carneiro, Yury Kudryashov
55
-/
6+
import Mathlib.Topology.Order.LeftRight
67
import Mathlib.Topology.Separation.Hausdorff
78

89
/-!
@@ -274,6 +275,12 @@ protected theorem PredOrder.nhdsLT [PredOrder α] : 𝓝[<] a = ⊥ := by
274275

275276
@[deprecated (since := "2024-12-21")] protected alias PredOrder.nhdsWithin_Iio := PredOrder.nhdsLT
276277

278+
theorem PredOrder.nhdsGT_eq_nhdsNE [PredOrder α] (a : α) : 𝓝[>] a = 𝓝[≠] a := by
279+
rw [← nhdsLT_sup_nhdsGT, PredOrder.nhdsLT, bot_sup_eq]
280+
281+
theorem PredOrder.nhdsGE_eq_nhds [PredOrder α] (a : α) : 𝓝[≥] a = 𝓝 a := by
282+
rw [← nhdsLT_sup_nhdsGE, PredOrder.nhdsLT, bot_sup_eq]
283+
277284
theorem Ico_mem_nhdsLT_of_mem (H : b ∈ Ioc a c) : Ico a c ∈ 𝓝[<] b :=
278285
mem_of_superset (Ioo_mem_nhdsLT_of_mem H) Ioo_subset_Ico_self
279286

@@ -556,6 +563,12 @@ protected theorem SuccOrder.nhdsGT [SuccOrder α] : 𝓝[>] a = ⊥ := PredOrder
556563

557564
@[deprecated (since := "2024-12-22")] alias SuccOrder.nhdsWithin_Ioi := SuccOrder.nhdsGT
558565

566+
theorem SuccOrder.nhdsLT_eq_nhdsNE [SuccOrder α] (a : α) : 𝓝[<] a = 𝓝[≠] a :=
567+
PredOrder.nhdsGT_eq_nhdsNE (α := αᵒᵈ) a
568+
569+
theorem SuccOrder.nhdsLE_eq_nhds [SuccOrder α] (a : α) : 𝓝[≤] a = 𝓝 a :=
570+
PredOrder.nhdsGE_eq_nhds (α := αᵒᵈ) a
571+
559572
theorem Ioc_mem_nhdsGT_of_mem (H : b ∈ Ico a c) : Ioc a c ∈ 𝓝[>] b :=
560573
mem_of_superset (Ioo_mem_nhdsGT_of_mem H) Ioo_subset_Ioc_self
561574

0 commit comments

Comments
 (0)