Theorem: Ordinal.principal_mul_iff_le_two_or_omega_opow_opow
File: Mathlib/SetTheory/Ordinal/Principal.lean

tactic: refine ⟨fun ho => ?_, ?_⟩
state_before: o : Ordinal.{u_1}
⊢ Principal (fun x x_1 => x * x_1) o ↔ o ≤ 2 ∨ ∃ a, o = ω ^ ω ^ a
state_after: case refine_1
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
⊢ o ≤ 2 ∨ ∃ a, o = ω ^ ω ^ a

case refine_2
o : Ordinal.{u_1}
⊢ (o ≤ 2 ∨ ∃ a, o = ω ^ ω ^ a) → Principal (fun x x_1 => x * x_1) o

tactic: rcases le_or_lt o 2 with ho₂ | ho₂
state_before: case refine_1
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
⊢ o ≤ 2 ∨ ∃ a, o = ω ^ ω ^ a
state_after: case refine_1.inl
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂ : o ≤ 2
⊢ o ≤ 2 ∨ ∃ a, o = ω ^ ω ^ a

case refine_1.inr
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂ : 2 < o
⊢ o ≤ 2 ∨ ∃ a, o = ω ^ ω ^ a

tactic: rcases principal_add_iff_zero_or_omega_opow.1 (principal_add_of_principal_mul ho ho₂.ne') with
  (rfl | ⟨a, rfl⟩)
state_before: case refine_1.inr
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂ : 2 < o
⊢ o ≤ 2 ∨ ∃ a, o = ω ^ ω ^ a
state_after: case refine_1.inr.inl
ho : Principal (fun x x_1 => x * x_1) 0
ho₂ : 2 < 0
⊢ 0 ≤ 2 ∨ ∃ a, 0 = ω ^ ω ^ a

case refine_1.inr.inr.intro
a : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) (ω ^ a)
ho₂ : 2 < ω ^ a
⊢ ω ^ a ≤ 2 ∨ ∃ a_1, ω ^ a = ω ^ ω ^ a_1

tactic: rcases principal_add_iff_zero_or_omega_opow.1
    (principal_add_of_principal_mul_opow one_lt_omega ho) with
  (rfl | ⟨b, rfl⟩)
state_before: case refine_1.inr.inr.intro
a : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) (ω ^ a)
ho₂ : 2 < ω ^ a
⊢ ω ^ a ≤ 2 ∨ ∃ a_1, ω ^ a = ω ^ ω ^ a_1
state_after: case refine_1.inr.inr.intro.inl
ho : Principal (fun x x_1 => x * x_1) (ω ^ 0)
ho₂ : 2 < ω ^ 0
⊢ ω ^ 0 ≤ 2 ∨ ∃ a, ω ^ 0 = ω ^ ω ^ a

case refine_1.inr.inr.intro.inr.intro
b : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) (ω ^ ω ^ b)
ho₂ : 2 < ω ^ ω ^ b
⊢ ω ^ ω ^ b ≤ 2 ∨ ∃ a, ω ^ ω ^ b = ω ^ ω ^ a

tactic: exact Or.inr ⟨b, rfl⟩
state_before: case refine_1.inr.inr.intro.inr.intro
b : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) (ω ^ ω ^ b)
ho₂ : 2 < ω ^ ω ^ b
⊢ ω ^ ω ^ b ≤ 2 ∨ ∃ a, ω ^ ω ^ b = ω ^ ω ^ a
state_after: no goals

tactic: exact Or.inl ho₂
state_before: case refine_1.inl
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂ : o ≤ 2
⊢ o ≤ 2 ∨ ∃ a, o = ω ^ ω ^ a
state_after: no goals

tactic: exact (Ordinal.not_lt_zero 2 ho₂).elim
state_before: case refine_1.inr.inl
ho : Principal (fun x x_1 => x * x_1) 0
ho₂ : 2 < 0
⊢ 0 ≤ 2 ∨ ∃ a, 0 = ω ^ ω ^ a
state_after: no goals

tactic: simp
state_before: case refine_1.inr.inr.intro.inl
ho : Principal (fun x x_1 => x * x_1) (ω ^ 0)
ho₂ : 2 < ω ^ 0
⊢ ω ^ 0 ≤ 2 ∨ ∃ a, ω ^ 0 = ω ^ ω ^ a
state_after: no goals

tactic: rintro (ho₂ | ⟨a, rfl⟩)
state_before: case refine_2
o : Ordinal.{u_1}
⊢ (o ≤ 2 ∨ ∃ a, o = ω ^ ω ^ a) → Principal (fun x x_1 => x * x_1) o
state_after: case refine_2.inl
o : Ordinal.{u_1}
ho₂ : o ≤ 2
⊢ Principal (fun x x_1 => x * x_1) o

case refine_2.inr.intro
a : Ordinal.{u_1}
⊢ Principal (fun x x_1 => x * x_1) (ω ^ ω ^ a)

tactic: exact principal_mul_of_le_two ho₂
state_before: case refine_2.inl
o : Ordinal.{u_1}
ho₂ : o ≤ 2
⊢ Principal (fun x x_1 => x * x_1) o
state_after: no goals

tactic: exact principal_mul_omega_opow_opow a
state_before: case refine_2.inr.intro
a : Ordinal.{u_1}
⊢ Principal (fun x x_1 => x * x_1) (ω ^ ω ^ a)
state_after: no goals