-- Mathlib/SetTheory/Ordinal/Exponential.lean
theorem succ_log_def {b x : Ordinal} (hb : 1 < b) (hx : x ≠ 0) :
    succ (log b x) = sInf { o : Ordinal | x < b ^ o }

Proof state:
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
t : Ordinal.{u_1} := sInf {o | x < b ^ o}
⊢ succ (log b x) = sInf {o | x < b ^ o}

Tactic:
have : x < b ^ t := csInf_mem (log_nonempty hb)

Result:
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
t : Ordinal.{u_1} := sInf {o | x < b ^ o}
this : x < b ^ t
⊢ succ (log b x) = sInf {o | x < b ^ o}

Proof state:
case inr.inr
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
t : Ordinal.{u_1} := sInf {o | x < b ^ o}
this : x < b ^ t
h : t.IsLimit
⊢ succ (log b x) = sInf {o | x < b ^ o}

Tactic:
rcases (lt_opow_of_limit (zero_lt_one.trans hb).ne' h).1 this with ⟨a, h₁, h₂⟩

Result:
case inr.inr.intro.intro
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
t : Ordinal.{u_1} := sInf {o | x < b ^ o}
this : x < b ^ t
h : t.IsLimit
a : Ordinal.{u_1}
h₁ : a < t
h₂ : x < b ^ a
⊢ succ (log b x) = sInf {o | x < b ^ o}

Proof state:
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
⊢ succ (log b x) = sInf {o | x < b ^ o}

Tactic:
let t := sInf { o : Ordinal | x < b ^ o }

Result:
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
t : Ordinal.{u_1} := sInf {o | x < b ^ o}
⊢ succ (log b x) = sInf {o | x < b ^ o}

Proof state:
case inr.inl
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
t : Ordinal.{u_1} := sInf {o | x < b ^ o}
this : x < b ^ t
h : ∃ a, t = succ a
⊢ succ (log b x) = sInf {o | x < b ^ o}

Tactic:
rw [show log b x = pred t from log_def hb x, succ_pred_iff_is_succ.2 h]

Result:
no goals

Proof state:
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
t : Ordinal.{u_1} := sInf {o | x < b ^ o}
this : x < b ^ t
⊢ succ (log b x) = sInf {o | x < b ^ o}

Tactic:
rcases zero_or_succ_or_limit t with (h | h | h)

Result:
case inl
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
t : Ordinal.{u_1} := sInf {o | x < b ^ o}
this : x < b ^ t
h : t = 0
⊢ succ (log b x) = sInf {o | x < b ^ o}

case inr.inl
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
t : Ordinal.{u_1} := sInf {o | x < b ^ o}
this : x < b ^ t
h : ∃ a, t = succ a
⊢ succ (log b x) = sInf {o | x < b ^ o}

case inr.inr
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
t : Ordinal.{u_1} := sInf {o | x < b ^ o}
this : x < b ^ t
h : t.IsLimit
⊢ succ (log b x) = sInf {o | x < b ^ o}

Proof state:
case inl
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
t : Ordinal.{u_1} := sInf {o | x < b ^ o}
this : x < b ^ t
h : t = 0
⊢ succ (log b x) = sInf {o | x < b ^ o}

Tactic:
refine ((one_le_iff_ne_zero.2 hx).not_lt ?_).elim

Result:
case inl
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
t : Ordinal.{u_1} := sInf {o | x < b ^ o}
this : x < b ^ t
h : t = 0
⊢ x < 1

Proof state:
case inl
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
t : Ordinal.{u_1} := sInf {o | x < b ^ o}
this : x < b ^ t
h : t = 0
⊢ x < 1

Tactic:
simpa only [h, opow_zero] using this

Result:
no goals

Proof state:
case inr.inr.intro.intro
b x : Ordinal.{u_1}
hb : 1 < b
hx : x ≠ 0
t : Ordinal.{u_1} := sInf {o | x < b ^ o}
this : x < b ^ t
h : t.IsLimit
a : Ordinal.{u_1}
h₁ : a < t
h₂ : x < b ^ a
⊢ succ (log b x) = sInf {o | x < b ^ o}

Tactic:
exact h₁.not_le.elim ((le_csInf_iff'' (log_nonempty hb)).1 le_rfl a h₂)

Result:
no goals