fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
isSuccLimit_of_principal_add (ho₁ : 1 < o) (ho : Principal (· + ·) o) : IsSuccLimit o := by rw [isSuccLimit_iff, isSuccPrelimit_iff_succ_lt] exact ⟨ho₁.ne_bot, fun _ ha ↦ ho ha ho₁⟩ @[deprecated (since := "2025-07-08")] alias isLimit_of_principal_add := isSuccLimit_of_principal_add
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
isSuccLimit_of_principal_add
null
principal_add_iff_add_left_eq_self : Principal (· + ·) o ↔ ∀ a < o, a + o = o := by refine ⟨fun ho a hao => ?_, fun h a b hao hbo => ?_⟩ · rcases lt_or_ge 1 o with ho₁ | ho₁ · exact op_eq_self_of_principal hao (isNormal_add_right a) ho (isSuccLimit_of_principal_add ho₁ ho) · rcases le_one_iff.1 ho₁ with (rfl | rfl) · exact (Ordinal.not_lt_zero a hao).elim · rw [lt_one_iff_zero] at hao rw [hao, zero_add] · rw [← h a hao] exact (isNormal_add_right a).strictMono hbo
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_add_iff_add_left_eq_self
null
exists_lt_add_of_not_principal_add (ha : ¬ Principal (· + ·) a) : ∃ b < a, ∃ c < a, b + c = a := by rw [not_principal_iff] at ha rcases ha with ⟨b, hb, c, hc, H⟩ refine ⟨b, hb, _, lt_of_le_of_ne (sub_le_self a b) fun hab => ?_, Ordinal.add_sub_cancel_of_le hb.le⟩ rw [← sub_le, hab] at H exact H.not_gt hc
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
exists_lt_add_of_not_principal_add
null
principal_add_iff_add_lt_ne_self : Principal (· + ·) a ↔ ∀ b < a, ∀ c < a, b + c ≠ a := ⟨fun ha _ hb _ hc => (ha hb hc).ne, fun H => by by_contra! ha rcases exists_lt_add_of_not_principal_add ha with ⟨b, hb, c, hc, rfl⟩ exact (H b hb c hc).irrefl⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_add_iff_add_lt_ne_self
null
principal_add_omega0 : Principal (· + ·) ω := principal_add_iff_add_left_eq_self.2 fun _ => add_omega0
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_add_omega0
null
add_omega0_opow (h : a < ω ^ b) : a + ω ^ b = ω ^ b := by refine le_antisymm ?_ (le_add_left _ a) induction b using limitRecOn with | zero => rw [opow_zero, ← succ_zero, lt_succ_iff, Ordinal.le_zero] at h rw [h, zero_add] | succ => rw [opow_succ] at h rcases (lt_mul_iff_of_isSuccLimit isSuccLimit_omega0).1 h with ⟨x, xo, ax⟩ apply (add_le_add_right ax.le _).trans rw [opow_succ, ← mul_add, add_omega0 xo] | limit b l IH => rcases (lt_opow_of_isSuccLimit omega0_ne_zero l).1 h with ⟨x, xb, ax⟩ apply (((isNormal_add_right a).trans <| isNormal_opow one_lt_omega0).limit_le l).2 intro y yb calc a + ω ^ y ≤ a + ω ^ max x y := add_le_add_left (opow_le_opow_right omega0_pos (le_max_right x y)) _ _ ≤ ω ^ max x y := IH _ (max_lt xb yb) <| ax.trans_le <| opow_le_opow_right omega0_pos <| le_max_left x y _ ≤ ω ^ b := opow_le_opow_right omega0_pos <| (max_lt xb yb).le
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
add_omega0_opow
null
principal_add_omega0_opow (o : Ordinal) : Principal (· + ·) (ω ^ o) := principal_add_iff_add_left_eq_self.2 fun _ => add_omega0_opow
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_add_omega0_opow
null
principal_add_iff_zero_or_omega0_opow : Principal (· + ·) o ↔ o = 0 ∨ o ∈ Set.range (ω ^ · : Ordinal → Ordinal) := by rcases eq_or_ne o 0 with (rfl | ho) · simp only [principal_zero, Or.inl] · rw [principal_add_iff_add_left_eq_self] simp only [ho, false_or] refine ⟨fun H => ⟨_, ((lt_or_eq_of_le (opow_log_le_self _ ho)).resolve_left fun h => ?_)⟩, fun ⟨b, e⟩ => e.symm ▸ fun a => add_omega0_opow⟩ have := H _ h have := lt_opow_succ_log_self one_lt_omega0 o rw [opow_succ, lt_mul_iff_of_isSuccLimit isSuccLimit_omega0] at this rcases this with ⟨a, ao, h'⟩ rcases lt_omega0.1 ao with ⟨n, rfl⟩ clear ao revert h' apply not_lt_of_ge suffices e : ω ^ log ω o * n + o = o by simpa only [e] using le_add_right (ω ^ log ω o * ↑n) o induction n with | zero => simp [Nat.cast_zero, mul_zero, zero_add] | succ n IH => simp only [Nat.cast_succ, mul_add_one, add_assoc, this, IH]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_add_iff_zero_or_omega0_opow
The main characterization theorem for additive principal ordinals.
principal_add_opow_of_principal_add {a} (ha : Principal (· + ·) a) (b : Ordinal) : Principal (· + ·) (a ^ b) := by rcases principal_add_iff_zero_or_omega0_opow.1 ha with (rfl | ⟨c, rfl⟩) · rcases eq_or_ne b 0 with (rfl | hb) · rw [opow_zero] exact principal_add_one · rwa [zero_opow hb] · rw [← opow_mul] exact principal_add_omega0_opow _
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_add_opow_of_principal_add
null
add_absorp (h₁ : a < ω ^ b) (h₂ : ω ^ b ≤ c) : a + c = c := by rw [← Ordinal.add_sub_cancel_of_le h₂, ← add_assoc, add_omega0_opow h₁]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
add_absorp
null
principal_add_mul_of_principal_add (a : Ordinal.{u}) {b : Ordinal.{u}} (hb₁ : b ≠ 1) (hb : Principal (· + ·) b) : Principal (· + ·) (a * b) := by rcases eq_zero_or_pos a with (rfl | _) · rw [zero_mul] exact principal_zero · rcases eq_zero_or_pos b with (rfl | hb₁') · rw [mul_zero] exact principal_zero · rw [← succ_le_iff, succ_zero] at hb₁' intro c d hc hd rw [lt_mul_iff_of_isSuccLimit (isSuccLimit_of_principal_add (lt_of_le_of_ne hb₁' hb₁.symm) hb)] at * rcases hc with ⟨x, hx, hx'⟩ rcases hd with ⟨y, hy, hy'⟩ use x + y, hb hx hy rw [mul_add] exact Left.add_lt_add hx' hy' /-! #### Multiplicative principal ordinals -/
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_add_mul_of_principal_add
null
principal_mul_one : Principal (· * ·) 1 := by rw [principal_one_iff] exact zero_mul _
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_mul_one
null
principal_mul_two : Principal (· * ·) 2 := by intro a b ha hb rw [← succ_one, lt_succ_iff] at * convert mul_le_mul' ha hb exact (mul_one 1).symm
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_mul_two
null
principal_mul_of_le_two (ho : o ≤ 2) : Principal (· * ·) o := by rcases lt_or_eq_of_le ho with (ho | rfl) · rw [← succ_one, lt_succ_iff] at ho rcases lt_or_eq_of_le ho with (ho | rfl) · rw [lt_one_iff_zero.1 ho] exact principal_zero · exact principal_mul_one · exact principal_mul_two
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_mul_of_le_two
null
principal_add_of_principal_mul (ho : Principal (· * ·) o) (ho₂ : o ≠ 2) : Principal (· + ·) o := by rcases lt_or_gt_of_ne ho₂ with ho₁ | ho₂ · replace ho₁ : o < succ 1 := by rwa [succ_one] rw [lt_succ_iff] at ho₁ exact principal_add_of_le_one ho₁ · refine fun a b hao hbo => lt_of_le_of_lt ?_ (ho (max_lt hao hbo) ho₂) dsimp only rw [← one_add_one_eq_two, mul_add, mul_one] exact add_le_add (le_max_left a b) (le_max_right a b)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_add_of_principal_mul
null
isSuccLimit_of_principal_mul (ho₂ : 2 < o) (ho : Principal (· * ·) o) : IsSuccLimit o := isSuccLimit_of_principal_add ((lt_succ 1).trans (succ_one ▸ ho₂)) (principal_add_of_principal_mul ho (ne_of_gt ho₂)) @[deprecated (since := "2025-07-08")] alias isLimit_of_principal_mul := isSuccLimit_of_principal_mul
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
isSuccLimit_of_principal_mul
null
principal_mul_iff_mul_left_eq : Principal (· * ·) o ↔ ∀ a, 0 < a → a < o → a * o = o := by refine ⟨fun h a ha₀ hao => ?_, fun h a b hao hbo => ?_⟩ · rcases le_or_gt o 2 with ho | ho · convert one_mul o apply le_antisymm · rw [← lt_succ_iff, succ_one] exact hao.trans_le ho · rwa [← succ_le_iff, succ_zero] at ha₀ · exact op_eq_self_of_principal hao (isNormal_mul_right ha₀) h (isSuccLimit_of_principal_mul ho h) · rcases eq_or_ne a 0 with (rfl | ha) · dsimp only; rwa [zero_mul] rw [← Ordinal.pos_iff_ne_zero] at ha rw [← h a ha hao] exact (isNormal_mul_right ha).strictMono hbo
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_mul_iff_mul_left_eq
null
principal_mul_omega0 : Principal (· * ·) ω := fun a b ha hb => match a, b, lt_omega0.1 ha, lt_omega0.1 hb with | _, _, ⟨m, rfl⟩, ⟨n, rfl⟩ => by dsimp only; rw [← natCast_mul] apply nat_lt_omega0
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_mul_omega0
null
mul_omega0 (a0 : 0 < a) (ha : a < ω) : a * ω = ω := principal_mul_iff_mul_left_eq.1 principal_mul_omega0 a a0 ha
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
mul_omega0
null
natCast_mul_omega0 {n : ℕ} (hn : 0 < n) : n * ω = ω := mul_omega0 (mod_cast hn) (nat_lt_omega0 n)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
natCast_mul_omega0
null
mul_lt_omega0_opow (c0 : 0 < c) (ha : a < ω ^ c) (hb : b < ω) : a * b < ω ^ c := by rcases zero_or_succ_or_isSuccLimit c with (rfl | ⟨c, rfl⟩ | l) · exact (lt_irrefl _).elim c0 · rw [opow_succ] at ha obtain ⟨n, hn, an⟩ := ((isNormal_mul_right <| opow_pos _ omega0_pos).limit_lt isSuccLimit_omega0).1 ha apply (mul_le_mul_right' (le_of_lt an) _).trans_lt rw [opow_succ, mul_assoc] gcongr exacts [opow_pos _ omega0_pos, principal_mul_omega0 hn hb] · rcases ((isNormal_opow one_lt_omega0).limit_lt l).1 ha with ⟨x, hx, ax⟩ refine (mul_le_mul' (le_of_lt ax) (le_of_lt hb)).trans_lt ?_ rw [← opow_succ, opow_lt_opow_iff_right one_lt_omega0] exact l.succ_lt hx
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
mul_lt_omega0_opow
null
mul_omega0_opow_opow (a0 : 0 < a) (h : a < ω ^ ω ^ b) : a * ω ^ ω ^ b = ω ^ ω ^ b := by obtain rfl | b0 := eq_or_ne b 0 · rw [opow_zero, opow_one] at h ⊢ exact mul_omega0 a0 h · apply le_antisymm · obtain ⟨x, xb, ax⟩ := (lt_opow_of_isSuccLimit omega0_ne_zero (isSuccLimit_opow_left isSuccLimit_omega0 b0)).1 h apply (mul_le_mul_right' (le_of_lt ax) _).trans rw [← opow_add, add_omega0_opow xb] · conv_lhs => rw [← one_mul (ω ^ _)] exact mul_le_mul_right' (one_le_iff_pos.2 a0) _
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
mul_omega0_opow_opow
null
principal_mul_omega0_opow_opow (o : Ordinal) : Principal (· * ·) (ω ^ ω ^ o) := principal_mul_iff_mul_left_eq.2 fun _ => mul_omega0_opow_opow
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_mul_omega0_opow_opow
null
principal_add_of_principal_mul_opow (hb : 1 < b) (ho : Principal (· * ·) (b ^ o)) : Principal (· + ·) o := by intro x y hx hy have := ho ((opow_lt_opow_iff_right hb).2 hx) ((opow_lt_opow_iff_right hb).2 hy) dsimp only at * rwa [← opow_add, opow_lt_opow_iff_right hb] at this
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_add_of_principal_mul_opow
null
principal_mul_iff_le_two_or_omega0_opow_opow : Principal (· * ·) o ↔ o ≤ 2 ∨ o ∈ Set.range (ω ^ ω ^ · : Ordinal → Ordinal) := by refine ⟨fun ho => ?_, ?_⟩ · rcases le_or_gt o 2 with ho₂ | ho₂ · exact Or.inl ho₂ · rcases principal_add_iff_zero_or_omega0_opow.1 (principal_add_of_principal_mul ho ho₂.ne') with (rfl | ⟨a, rfl⟩) · exact (Ordinal.not_lt_zero 2 ho₂).elim · rcases principal_add_iff_zero_or_omega0_opow.1 (principal_add_of_principal_mul_opow one_lt_omega0 ho) with (rfl | ⟨b, rfl⟩) · simp · exact Or.inr ⟨b, rfl⟩ · rintro (ho₂ | ⟨a, rfl⟩) · exact principal_mul_of_le_two ho₂ · exact principal_mul_omega0_opow_opow a
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_mul_iff_le_two_or_omega0_opow_opow
The main characterization theorem for multiplicative principal ordinals.
mul_omega0_dvd (a0 : 0 < a) (ha : a < ω) : ∀ {b}, ω ∣ b → a * b = b | _, ⟨b, rfl⟩ => by rw [← mul_assoc, mul_omega0 a0 ha]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
mul_omega0_dvd
null
mul_eq_opow_log_succ (ha : a ≠ 0) (hb : Principal (· * ·) b) (hb₂ : 2 < b) : a * b = b ^ succ (log b a) := by apply le_antisymm · have hbl := isSuccLimit_of_principal_mul hb₂ hb rw [(isNormal_mul_right (Ordinal.pos_iff_ne_zero.2 ha)).apply_of_isSuccLimit hbl, Ordinal.iSup_le_iff] intro ⟨c, hcb⟩ have hb₁ : 1 < b := one_lt_two.trans hb₂ have hbo₀ : b ^ log b a ≠ 0 := Ordinal.pos_iff_ne_zero.1 (opow_pos _ (zero_lt_one.trans hb₁)) apply (mul_le_mul_right' (le_of_lt (lt_mul_succ_div a hbo₀)) c).trans rw [mul_assoc, opow_succ] refine mul_le_mul_left' (hb (hbl.succ_lt ?_) hcb).le _ rw [div_lt hbo₀, ← opow_succ] exact lt_opow_succ_log_self hb₁ _ · rw [opow_succ] exact mul_le_mul_right' (opow_log_le_self b ha) b /-! #### Exponential principal ordinals -/
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
mul_eq_opow_log_succ
null
principal_opow_omega0 : Principal (· ^ ·) ω := fun a b ha hb => match a, b, lt_omega0.1 ha, lt_omega0.1 hb with | _, _, ⟨m, rfl⟩, ⟨n, rfl⟩ => by simp_rw [← natCast_opow] apply nat_lt_omega0
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
principal_opow_omega0
null
opow_omega0 (a1 : 1 < a) (h : a < ω) : a ^ ω = ω := ((opow_le_of_isSuccLimit (one_le_iff_ne_zero.1 <| le_of_lt a1) isSuccLimit_omega0).2 fun _ hb => (principal_opow_omega0 h hb).le).antisymm (right_le_opow _ a1)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
opow_omega0
null
natCast_opow_omega0 {n : ℕ} (hn : 1 < n) : n ^ ω = ω := opow_omega0 (mod_cast hn) (nat_lt_omega0 n)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Principal.lean
natCast_opow_omega0
null
noncomputable rank (h : Acc r a) : Ordinal.{u} := Acc.recOn h fun a _h ih => ⨆ b : { b // r b a }, Order.succ (ih b b.2)
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Rank.lean
rank
The rank of an element `a` accessible under a relation `r` is defined recursively as the smallest ordinal greater than the ranks of all elements below it (i.e. elements `b` such that `r b a`).
rank_eq (h : Acc r a) : h.rank = ⨆ b : { b // r b a }, Order.succ (h.inv b.2).rank := by change (Acc.intro a fun _ => h.inv).rank = _ rfl
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Rank.lean
rank_eq
null
rank_lt_of_rel (hb : Acc r b) (h : r a b) : (hb.inv h).rank < hb.rank := (Order.lt_succ _).trans_le <| by rw [hb.rank_eq] exact Ordinal.le_iSup _ (⟨a, h⟩ : {a // r a b})
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Rank.lean
rank_lt_of_rel
if `r a b` then the rank of `a` is less than the rank of `b`.
mem_range_rank_of_le {o : Ordinal} (ha : Acc r a) (ho : o ≤ ha.rank) : ∃ (b : α) (hb : Acc r b), hb.rank = o := by obtain rfl | ho := ho.eq_or_lt · exact ⟨a, ha, rfl⟩ · revert ho refine ha.recOn fun a ha IH ho ↦ ?_ rw [rank_eq, Ordinal.lt_iSup_iff] at ho obtain ⟨⟨b, hb⟩, ho⟩ := ho rw [Order.lt_succ_iff] at ho obtain rfl | ho := ho.eq_or_lt exacts [⟨b, ha b hb, rfl⟩, IH _ hb ho]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Rank.lean
mem_range_rank_of_le
null
noncomputable rank (a : α) : Ordinal.{u} := (hwf.apply r a).rank
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Rank.lean
rank
The rank of an element `a` under a well-founded relation `r` is defined recursively as the smallest ordinal greater than the ranks of all elements below it (i.e. elements `b` such that `r b a`).
rank_eq (a : α) : rank r a = ⨆ b : { b // r b a }, Order.succ (rank r b) := (hwf.apply r a).rank_eq variable {r : α → α → Prop} [hwf : IsWellFounded α r]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Rank.lean
rank_eq
null
rank_lt_of_rel (h : r a b) : rank r a < rank r b := Acc.rank_lt_of_rel _ h
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Rank.lean
rank_lt_of_rel
null
mem_range_rank_of_le {o : Ordinal} (h : o ≤ rank r a) : o ∈ Set.range (rank r) := by obtain ⟨b, hb, rfl⟩ := Acc.mem_range_rank_of_le (hwf.apply r a) h exact ⟨b, rfl⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Rank.lean
mem_range_rank_of_le
null
WellFoundedLT.rank_strictMono [Preorder α] [WellFoundedLT α] : StrictMono (IsWellFounded.rank (α := α) (· < ·)) := fun _ _ => IsWellFounded.rank_lt_of_rel
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Rank.lean
WellFoundedLT.rank_strictMono
null
WellFoundedGT.rank_strictAnti [Preorder α] [WellFoundedGT α] : StrictAnti (IsWellFounded.rank (α := α) (· > ·)) := fun _ _ a => IsWellFounded.rank_lt_of_rel a @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Rank.lean
WellFoundedGT.rank_strictAnti
null
IsWellFounded.rank_eq_typein (r) [IsWellOrder α r] : rank r = Ordinal.typein r := by classical letI := linearOrderOfSTO r ext a exact InitialSeg.eq (⟨(OrderEmbedding.ofStrictMono _ WellFoundedLT.rank_strictMono).ltEmbedding, fun a b h ↦ mem_range_rank_of_le h.le⟩) (Ordinal.typein r) a
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Rank.lean
IsWellFounded.rank_eq_typein
null
isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ ¬ IsSuccLimit a := by refine ⟨fun h ha => ?_, fun ha => ?_⟩ · obtain ⟨b, c, hbc, hbc'⟩ := (mem_nhds_iff_exists_Ioo_subset' ⟨0, ha.bot_lt⟩ ⟨_, lt_succ a⟩).1 (h.mem_nhds rfl) have hba := ha.succ_lt hbc.1 exact hba.ne (hbc' ⟨lt_succ b, hba.trans hbc.2⟩) · rcases zero_or_succ_or_isSuccLimit a with (rfl | ⟨b, rfl⟩ | ha') · rw [← bot_eq_zero, ← Set.Iic_bot, ← Iio_succ] exact isOpen_Iio · rw [← Set.Icc_self, Icc_succ_left, ← Ioo_succ_right] exact isOpen_Ioo · exact (ha ha').elim
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
isOpen_singleton_iff
null
nhds_eq_pure : 𝓝 a = pure a ↔ ¬ IsSuccLimit a := (isOpen_singleton_iff_nhds_eq_pure _).symm.trans isOpen_singleton_iff
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
nhds_eq_pure
null
isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsSuccLimit o → ∃ a < o, Set.Ioo a o ⊆ s := by refine isOpen_iff_mem_nhds.trans <| forall₂_congr fun o ho => ?_ by_cases ho' : IsSuccLimit o · simp only [(SuccOrder.hasBasis_nhds_Ioc_of_exists_lt ⟨0, ho'.bot_lt⟩).mem_iff, ho', true_implies] refine exists_congr fun a => and_congr_right fun ha => ?_ simp only [← Set.Ioo_insert_right ha, Set.insert_subset_iff, ho, true_and] · simp [nhds_eq_pure.2 ho', ho, ho'] open List Set in
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
isOpen_iff
null
mem_closure_tfae (a : Ordinal.{u}) (s : Set Ordinal) : TFAE [a ∈ closure s, a ∈ closure (s ∩ Iic a), (s ∩ Iic a).Nonempty ∧ sSup (s ∩ Iic a) = a, ∃ t, t ⊆ s ∧ t.Nonempty ∧ BddAbove t ∧ sSup t = a, ∃ (o : Ordinal.{u}), o ≠ 0 ∧ ∃ (f : ∀ x < o, Ordinal), (∀ x hx, f x hx ∈ s) ∧ bsup.{u, u} o f = a, ∃ (ι : Type u), Nonempty ι ∧ ∃ f : ι → Ordinal, (∀ i, f i ∈ s) ∧ ⨆ i, f i = a] := by tfae_have 1 → 2 := by simpa only [mem_closure_iff_nhdsWithin_neBot, inter_comm s, nhdsWithin_inter', SuccOrder.nhdsLE_eq_nhds] using id tfae_have 2 → 3 | h => by rcases (s ∩ Iic a).eq_empty_or_nonempty with he | hne · simp [he] at h · refine ⟨hne, (isLUB_of_mem_closure ?_ h).csSup_eq hne⟩ exact fun x hx => hx.2 tfae_have 3 → 4 | h => ⟨_, inter_subset_left, h.1, bddAbove_Iic.mono inter_subset_right, h.2⟩ tfae_have 4 → 5 := by rintro ⟨t, hts, hne, hbdd, rfl⟩ have hlub : IsLUB t (sSup t) := isLUB_csSup hne hbdd let ⟨y, hyt⟩ := hne classical refine ⟨succ (sSup t), succ_ne_zero _, fun x _ => if x ∈ t then x else y, fun x _ => ?_, ?_⟩ · simp only split_ifs with h <;> exact hts ‹_› · refine le_antisymm (bsup_le fun x _ => ?_) (csSup_le hne fun x hx => ?_) · split_ifs <;> exact hlub.1 ‹_› · refine (if_pos hx).symm.trans_le (le_bsup _ _ <| (hlub.1 hx).trans_lt (lt_succ _)) tfae_have 5 → 6 := by rintro ⟨o, h₀, f, hfs, rfl⟩ exact ⟨_, toType_nonempty_iff_ne_zero.2 h₀, familyOfBFamily o f, fun _ => hfs _ _, rfl⟩ tfae_have 6 → 1 := by rintro ⟨ι, hne, f, hfs, rfl⟩ exact closure_mono (range_subset_iff.2 hfs) <| csSup_mem_closure (range_nonempty f) (bddAbove_range.{u, u} f) tfae_finish
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
mem_closure_tfae
null
mem_closure_iff_iSup : a ∈ closure s ↔ ∃ (ι : Type u) (_ : Nonempty ι) (f : ι → Ordinal), (∀ i, f i ∈ s) ∧ ⨆ i, f i = a := by apply ((mem_closure_tfae a s).out 0 5).trans simp_rw [exists_prop]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
mem_closure_iff_iSup
null
mem_iff_iSup_of_isClosed (hs : IsClosed s) : a ∈ s ↔ ∃ (ι : Type u) (_hι : Nonempty ι) (f : ι → Ordinal), (∀ i, f i ∈ s) ∧ ⨆ i, f i = a := by rw [← mem_closure_iff_iSup, hs.closure_eq]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
mem_iff_iSup_of_isClosed
null
mem_closure_iff_bsup : a ∈ closure s ↔ ∃ (o : Ordinal) (_ho : o ≠ 0) (f : ∀ a < o, Ordinal), (∀ i hi, f i hi ∈ s) ∧ bsup.{u, u} o f = a := by apply ((mem_closure_tfae a s).out 0 4).trans simp_rw [exists_prop]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
mem_closure_iff_bsup
null
mem_closed_iff_bsup (hs : IsClosed s) : a ∈ s ↔ ∃ (o : Ordinal) (_ho : o ≠ 0) (f : ∀ a < o, Ordinal), (∀ i hi, f i hi ∈ s) ∧ bsup.{u, u} o f = a := by rw [← mem_closure_iff_bsup, hs.closure_eq]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
mem_closed_iff_bsup
null
isClosed_iff_iSup : IsClosed s ↔ ∀ {ι : Type u}, Nonempty ι → ∀ f : ι → Ordinal, (∀ i, f i ∈ s) → ⨆ i, f i ∈ s := by use fun hs ι hι f hf => (mem_iff_iSup_of_isClosed hs).2 ⟨ι, hι, f, hf, rfl⟩ rw [← closure_subset_iff_isClosed] intro h x hx rcases mem_closure_iff_iSup.1 hx with ⟨ι, hι, f, hf, rfl⟩ exact h hι f hf
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
isClosed_iff_iSup
null
isClosed_iff_bsup : IsClosed s ↔ ∀ {o : Ordinal}, o ≠ 0 → ∀ f : ∀ a < o, Ordinal, (∀ i hi, f i hi ∈ s) → bsup.{u, u} o f ∈ s := by rw [isClosed_iff_iSup] refine ⟨fun H o ho f hf => H (toType_nonempty_iff_ne_zero.2 ho) _ ?_, fun H ι hι f hf => ?_⟩ · exact fun i => hf _ _ · rw [← bsup_eq_iSup] apply H (type_ne_zero_iff_nonempty.2 hι) exact fun i hi => hf _
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
isClosed_iff_bsup
null
isSuccLimit_of_mem_frontier (ha : a ∈ frontier s) : IsSuccLimit a := by simp only [frontier_eq_closure_inter_closure, Set.mem_inter_iff, mem_closure_iff] at ha by_contra h rw [← isOpen_singleton_iff] at h rcases ha.1 _ h rfl with ⟨b, hb, hb'⟩ rcases ha.2 _ h rfl with ⟨c, hc, hc'⟩ rw [Set.mem_singleton_iff] at * subst hb; subst hc exact hc' hb' @[deprecated (since := "2025-07-08")] alias isLimit_of_mem_frontier := isSuccLimit_of_mem_frontier @[deprecated Order.isNormal_iff_strictMono_and_continuous (since := "2025-08-21")]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
isSuccLimit_of_mem_frontier
null
isNormal_iff_strictMono_and_continuous (f : Ordinal.{u} → Ordinal.{u}) : IsNormal f ↔ StrictMono f ∧ Continuous f := Order.isNormal_iff_strictMono_and_continuous
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
isNormal_iff_strictMono_and_continuous
null
enumOrd_isNormal_iff_isClosed (hs : ¬ BddAbove s) : IsNormal (enumOrd s) ↔ IsClosed s := by have Hs := enumOrd_strictMono hs refine ⟨fun h => isClosed_iff_iSup.2 fun {ι} hι f hf => ?_, fun h => (isNormal_iff_strictMono_limit _).2 ⟨Hs, fun a ha o H => ?_⟩⟩ · let g : ι → Ordinal.{u} := fun i => (enumOrdOrderIso s hs).symm ⟨_, hf i⟩ suffices enumOrd s (⨆ i, g i) = ⨆ i, f i by rw [← this] exact enumOrd_mem hs _ rw [IsNormal.map_iSup h g] congr ext x change (enumOrdOrderIso s hs _).val = f x rw [OrderIso.apply_symm_apply] · rw [isClosed_iff_bsup] at h suffices enumOrd s a ≤ bsup.{u, u} a fun b (_ : b < a) => enumOrd s b from this.trans (bsup_le H) obtain ⟨b, hb⟩ := enumOrd_surjective hs (h ha.ne_bot (fun b _ => enumOrd s b) fun b _ => enumOrd_mem hs b) rw [← hb] apply Hs.monotone by_contra! hba apply (Hs (lt_succ b)).not_ge rw [hb] exact le_bsup.{u, u} _ _ (ha.succ_lt hba) open Set Filter Set.Notation
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
enumOrd_isNormal_iff_isClosed
null
IsAcc (o : Ordinal) (S : Set Ordinal) : Prop := AccPt o (𝓟 S)
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
IsAcc
An ordinal is an accumulation point of a set of ordinals if it is positive and there are elements in the set arbitrarily close to the ordinal from below.
IsClosedBelow (S : Set Ordinal) (o : Ordinal) : Prop := IsClosed (Iio o ↓∩ S)
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
IsClosedBelow
A set of ordinals is closed below an ordinal if it contains all of its accumulation points below the ordinal.
isAcc_iff (o : Ordinal) (S : Set Ordinal) : o.IsAcc S ↔ o ≠ 0 ∧ ∀ p < o, (S ∩ Ioo p o).Nonempty := by dsimp [IsAcc] constructor · rw [accPt_iff_nhds] intro h constructor · rintro rfl obtain ⟨x, hx⟩ := h (Iio 1) (Iio_mem_nhds zero_lt_one) exact hx.2 <| lt_one_iff_zero.mp hx.1.1 · intro p plt obtain ⟨x, hx⟩ := h (Ioo p (o + 1)) <| Ioo_mem_nhds plt (lt_succ o) use x refine ⟨hx.1.2, ⟨hx.1.1.1, lt_of_le_of_ne ?_ hx.2⟩⟩ have := hx.1.1.2 rwa [← succ_eq_add_one, lt_succ_iff] at this · rw [accPt_iff_nhds] intro h u umem obtain ⟨l, hl⟩ := exists_Ioc_subset_of_mem_nhds umem ⟨0, Ordinal.pos_iff_ne_zero.mpr h.1⟩ obtain ⟨x, hx⟩ := h.2 l hl.1 use x exact ⟨⟨hl.2 ⟨hx.2.1, hx.2.2.le⟩, hx.1⟩, hx.2.2.ne⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
isAcc_iff
null
IsAcc.forall_lt {o : Ordinal} {S : Set Ordinal} (h : o.IsAcc S) : ∀ p < o, (S ∩ Ioo p o).Nonempty := ((isAcc_iff _ _).mp h).2
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
IsAcc.forall_lt
null
IsAcc.pos {o : Ordinal} {S : Set Ordinal} (h : o.IsAcc S) : 0 < o := Ordinal.pos_iff_ne_zero.mpr ((isAcc_iff _ _).mp h).1
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
IsAcc.pos
null
IsAcc.isSuccLimit {o : Ordinal} {S : Set Ordinal} (h : o.IsAcc S) : IsSuccLimit o := by rw [isAcc_iff] at h rw [isSuccLimit_iff] refine ⟨h.1, isSuccPrelimit_of_succ_ne fun x hx ↦ ?_⟩ rcases h.2 x (lt_of_lt_of_le (lt_succ x) hx.le) with ⟨p, hp⟩ exact (hx.symm ▸ (succ_le_iff.mpr hp.2.1)).not_gt hp.2.2 @[deprecated IsAcc.isSuccLimit (since := "2025-07-08")] alias IsAcc.isLimit := IsAcc.isSuccLimit
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
IsAcc.isSuccLimit
null
IsAcc.mono {o : Ordinal} {S T : Set Ordinal} (h : S ⊆ T) (ho : o.IsAcc S) : o.IsAcc T := by rw [isAcc_iff] at * exact ⟨ho.1, fun p plto ↦ (ho.2 p plto).casesOn fun s hs ↦ ⟨s, h hs.1, hs.2⟩⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
IsAcc.mono
null
IsAcc.inter_Ioo_nonempty {o : Ordinal} {S : Set Ordinal} (hS : o.IsAcc S) {p : Ordinal} (hp : p < o) : (S ∩ Ioo p o).Nonempty := hS.forall_lt p hp
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
IsAcc.inter_Ioo_nonempty
null
accPt_subtype {p o : Ordinal} (S : Set Ordinal) (hpo : p < o) : AccPt p (𝓟 S) ↔ AccPt ⟨p, hpo⟩ (𝓟 (Iio o ↓∩ S)) := by constructor · intro h have plim := IsAcc.isSuccLimit h rw [accPt_iff_nhds] at * intro u hu obtain ⟨l, hl⟩ := exists_Ioc_subset_of_mem_nhds hu ⟨⟨0, plim.bot_lt.trans hpo⟩, plim.bot_lt⟩ obtain ⟨x, hx⟩ := h (Ioo l (p + 1)) (Ioo_mem_nhds hl.1 (lt_add_one _)) use ⟨x, lt_of_le_of_lt (lt_succ_iff.mp hx.1.1.2) hpo⟩ refine ⟨?_, Subtype.coe_ne_coe.mp hx.2⟩ exact ⟨hl.2 ⟨hx.1.1.1, by exact_mod_cast lt_succ_iff.mp hx.1.1.2⟩, hx.1.2⟩ · intro h rw [accPt_iff_nhds] at * intro u hu by_cases ho : p + 1 < o · have ppos : p ≠ 0 := by rintro rfl rw [zero_add] at ho specialize h (Iio ⟨1, ho⟩) (Iio_mem_nhds (Subtype.mk_lt_mk.mpr zero_lt_one)) obtain ⟨_, h⟩ := h exact h.2 <| Subtype.mk_eq_mk.mpr (lt_one_iff_zero.mp h.1.1) have plim : IsSuccLimit p := by contrapose! h obtain ⟨q, hq⟩ := ((zero_or_succ_or_isSuccLimit p).resolve_left ppos).resolve_right h use (Ioo ⟨q, ((hq ▸ lt_succ q).trans hpo)⟩ ⟨p + 1, ho⟩) constructor · exact Ioo_mem_nhds (hq ▸ lt_succ q) (lt_succ p) · intro _ mem have aux1 := Subtype.mk_lt_mk.mp mem.1.1 have aux2 := Subtype.mk_lt_mk.mp mem.1.2 rw [Subtype.mk_eq_mk] subst hq exact ((succ_le_iff.mpr aux1).antisymm (le_of_lt_succ aux2)).symm obtain ⟨l, hl⟩ := exists_Ioc_subset_of_mem_nhds hu ⟨0, plim.bot_lt⟩ obtain ⟨x, hx⟩ := h (Ioo ⟨l, hl.1.trans hpo⟩ ⟨p + 1, ho⟩) (Ioo_mem_nhds hl.1 (lt_add_one p)) use x exact ⟨⟨hl.2 ⟨hx.1.1.1, lt_succ_iff.mp hx.1.1.2⟩, hx.1.2⟩, fun h ↦ hx.2 (SetCoe.ext h)⟩ have hp : o = p + 1 := (le_succ_iff_eq_or_le.mp (le_of_not_gt ho)).resolve_right (not_le_of_gt hpo) have ppos : p ≠ 0 := by rintro rfl obtain ⟨x, hx⟩ := h Set.univ univ_mem have : ↑x < o := x.2 simp_rw [hp, zero_add, lt_one_iff_zero] at this exact hx.2 (SetCoe.ext this) obtain ⟨l, hl⟩ := exists_Ioc_subset_of_mem_nhds hu ⟨0, Ordinal.pos_iff_ne_zero.mpr ppos⟩ obtain ⟨x, hx⟩ := h (Ioi ⟨l, hl.1.trans hpo⟩) (Ioi_mem_nhds hl.1) use x refine ⟨⟨hl.2 ⟨hx.1.1, ?_⟩, hx.1.2⟩, fun h ↦ hx.2 (SetCoe.ext h)⟩ rw [← lt_add_one_iff, ← hp] ...
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
accPt_subtype
null
isClosedBelow_iff {S : Set Ordinal} {o : Ordinal} : IsClosedBelow S o ↔ ∀ p < o, IsAcc p S → p ∈ S := by dsimp [IsClosedBelow] constructor · intro h p plto hp have : AccPt ⟨p, plto⟩ (𝓟 (Iio o ↓∩ S)) := (accPt_subtype _ _).mp hp rw [isClosed_iff_clusterPt] at h exact h ⟨p, plto⟩ this.clusterPt · intro h rw [isClosed_iff_clusterPt] intro r hr match clusterPt_principal.mp hr with | .inl h => exact h | .inr h' => exact h r.1 r.2 <| (accPt_subtype _ _).mpr h' alias ⟨IsClosedBelow.forall_lt, _⟩ := isClosedBelow_iff
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
isClosedBelow_iff
null
IsClosedBelow.sInter {o : Ordinal} {S : Set (Set Ordinal)} (h : ∀ C ∈ S, IsClosedBelow C o) : IsClosedBelow (⋂₀ S) o := by rw [isClosedBelow_iff] intro p plto pAcc C CmemS exact (h C CmemS).forall_lt p plto (pAcc.mono (sInter_subset_of_mem CmemS))
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
IsClosedBelow.sInter
null
IsClosedBelow.iInter {ι : Type u} {f : ι → Set Ordinal} {o : Ordinal} (h : ∀ i, IsClosedBelow (f i) o) : IsClosedBelow (⋂ i, f i) o := IsClosedBelow.sInter fun _ ⟨i, hi⟩ ↦ hi ▸ (h i)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.Tactic.TFAE", "Mathlib.Topology.Order.IsNormal", "Mathlib.Topology.Order.Monotone" ]
Mathlib/SetTheory/Ordinal/Topology.lean
IsClosedBelow.iInter
null
@[pp_nodot] veblenWith (f : Ordinal.{u} → Ordinal.{u}) (o : Ordinal.{u}) : Ordinal.{u} → Ordinal.{u} := if o = 0 then f else derivFamily fun (⟨x, _⟩ : Iio o) ↦ veblenWith f x termination_by o @[simp]
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith
`veblenWith f o` is the `o`-th function in the Veblen hierarchy starting with `f`. This is defined so that - `veblenWith f 0 = f`. - `veblenWith f o` for `o ≠ 0` enumerates the common fixed points of `veblenWith f o'` over all `o' < o`.
veblenWith_zero (f : Ordinal → Ordinal) : veblenWith f 0 = f := by rw [veblenWith, if_pos rfl]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_zero
null
veblenWith_of_ne_zero (f : Ordinal → Ordinal) (h : o ≠ 0) : veblenWith f o = derivFamily fun x : Iio o ↦ veblenWith f x.1 := by rw [veblenWith, if_neg h]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_of_ne_zero
null
isNormal_veblenWith' (f : Ordinal → Ordinal) (h : o ≠ 0) : IsNormal (veblenWith f o) := by rw [veblenWith_of_ne_zero f h] exact isNormal_derivFamily _ variable (hf : IsNormal f) include hf
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
isNormal_veblenWith'
`veblenWith f o` is always normal for `o ≠ 0`. See `isNormal_veblenWith` for a version which assumes `IsNormal f`.
isNormal_veblenWith (o : Ordinal) : IsNormal (veblenWith f o) := by obtain rfl | h := eq_or_ne o 0 · rwa [veblenWith_zero] · exact isNormal_veblenWith' f h protected alias IsNormal.veblenWith := isNormal_veblenWith
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
isNormal_veblenWith
`veblenWith f o` is always normal whenever `f` is. See `isNormal_veblenWith'` for a version which does not assume `IsNormal f`.
mem_range_veblenWith (h : o ≠ 0) : a ∈ range (veblenWith f o) ↔ ∀ b < o, veblenWith f b a = a := by rw [veblenWith_of_ne_zero f h, mem_range_derivFamily (fun _ ↦ isNormal_veblenWith hf _)] exact Subtype.forall
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
mem_range_veblenWith
null
veblenWith_veblenWith_of_lt (h : o₁ < o₂) (a : Ordinal) : veblenWith f o₁ (veblenWith f o₂ a) = veblenWith f o₂ a := by apply (mem_range_veblenWith hf h.ne_bot).1 _ _ h simp
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_veblenWith_of_lt
null
veblenWith_eq_self_of_le (h : o₁ ≤ o₂) (h' : veblenWith f o₂ a = a) : veblenWith f o₁ a = a := by obtain rfl | h := h.eq_or_lt · assumption · rw [← h', veblenWith_veblenWith_of_lt hf h]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_eq_self_of_le
null
veblenWith_mem_range : veblenWith f o a ∈ range f := by obtain rfl | h := eq_zero_or_pos o · simp · rw [← veblenWith_veblenWith_of_lt hf h] simp
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_mem_range
null
veblenWith_succ (o : Ordinal) : veblenWith f (succ o) = deriv (veblenWith f o) := by rw [deriv_eq_enumOrd (hf.veblenWith o), veblenWith_of_ne_zero f (succ_ne_zero _), derivFamily_eq_enumOrd] · apply congr_arg ext a rw [mem_iInter] use fun ha ↦ ha ⟨o, lt_succ o⟩ rintro (ha : _ = _) ⟨b, hb : b < _⟩ obtain rfl | hb := lt_succ_iff_eq_or_lt.1 hb · rw [Function.mem_fixedPoints_iff, ha] · rw [← ha] exact veblenWith_veblenWith_of_lt hf hb _ · exact fun o ↦ hf.veblenWith o.1
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_succ
null
veblenWith_right_strictMono (o : Ordinal) : StrictMono (veblenWith f o) := (hf.veblenWith o).strictMono @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_right_strictMono
null
veblenWith_lt_veblenWith_iff_right : veblenWith f o a < veblenWith f o b ↔ a < b := (veblenWith_right_strictMono hf o).lt_iff_lt @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_lt_veblenWith_iff_right
null
veblenWith_le_veblenWith_iff_right : veblenWith f o a ≤ veblenWith f o b ↔ a ≤ b := (veblenWith_right_strictMono hf o).le_iff_le
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_le_veblenWith_iff_right
null
veblenWith_injective (o : Ordinal) : Function.Injective (veblenWith f o) := (veblenWith_right_strictMono hf o).injective @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_injective
null
veblenWith_inj : veblenWith f o a = veblenWith f o b ↔ a = b := (veblenWith_injective hf o).eq_iff
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_inj
null
right_le_veblenWith (o a : Ordinal) : a ≤ veblenWith f o a := (veblenWith_right_strictMono hf o).le_apply
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
right_le_veblenWith
null
veblenWith_left_monotone (a : Ordinal) : Monotone (veblenWith f · a) := by rw [monotone_iff_forall_lt] intro o₁ o₂ h rw [← veblenWith_veblenWith_of_lt hf h] exact (veblenWith_right_strictMono hf o₁).monotone (right_le_veblenWith hf o₂ a)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_left_monotone
null
veblenWith_pos (hp : 0 < f 0) : 0 < veblenWith f o a := by have H (b) : 0 < veblenWith f 0 b := by rw [veblenWith_zero] exact hp.trans_le (hf.monotone (Ordinal.zero_le _)) obtain rfl | h := eq_zero_or_pos o · exact H a · rw [← veblenWith_veblenWith_of_lt hf h] exact H _
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_pos
null
veblenWith_zero_strictMono (hp : 0 < f 0) : StrictMono (veblenWith f · 0) := by intro o₁ o₂ h dsimp only rw [← veblenWith_veblenWith_of_lt hf h, veblenWith_lt_veblenWith_iff_right hf] exact veblenWith_pos hf hp
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_zero_strictMono
null
veblenWith_zero_lt_veblenWith_zero (hp : 0 < f 0) : veblenWith f o₁ 0 < veblenWith f o₂ 0 ↔ o₁ < o₂ := (veblenWith_zero_strictMono hf hp).lt_iff_lt
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_zero_lt_veblenWith_zero
null
veblenWith_zero_le_veblenWith_zero (hp : 0 < f 0) : veblenWith f o₁ 0 ≤ veblenWith f o₂ 0 ↔ o₁ ≤ o₂ := (veblenWith_zero_strictMono hf hp).le_iff_le
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_zero_le_veblenWith_zero
null
veblenWith_zero_inj (hp : 0 < f 0) : veblenWith f o₁ 0 = veblenWith f o₂ 0 ↔ o₁ = o₂ := (veblenWith_zero_strictMono hf hp).injective.eq_iff
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_zero_inj
null
left_le_veblenWith (hp : 0 < f 0) (o a : Ordinal) : o ≤ veblenWith f o a := (veblenWith_zero_strictMono hf hp).le_apply.trans <| (veblenWith_right_strictMono hf _).monotone (Ordinal.zero_le _)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
left_le_veblenWith
null
IsNormal.veblenWith_zero (hp : 0 < f 0) : IsNormal (veblenWith f · 0) := by rw [isNormal_iff_strictMono_limit] refine ⟨veblenWith_zero_strictMono hf hp, fun o ho a IH ↦ ?_⟩ rw [veblenWith_of_ne_zero f ho.ne_bot, derivFamily_zero] apply nfpFamily_le fun l ↦ ?_ suffices ∃ b < o, List.foldr _ 0 l ≤ veblenWith f b 0 by obtain ⟨b, hb, hb'⟩ := this exact hb'.trans (IH b hb) induction l with | nil => use 0; simpa using ho.bot_lt | cons a l IH => obtain ⟨b, hb, hb'⟩ := IH refine ⟨_, ho.succ_lt (max_lt a.2 hb), ((veblenWith_right_strictMono hf _).monotone <| hb'.trans <| veblenWith_left_monotone hf _ <| (le_max_right a.1 b).trans (le_succ _)).trans ?_⟩ rw [veblenWith_veblenWith_of_lt hf] rw [lt_succ_iff] exact le_max_left _ b
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
IsNormal.veblenWith_zero
null
veblenWith_veblenWith_eq_veblenWith_iff (h : o₂ ≤ o₁) : veblenWith f o₁ (veblenWith f o₂ a) = veblenWith f o₂ a ↔ veblenWith f o₁ a = a := by grind [veblenWith_inj, → veblenWith_eq_self_of_le]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_veblenWith_eq_veblenWith_iff
null
veblenWith_lt_veblenWith_veblenWith_iff (h : o₂ ≤ o₁) : veblenWith f o₂ a < veblenWith f o₁ (veblenWith f o₂ a) ↔ a < veblenWith f o₁ a := by simp_rw [(right_le_veblenWith hf ..).lt_iff_ne', ne_eq, veblenWith_veblenWith_eq_veblenWith_iff hf h]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_lt_veblenWith_veblenWith_iff
null
veblenWith_apply_eq_apply_iff : veblenWith f o (f a) = f a ↔ veblenWith f o a = a := by simpa using veblenWith_veblenWith_eq_veblenWith_iff hf (zero_le o)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_apply_eq_apply_iff
null
apply_lt_veblenWith_apply_iff : f a < veblenWith f o (f a) ↔ a < veblenWith f o a := by simpa using veblenWith_lt_veblenWith_veblenWith_iff hf (zero_le o)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
apply_lt_veblenWith_apply_iff
null
cmp_veblenWith : cmp (veblenWith f o₁ a) (veblenWith f o₂ b) = match cmp o₁ o₂ with | .eq => cmp a b | .lt => cmp a (veblenWith f o₂ b) | .gt => cmp (veblenWith f o₁ a) b := by obtain h | rfl | h := lt_trichotomy o₁ o₂ on_goal 2 => simp [(veblenWith_right_strictMono hf _).cmp_map_eq] all_goals conv_lhs => rw [← veblenWith_veblenWith_of_lt hf h] simp [h.cmp_eq_lt, h.cmp_eq_gt, (veblenWith_right_strictMono hf _).cmp_map_eq]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
cmp_veblenWith
null
veblenWith_lt_veblenWith_iff : veblenWith f o₁ a < veblenWith f o₂ b ↔ o₁ = o₂ ∧ a < b ∨ o₁ < o₂ ∧ a < veblenWith f o₂ b ∨ o₂ < o₁ ∧ veblenWith f o₁ a < b := by rw [← cmp_eq_lt_iff, cmp_veblenWith hf] aesop (add simp lt_asymm)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_lt_veblenWith_iff
`veblenWith f o₁ a < veblenWith f o₂ b` iff one of the following holds: * `o₁ = o₂` and `a < b` * `o₁ < o₂` and `a < veblenWith f o₂ b` * `o₁ > o₂` and `veblenWith f o₁ a < b`
veblenWith_le_veblenWith_iff : veblenWith f o₁ a ≤ veblenWith f o₂ b ↔ o₁ = o₂ ∧ a ≤ b ∨ o₁ < o₂ ∧ a ≤ veblenWith f o₂ b ∨ o₂ < o₁ ∧ veblenWith f o₁ a ≤ b := by rw [← not_lt, ← cmp_eq_gt_iff, cmp_veblenWith hf] aesop (add simp [not_lt_of_ge, lt_asymm])
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_le_veblenWith_iff
`veblenWith f o₁ a ≤ veblenWith f o₂ b` iff one of the following holds: * `o₁ = o₂` and `a ≤ b` * `o₁ < o₂` and `a ≤ veblenWith f o₂ b` * `o₁ > o₂` and `veblenWith f o₁ a ≤ b`
veblenWith_eq_veblenWith_iff : veblenWith f o₁ a = veblenWith f o₂ b ↔ o₁ = o₂ ∧ a = b ∨ o₁ < o₂ ∧ a = veblenWith f o₂ b ∨ o₂ < o₁ ∧ veblenWith f o₁ a = b := by rw [← cmp_eq_eq_iff, cmp_veblenWith hf] aesop (add simp lt_asymm)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblenWith_eq_veblenWith_iff
`veblenWith f o₁ a = veblenWith f o₂ b` iff one of the following holds: * `o₁ = o₂` and `a = b` * `o₁ < o₂` and `a = veblenWith f o₂ b` * `o₁ > o₂` and `veblenWith f o₁ a = b`
@[pp_nodot] veblen : Ordinal.{u} → Ordinal.{u} → Ordinal.{u} := veblenWith (ω ^ ·) @[simp]
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblen
`veblen o` is the `o`-th function in the Veblen hierarchy starting with `ω ^ ·`. That is: - `veblen 0 a = ω ^ a`. - `veblen o` for `o ≠ 0` enumerates the fixed points of `veblen o'` for `o' < o`.
veblen_zero : veblen 0 = fun a ↦ ω ^ a := by rw [veblen, veblenWith_zero]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.FixedPoint" ]
Mathlib/SetTheory/Ordinal/Veblen.lean
veblen_zero
null