Skip to content

Commit 975f9e8

Browse files
committed
refactor: rename Cardinal.ord_eqCardinal.exists_ord_eq (#37330)
As suggested in #36928.
1 parent ef2abb0 commit 975f9e8

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

Counterexamples/Phillips.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ We need the continuum hypothesis to construct it.
460460

461461
theorem sierpinski_pathological_family (Hcont : #ℝ = ℵ₁) :
462462
∃ f : ℝ → Set ℝ, (∀ x, (univ \ f x).Countable) ∧ ∀ y, {x : ℝ | y ∈ f x}.Countable := by
463-
rcases Cardinal.ord_eqwith ⟨r, hr, H⟩
463+
rcases Cardinal.exists_ord_eqwith ⟨r, hr, H⟩
464464
refine ⟨fun x => {y | r x y}, fun x => ?_, fun y => ?_⟩
465465
· have : univ \ {y | r x y} = {y | r y x} ∪ {x} := by
466466
ext y

Mathlib/SetTheory/Cardinal/Arithmetic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ theorem mul_eq_self {c : Cardinal} (h : ℵ₀ ≤ c) : c * c = c := by
4646
-- the only nontrivial part is `c * c ≤ c`. We prove it inductively.
4747
refine Acc.recOn (Cardinal.lt_wf.apply c) (fun c _ => Cardinal.inductionOn c fun α IH ol => ?_) h
4848
-- consider the minimal well-order `r` on `α` (a type with cardinality `c`).
49-
rcases ord_eq α with ⟨r, wo, e⟩
49+
rcases exists_ord_eq α with ⟨r, wo, e⟩
5050
classical
5151
letI := linearOrderOfSTO r
5252
-- Define an order `s` on `α × α` by writing `(a, b) < (c, d)` if `max a b < max c d`, or

Mathlib/SetTheory/Cardinal/Cofinality.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ theorem cof_omega0 : cof ω = ℵ₀ :=
337337
theorem ord_cof_eq (α : Type*) [LinearOrder α] [WellFoundedLT α] :
338338
∃ s : Set α, IsCofinal s ∧ typeLT s = (Order.cof α).ord := by
339339
obtain ⟨s, hs, hs'⟩ := Order.cof_eq α
340-
obtain ⟨r, hr, hr'⟩ := ord_eq s
340+
obtain ⟨r, hr, hr'⟩ := exists_ord_eq s
341341
have ht := hs.trans (isCofinal_setOf_imp_lt r)
342342
refine ⟨_, ht, (ord_le.2 (cof_le ht)).antisymm' ?_⟩
343343
rw [← hs', hr', type_le_iff']
@@ -636,7 +636,7 @@ theorem nfp_lt_ord {f : Ordinal → Ordinal} {c} (hc : ℵ₀ < cof c) (hf : ∀
636636
theorem exists_blsub_cof (o : Ordinal) :
637637
∃ f : ∀ a < (cof o).ord, Ordinal, blsub.{u, u} _ f = o := by
638638
rcases exists_lsub_cof o with ⟨ι, f, hf, hι⟩
639-
rcases Cardinal.ord_eq ι with ⟨r, hr, hι'⟩
639+
rcases Cardinal.exists_ord_eq ι with ⟨r, hr, hι'⟩
640640
rw [← @blsub_eq_lsub' ι r hr] at hf
641641
rw [← hι, hι']
642642
exact ⟨_, hf⟩
@@ -645,7 +645,7 @@ theorem le_cof_iff_blsub {b : Ordinal} {a : Cardinal} :
645645
a ≤ cof b ↔ ∀ {o} (f : ∀ a < o, Ordinal), blsub.{u, u} o f = b → a ≤ o.card :=
646646
le_cof_iff_lsub.trans
647647
fun H o f hf => by simpa using H _ hf, fun H ι f hf => by
648-
rcases Cardinal.ord_eq ι with ⟨r, hr, hι'⟩
648+
rcases Cardinal.exists_ord_eq ι with ⟨r, hr, hι'⟩
649649
rw [← @blsub_eq_lsub' ι r hr] at hf
650650
simpa using H _ hf⟩
651651

@@ -762,7 +762,7 @@ theorem mk_subset_mk_lt_cof {α : Type*} (h : ∀ x < #α, 2 ^ x < #α) :
762762
rcases eq_or_ne #α 0 with (ha | ha)
763763
· simp [ha]
764764
have h' : IsStrongLimit #α := ⟨ha, @h⟩
765-
rcases ord_eq α with ⟨r, wo, hr⟩
765+
rcases exists_ord_eq α with ⟨r, wo, hr⟩
766766
classical
767767
letI := linearOrderOfSTO r
768768
apply le_antisymm
@@ -790,7 +790,7 @@ alias unbounded_of_unbounded_iUnion := isCofinal_of_isCofinal_iUnion
790790

791791
theorem lt_power_cof {c : Cardinal.{u}} : ℵ₀ ≤ c → c < c ^ c.ord.cof :=
792792
Cardinal.inductionOn c fun α h => by
793-
rcases ord_eq α with ⟨r, wo, re⟩
793+
rcases exists_ord_eq α with ⟨r, wo, re⟩
794794
have := isSuccLimit_ord h
795795
rw [re] at this ⊢
796796
rcases cof_eq' r this with ⟨S, H, Se⟩

Mathlib/SetTheory/Cardinal/Regular.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ theorem isRegular_succ {c : Cardinal.{u}} (h : ℵ₀ ≤ c) : IsRegular (succ c
8282
(by
8383
have αe := Cardinal.mk_out (succ c)
8484
set α := (succ c).out
85-
rcases ord_eq α with ⟨r, wo, re⟩
85+
rcases exists_ord_eq α with ⟨r, wo, re⟩
8686
have := isSuccLimit_ord (h.trans (le_succ _))
8787
rw [← αe, re] at this ⊢
8888
rcases cof_eq' r this with ⟨S, H, Se⟩

Mathlib/SetTheory/Ordinal/Basic.lean

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,14 +1101,16 @@ theorem ord_eq_iInf (α : Type u) : ord #α = ⨅ r : { r // IsWellOrder α r },
11011101
@[deprecated (since := "2026-03-15")] alias ord_eq_Inf := ord_eq_iInf
11021102

11031103
/-- There exists a well-order on `α` whose order type is exactly `ord #α`. -/
1104-
theorem ord_eq (α) : ∃ (r : α → α → Prop) (_ : IsWellOrder α r), ord #α = type r :=
1104+
theorem exists_ord_eq (α) : ∃ (r : α → α → Prop) (_ : IsWellOrder α r), ord #α = type r :=
11051105
let ⟨r, wo⟩ := ciInf_mem fun r : { r // IsWellOrder α r } => @type α r.1 r.2
11061106
⟨r.1, r.2, wo.symm⟩
11071107

1108+
@[deprecated (since := "2026-03-29")] alias ord_eq := exists_ord_eq
1109+
11081110
open Classical in
11091111
/-- There exists a well-order on `α` whose order type is exactly `ord #α`. -/
11101112
theorem exists_ord_eq_type_lt (α) : ∃ (_ : LinearOrder α) (_: WellFoundedLT α), ord #α = typeLT α :=
1111-
let ⟨r, _, hr⟩ := ord_eq α
1113+
let ⟨r, _, hr⟩ := exists_ord_eq α
11121114
let := linearOrderOfSTO r
11131115
⟨this, inferInstance, hr⟩
11141116

@@ -1117,7 +1119,7 @@ theorem ord_le_type (r : α → α → Prop) [h : IsWellOrder α r] : ord #α
11171119

11181120
theorem ord_le {c o} : ord c ≤ o ↔ c ≤ o.card := by
11191121
refine c.inductionOn fun α ↦ o.inductionOn fun β s _ ↦ ?_
1120-
let ⟨r, _, e⟩ := ord_eq α
1122+
let ⟨r, _, e⟩ := exists_ord_eq α
11211123
constructor <;> intro h
11221124
· rw [e] at h
11231125
exact card_le_card h
@@ -1133,7 +1135,7 @@ theorem lt_ord {c o} : o < ord c ↔ o.card < c :=
11331135

11341136
@[simp]
11351137
theorem card_ord (c) : (ord c).card = c :=
1136-
c.inductionOn fun α ↦ let ⟨r, _, e⟩ := ord_eq α; e ▸ card_type r
1138+
c.inductionOn fun α ↦ let ⟨r, _, e⟩ := exists_ord_eq α; e ▸ card_type r
11371139

11381140
theorem card_surjective : Function.Surjective card :=
11391141
fun c ↦ ⟨_, card_ord c⟩

0 commit comments

Comments
 (0)