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
@[pp_nodot] coeff (b o : Ordinal) : Ordinal →₀ Ordinal := lookupFinsupp ⟨_, nodupKeys b o⟩
def
SetTheory
[ "Mathlib.Data.Finsupp.AList", "Mathlib.SetTheory.Ordinal.Exponential", "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/CantorNormalForm.lean
coeff
`CNF.coeff b o` is the finitely supported function returning the coefficient of `b ^ e` in the Cantor Normal Form (`CNF`) of `o`, for each `e`.
coeff_of_mem_CNF {b o e c : Ordinal} (h : ⟨e, c⟩ ∈ CNF b o) : coeff b o e = c := by rw [coeff, lookupFinsupp_apply, mem_lookup_iff.2, Option.getD_some] simpa
theorem
SetTheory
[ "Mathlib.Data.Finsupp.AList", "Mathlib.SetTheory.Ordinal.Exponential", "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/CantorNormalForm.lean
coeff_of_mem_CNF
null
coeff_of_not_mem_CNF {b o e : Ordinal} (h : e ∉ (CNF b o).map Prod.fst) : coeff b o e = 0 := by rw [coeff, lookupFinsupp_apply, lookup_eq_none.2, Option.getD_none] simp_all [List.keys]
theorem
SetTheory
[ "Mathlib.Data.Finsupp.AList", "Mathlib.SetTheory.Ordinal.Exponential", "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/CantorNormalForm.lean
coeff_of_not_mem_CNF
null
coeff_zero_apply (b e : Ordinal) : coeff b 0 e = 0 := by apply coeff_of_not_mem_CNF simp @[simp]
theorem
SetTheory
[ "Mathlib.Data.Finsupp.AList", "Mathlib.SetTheory.Ordinal.Exponential", "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/CantorNormalForm.lean
coeff_zero_apply
null
coeff_zero_right (b : Ordinal) : coeff b 0 = 0 := by ext e exact coeff_zero_apply b e
theorem
SetTheory
[ "Mathlib.Data.Finsupp.AList", "Mathlib.SetTheory.Ordinal.Exponential", "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/CantorNormalForm.lean
coeff_zero_right
null
coeff_of_le_one {b : Ordinal} (hb : b ≤ 1) (o : Ordinal) : coeff b o = single 0 o := by ext a obtain rfl | ho := eq_or_ne o 0 · simp · obtain rfl | ha := eq_or_ne a 0 · apply coeff_of_mem_CNF rw [CNF.of_le_one hb ho] simp · rw [single_eq_of_ne ha] apply coeff_of_not_mem_CNF rw [CNF.of_le_one hb ho] simpa using ha @[simp]
theorem
SetTheory
[ "Mathlib.Data.Finsupp.AList", "Mathlib.SetTheory.Ordinal.Exponential", "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/CantorNormalForm.lean
coeff_of_le_one
null
coeff_zero_left (o : Ordinal) : coeff 0 o = single 0 o := coeff_of_le_one zero_le_one o @[simp]
theorem
SetTheory
[ "Mathlib.Data.Finsupp.AList", "Mathlib.SetTheory.Ordinal.Exponential", "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/CantorNormalForm.lean
coeff_zero_left
null
coeff_one_left (o : Ordinal) : coeff 1 o = single 0 o := coeff_of_le_one le_rfl o
theorem
SetTheory
[ "Mathlib.Data.Finsupp.AList", "Mathlib.SetTheory.Ordinal.Exponential", "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/CantorNormalForm.lean
coeff_one_left
null
noncomputable enumOrd (s : Set Ordinal.{u}) (o : Ordinal.{u}) : Ordinal.{u} := sInf (s ∩ { b | ∀ c, c < o → enumOrd s c < b }) termination_by o variable {s : Set Ordinal.{u}}
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd
Enumerator function for an unbounded set of ordinals.
enumOrd_le_of_forall_lt (ha : a ∈ s) (H : ∀ b < o, enumOrd s b < a) : enumOrd s o ≤ a := by rw [enumOrd] exact csInf_le' ⟨ha, H⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_le_of_forall_lt
null
private enumOrd_nonempty (hs : ¬ BddAbove s) (o : Ordinal) : (s ∩ { b | ∀ c, c < o → enumOrd s c < b }).Nonempty := by rw [not_bddAbove_iff] at hs obtain ⟨a, ha⟩ := bddAbove_of_small (enumOrd s '' Iio o) obtain ⟨b, hb, hba⟩ := hs a exact ⟨b, hb, fun c hc ↦ (ha (mem_image_of_mem _ hc)).trans_lt hba⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_nonempty
The set in the definition of `enumOrd` is nonempty.
private enumOrd_mem_aux (hs : ¬ BddAbove s) (o : Ordinal) : enumOrd s o ∈ s ∩ { b | ∀ c, c < o → enumOrd s c < b } := by rw [enumOrd] exact csInf_mem (enumOrd_nonempty hs o)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_mem_aux
null
enumOrd_mem (hs : ¬ BddAbove s) (o : Ordinal) : enumOrd s o ∈ s := (enumOrd_mem_aux hs o).1
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_mem
null
enumOrd_strictMono (hs : ¬ BddAbove s) : StrictMono (enumOrd s) := fun a b ↦ (enumOrd_mem_aux hs b).2 a
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_strictMono
null
enumOrd_injective (hs : ¬ BddAbove s) : Function.Injective (enumOrd s) := (enumOrd_strictMono hs).injective
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_injective
null
enumOrd_inj (hs : ¬ BddAbove s) {a b : Ordinal} : enumOrd s a = enumOrd s b ↔ a = b := (enumOrd_injective hs).eq_iff
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_inj
null
enumOrd_le_enumOrd (hs : ¬ BddAbove s) {a b : Ordinal} : enumOrd s a ≤ enumOrd s b ↔ a ≤ b := (enumOrd_strictMono hs).le_iff_le
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_le_enumOrd
null
enumOrd_lt_enumOrd (hs : ¬ BddAbove s) {a b : Ordinal} : enumOrd s a < enumOrd s b ↔ a < b := (enumOrd_strictMono hs).lt_iff_lt
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_lt_enumOrd
null
id_le_enumOrd (hs : ¬ BddAbove s) : id ≤ enumOrd s := (enumOrd_strictMono hs).id_le
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
id_le_enumOrd
null
le_enumOrd_self (hs : ¬ BddAbove s) {a} : a ≤ enumOrd s a := (enumOrd_strictMono hs).le_apply
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
le_enumOrd_self
null
enumOrd_succ_le (hs : ¬ BddAbove s) (ha : a ∈ s) (hb : enumOrd s b < a) : enumOrd s (succ b) ≤ a := by apply enumOrd_le_of_forall_lt ha intro c hc rw [lt_succ_iff] at hc exact ((enumOrd_strictMono hs).monotone hc).trans_lt hb
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_succ_le
null
range_enumOrd (hs : ¬ BddAbove s) : range (enumOrd s) = s := by ext a let t := { b | a ≤ enumOrd s b } constructor · rintro ⟨b, rfl⟩ exact enumOrd_mem hs b · intro ha refine ⟨sInf t, (enumOrd_le_of_forall_lt ha ?_).antisymm ?_⟩ · intro b hb by_contra! hb' exact hb.not_ge (csInf_le' hb') · exact csInf_mem (s := t) ⟨a, (enumOrd_strictMono hs).id_le a⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
range_enumOrd
null
enumOrd_surjective (hs : ¬ BddAbove s) {b : Ordinal} (hb : b ∈ s) : ∃ a, enumOrd s a = b := by rwa [← range_enumOrd hs] at hb
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_surjective
null
enumOrd_le_of_subset {t : Set Ordinal} (hs : ¬ BddAbove s) (hst : s ⊆ t) : enumOrd t ≤ enumOrd s := by intro a rw [enumOrd, enumOrd] gcongr with b c exacts [enumOrd_nonempty hs a, enumOrd_le_of_subset hs hst c] termination_by a => a
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_le_of_subset
null
eq_enumOrd (f : Ordinal → Ordinal) (hs : ¬ BddAbove s) : enumOrd s = f ↔ StrictMono f ∧ range f = s := by constructor · rintro rfl exact ⟨enumOrd_strictMono hs, range_enumOrd hs⟩ · rintro ⟨h₁, h₂⟩ rwa [← (enumOrd_strictMono hs).range_inj h₁, range_enumOrd hs, eq_comm]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
eq_enumOrd
A characterization of `enumOrd`: it is the unique strict monotonic function with range `s`.
enumOrd_range {f : Ordinal → Ordinal} (hf : StrictMono f) : enumOrd (range f) = f := (eq_enumOrd _ hf.not_bddAbove_range_of_wellFoundedLT).2 ⟨hf, rfl⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_range
null
isNormal_enumOrd (H : ∀ t ⊆ s, t.Nonempty → BddAbove t → sSup t ∈ s) (hs : ¬ BddAbove s) : IsNormal (enumOrd s) := by refine (isNormal_iff_strictMono_limit _).2 ⟨enumOrd_strictMono hs, fun o ho a ha ↦ ?_⟩ trans ⨆ b : Iio o, enumOrd s b · refine enumOrd_le_of_forall_lt ?_ (fun b hb ↦ (enumOrd_strictMono hs (lt_succ b)).trans_le ?_) · have : Nonempty (Iio o) := ⟨0, ho.bot_lt⟩ apply H _ _ (range_nonempty _) (bddAbove_of_small _) rintro _ ⟨c, rfl⟩ exact enumOrd_mem hs c · exact Ordinal.le_iSup _ (⟨_, ho.succ_lt hb⟩ : Iio o) · exact Ordinal.iSup_le fun x ↦ ha _ x.2 @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
isNormal_enumOrd
If `s` is closed under nonempty suprema, then its enumerator function is normal. See also `enumOrd_isNormal_iff_isClosed`.
enumOrd_univ : enumOrd Set.univ = id := by rw [← range_id] exact enumOrd_range strictMono_id @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_univ
null
enumOrd_zero : enumOrd s 0 = sInf s := by rw [enumOrd] simp [Ordinal.not_lt_zero]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrd_zero
null
noncomputable enumOrdOrderIso (s : Set Ordinal) (hs : ¬ BddAbove s) : Ordinal ≃o s := StrictMono.orderIsoOfSurjective (fun o => ⟨_, enumOrd_mem hs o⟩) (enumOrd_strictMono hs) fun s => let ⟨a, ha⟩ := enumOrd_surjective hs s.prop ⟨a, Subtype.eq ha⟩
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Enum.lean
enumOrdOrderIso
An order isomorphism between an unbounded set of ordinals and the ordinals.
instPow : Pow Ordinal Ordinal := ⟨fun a b ↦ if a = 0 then 1 - b else limitRecOn b 1 (fun _ x ↦ x * a) fun o _ f ↦ ⨆ x : Iio o, f x.1 x.2⟩
instance
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
instPow
The ordinal exponential, defined by transfinite recursion. We call this `opow` in theorems in order to disambiguate from other exponentials.
private opow_of_ne_zero {a b : Ordinal} (h : a ≠ 0) : a ^ b = limitRecOn b 1 (fun _ x ↦ x * a) fun o _ f ↦ ⨆ x : Iio o, f x.1 x.2 := if_neg h
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_of_ne_zero
null
zero_opow' (a : Ordinal) : 0 ^ a = 1 - a := if_pos rfl
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
zero_opow'
`0 ^ a = 1` if `a = 0` and `0 ^ a = 0` otherwise.
zero_opow_le (a : Ordinal) : (0 : Ordinal) ^ a ≤ 1 := by rw [zero_opow'] exact sub_le_self 1 a @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
zero_opow_le
null
zero_opow {a : Ordinal} (a0 : a ≠ 0) : (0 : Ordinal) ^ a = 0 := by rwa [zero_opow', Ordinal.sub_eq_zero_iff_le, one_le_iff_ne_zero] @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
zero_opow
null
opow_zero (a : Ordinal) : a ^ (0 : Ordinal) = 1 := by obtain rfl | h := eq_or_ne a 0 · rw [zero_opow', Ordinal.sub_zero] · rw [opow_of_ne_zero h, limitRecOn_zero] @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_zero
null
opow_succ (a b : Ordinal) : a ^ succ b = a ^ b * a := by obtain rfl | h := eq_or_ne a 0 · rw [zero_opow (succ_ne_zero b), mul_zero] · rw [opow_of_ne_zero h, opow_of_ne_zero h, limitRecOn_succ]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_succ
null
opow_limit {a b : Ordinal} (ha : a ≠ 0) (hb : IsSuccLimit b) : a ^ b = ⨆ x : Iio b, a ^ x.1 := by simp_rw [opow_of_ne_zero ha, limitRecOn_limit _ _ _ _ hb]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_limit
null
opow_le_of_isSuccLimit {a b c : Ordinal} (a0 : a ≠ 0) (h : IsSuccLimit b) : a ^ b ≤ c ↔ ∀ b' < b, a ^ b' ≤ c := by rw [opow_limit a0 h, Ordinal.iSup_le_iff, Subtype.forall] rfl @[deprecated (since := "2025-07-08")] alias opow_le_of_limit := opow_le_of_isSuccLimit
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_le_of_isSuccLimit
null
lt_opow_of_isSuccLimit {a b c : Ordinal} (b0 : b ≠ 0) (h : IsSuccLimit c) : a < b ^ c ↔ ∃ c' < c, a < b ^ c' := by simpa using (opow_le_of_isSuccLimit b0 h).not @[deprecated (since := "2025-07-08")] alias lt_opow_of_limit := lt_opow_of_isSuccLimit @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
lt_opow_of_isSuccLimit
null
opow_one (a : Ordinal) : a ^ (1 : Ordinal) = a := by rw [← succ_zero, opow_succ] simp only [opow_zero, one_mul] @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_one
null
one_opow (a : Ordinal) : (1 : Ordinal) ^ a = 1 := by induction a using limitRecOn with | zero => simp only [opow_zero] | succ _ ih => simp only [opow_succ, ih, mul_one] | limit b l IH => refine eq_of_forall_ge_iff fun c => ?_ rw [opow_le_of_isSuccLimit Ordinal.one_ne_zero l] exact ⟨fun H => by simpa only [opow_zero] using H 0 l.bot_lt, fun H b' h => by rwa [IH _ h]⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
one_opow
null
opow_pos {a : Ordinal} (b : Ordinal) (a0 : 0 < a) : 0 < a ^ b := by have h0 : 0 < a ^ (0 : Ordinal) := by simp only [opow_zero, zero_lt_one] induction b using limitRecOn with | zero => exact h0 | succ b IH => rw [opow_succ] exact mul_pos IH a0 | limit b l _ => exact (lt_opow_of_isSuccLimit (Ordinal.pos_iff_ne_zero.1 a0) l).2 ⟨0, l.bot_lt, h0⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_pos
null
opow_ne_zero {a : Ordinal} (b : Ordinal) (a0 : a ≠ 0) : a ^ b ≠ 0 := Ordinal.pos_iff_ne_zero.1 <| opow_pos b <| Ordinal.pos_iff_ne_zero.2 a0 @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_ne_zero
null
opow_eq_zero {a b : Ordinal} : a ^ b = 0 ↔ a = 0 ∧ b ≠ 0 := by by_cases a = 0 <;> by_cases b = 0 <;> simp_all [opow_ne_zero] @[simp, norm_cast]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_eq_zero
null
opow_natCast (a : Ordinal) (n : ℕ) : a ^ (n : Ordinal) = a ^ n := by induction n with | zero => rw [Nat.cast_zero, opow_zero, pow_zero] | succ n IH => rw [Nat.cast_succ, add_one_eq_succ, opow_succ, pow_succ, IH]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_natCast
null
isNormal_opow {a : Ordinal} (h : 1 < a) : IsNormal (a ^ ·) := by have ha : 0 < a := zero_lt_one.trans h refine IsNormal.of_succ_lt ?_ fun hl ↦ ?_ · simpa only [mul_one, opow_succ] using fun b ↦ mul_lt_mul_of_pos_left h (opow_pos b ha) · simp [IsLUB, IsLeast, upperBounds, lowerBounds, ← opow_le_of_isSuccLimit ha.ne' hl] @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
isNormal_opow
null
opow_lt_opow_iff_right {a b c : Ordinal} (a1 : 1 < a) : a ^ b < a ^ c ↔ b < c := (isNormal_opow a1).lt_iff @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_lt_opow_iff_right
null
opow_le_opow_iff_right {a b c : Ordinal} (a1 : 1 < a) : a ^ b ≤ a ^ c ↔ b ≤ c := (isNormal_opow a1).le_iff @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_le_opow_iff_right
null
opow_right_inj {a b c : Ordinal} (a1 : 1 < a) : a ^ b = a ^ c ↔ b = c := (isNormal_opow a1).inj
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_right_inj
null
isSuccLimit_opow {a b : Ordinal} (a1 : 1 < a) : IsSuccLimit b → IsSuccLimit (a ^ b) := (isNormal_opow a1).isSuccLimit @[deprecated (since := "2025-07-08")] alias isLimit_opow := isSuccLimit_opow
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
isSuccLimit_opow
null
isSuccLimit_opow_left {a b : Ordinal} (l : IsSuccLimit a) (hb : b ≠ 0) : IsSuccLimit (a ^ b) := by rcases zero_or_succ_or_isSuccLimit b with (e | ⟨b, rfl⟩ | l') · exact absurd e hb · rw [opow_succ] exact isSuccLimit_mul (opow_pos _ l.bot_lt) l · exact isSuccLimit_opow (one_lt_of_isSuccLimit l) l' @[deprecated (since := "2025-07-08")] alias isLimit_opow_left := isSuccLimit_opow_left
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
isSuccLimit_opow_left
null
opow_le_opow_right {a b c : Ordinal} (h₁ : 0 < a) (h₂ : b ≤ c) : a ^ b ≤ a ^ c := by rcases (one_le_iff_pos.2 h₁).eq_or_lt' with h₁ | h₁ · simp_all · exact (opow_le_opow_iff_right h₁).2 h₂
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_le_opow_right
null
opow_le_opow_left {a b : Ordinal} (c : Ordinal) (ab : a ≤ b) : a ^ c ≤ b ^ c := by by_cases ha : a = 0 · by_cases c = 0 <;> simp_all · induction c using limitRecOn with | zero => simp | succ c IH => simpa using mul_le_mul' IH ab | limit c l IH => exact (opow_le_of_isSuccLimit ha l).2 fun b' h ↦ (IH _ h).trans (opow_le_opow_right ((Ordinal.pos_iff_ne_zero.2 ha).trans_le ab) h.le)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_le_opow_left
null
opow_le_opow {a b c d : Ordinal} (hac : a ≤ c) (hbd : b ≤ d) (hc : 0 < c) : a ^ b ≤ c ^ d := (opow_le_opow_left b hac).trans (opow_le_opow_right hc hbd)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_le_opow
null
left_le_opow (a : Ordinal) {b : Ordinal} (b1 : 0 < b) : a ≤ a ^ b := by nth_rw 1 [← opow_one a] rcases le_or_gt a 1 with a1 | a1 · rcases lt_or_eq_of_le a1 with a0 | a1 · rw [lt_one_iff_zero] at a0 rw [a0, zero_opow Ordinal.one_ne_zero] exact Ordinal.zero_le _ rw [a1, one_opow, one_opow] rwa [opow_le_opow_iff_right a1, one_le_iff_pos]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
left_le_opow
null
left_lt_opow {a b : Ordinal} (ha : 1 < a) (hb : 1 < b) : a < a ^ b := by conv_lhs => rw [← opow_one a] rwa [opow_lt_opow_iff_right ha]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
left_lt_opow
null
right_le_opow {a : Ordinal} (b : Ordinal) (a1 : 1 < a) : b ≤ a ^ b := (isNormal_opow a1).le_apply
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
right_le_opow
null
opow_lt_opow_left_of_succ {a b c : Ordinal} (ab : a < b) : a ^ succ c < b ^ succ c := by rw [opow_succ, opow_succ] exact (mul_le_mul_right' (opow_le_opow_left c ab.le) a).trans_lt <| mul_lt_mul_of_pos_left ab <| opow_pos c <| (Ordinal.zero_le a).trans_lt ab
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_lt_opow_left_of_succ
null
opow_add (a b c : Ordinal) : a ^ (b + c) = a ^ b * a ^ c := by rcases eq_or_ne a 0 with (rfl | a0) · rcases eq_or_ne c 0 with (rfl | c0) · simp have : b + c ≠ 0 := ((Ordinal.pos_iff_ne_zero.2 c0).trans_le (le_add_left _ _)).ne' simp only [zero_opow c0, zero_opow this, mul_zero] rcases eq_or_lt_of_le (one_le_iff_ne_zero.2 a0) with (rfl | a1) · simp only [one_opow, mul_one] induction c using limitRecOn with | zero => simp | succ c IH => rw [add_succ, opow_succ, IH, opow_succ, mul_assoc] | limit c l IH => refine eq_of_forall_ge_iff fun d => (((isNormal_opow a1).trans (isNormal_add_right b)).limit_le l).trans ?_ dsimp only [Function.comp_def] simp +contextual only [IH] exact (((isNormal_mul_right <| opow_pos b (Ordinal.pos_iff_ne_zero.2 a0)).trans (isNormal_opow a1)).limit_le l).symm
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_add
null
opow_one_add (a b : Ordinal) : a ^ (1 + b) = a * a ^ b := by rw [opow_add, opow_one]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_one_add
null
opow_dvd_opow (a : Ordinal) {b c : Ordinal} (h : b ≤ c) : a ^ b ∣ a ^ c := ⟨a ^ (c - b), by rw [← opow_add, Ordinal.add_sub_cancel_of_le h]⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_dvd_opow
null
opow_dvd_opow_iff {a b c : Ordinal} (a1 : 1 < a) : a ^ b ∣ a ^ c ↔ b ≤ c := ⟨fun h => le_of_not_gt fun hn => not_le_of_gt ((opow_lt_opow_iff_right a1).2 hn) <| le_of_dvd (opow_ne_zero _ <| one_le_iff_ne_zero.1 <| a1.le) h, opow_dvd_opow _⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_dvd_opow_iff
null
opow_mul (a b c : Ordinal) : a ^ (b * c) = (a ^ b) ^ c := by by_cases b0 : b = 0; · simp only [b0, zero_mul, opow_zero, one_opow] by_cases a0 : a = 0 · subst a by_cases c0 : c = 0 · simp only [c0, mul_zero, opow_zero] simp only [zero_opow b0, zero_opow c0, zero_opow (mul_ne_zero b0 c0)] rcases eq_or_lt_of_le (one_le_iff_ne_zero.2 a0) with a1 | a1 · subst a1 simp only [one_opow] induction c using limitRecOn with | zero => simp only [mul_zero, opow_zero] | succ c IH => rw [mul_succ, opow_add, IH, opow_succ] | limit c l IH => refine eq_of_forall_ge_iff fun d => (((isNormal_opow a1).trans (isNormal_mul_right (Ordinal.pos_iff_ne_zero.2 b0))).limit_le l).trans ?_ dsimp only [Function.comp_def] simp +contextual only [IH] exact (opow_le_of_isSuccLimit (opow_ne_zero _ a0) l).symm
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_mul
null
opow_mul_add_pos {b v : Ordinal} (hb : b ≠ 0) (u : Ordinal) (hv : v ≠ 0) (w : Ordinal) : 0 < b ^ u * v + w := (opow_pos u <| Ordinal.pos_iff_ne_zero.2 hb).trans_le <| (le_mul_left _ <| Ordinal.pos_iff_ne_zero.2 hv).trans <| le_add_right _ _
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_mul_add_pos
null
opow_mul_add_lt_opow_mul_succ {b u w : Ordinal} (v : Ordinal) (hw : w < b ^ u) : b ^ u * v + w < b ^ u * succ v := by rwa [mul_succ, add_lt_add_iff_left]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_mul_add_lt_opow_mul_succ
null
opow_mul_add_lt_opow_succ {b u v w : Ordinal} (hvb : v < b) (hw : w < b ^ u) : b ^ u * v + w < b ^ succ u := by convert (opow_mul_add_lt_opow_mul_succ v hw).trans_le (mul_le_mul_left' (succ_le_of_lt hvb) _) using 1 exact opow_succ b u /-! ### Ordinal logarithm -/
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_mul_add_lt_opow_succ
null
@[pp_nodot] log (b : Ordinal) (x : Ordinal) : Ordinal := if 1 < b then pred (sInf { o | x < b ^ o }) else 0
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log
The ordinal logarithm is the solution `u` to the equation `x = b ^ u * v + w` where `v < b` and `w < b ^ u`.
private log_nonempty {b x : Ordinal} (h : 1 < b) : { o : Ordinal | x < b ^ o }.Nonempty := ⟨_, succ_le_iff.1 (right_le_opow _ h)⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_nonempty
The set in the definition of `log` is nonempty.
log_def {b : Ordinal} (h : 1 < b) (x : Ordinal) : log b x = pred (sInf { o | x < b ^ o }) := if_pos h
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_def
null
log_of_left_le_one {b : Ordinal} (h : b ≤ 1) (x : Ordinal) : log b x = 0 := if_neg h.not_gt @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_of_left_le_one
null
log_zero_left : ∀ b, log 0 b = 0 := log_of_left_le_one zero_le_one @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_zero_left
null
log_zero_right (b : Ordinal) : log b 0 = 0 := by obtain hb | hb := lt_or_ge 1 b · rw [log_def hb, ← Ordinal.le_zero, pred_le_iff_le_succ, succ_zero] apply csInf_le' rw [mem_setOf, opow_one] exact bot_lt_of_lt hb · rw [log_of_left_le_one hb] @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_zero_right
null
log_one_left : ∀ b, log 1 b = 0 := log_of_left_le_one le_rfl
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_one_left
null
succ_log_def {b x : Ordinal} (hb : 1 < b) (hx : x ≠ 0) : succ (log b x) = sInf { o : Ordinal | x < b ^ o } := by let t := sInf { o : Ordinal | x < b ^ o } have : x < b ^ t := csInf_mem (log_nonempty hb) rcases zero_or_succ_or_isSuccLimit t with (h | h | h) · refine ((one_le_iff_ne_zero.2 hx).not_gt ?_).elim simpa only [h, opow_zero] using this · rw [log_def hb x, succ_pred_eq_iff_not_isSuccPrelimit, not_isSuccPrelimit_iff'] simpa [eq_comm] using h · rcases (lt_opow_of_isSuccLimit (zero_lt_one.trans hb).ne' h).1 this with ⟨a, h₁, h₂⟩ exact h₁.not_ge.elim ((le_csInf_iff'' (log_nonempty hb)).1 le_rfl a h₂)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
succ_log_def
null
lt_opow_succ_log_self {b : Ordinal} (hb : 1 < b) (x : Ordinal) : x < b ^ succ (log b x) := by rcases eq_or_ne x 0 with (rfl | hx) · apply opow_pos _ (zero_lt_one.trans hb) · rw [succ_log_def hb hx] exact csInf_mem (log_nonempty hb)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
lt_opow_succ_log_self
null
opow_log_le_self (b : Ordinal) {x : Ordinal} (hx : x ≠ 0) : b ^ log b x ≤ x := by rcases eq_or_ne b 0 with (rfl | b0) · exact (zero_opow_le _).trans (one_le_iff_ne_zero.2 hx) rcases lt_or_eq_of_le (one_le_iff_ne_zero.2 b0) with (hb | rfl) · refine le_of_not_gt fun h => (lt_succ (log b x)).not_ge ?_ have := @csInf_le' _ _ { o | x < b ^ o } _ h rwa [← succ_log_def hb hx] at this · rwa [one_opow, one_le_iff_ne_zero]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_log_le_self
null
opow_le_iff_le_log {b x c : Ordinal} (hb : 1 < b) (hx : x ≠ 0) : b ^ c ≤ x ↔ c ≤ log b x := by constructor <;> intro h · apply le_of_not_gt intro hn apply (lt_opow_succ_log_self hb x).not_ge <| ((opow_le_opow_iff_right hb).2 <| succ_le_of_lt hn).trans h · exact ((opow_le_opow_iff_right hb).2 h).trans <| opow_log_le_self b hx
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_le_iff_le_log
`opow b` and `log b` (almost) form a Galois connection. See `opow_le_iff_le_log'` for a variant assuming `c ≠ 0` rather than `x ≠ 0`. See also `le_log_of_opow_le` and `opow_le_of_le_log`, which are both separate implications under weaker assumptions.
opow_le_iff_le_log' {b x c : Ordinal} (hb : 1 < b) (hc : c ≠ 0) : b ^ c ≤ x ↔ c ≤ log b x := by obtain rfl | hx := eq_or_ne x 0 · simp [hc, (zero_lt_one.trans hb).ne'] · exact opow_le_iff_le_log hb hx
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_le_iff_le_log'
`opow b` and `log b` (almost) form a Galois connection. See `opow_le_iff_le_log` for a variant assuming `x ≠ 0` rather than `c ≠ 0`. See also `le_log_of_opow_le` and `opow_le_of_le_log`, which are both separate implications under weaker assumptions.
le_log_of_opow_le {b x c : Ordinal} (hb : 1 < b) (h : b ^ c ≤ x) : c ≤ log b x := by obtain rfl | hx := eq_or_ne x 0 · rw [Ordinal.le_zero, opow_eq_zero] at h exact (zero_lt_one.asymm <| h.1 ▸ hb).elim · exact (opow_le_iff_le_log hb hx).1 h
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
le_log_of_opow_le
null
opow_le_of_le_log {b x c : Ordinal} (hc : c ≠ 0) (h : c ≤ log b x) : b ^ c ≤ x := by obtain hb | hb := le_or_gt b 1 · rw [log_of_left_le_one hb] at h exact (h.not_gt (Ordinal.pos_iff_ne_zero.2 hc)).elim · rwa [opow_le_iff_le_log' hb hc]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
opow_le_of_le_log
null
lt_opow_iff_log_lt {b x c : Ordinal} (hb : 1 < b) (hx : x ≠ 0) : x < b ^ c ↔ log b x < c := lt_iff_lt_of_le_iff_le (opow_le_iff_le_log hb hx)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
lt_opow_iff_log_lt
`opow b` and `log b` (almost) form a Galois connection. See `lt_opow_iff_log_lt'` for a variant assuming `c ≠ 0` rather than `x ≠ 0`. See also `lt_opow_of_log_lt` and `lt_log_of_lt_opow`, which are both separate implications under weaker assumptions.
lt_opow_iff_log_lt' {b x c : Ordinal} (hb : 1 < b) (hc : c ≠ 0) : x < b ^ c ↔ log b x < c := lt_iff_lt_of_le_iff_le (opow_le_iff_le_log' hb hc)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
lt_opow_iff_log_lt'
`opow b` and `log b` (almost) form a Galois connection. See `lt_opow_iff_log_lt` for a variant assuming `x ≠ 0` rather than `c ≠ 0`. See also `lt_opow_of_log_lt` and `lt_log_of_lt_opow`, which are both separate implications under weaker assumptions.
lt_opow_of_log_lt {b x c : Ordinal} (hb : 1 < b) : log b x < c → x < b ^ c := lt_imp_lt_of_le_imp_le <| le_log_of_opow_le hb
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
lt_opow_of_log_lt
null
lt_log_of_lt_opow {b x c : Ordinal} (hc : c ≠ 0) : x < b ^ c → log b x < c := lt_imp_lt_of_le_imp_le <| opow_le_of_le_log hc
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
lt_log_of_lt_opow
null
log_pos {b o : Ordinal} (hb : 1 < b) (ho : o ≠ 0) (hbo : b ≤ o) : 0 < log b o := by rwa [← succ_le_iff, succ_zero, ← opow_le_iff_le_log hb ho, opow_one]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_pos
null
log_eq_zero {b o : Ordinal} (hbo : o < b) : log b o = 0 := by rcases eq_or_ne o 0 with (rfl | ho) · exact log_zero_right b rcases le_or_gt b 1 with hb | hb · rcases le_one_iff.1 hb with (rfl | rfl) · exact log_zero_left o · exact log_one_left o · rwa [← Ordinal.le_zero, ← lt_succ_iff, succ_zero, ← lt_opow_iff_log_lt hb ho, opow_one] @[mono]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_eq_zero
null
log_mono_right (b : Ordinal) {x y : Ordinal} (xy : x ≤ y) : log b x ≤ log b y := by obtain rfl | hx := eq_or_ne x 0 · simp_rw [log_zero_right, Ordinal.zero_le] · obtain hb | hb := lt_or_ge 1 b · exact (opow_le_iff_le_log hb (hx.bot_lt.trans_le xy).ne').1 <| (opow_log_le_self _ hx).trans xy · rw [log_of_left_le_one hb, log_of_left_le_one hb]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_mono_right
null
log_le_self (b x : Ordinal) : log b x ≤ x := by obtain rfl | hx := eq_or_ne x 0 · rw [log_zero_right] · obtain hb | hb := lt_or_ge 1 b · exact (right_le_opow _ hb).trans (opow_log_le_self b hx) · simp_rw [log_of_left_le_one hb, Ordinal.zero_le] @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_le_self
null
log_one_right (b : Ordinal) : log b 1 = 0 := by obtain hb | hb := lt_or_ge 1 b · exact log_eq_zero hb · exact log_of_left_le_one hb 1
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_one_right
null
mod_opow_log_lt_self (b : Ordinal) {o : Ordinal} (ho : o ≠ 0) : o % (b ^ log b o) < o := by rcases eq_or_ne b 0 with (rfl | hb) · simpa using Ordinal.pos_iff_ne_zero.2 ho · exact (mod_lt _ <| opow_ne_zero _ hb).trans_le (opow_log_le_self _ ho)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
mod_opow_log_lt_self
null
log_mod_opow_log_lt_log_self {b o : Ordinal} (hb : 1 < b) (hbo : b ≤ o) : log b (o % (b ^ log b o)) < log b o := by rcases eq_or_ne (o % (b ^ log b o)) 0 with h | h · rw [h, log_zero_right] exact log_pos hb (one_le_iff_ne_zero.1 (hb.le.trans hbo)) hbo · rw [← succ_le_iff, succ_log_def hb h] apply csInf_le' apply mod_lt rw [← Ordinal.pos_iff_ne_zero] exact opow_pos _ (zero_lt_one.trans hb)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_mod_opow_log_lt_log_self
null
log_eq_iff {b x : Ordinal} (hb : 1 < b) (hx : x ≠ 0) (y : Ordinal) : log b x = y ↔ b ^ y ≤ x ∧ x < b ^ succ y := by constructor · rintro rfl use opow_log_le_self b hx, lt_opow_succ_log_self hb x · rintro ⟨hx₁, hx₂⟩ apply le_antisymm · rwa [← lt_succ_iff, ← lt_opow_iff_log_lt hb hx] · rwa [← opow_le_iff_le_log hb hx]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_eq_iff
null
log_opow_mul_add {b u v w : Ordinal} (hb : 1 < b) (hv : v ≠ 0) (hw : w < b ^ u) : log b (b ^ u * v + w) = u + log b v := by rw [log_eq_iff hb] · constructor · rw [opow_add] exact (mul_le_mul_left' (opow_log_le_self b hv) _).trans (le_add_right _ w) · apply (add_lt_add_left hw _).trans_le rw [← mul_succ, ← add_succ, opow_add] apply mul_le_mul_left' rw [succ_le_iff] exact lt_opow_succ_log_self hb _ · exact fun h ↦ mul_ne_zero (opow_ne_zero u (bot_lt_of_lt hb).ne') hv <| left_eq_zero_of_add_eq_zero h
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_opow_mul_add
null
log_opow_mul {b v : Ordinal} (hb : 1 < b) (u : Ordinal) (hv : v ≠ 0) : log b (b ^ u * v) = u + log b v := by simpa using log_opow_mul_add hb hv (opow_pos u (bot_lt_of_lt hb))
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_opow_mul
null
log_opow {b : Ordinal} (hb : 1 < b) (x : Ordinal) : log b (b ^ x) = x := by convert log_opow_mul hb x zero_ne_one.symm using 1 · rw [mul_one] · rw [log_one_right, add_zero]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
log_opow
null
div_opow_log_pos (b : Ordinal) {o : Ordinal} (ho : o ≠ 0) : 0 < o / (b ^ log b o) := by rcases eq_zero_or_pos b with (rfl | hb) · simpa using Ordinal.pos_iff_ne_zero.2 ho · rw [div_pos (opow_ne_zero _ hb.ne')] exact opow_log_le_self b ho
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
div_opow_log_pos
null
div_opow_log_lt {b : Ordinal} (o : Ordinal) (hb : 1 < b) : o / (b ^ log b o) < b := by rw [div_lt (opow_pos _ (zero_lt_one.trans hb)).ne', ← opow_succ] exact lt_opow_succ_log_self hb o
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
div_opow_log_lt
null
add_log_le_log_mul {x y : Ordinal} (b : Ordinal) (hx : x ≠ 0) (hy : y ≠ 0) : log b x + log b y ≤ log b (x * y) := by obtain hb | hb := lt_or_ge 1 b · rw [← opow_le_iff_le_log hb (mul_ne_zero hx hy), opow_add] exact mul_le_mul' (opow_log_le_self b hx) (opow_log_le_self b hy) · simpa only [log_of_left_le_one hb, zero_add] using le_rfl
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
add_log_le_log_mul
null
omega0_opow_mul_nat_lt {a b : Ordinal} (h : a < b) (n : ℕ) : ω ^ a * n < ω ^ b := by apply lt_of_lt_of_le _ (opow_le_opow_right omega0_pos (succ_le_of_lt h)) rw [opow_succ] gcongr exacts [opow_pos a omega0_pos, nat_lt_omega0 n]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family" ]
Mathlib/SetTheory/Ordinal/Exponential.lean
omega0_opow_mul_nat_lt
null