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

tactic: refine ⟨fun h a ha₀ hao => ?_, fun h a b hao hbo => ?_⟩
state_before: o : Ordinal.{u_1}
⊢ Principal (fun x x_1 => x * x_1) o ↔ ∀ (a : Ordinal.{u_1}), 0 < a → a < o → a * o = o
state_after: case refine_1
o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
⊢ a * o = o

case refine_2
o : Ordinal.{u_1}
h : ∀ (a : Ordinal.{u_1}), 0 < a → a < o → a * o = o
a b : Ordinal.{u_1}
hao : a < o
hbo : b < o
⊢ (fun x x_1 => x * x_1) a b < o

tactic: cases' le_or_gt o 2 with ho ho
state_before: case refine_1
o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
⊢ a * o = o
state_after: case refine_1.inl
o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
ho : o ≤ 2
⊢ a * o = o

case refine_1.inr
o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
ho : o > 2
⊢ a * o = o

tactic: convert one_mul o
state_before: case refine_1.inl
o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
ho : o ≤ 2
⊢ a * o = o
state_after: case h.e'_2.h.e'_5
o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
ho : o ≤ 2
⊢ a = 1

tactic: apply le_antisymm
state_before: case h.e'_2.h.e'_5
o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
ho : o ≤ 2
⊢ a = 1
state_after: case h.e'_2.h.e'_5.a
o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
ho : o ≤ 2
⊢ a ≤ 1

case h.e'_2.h.e'_5.a
o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
ho : o ≤ 2
⊢ 1 ≤ a

tactic: have : a < succ 1 := hao.trans_le (by simpa using ho)
state_before: case h.e'_2.h.e'_5.a
o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
ho : o ≤ 2
⊢ a ≤ 1
state_after: case h.e'_2.h.e'_5.a
o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
ho : o ≤ 2
this : a < succ 1
⊢ a ≤ 1

tactic: rwa [lt_succ_iff] at this
state_before: case h.e'_2.h.e'_5.a
o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
ho : o ≤ 2
this : a < succ 1
⊢ a ≤ 1
state_after: no goals

tactic: simpa using ho
state_before: o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
ho : o ≤ 2
⊢ o ≤ succ 1
state_after: no goals

tactic: rwa [← succ_le_iff, succ_zero] at ha₀
state_before: case h.e'_2.h.e'_5.a
o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
ho : o ≤ 2
⊢ 1 ≤ a
state_after: no goals

tactic: exact op_eq_self_of_principal hao (mul_isNormal ha₀) h (principal_mul_isLimit ho h)
state_before: case refine_1.inr
o : Ordinal.{u_1}
h : Principal (fun x x_1 => x * x_1) o
a : Ordinal.{u_1}
ha₀ : 0 < a
hao : a < o
ho : o > 2
⊢ a * o = o
state_after: no goals

tactic: rcases eq_or_ne a 0 with (rfl | ha)
state_before: case refine_2
o : Ordinal.{u_1}
h : ∀ (a : Ordinal.{u_1}), 0 < a → a < o → a * o = o
a b : Ordinal.{u_1}
hao : a < o
hbo : b < o
⊢ (fun x x_1 => x * x_1) a b < o
state_after: case refine_2.inl
o : Ordinal.{u_1}
h : ∀ (a : Ordinal.{u_1}), 0 < a → a < o → a * o = o
b : Ordinal.{u_1}
hbo : b < o
hao : 0 < o
⊢ (fun x x_1 => x * x_1) 0 b < o

case refine_2.inr
o : Ordinal.{u_1}
h : ∀ (a : Ordinal.{u_1}), 0 < a → a < o → a * o = o
a b : Ordinal.{u_1}
hao : a < o
hbo : b < o
ha : a ≠ 0
⊢ (fun x x_1 => x * x_1) a b < o

tactic: rw [← Ordinal.pos_iff_ne_zero] at ha
state_before: case refine_2.inr
o : Ordinal.{u_1}
h : ∀ (a : Ordinal.{u_1}), 0 < a → a < o → a * o = o
a b : Ordinal.{u_1}
hao : a < o
hbo : b < o
ha : a ≠ 0
⊢ (fun x x_1 => x * x_1) a b < o
state_after: case refine_2.inr
o : Ordinal.{u_1}
h : ∀ (a : Ordinal.{u_1}), 0 < a → a < o → a * o = o
a b : Ordinal.{u_1}
hao : a < o
hbo : b < o
ha : 0 < a
⊢ (fun x x_1 => x * x_1) a b < o

tactic: rw [← h a ha hao]
state_before: case refine_2.inr
o : Ordinal.{u_1}
h : ∀ (a : Ordinal.{u_1}), 0 < a → a < o → a * o = o
a b : Ordinal.{u_1}
hao : a < o
hbo : b < o
ha : 0 < a
⊢ (fun x x_1 => x * x_1) a b < o
state_after: case refine_2.inr
o : Ordinal.{u_1}
h : ∀ (a : Ordinal.{u_1}), 0 < a → a < o → a * o = o
a b : Ordinal.{u_1}
hao : a < o
hbo : b < o
ha : 0 < a
⊢ (fun x x_1 => x * x_1) a b < a * o

tactic: exact (mul_isNormal ha).strictMono hbo
state_before: case refine_2.inr
o : Ordinal.{u_1}
h : ∀ (a : Ordinal.{u_1}), 0 < a → a < o → a * o = o
a b : Ordinal.{u_1}
hao : a < o
hbo : b < o
ha : 0 < a
⊢ (fun x x_1 => x * x_1) a b < a * o
state_after: no goals

tactic: dsimp only
state_before: case refine_2.inl
o : Ordinal.{u_1}
h : ∀ (a : Ordinal.{u_1}), 0 < a → a < o → a * o = o
b : Ordinal.{u_1}
hbo : b < o
hao : 0 < o
⊢ (fun x x_1 => x * x_1) 0 b < o
state_after: case refine_2.inl
o : Ordinal.{u_1}
h : ∀ (a : Ordinal.{u_1}), 0 < a → a < o → a * o = o
b : Ordinal.{u_1}
hbo : b < o
hao : 0 < o
⊢ 0 * b < o

tactic: rwa [zero_mul]
state_before: case refine_2.inl
o : Ordinal.{u_1}
h : ∀ (a : Ordinal.{u_1}), 0 < a → a < o → a * o = o
b : Ordinal.{u_1}
hbo : b < o
hao : 0 < o
⊢ 0 * b < o
state_after: no goals