Skip to content

Commit 5a1c5fc

Browse files
committed
feat(SetTheory/Ordinal): add add_iSup, mul_iSup and friends (leanprover-community#37470)
Add a couple lemmas for working with ordinal `iSup` and `sSup`, addition and multiplication. Co-authored-by: SabrinaJewson <sejewson@gmail.com>
1 parent 301c8f7 commit 5a1c5fc

2 files changed

Lines changed: 32 additions & 6 deletions

File tree

Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,9 @@ theorem ciSup_le_iff' {f : ι → α} (h : BddAbove (range f)) {a : α} :
474474
theorem ciSup_le' {f : ι → α} {a : α} (h : ∀ i, f i ≤ a) : ⨆ i, f i ≤ a :=
475475
csSup_le' <| forall_mem_range.2 h
476476

477+
@[simp]
478+
theorem ciSup_bot : ⨆ _ : ι, (⊥ : α) = ⊥ := le_bot_iff.mp (ciSup_le' fun _ ↦ bot_le)
479+
477480
/-- In conditionally complete orders with a bottom element, the nonempty condition can be omitted
478481
from `lt_ciSup_iff`. -/
479482
theorem lt_ciSup_iff' {f : ι → α} (h : BddAbove (range f)) : a < iSup f ↔ ∃ i, a < f i := by

Mathlib/SetTheory/Ordinal/Family.lean

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -920,18 +920,41 @@ theorem apply_omega0_of_isNormal {f : Ordinal.{u} → Ordinal.{v}} (hf : IsNorma
920920
alias IsNormal.apply_omega0 := apply_omega0_of_isNormal
921921

922922
@[simp]
923-
theorem iSup_add_natCast (o : Ordinal) : ⨆ n : ℕ, o + n = o + ω :=
924-
apply_omega0_of_isNormal (isNormal_add_right o)
923+
theorem add_iSup (o : Ordinal.{u}) {ι} [Small.{u} ι] [Nonempty ι] (f : ι → Ordinal) :
924+
o + ⨆ i, f i = ⨆ i, o + f i :=
925+
(isNormal_add_right o).map_iSup (bddAbove_of_small _)
926+
927+
@[simp]
928+
theorem add_sSup (o : Ordinal.{u}) {s : Set Ordinal} [Small.{u} s] (hs : s.Nonempty) :
929+
o + sSup s = sSup ((o + ·) '' s) :=
930+
(isNormal_add_right o).map_sSup hs (bddAbove_of_small s)
931+
932+
@[simp]
933+
lemma mul_sSup (o : Ordinal) (s : Set Ordinal) : o * sSup s = sSup ((o * ·) '' s) := by
934+
rcases s.eq_empty_or_nonempty with (rfl | hs)
935+
· simp
936+
rcases eq_zero_or_pos o with (rfl | ho)
937+
· simp [hs.image_const]
938+
by_cases bdd : BddAbove s
939+
· exact (isNormal_mul_right ho).map_sSup hs bdd
940+
· rw [csSup_of_not_bddAbove bdd, csSup_empty, csSup_of_not_bddAbove]
941+
· simp
942+
exact fun ⟨u, hu⟩ ↦ bdd ⟨u, fun x hx ↦ (x.le_mul_right ho).trans (hu ⟨x, hx, rfl⟩)⟩
943+
944+
@[simp]
945+
lemma mul_iSup (o : Ordinal) {ι} (f : ι → Ordinal) : o * ⨆ i, f i = ⨆ i, o * f i := by
946+
rw [← sSup_range, mul_sSup, ← Set.range_comp', sSup_range]
947+
948+
@[simp]
949+
theorem iSup_add_natCast (o : Ordinal) : ⨆ n : ℕ, o + n = o + ω := by
950+
rw [← iSup_natCast, Ordinal.add_iSup]
925951

926952
@[deprecated (since := "2025-12-25")]
927953
alias iSup_add_nat := iSup_add_natCast
928954

929955
@[simp]
930956
theorem iSup_mul_natCast (o : Ordinal) : ⨆ n : ℕ, o * n = o * ω := by
931-
rcases eq_zero_or_pos o with (rfl | ho)
932-
· rw [zero_mul]
933-
exact iSup_eq_zero_iff.2 fun n => zero_mul (n : Ordinal)
934-
· exact apply_omega0_of_isNormal (isNormal_mul_right ho)
957+
rw [← iSup_natCast, Ordinal.mul_iSup]
935958

936959
@[deprecated (since := "2025-12-25")]
937960
alias iSup_mul_nat := iSup_mul_natCast

0 commit comments

Comments
 (0)