Skip to content

Commit 6a9d0fe

Browse files
committed
refactor(SetTheory/Ordinal/Arithmetic): redefine IsLimit to IsSuccLimit (leanprover-community#19054)
This is a temporary stepping stone before outright deprecating `IsLimit`.
1 parent 1f334b5 commit 6a9d0fe

File tree

8 files changed

+102
-80
lines changed

8 files changed

+102
-80
lines changed

Mathlib/Order/SuccPred/Limit.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ variable [PartialOrder α]
193193
theorem isSuccLimit_iff [OrderBot α] : IsSuccLimit a ↔ a ≠ ⊥ ∧ IsSuccPrelimit a := by
194194
rw [IsSuccLimit, isMin_iff_eq_bot]
195195

196+
theorem IsSuccLimit.bot_lt [OrderBot α] (h : IsSuccLimit a) : ⊥ < a :=
197+
h.ne_bot.bot_lt
198+
196199
variable [SuccOrder α]
197200

198201
theorem isSuccPrelimit_of_succ_ne (h : ∀ b, succ b ≠ a) : IsSuccPrelimit a := fun b hba =>
@@ -223,6 +226,12 @@ theorem mem_range_succ_or_isSuccPrelimit (a) : a ∈ range (succ : α → α)
223226
@[deprecated mem_range_succ_or_isSuccPrelimit (since := "2024-09-05")]
224227
alias mem_range_succ_or_isSuccLimit := mem_range_succ_or_isSuccPrelimit
225228

229+
theorem isMin_or_mem_range_succ_or_isSuccLimit (a) :
230+
IsMin a ∨ a ∈ range (succ : α → α) ∨ IsSuccLimit a := by
231+
rw [IsSuccLimit]
232+
have := mem_range_succ_or_isSuccPrelimit a
233+
tauto
234+
226235
theorem isSuccPrelimit_of_succ_lt (H : ∀ a < b, succ a < b) : IsSuccPrelimit b := fun a hab =>
227236
(H a hab.lt).ne (CovBy.succ_eq hab)
228237

Mathlib/SetTheory/Cardinal/Arithmetic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ theorem mul_eq_self {c : Cardinal} (h : ℵ₀ ≤ c) : c * c = c := by
8282
· exact (mul_lt_aleph0 qo qo).trans_le ol
8383
· suffices (succ (typein LT.lt (g p))).card < #α from (IH _ this qo).trans_lt this
8484
rw [← lt_ord]
85-
apply (isLimit_ord ol).2
85+
apply (isLimit_ord ol).succ_lt
8686
rw [e]
8787
apply typein_lt_type
8888

Mathlib/SetTheory/Cardinal/Cofinality.lean

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ theorem cof_eq' (r : α → α → Prop) [IsWellOrder α r] (h : IsLimit (type r
696696
∃ S : Set α, (∀ a, ∃ b ∈ S, r a b) ∧ #S = cof (type r) :=
697697
let ⟨S, H, e⟩ := cof_eq r
698698
⟨S, fun a =>
699-
let a' := enum r ⟨_, h.2 _ (typein_lt_type r a)⟩
699+
let a' := enum r ⟨_, h.succ_lt (typein_lt_type r a)⟩
700700
let ⟨b, h, ab⟩ := H a'
701701
⟨b, h,
702702
(IsOrderConnected.conn a b a' <|
@@ -834,11 +834,13 @@ theorem isStrongLimit_beth {o : Ordinal} (H : IsSuccPrelimit o) : IsStrongLimit
834834
· rw [beth_zero]
835835
exact isStrongLimit_aleph0
836836
· refine ⟨beth_ne_zero o, fun a ha => ?_⟩
837-
rw [beth_limit ⟨h, isSuccPrelimit_iff_succ_lt.1 H⟩] at ha
838-
rcases exists_lt_of_lt_ciSup' ha with ⟨⟨i, hi⟩, ha⟩
839-
have := power_le_power_left two_ne_zero ha.le
840-
rw [← beth_succ] at this
841-
exact this.trans_lt (beth_lt.2 (H.succ_lt hi))
837+
rw [beth_limit] at ha
838+
· rcases exists_lt_of_lt_ciSup' ha with ⟨⟨i, hi⟩, ha⟩
839+
have := power_le_power_left two_ne_zero ha.le
840+
rw [← beth_succ] at this
841+
exact this.trans_lt (beth_lt.2 (H.succ_lt hi))
842+
· rw [isLimit_iff]
843+
exact ⟨h, H⟩
842844

843845
theorem mk_bounded_subset {α : Type*} (h : ∀ x < #α, (2^x) < #α) {r : α → α → Prop}
844846
[IsWellOrder α r] (hr : (#α).ord = type r) : #{ s : Set α // Bounded r s } = #α := by
@@ -1140,7 +1142,7 @@ theorem derivFamily_lt_ord_lift {ι : Type u} {f : ι → Ordinal → Ordinal} {
11401142
rw [derivFamily_succ]
11411143
exact
11421144
nfpFamily_lt_ord_lift hω (by rwa [hc.cof_eq]) hf
1143-
((isLimit_ord hc.1).2 _ (hb ((lt_succ b).trans hb')))
1145+
((isLimit_ord hc.1).succ_lt (hb ((lt_succ b).trans hb')))
11441146
| H₃ b hb H =>
11451147
intro hb'
11461148
-- TODO: generalize the universes of the lemmas in this file so we don't have to rely on bsup

Mathlib/SetTheory/Ordinal/Arithmetic.lean

Lines changed: 66 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ Copyright (c) 2017 Johannes Hölzl. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Mario Carneiro, Floris van Doorn, Violeta Hernández Palacios
55
-/
6-
import Mathlib.SetTheory.Ordinal.Basic
7-
import Mathlib.Data.Nat.SuccPred
86
import Mathlib.Algebra.GroupWithZero.Divisibility
7+
import Mathlib.Data.Nat.SuccPred
8+
import Mathlib.Order.SuccPred.InitialSeg
99
import Mathlib.SetTheory.Cardinal.UnivLE
10+
import Mathlib.SetTheory.Ordinal.Basic
1011

1112
/-!
1213
# Ordinal arithmetic
@@ -197,33 +198,36 @@ theorem lift_pred (o : Ordinal.{v}) : lift.{u} (pred o) = pred (lift.{u} o) := b
197198
198199
TODO: deprecate this in favor of `Order.IsSuccLimit`. -/
199200
def IsLimit (o : Ordinal) : Prop :=
200-
o ≠ 0 ∧ ∀ a < o, succ a < o
201+
IsSuccLimit o
202+
203+
theorem isLimit_iff {o} : IsLimit o ↔ o ≠ 0 ∧ IsSuccPrelimit o := by
204+
simp [IsLimit, IsSuccLimit]
201205

202206
theorem IsLimit.isSuccPrelimit {o} (h : IsLimit o) : IsSuccPrelimit o :=
203-
isSuccPrelimit_iff_succ_lt.mpr h.2
207+
IsSuccLimit.isSuccPrelimit h
204208

205209
@[deprecated IsLimit.isSuccPrelimit (since := "2024-09-05")]
206210
alias IsLimit.isSuccLimit := IsLimit.isSuccPrelimit
207211

208212
theorem IsLimit.succ_lt {o a : Ordinal} (h : IsLimit o) : a < o → succ a < o :=
209-
h.2 a
213+
IsSuccLimit.succ_lt h
210214

211215
theorem isSuccPrelimit_zero : IsSuccPrelimit (0 : Ordinal) := isSuccPrelimit_bot
212216

213217
@[deprecated isSuccPrelimit_zero (since := "2024-09-05")]
214218
alias isSuccLimit_zero := isSuccPrelimit_zero
215219

216-
theorem not_zero_isLimit : ¬IsLimit 0
217-
| ⟨h, _⟩ => h rfl
220+
theorem not_zero_isLimit : ¬IsLimit 0 :=
221+
not_isSuccLimit_bot
218222

219-
theorem not_succ_isLimit (o) : ¬IsLimit (succ o)
220-
| ⟨_, h⟩ => lt_irrefl _ (h _ (lt_succ o))
223+
theorem not_succ_isLimit (o) : ¬IsLimit (succ o) :=
224+
not_isSuccLimit_succ o
221225

222226
theorem not_succ_of_isLimit {o} (h : IsLimit o) : ¬∃ a, o = succ a
223227
| ⟨a, e⟩ => not_succ_isLimit a (e ▸ h)
224228

225229
theorem succ_lt_of_isLimit {o a : Ordinal} (h : IsLimit o) : succ a < o ↔ a < o :=
226-
⟨(lt_succ a).trans, h.2 _⟩
230+
IsSuccLimit.succ_lt_iff h
227231

228232
theorem le_succ_of_isLimit {o} (h : IsLimit o) {a} : o ≤ succ a ↔ o ≤ a :=
229233
le_iff_le_iff_lt_iff_lt.2 <| succ_lt_of_isLimit h
@@ -238,29 +242,23 @@ theorem lt_limit {o} (h : IsLimit o) {a} : a < o ↔ ∃ x < o, a < x := by
238242

239243
@[simp]
240244
theorem lift_isLimit (o : Ordinal.{v}) : IsLimit (lift.{u,v} o) ↔ IsLimit o :=
241-
and_congr (not_congr <| by simpa only [lift_zero] using @lift_inj o 0)
242-
fun H a h => (lift_lt.{u,v}).1 <|
243-
by simpa only [lift_succ] using H _ (lift_lt.2 h), fun H a h => by
244-
obtain ⟨a', rfl⟩ := mem_range_lift_of_le h.le
245-
rw [← lift_succ, lift_lt]
246-
exact H a' (lift_lt.1 h)⟩
245+
liftInitialSeg.isSuccLimit_apply_iff
247246

248247
theorem IsLimit.pos {o : Ordinal} (h : IsLimit o) : 0 < o :=
249-
lt_of_le_of_ne (Ordinal.zero_le _) h.1.symm
248+
IsSuccLimit.bot_lt h
249+
250+
theorem IsLimit.ne_zero {o : Ordinal} (h : IsLimit o) : o ≠ 0 :=
251+
h.pos.ne'
250252

251253
theorem IsLimit.one_lt {o : Ordinal} (h : IsLimit o) : 1 < o := by
252-
simpa only [succ_zero] using h.2 _ h.pos
254+
simpa only [succ_zero] using h.succ_lt h.pos
253255

254256
theorem IsLimit.nat_lt {o : Ordinal} (h : IsLimit o) : ∀ n : ℕ, (n : Ordinal) < o
255257
| 0 => h.pos
256-
| n + 1 => h.2 _ (IsLimit.nat_lt h n)
258+
| n + 1 => h.succ_lt (IsLimit.nat_lt h n)
257259

258260
theorem zero_or_succ_or_limit (o : Ordinal) : o = 0 ∨ (∃ a, o = succ a) ∨ IsLimit o := by
259-
classical
260-
exact if o0 : o = 0 then Or.inl o0
261-
else
262-
if h : ∃ a, o = succ a then Or.inr (Or.inl h)
263-
else Or.inr <| Or.inr ⟨o0, fun _a => (succ_lt_of_not_succ h).2
261+
simpa [eq_comm] using isMin_or_mem_range_succ_or_isSuccLimit o
264262

265263
theorem isLimit_of_not_succ_of_ne_zero {o : Ordinal} (h : ¬∃ a, o = succ a) (h' : o ≠ 0) :
266264
IsLimit o := ((zero_or_succ_or_limit o).resolve_left h').resolve_left h
@@ -279,23 +277,24 @@ theorem IsLimit.iSup_Iio {o : Ordinal} (h : IsLimit o) : ⨆ a : Iio o, a.1 = o
279277
induction at successor ordinals and at limit ordinals, then it holds for all ordinals. -/
280278
@[elab_as_elim]
281279
def limitRecOn {C : Ordinal → Sort*} (o : Ordinal) (H₁ : C 0) (H₂ : ∀ o, C o → C (succ o))
282-
(H₃ : ∀ o, IsLimit o → (∀ o' < o, C o') → C o) : C o :=
283-
SuccOrder.prelimitRecOn o (fun o _ ↦ H₂ o) fun o hl ↦
284-
if h : o = 0 then fun _ ↦ h ▸ H₁ else H₃ o ⟨h, fun _ ↦ hl.succ_lt⟩
280+
(H₃ : ∀ o, IsLimit o → (∀ o' < o, C o') → C o) : C o := by
281+
refine SuccOrder.limitRecOn o (fun a ha ↦ ?_) (fun a _ ↦ H₂ a) H₃
282+
convert H₁
283+
simpa using ha
285284

286285
@[simp]
287-
theorem limitRecOn_zero {C} (H₁ H₂ H₃) : @limitRecOn C 0 H₁ H₂ H₃ = H₁ := by
288-
rw [limitRecOn, SuccOrder.prelimitRecOn_of_isSuccPrelimit _ _ isSuccPrelimit_zero, dif_pos rfl]
286+
theorem limitRecOn_zero {C} (H₁ H₂ H₃) : @limitRecOn C 0 H₁ H₂ H₃ = H₁ :=
287+
SuccOrder.limitRecOn_isMin _ _ _ isMin_bot
289288

290289
@[simp]
291290
theorem limitRecOn_succ {C} (o H₁ H₂ H₃) :
292-
@limitRecOn C (succ o) H₁ H₂ H₃ = H₂ o (@limitRecOn C o H₁ H₂ H₃) := by
293-
rw [limitRecOn, limitRecOn, SuccOrder.prelimitRecOn_succ]
291+
@limitRecOn C (succ o) H₁ H₂ H₃ = H₂ o (@limitRecOn C o H₁ H₂ H₃) :=
292+
SuccOrder.limitRecOn_succ ..
294293

295294
@[simp]
296295
theorem limitRecOn_limit {C} (o H₁ H₂ H₃ h) :
297-
@limitRecOn C o H₁ H₂ H₃ = H₃ o h fun x _h => @limitRecOn C x H₁ H₂ H₃ := by
298-
simp_rw [limitRecOn, SuccOrder.prelimitRecOn_of_isSuccPrelimit _ _ h.isSuccPrelimit, dif_neg h.1]
296+
@limitRecOn C o H₁ H₂ H₃ = H₃ o h fun x _h => @limitRecOn C x H₁ H₂ H₃ :=
297+
SuccOrder.limitRecOn_of_isSuccLimit ..
299298

300299
/-- Bounded recursion on ordinals. Similar to `limitRecOn`, with the assumption `o < l`
301300
added to all cases. The final term's domain is the ordinals below `l`. -/
@@ -347,7 +346,7 @@ alias out_no_max_of_succ_lt := toType_noMax_of_succ_lt
347346

348347
theorem bounded_singleton {r : α → α → Prop} [IsWellOrder α r] (hr : (type r).IsLimit) (x) :
349348
Bounded r {x} := by
350-
refine ⟨enum r ⟨succ (typein r x), hr.2 _ (typein_lt_type r x)⟩, ?_⟩
349+
refine ⟨enum r ⟨succ (typein r x), hr.succ_lt (typein_lt_type r x)⟩, ?_⟩
351350
intro b hb
352351
rw [mem_singleton_iff.1 hb]
353352
nth_rw 1 [← enum_typein r x]
@@ -398,7 +397,7 @@ theorem IsNormal.strictMono {f} (H : IsNormal f) : StrictMono f := fun a b =>
398397
limitRecOn b (Not.elim (not_lt_of_le <| Ordinal.zero_le _))
399398
(fun _b IH h =>
400399
(lt_or_eq_of_le (le_of_lt_succ h)).elim (fun h => (IH h).trans (H.1 _)) fun e => e ▸ H.1 _)
401-
fun _b l _IH h => lt_of_lt_of_le (H.1 a) ((H.2 _ l _).1 le_rfl _ (l.2 _ h))
400+
fun _b l _IH h => lt_of_lt_of_le (H.1 a) ((H.2 _ l _).1 le_rfl _ (l.succ_lt h))
402401

403402
theorem IsNormal.monotone {f} (H : IsNormal f) : Monotone f :=
404403
H.strictMono.monotone
@@ -460,10 +459,14 @@ theorem IsNormal.trans {f g} (H₁ : IsNormal f) (H₂ : IsNormal g) : IsNormal
460459
fun _x => H₁.lt_iff.2 (H₂.1 _), fun o l _a =>
461460
H₁.le_set' (· < o) ⟨0, l.pos⟩ g _ fun _c => H₂.2 _ l _⟩
462461

463-
theorem IsNormal.isLimit {f} (H : IsNormal f) {o} (l : IsLimit o) : IsLimit (f o) :=
464-
⟨ne_of_gt <| (Ordinal.zero_le _).trans_lt <| H.lt_iff.2 l.pos, fun _ h =>
465-
let ⟨_b, h₁, h₂⟩ := (H.limit_lt l).1 h
466-
(succ_le_of_lt h₂).trans_lt (H.lt_iff.2 h₁)⟩
462+
theorem IsNormal.isLimit {f} (H : IsNormal f) {o} (ho : IsLimit o) : IsLimit (f o) := by
463+
rw [isLimit_iff, isSuccPrelimit_iff_succ_lt]
464+
use (H.lt_iff.2 ho.pos).ne_bot
465+
intro a ha
466+
obtain ⟨b, hb, hab⟩ := (H.limit_lt ho).1 ha
467+
rw [← succ_le_iff] at hab
468+
apply hab.trans_lt
469+
rwa [H.lt_iff]
467470

468471
theorem add_le_of_limit {a b c : Ordinal} (h : IsLimit b) : a + b ≤ c ↔ ∀ b' < b, a + b' ≤ c :=
469472
fun h _ l => (add_le_add_left l.le _).trans h, fun H =>
@@ -482,7 +485,7 @@ theorem add_le_of_limit {a b c : Ordinal} (h : IsLimit b) : a + b ≤ c ↔ ∀
482485
· exact irrefl _ (this _)
483486
intro x
484487
rw [← typein_lt_typein (Sum.Lex r s), typein_enum]
485-
have := H _ (h.2 _ (typein_lt_type s x))
488+
have := H _ (h.succ_lt (typein_lt_type s x))
486489
rw [add_succ, succ_le_iff] at this
487490
refine
488491
(RelEmbedding.ofMonotone (fun a => ?_) fun a b => ?_).ordinal_type_le.trans_lt this
@@ -566,6 +569,9 @@ protected theorem sub_eq_zero_iff_le {a b : Ordinal} : a - b = 0 ↔ a ≤ b :=
566569
fun h => by simpa only [h, add_zero] using le_add_sub a b, fun h => by
567570
rwa [← Ordinal.le_zero, sub_le, add_zero]⟩
568571

572+
protected theorem sub_ne_zero_iff_lt {a b : Ordinal} : a - b ≠ 0 ↔ b < a := by
573+
simpa using Ordinal.sub_eq_zero_iff_le.not
574+
569575
theorem sub_sub (a b c : Ordinal) : a - b - c = a - (b + c) :=
570576
eq_of_forall_ge_iff fun d => by rw [sub_le, sub_le, sub_le, add_assoc]
571577

@@ -587,9 +593,12 @@ theorem lt_add_iff {a b c : Ordinal} (hc : c ≠ 0) : a < b + c ↔ ∃ d < c, a
587593
rintro ⟨d, hd, ha⟩
588594
exact ha.trans_lt (add_lt_add_left hd b)
589595

590-
theorem isLimit_sub {a b} (l : IsLimit a) (h : b < a) : IsLimit (a - b) :=
591-
⟨ne_of_gt <| lt_sub.2 <| by rwa [add_zero], fun c h => by
592-
rw [lt_sub, add_succ]; exact l.2 _ (lt_sub.1 h)⟩
596+
theorem isLimit_sub {a b} (ha : IsLimit a) (h : b < a) : IsLimit (a - b) := by
597+
rw [isLimit_iff, Ordinal.sub_ne_zero_iff_lt, isSuccPrelimit_iff_succ_lt]
598+
refine ⟨h, fun c hc ↦ ?_⟩
599+
rw [lt_sub] at hc ⊢
600+
rw [add_succ]
601+
exact ha.succ_lt hc
593602

594603
@[deprecated isLimit_sub (since := "2024-10-11")]
595604
alias sub_isLimit := isLimit_sub
@@ -732,7 +741,7 @@ private theorem mul_le_of_limit_aux {α β r s} [IsWellOrder α r] [IsWellOrder
732741
exact irrefl _ (this _ _)
733742
intro a b
734743
rw [← typein_lt_typein (Prod.Lex s r), typein_enum]
735-
have := H _ (h.2 _ (typein_lt_type s b))
744+
have := H _ (h.succ_lt (typein_lt_type s b))
736745
rw [mul_succ] at this
737746
have := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this
738747
refine (RelEmbedding.ofMonotone (fun a => ?_) fun a b => ?_).ordinal_type_le.trans_lt this
@@ -1897,7 +1906,7 @@ theorem bsup_eq_blsub_iff_lt_bsup {o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max
18971906
apply lt_blsub, fun h => le_antisymm (bsup_le_blsub f) (blsub_le h)⟩
18981907

18991908
theorem bsup_eq_blsub_of_lt_succ_limit {o : Ordinal.{u}} (ho : IsLimit o)
1900-
{f : ∀ a < o, Ordinal.{max u v}} (hf : ∀ a ha, f a ha < f (succ a) (ho.2 a ha)) :
1909+
{f : ∀ a < o, Ordinal.{max u v}} (hf : ∀ a ha, f a ha < f (succ a) (ho.succ_lt ha)) :
19011910
bsup.{_, v} o f = blsub.{_, v} o f := by
19021911
rw [bsup_eq_blsub_iff_lt_bsup]
19031912
exact fun i hi => (hf i hi).trans_le (le_bsup f _ _)
@@ -1975,7 +1984,7 @@ theorem blsub_comp {o o' : Ordinal.{max u v}} {f : ∀ a < o, Ordinal.{max u v w
19751984

19761985
theorem IsNormal.bsup_eq {f : Ordinal.{u} → Ordinal.{max u v}} (H : IsNormal f) {o : Ordinal.{u}}
19771986
(h : IsLimit o) : (Ordinal.bsup.{_, v} o fun x _ => f x) = f o := by
1978-
rw [← IsNormal.bsup.{u, u, v} H (fun x _ => x) h.1, bsup_id_limit h.2]
1987+
rw [← IsNormal.bsup.{u, u, v} H (fun x _ => x) h.ne_bot, bsup_id_limit fun _ ↦ h.succ_lt]
19791988

19801989
theorem IsNormal.blsub_eq {f : Ordinal.{u} → Ordinal.{max u v}} (H : IsNormal f) {o : Ordinal.{u}}
19811990
(h : IsLimit o) : (blsub.{_, v} o fun x _ => f x) = f o := by
@@ -2360,10 +2369,11 @@ theorem one_lt_omega0 : 1 < ω := by simpa only [Nat.cast_one] using nat_lt_omeg
23602369
@[deprecated "No deprecation message was provided." (since := "2024-09-30")]
23612370
alias one_lt_omega := one_lt_omega0
23622371

2363-
theorem isLimit_omega0 : IsLimit ω :=
2364-
⟨omega0_ne_zero, fun o h => by
2365-
let ⟨n, e⟩ := lt_omega0.1 h
2366-
rw [e]; exact nat_lt_omega0 (n + 1)⟩
2372+
theorem isLimit_omega0 : IsLimit ω := by
2373+
rw [isLimit_iff, isSuccPrelimit_iff_succ_lt]
2374+
refine ⟨omega0_ne_zero, fun o h => ?_⟩
2375+
obtain ⟨n, rfl⟩ := lt_omega0.1 h
2376+
exact nat_lt_omega0 (n + 1)
23672377

23682378
@[deprecated "No deprecation message was provided." (since := "2024-10-14")]
23692379
alias omega0_isLimit := isLimit_omega0
@@ -2393,8 +2403,8 @@ theorem sup_natCast : sup Nat.cast = ω :=
23932403
alias sup_nat_cast := sup_natCast
23942404

23952405
theorem nat_lt_limit {o} (h : IsLimit o) : ∀ n : ℕ, ↑n < o
2396-
| 0 => lt_of_le_of_ne (Ordinal.zero_le o) h.1.symm
2397-
| n + 1 => h.2 _ (nat_lt_limit h n)
2406+
| 0 => h.pos
2407+
| n + 1 => h.succ_lt (nat_lt_limit h n)
23982408

23992409
theorem omega0_le_of_isLimit {o} (h : IsLimit o) : ω ≤ o :=
24002410
omega0_le.2 fun n => le_of_lt <| nat_lt_limit h n
@@ -2403,7 +2413,7 @@ theorem omega0_le_of_isLimit {o} (h : IsLimit o) : ω ≤ o :=
24032413
alias omega_le_of_isLimit := omega0_le_of_isLimit
24042414

24052415
theorem isLimit_iff_omega0_dvd {a : Ordinal} : IsLimit a ↔ a ≠ 0 ∧ ω ∣ a := by
2406-
refine ⟨fun l => ⟨l.1, ⟨a / ω, le_antisymm ?_ (mul_div_le _ _)⟩⟩, fun h => ?_⟩
2416+
refine ⟨fun l => ⟨l.ne_zero, ⟨a / ω, le_antisymm ?_ (mul_div_le _ _)⟩⟩, fun h => ?_⟩
24072417
· refine (limit_le l).2 fun x hx => le_of_lt ?_
24082418
rw [← div_lt omega0_ne_zero, ← succ_le_iff, le_div omega0_ne_zero, mul_succ,
24092419
add_le_of_limit isLimit_omega0]
@@ -2428,7 +2438,7 @@ theorem add_mul_limit_aux {a b c : Ordinal} (ba : b + a = a) (l : IsLimit c)
24282438
rw [IH _ h]
24292439
apply (add_le_add_left _ _).trans
24302440
· rw [← mul_succ]
2431-
exact mul_le_mul_left' (succ_le_of_lt <| l.2 _ h) _
2441+
exact mul_le_mul_left' (succ_le_of_lt <| l.succ_lt h) _
24322442
· rw [← ba]
24332443
exact le_add_right _ _)
24342444
(mul_le_mul_right' (le_add_right _ _) _)
@@ -2495,6 +2505,7 @@ namespace Cardinal
24952505
open Ordinal
24962506

24972507
theorem isLimit_ord {c} (co : ℵ₀ ≤ c) : (ord c).IsLimit := by
2508+
rw [isLimit_iff, isSuccPrelimit_iff_succ_lt]
24982509
refine ⟨fun h => aleph0_ne_zero ?_, fun a => lt_imp_lt_of_le_imp_le fun h => ?_⟩
24992510
· rw [← Ordinal.le_zero, ord_le] at h
25002511
simpa only [card_zero, nonpos_iff_eq_zero] using co.trans h
@@ -2509,7 +2520,7 @@ theorem isLimit_ord {c} (co : ℵ₀ ≤ c) : (ord c).IsLimit := by
25092520
alias ord_isLimit := isLimit_ord
25102521

25112522
theorem noMaxOrder {c} (h : ℵ₀ ≤ c) : NoMaxOrder c.ord.toType :=
2512-
toType_noMax_of_succ_lt (isLimit_ord h).2
2523+
toType_noMax_of_succ_lt fun _ ↦ (isLimit_ord h).succ_lt
25132524

25142525
end Cardinal
25152526

Mathlib/SetTheory/Ordinal/Notation.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,8 @@ theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr
802802
· apply (mul_le_mul_left' (le_succ b) _).trans
803803
rw [← add_one_eq_succ, add_mul_succ _ (one_add_of_omega0_le h), add_one_eq_succ, succ_le_iff,
804804
Ordinal.mul_lt_mul_iff_left (Ordinal.pos_iff_ne_zero.2 e0)]
805-
exact isLimit_omega0.2 _ l
806-
· apply (principal_mul_omega0 (isLimit_omega0.2 _ h) l).le.trans
805+
exact isLimit_omega0.succ_lt l
806+
· apply (principal_mul_omega0 (isLimit_omega0.succ_lt h) l).le.trans
807807
simpa using mul_le_mul_right' (one_le_iff_ne_zero.2 e0) ω
808808

809809
section

0 commit comments

Comments
 (0)