Skip to content

Commit 26d69a0

Browse files
committed
chore: golf Ordinal.cof_univ (#36925)
And tweak some existing theorems on `univ`.
1 parent 6682a4e commit 26d69a0

File tree

3 files changed

+19
-23
lines changed

3 files changed

+19
-23
lines changed

Mathlib/SetTheory/Cardinal/Aleph.lean

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,13 +291,14 @@ theorem ord_preAleph (o : Ordinal) : (preAleph o).ord = preOmega o := by
291291
rw [← o.card_preOmega, (isInitial_preOmega o).ord_card]
292292

293293
@[simp]
294-
theorem type_cardinal : typeLT Cardinal = Ordinal.univ.{u, u + 1} := by
295-
rw [Ordinal.univ_id]
296-
exact Quotient.sound ⟨preAleph.symm.toRelIsoLT⟩
294+
theorem _root_.Ordinal.type_lt_cardinal : typeLT Cardinal = Ordinal.univ.{u, u + 1} := by
295+
simpa using preAleph.symm.toRelIsoLT.ordinal_type_eq
296+
297+
@[deprecated (since := "2026-03-20")] alias type_cardinal := type_lt_cardinal
297298

298299
@[simp]
299300
theorem mk_cardinal : #Cardinal = univ.{u, u + 1} := by
300-
simpa only [card_type, card_univ] using congr_arg card type_cardinal
301+
simpa only [card_type, card_univ] using congr_arg card type_lt_cardinal
301302

302303
theorem preAleph_lt_preAleph {o₁ o₂ : Ordinal} : preAleph o₁ < preAleph o₂ ↔ o₁ < o₂ :=
303304
preAleph.lt_iff_lt

Mathlib/SetTheory/Cardinal/Cofinality.lean

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -752,24 +752,11 @@ theorem cof_eq' (r : α → α → Prop) [H : IsWellOrder α r] (h : IsSuccLimit
752752
rwa [← not_bddAbove_iff_isCofinal, not_bddAbove_iff] at hs
753753

754754
@[simp]
755-
theorem cof_univ : cof univ.{u, v} = Cardinal.univ.{u, v} :=
756-
le_antisymm (cof_le_card _)
757-
(by
758-
refine le_of_forall_lt fun c h => ?_
759-
rcases lt_univ'.1 h with ⟨c, rfl⟩
760-
rcases Order.cof_eq Ordinal.{u} with ⟨S, H, Se⟩
761-
rw [univ, ← lift_cof, ← Cardinal.lift_lift.{u + 1, v, u}, Cardinal.lift_lt, cof_type, ← Se]
762-
refine lt_of_not_ge fun h => ?_
763-
obtain ⟨a, e⟩ := Cardinal.mem_range_lift_of_le h
764-
induction a using Quotient.inductionOn
765-
obtain ⟨f⟩ := Quotient.exact e
766-
have f := Equiv.ulift.symm.trans f
767-
let g a := (f a).1
768-
let o := succ (iSup g)
769-
rcases H o with ⟨b, h, l⟩
770-
refine l.not_gt (lt_succ_iff.2 ?_)
771-
rw [← show g (f.symm ⟨b, h⟩) = b by simp [g]]
772-
apply Ordinal.le_iSup)
755+
theorem cof_univ : cof univ.{u, v} = Cardinal.univ.{u, v} := by
756+
apply (cof_le_card _).antisymm
757+
simp_rw [univ, ← lift_cof, ← lift_card, Cardinal.lift_le, cof_type, card_type, le_cof_iff,
758+
← not_bddAbove_iff_isCofinal]
759+
exact fun s hs ↦ mk_le_of_injective (enumOrdOrderIso s hs).injective
773760

774761
end Ordinal
775762

Mathlib/SetTheory/Ordinal/Basic.lean

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,11 @@ theorem le_enum_succ {o : Ordinal} (a : (succ o).ToType) :
10141014
def univ : Ordinal.{max (u + 1) v} :=
10151015
lift.{v, u + 1} (typeLT Ordinal)
10161016

1017+
@[simp]
1018+
theorem type_lt_ordinal : typeLT Ordinal = univ.{u, u + 1} :=
1019+
(lift_id _).symm
1020+
1021+
@[deprecated type_lt_ordinal (since := "2026-03-20")]
10171022
theorem univ_id : univ.{u, u + 1} = typeLT Ordinal :=
10181023
lift_id _
10191024

@@ -1061,8 +1066,9 @@ theorem liftPrincipalSeg_coe :
10611066
theorem liftPrincipalSeg_top : (liftPrincipalSeg.{u, v}).top = univ.{u, v} :=
10621067
rfl
10631068

1069+
@[deprecated liftPrincipalSeg_top (since := "2026-03-20")]
10641070
theorem liftPrincipalSeg_top' : liftPrincipalSeg.{u, u + 1}.top = typeLT Ordinal := by
1065-
simp only [liftPrincipalSeg_top, univ_id]
1071+
simp
10661072

10671073
end Ordinal
10681074

@@ -1493,3 +1499,5 @@ theorem List.SortedGT.lt_ord_of_lt [LinearOrder α] [WellFoundedLT α] {l m : Li
14931499
(List.head_le_of_lt hmltl))
14941500

14951501
@[deprecated (since := "2025-11-27")] alias List.Sorted.lt_ord_of_lt := List.SortedGT.lt_ord_of_lt
1502+
1503+
set_option linter.style.longFile 1700

0 commit comments

Comments
 (0)