Skip to content

Commit 9c94276

Browse files
vihdzpReemMelamed
authored andcommitted
chore: deprecate Ordinal.IsAcc and Ordinal.IsClosedBelow (leanprover-community#39792)
These predicates were introduced in leanprover-community#16710 as preliminaries for a development of club sets. Those have [since been defined](https://leanprover-community.github.io/mathlib4_docs/Mathlib/SetTheory/Cardinal/Cofinality/Club.html#IsClub) without them, so we deprecate them, and generalize the results on them to the setting of successor orders.
1 parent 76923f0 commit 9c94276

2 files changed

Lines changed: 64 additions & 37 deletions

File tree

Mathlib/SetTheory/Ordinal/Topology.lean

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -170,55 +170,45 @@ open Set Filter Set.Notation
170170

171171
/-- An ordinal is an accumulation point of a set of ordinals if it is positive and there
172172
are elements in the set arbitrarily close to the ordinal from below. -/
173+
@[deprecated AccPt (since := "2026-05-24")]
173174
def IsAcc (o : Ordinal) (S : Set Ordinal) : Prop :=
174175
AccPt o (𝓟 S)
175176

176177
/-- A set of ordinals is closed below an ordinal if it contains all of
177178
its accumulation points below the ordinal. -/
179+
@[deprecated IsClosed (since := "2026-05-24")]
178180
def IsClosedBelow (S : Set Ordinal) (o : Ordinal) : Prop :=
179181
IsClosed (Iio o ↓∩ S)
180182

183+
set_option linter.deprecated false in
184+
@[deprecated SuccOrder.accPt_principal (since := "2026-05-24")]
181185
theorem isAcc_iff (o : Ordinal) (S : Set Ordinal) : o.IsAcc S ↔
182186
o ≠ 0 ∧ ∀ p < o, (S ∩ Ioo p o).Nonempty := by
183-
dsimp [IsAcc]
184-
constructor
185-
· rw [accPt_iff_nhds]
186-
intro h
187-
constructor
188-
· rintro rfl
189-
obtain ⟨x, hx⟩ := h (Iio 1) (Iio_mem_nhds zero_lt_one)
190-
exact hx.2 <| lt_one_iff.mp hx.1.1
191-
· intro p plt
192-
obtain ⟨x, hx⟩ := h (Ioo p (o + 1)) <| Ioo_mem_nhds plt (lt_succ o)
193-
use x
194-
refine ⟨hx.1.2, ⟨hx.1.1.1, lt_of_le_of_ne ?_ hx.2⟩⟩
195-
have := hx.1.1.2
196-
rwa [← succ_eq_add_one, lt_succ_iff] at this
197-
· rw [accPt_iff_nhds]
198-
intro h u umem
199-
obtain ⟨l, hl⟩ := exists_Ioc_subset_of_mem_nhds umem ⟨0, pos_iff_ne_zero.mpr h.1
200-
obtain ⟨x, hx⟩ := h.2 l hl.1
201-
use x
202-
exact ⟨⟨hl.2 ⟨hx.2.1, hx.2.2.le⟩, hx.1⟩, hx.2.2.ne⟩
187+
apply SuccOrder.accPt_principal.trans
188+
simp
203189

190+
set_option linter.deprecated false in
191+
@[deprecated SuccOrder.accPt_principal (since := "2026-05-24")]
204192
theorem IsAcc.forall_lt {o : Ordinal} {S : Set Ordinal} (h : o.IsAcc S) :
205193
∀ p < o, (S ∩ Ioo p o).Nonempty := ((isAcc_iff _ _).mp h).2
206194

195+
set_option linter.deprecated false in
196+
@[deprecated AccPt.not_isMin (since := "2026-05-24")]
207197
theorem IsAcc.pos {o : Ordinal} {S : Set Ordinal} (h : o.IsAcc S) :
208198
0 < o := pos_iff_ne_zero.mpr ((isAcc_iff _ _).mp h).1
209199

210-
theorem IsAcc.isSuccLimit {o : Ordinal} {S : Set Ordinal} (h : o.IsAcc S) : IsSuccLimit o := by
211-
rw [isAcc_iff] at h
212-
rw [isSuccLimit_iff]
213-
refine ⟨h.1, isSuccPrelimit_of_succ_ne fun x hx ↦ ?_⟩
214-
rcases h.2 x (lt_of_lt_of_le (lt_succ x) hx.le) with ⟨p, hp⟩
215-
exact (hx.symm ▸ (succ_le_iff.mpr hp.2.1)).not_gt hp.2.2
200+
set_option linter.deprecated false in
201+
@[deprecated AccPt.isSuccLimit (since := "2026-05-24")]
202+
theorem IsAcc.isSuccLimit {o : Ordinal} {S : Set Ordinal} (h : o.IsAcc S) : IsSuccLimit o :=
203+
AccPt.isSuccLimit h
216204

217-
theorem IsAcc.mono {o : Ordinal} {S T : Set Ordinal} (h : S ⊆ T) (ho : o.IsAcc S) :
218-
o.IsAcc T := by
219-
rw [isAcc_iff] at *
220-
exact ⟨ho.1, fun p plto ↦ (ho.2 p plto).casesOn fun s hs ↦ ⟨s, h hs.1, hs.2⟩⟩
205+
set_option linter.deprecated false in
206+
@[deprecated AccPt.mono (since := "2026-05-24")]
207+
theorem IsAcc.mono {o : Ordinal} {S T : Set Ordinal} (h : S ⊆ T) (ho : o.IsAcc S) : o.IsAcc T :=
208+
AccPt.mono ho (monotone_principal h)
221209

210+
set_option linter.deprecated false in
211+
@[deprecated SuccOrder.accPt_principal (since := "2026-05-24")]
222212
theorem IsAcc.inter_Ioo_nonempty {o : Ordinal} {S : Set Ordinal} (hS : o.IsAcc S)
223213
{p : Ordinal} (hp : p < o) : (S ∩ Ioo p o).Nonempty := hS.forall_lt p hp
224214

@@ -227,19 +217,27 @@ theorem accPt_subtype {p o : Ordinal} (S : Set Ordinal) (hpo : p < o) :
227217
AccPt p (𝓟 S) ↔ AccPt ⟨p, hpo⟩ (𝓟 (Iio o ↓∩ S)) := by
228218
rw [← comap_principal, isOpen_Iio.isOpenEmbedding_subtypeVal.accPt_comap_iff]
229219

220+
set_option linter.deprecated false in
221+
@[deprecated isClosed_iff_accPt (since := "2026-05-24")]
230222
theorem isClosedBelow_iff {S : Set Ordinal} {o : Ordinal} : IsClosedBelow S o ↔
231223
∀ p < o, IsAcc p S → p ∈ S := by
232224
simp [IsClosedBelow, IsAcc, isClosed_iff_accPt, ← comap_principal,
233225
isOpen_Iio.isOpenEmbedding_subtypeVal.accPt_comap_iff]
234226

227+
set_option linter.deprecated false in
228+
@[deprecated isClosed_iff_accPt (since := "2026-05-24")]
235229
alias ⟨IsClosedBelow.forall_lt, _⟩ := isClosedBelow_iff
236230

231+
set_option linter.deprecated false in
232+
@[deprecated isClosed_sInter (since := "2026-05-24")]
237233
theorem IsClosedBelow.sInter {o : Ordinal} {S : Set (Set Ordinal)}
238234
(h : ∀ C ∈ S, IsClosedBelow C o) : IsClosedBelow (⋂₀ S) o := by
239235
rw [isClosedBelow_iff]
240-
intro p plto pAcc C CmemS
241-
exact (h C CmemS).forall_lt p plto (pAcc.mono (sInter_subset_of_mem CmemS))
236+
exact fun p plto pAcc C CmemS ↦ (h C CmemS).forall_lt p plto <|
237+
AccPt.mono pAcc (monotone_principal (sInter_subset_of_mem CmemS))
242238

239+
set_option linter.deprecated false in
240+
@[deprecated isClosed_iInter (since := "2026-05-24")]
243241
theorem IsClosedBelow.iInter {ι : Type u} {f : ι → Set Ordinal} {o : Ordinal}
244242
(h : ∀ i, IsClosedBelow (f i) o) : IsClosedBelow (⋂ i, f i) o :=
245243
IsClosedBelow.sInter fun _ ⟨i, hi⟩ ↦ hi ▸ (h i)

Mathlib/Topology/Order/SuccPred.lean

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public section
2020
variable {α : Type*} [LinearOrder α] [TopologicalSpace α] [OrderTopology α]
2121
{a : α} {s : Set α}
2222

23-
open Order Topology
23+
open Filter Order Set Topology
2424

2525
namespace SuccOrder
2626
variable [SuccOrder α]
@@ -42,10 +42,10 @@ theorem isOpen_singleton_iff : IsOpen {a} ↔ ¬ IsSuccLimit a := by
4242
nontriviality α
4343
refine ⟨fun h ha ↦ ?_, fun ha ↦ ?_⟩
4444
· obtain ⟨l, u, h₁, h₂⟩ := mem_nhds_iff_exists_Ioo_subset' (by simpa using ha.not_isMin)
45-
(by simpa only [not_isMax_iff] using not_isMax a) |>.mp (h.mem_nhds (Set.mem_singleton a))
45+
(by simpa only [not_isMax_iff] using not_isMax a) |>.mp (h.mem_nhds (mem_singleton a))
4646
refine ha.isSuccPrelimit l ?_
4747
rw [← succ_eq_iff_covBy]
48-
simp only [Set.mem_Ioo, Set.subset_singleton_iff] at h₁ h₂
48+
simp only [mem_Ioo, subset_singleton_iff] at h₁ h₂
4949
exact h₂ _ ⟨lt_succ l, h₁.1.succ_le.trans_lt h₁.2
5050
· obtain (ha | ha) := not_isSuccLimit_iff.mp ha
5151
· convert! isOpen_Iio (a := Order.succ a) using 1
@@ -56,15 +56,44 @@ theorem isOpen_singleton_iff : IsOpen {a} ↔ ¬ IsSuccLimit a := by
5656
theorem nhds_eq_pure {a : α} : 𝓝 a = pure a ↔ ¬ IsSuccLimit a :=
5757
(isOpen_singleton_iff_nhds_eq_pure _).symm.trans isOpen_singleton_iff
5858

59+
@[to_dual]
60+
theorem nhds_of_isMin {a : α} (h : IsMin a) : 𝓝 a = pure a := by
61+
rw [nhds_eq_pure, isSuccLimit_iff]
62+
tauto
63+
64+
@[to_dual (attr := simp)]
65+
theorem nhds_bot [OrderBot α] : 𝓝 (⊥ : α) = pure ⊥ :=
66+
nhds_of_isMin isMin_bot
67+
5968
@[to_dual]
6069
theorem isOpen_iff {s : Set α} : IsOpen s ↔
61-
∀ o ∈ s, IsSuccLimit o → ∃ a < o, Set.Ioo a o ⊆ s := by
70+
∀ o ∈ s, IsSuccLimit o → ∃ a < o, Ioo a o ⊆ s := by
6271
refine isOpen_iff_mem_nhds.trans <| forall₂_congr fun o ho ↦ ?_
6372
by_cases ho' : IsSuccLimit o
64-
· rw [(SuccOrder.hasBasis_nhds_Ioc_of_exists_lt (not_isMin_iff.1 ho'.not_isMin)).mem_iff]
73+
· rw [(hasBasis_nhds_Ioc_of_exists_lt (not_isMin_iff.1 ho'.not_isMin)).mem_iff]
6574
grind
6675
· simp [nhds_eq_pure.2 ho', ho, ho']
6776

77+
@[to_dual]
78+
theorem accPt_principal {a : α} {s : Set α} :
79+
AccPt a (𝓟 s) ↔ ¬ IsMin a ∧ ∀ b < a, (s ∩ Ioo b a).Nonempty := by
80+
rw [accPt_iff_frequently]
81+
by_cases ha : IsMin a
82+
· simp [nhds_of_isMin, ha]
83+
· rw [not_isMin_iff] at ha ⊢
84+
simp_rw [(hasBasis_nhds_Ioc_of_exists_lt ha).frequently_iff, Set.Nonempty, mem_inter_iff]
85+
grind
86+
87+
@[to_dual]
88+
theorem _root_.AccPt.not_isMin {a : α} {s : Set α} (h : AccPt a (𝓟 s)) : ¬ IsMin a :=
89+
(accPt_principal.1 h).1
90+
91+
@[to_dual]
92+
theorem _root_.AccPt.isSuccLimit {a : α} {s : Set α} (h : AccPt a (𝓟 s)) : IsSuccLimit a := by
93+
rw [isSuccLimit_iff, IsSuccPrelimit]
94+
simp_rw [accPt_principal, Set.Nonempty] at h
95+
grind [covBy_iff_Ioo_eq]
96+
6897
@[to_dual]
6998
theorem isSuccLimit_of_mem_frontier {a : α} {s : Set α} (ha : a ∈ frontier s) : IsSuccLimit a := by
7099
rw [← isOpen_singleton_iff.not_left]

0 commit comments

Comments
 (0)