l3lab/ntp-mathlib huggingface dataset:
/-- The main characterization theorem for additive principal ordinals. -/
theorem principal_add_iff_zero_or_omega_opow {o : Ordinal} :
    Principal (· + ·) o ↔ o = 0 ∨ ∃ a : Ordinal, o = (omega^a) := 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_iff]
    refine'
      ⟨fun H => ⟨_, ((lt_or_eq_of_le (opow_log_le_self _ ho)).resolve_left fun h => _).symm⟩,
        fun ⟨b, e⟩ => e.symm ▸ fun a => add_omega_opow⟩
    have := H _ h
    have := lt_opow_succ_log_self one_lt_omega o
    rw [opow_succ, lt_mul_of_limit omega_isLimit] at this
    rcases this with ⟨a, ao, h'⟩
    rcases lt_omega.1 ao with ⟨n, rfl⟩
    

Proof state:
case inr.intro.intro.intro
o : Ordinal.{u_1}
ho : o ≠ 0
H : ∀ a < o, a + o = o
h : ω ^ log ω o < o
this : ω ^ log ω o + o = o
n : ℕ
ao : ↑n < ω
h' : o < ω ^ log ω o * ↑n
⊢ False

Next tactic:
clear ao
/-- The main characterization theorem for additive principal ordinals. -/
theorem principal_add_iff_zero_or_omega_opow {o : Ordinal} :
    Principal (· + ·) o ↔ o = 0 ∨ ∃ a : Ordinal, o = (omega^a) := 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_iff]
    refine'
      ⟨fun H => ⟨_, ((lt_or_eq_of_le (opow_log_le_self _ ho)).resolve_left fun h => _).symm⟩,
        fun ⟨b, e⟩ => e.symm ▸ fun a => add_omega_opow⟩
    have := H _ h
    have := lt_opow_succ_log_self one_lt_omega o
    rw [opow_succ, lt_mul_of_limit omega_isLimit] at this
    rcases this with ⟨a, ao, h'⟩
    rcases lt_omega.1 ao with ⟨n, rfl⟩
    clear ao
    

Proof state:
case inr.intro.intro.intro
o : Ordinal.{u_1}
ho : o ≠ 0
H : ∀ a < o, a + o = o
h : ω ^ log ω o < o
this : ω ^ log ω o + o = o
n : ℕ
h' : o < ω ^ log ω o * ↑n
⊢ False

Next tactic:
revert h'
/-- The main characterization theorem for additive principal ordinals. -/
theorem principal_add_iff_zero_or_omega_opow {o : Ordinal} :
    Principal (· + ·) o ↔ o = 0 ∨ ∃ a : Ordinal, o = (omega^a) := 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_iff]
    refine'
      ⟨fun H => ⟨_, ((lt_or_eq_of_le (opow_log_le_self _ ho)).resolve_left fun h => _).symm⟩,
        fun ⟨b, e⟩ => e.symm ▸ fun a => add_omega_opow⟩
    have := H _ h
    have := lt_opow_succ_log_self one_lt_omega o
    rw [opow_succ, lt_mul_of_limit omega_isLimit] at this
    rcases this with ⟨a, ao, h'⟩
    rcases lt_omega.1 ao with ⟨n, rfl⟩
    clear ao
    revert h'
    

Proof state:
case inr.intro.intro.intro
o : Ordinal.{u_1}
ho : o ≠ 0
H : ∀ a < o, a + o = o
h : ω ^ log ω o < o
this : ω ^ log ω o + o = o
n : ℕ
⊢ o < ω ^ log ω o * ↑n → False

Next tactic:
apply not_lt_of_le
/-- The main characterization theorem for additive principal ordinals. -/
theorem principal_add_iff_zero_or_omega_opow {o : Ordinal} :
    Principal (· + ·) o ↔ o = 0 ∨ ∃ a : Ordinal, o = (omega^a) := 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_iff]
    refine'
      ⟨fun H => ⟨_, ((lt_or_eq_of_le (opow_log_le_self _ ho)).resolve_left fun h => _).symm⟩,
        fun ⟨b, e⟩ => e.symm ▸ fun a => add_omega_opow⟩
    have := H _ h
    have := lt_opow_succ_log_self one_lt_omega o
    rw [opow_succ, lt_mul_of_limit omega_isLimit] at this
    rcases this with ⟨a, ao, h'⟩
    rcases lt_omega.1 ao with ⟨n, rfl⟩
    clear ao
    revert h'
    apply not_lt_of_le
    

Proof state:
case inr.intro.intro.intro.h
o : Ordinal.{u_1}
ho : o ≠ 0
H : ∀ a < o, a + o = o
h : ω ^ log ω o < o
this : ω ^ log ω o + o = o
n : ℕ
⊢ ω ^ log ω o * ↑n ≤ o

Next tactic:
suffices e : (omega^log omega o) * ↑n + o = o
/-- The main characterization theorem for additive principal ordinals. -/
theorem principal_add_iff_zero_or_omega_opow {o : Ordinal} :
    Principal (· + ·) o ↔ o = 0 ∨ ∃ a : Ordinal, o = (omega^a) := 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_iff]
    refine'
      ⟨fun H => ⟨_, ((lt_or_eq_of_le (opow_log_le_self _ ho)).resolve_left fun h => _).symm⟩,
        fun ⟨b, e⟩ => e.symm ▸ fun a => add_omega_opow⟩
    have := H _ h
    have := lt_opow_succ_log_self one_lt_omega o
    rw [opow_succ, lt_mul_of_limit omega_isLimit] at this
    rcases this with ⟨a, ao, h'⟩
    rcases lt_omega.1 ao with ⟨n, rfl⟩
    clear ao
    revert h'
    apply not_lt_of_le
    suffices e : (omega^log omega o) * ↑n + o = o
    · 

Proof state:
case inr.intro.intro.intro.h
o : Ordinal.{u_1}
ho : o ≠ 0
H : ∀ a < o, a + o = o
h : ω ^ log ω o < o
this : ω ^ log ω o + o = o
n : ℕ
e : ω ^ log ω o * ↑n + o = o
⊢ ω ^ log ω o * ↑n ≤ o

Next tactic:
simpa only [e] using le_add_right ((omega^log omega o) * ↑n) o
/-- The main characterization theorem for additive principal ordinals. -/
theorem principal_add_iff_zero_or_omega_opow {o : Ordinal} :
    Principal (· + ·) o ↔ o = 0 ∨ ∃ a : Ordinal, o = (omega^a) := 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_iff]
    refine'
      ⟨fun H => ⟨_, ((lt_or_eq_of_le (opow_log_le_self _ ho)).resolve_left fun h => _).symm⟩,
        fun ⟨b, e⟩ => e.symm ▸ fun a => add_omega_opow⟩
    have := H _ h
    have := lt_opow_succ_log_self one_lt_omega o
    rw [opow_succ, lt_mul_of_limit omega_isLimit] at this
    rcases this with ⟨a, ao, h'⟩
    rcases lt_omega.1 ao with ⟨n, rfl⟩
    clear ao
    revert h'
    apply not_lt_of_le
    suffices e : (omega^log omega o) * ↑n + o = o
    · simpa only [e] using le_add_right ((omega^log omega o) * ↑n) o
    

Proof state:
case e
o : Ordinal.{u_1}
ho : o ≠ 0
H : ∀ a < o, a + o = o
h : ω ^ log ω o < o
this : ω ^ log ω o + o = o
n : ℕ
⊢ ω ^ log ω o * ↑n + o = o

Next tactic:
induction' n with n IH
/-- The main characterization theorem for additive principal ordinals. -/
theorem principal_add_iff_zero_or_omega_opow {o : Ordinal} :
    Principal (· + ·) o ↔ o = 0 ∨ ∃ a : Ordinal, o = (omega^a) := 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_iff]
    refine'
      ⟨fun H => ⟨_, ((lt_or_eq_of_le (opow_log_le_self _ ho)).resolve_left fun h => _).symm⟩,
        fun ⟨b, e⟩ => e.symm ▸ fun a => add_omega_opow⟩
    have := H _ h
    have := lt_opow_succ_log_self one_lt_omega o
    rw [opow_succ, lt_mul_of_limit omega_isLimit] at this
    rcases this with ⟨a, ao, h'⟩
    rcases lt_omega.1 ao with ⟨n, rfl⟩
    clear ao
    revert h'
    apply not_lt_of_le
    suffices e : (omega^log omega o) * ↑n + o = o
    · simpa only [e] using le_add_right ((omega^log omega o) * ↑n) o
    induction' n with n IH
    · 

Proof state:
case e.zero
o : Ordinal.{u_1}
ho : o ≠ 0
H : ∀ a < o, a + o = o
h : ω ^ log ω o < o
this : ω ^ log ω o + o = o
⊢ ω ^ log ω o * ↑Nat.zero + o = o

Next tactic:
simp [Nat.cast_zero, mul_zero, zero_add]
/-- The main characterization theorem for additive principal ordinals. -/
theorem principal_add_iff_zero_or_omega_opow {o : Ordinal} :
    Principal (· + ·) o ↔ o = 0 ∨ ∃ a : Ordinal, o = (omega^a) := 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_iff]
    refine'
      ⟨fun H => ⟨_, ((lt_or_eq_of_le (opow_log_le_self _ ho)).resolve_left fun h => _).symm⟩,
        fun ⟨b, e⟩ => e.symm ▸ fun a => add_omega_opow⟩
    have := H _ h
    have := lt_opow_succ_log_self one_lt_omega o
    rw [opow_succ, lt_mul_of_limit omega_isLimit] at this
    rcases this with ⟨a, ao, h'⟩
    rcases lt_omega.1 ao with ⟨n, rfl⟩
    clear ao
    revert h'
    apply not_lt_of_le
    suffices e : (omega^log omega o) * ↑n + o = o
    · simpa only [e] using le_add_right ((omega^log omega o) * ↑n) o
    induction' n with n IH
    · simp [Nat.cast_zero, mul_zero, zero_add]
    

Proof state:
case e.succ
o : Ordinal.{u_1}
ho : o ≠ 0
H : ∀ a < o, a + o = o
h : ω ^ log ω o < o
this : ω ^ log ω o + o = o
n : ℕ
IH : ω ^ log ω o * ↑n + o = o
⊢ ω ^ log ω o * ↑(Nat.succ n) + o = o

Next tactic:
simp only [Nat.cast_succ, mul_add_one, add_assoc, this, IH]
theorem opow_principal_add_of_principal_add {a} (ha : Principal (· + ·) a) (b : Ordinal) :
    Principal (· + ·) (a^b) := by
  

Proof state:
a : Ordinal.{u_1}
ha : Principal (fun x x_1 => x + x_1) a
b : Ordinal.{u_1}
⊢ Principal (fun x x_1 => x + x_1) (a ^ b)

Next tactic:
rcases principal_add_iff_zero_or_omega_opow.1 ha with (rfl | ⟨c, rfl⟩)
theorem opow_principal_add_of_principal_add {a} (ha : Principal (· + ·) a) (b : Ordinal) :
    Principal (· + ·) (a^b) := by
  rcases principal_add_iff_zero_or_omega_opow.1 ha with (rfl | ⟨c, rfl⟩)
  · 

Proof state:
case inl
b : Ordinal.{u_1}
ha : Principal (fun x x_1 => x + x_1) 0
⊢ Principal (fun x x_1 => x + x_1) (0 ^ b)

Next tactic:
rcases eq_or_ne b 0 with (rfl | hb)
theorem opow_principal_add_of_principal_add {a} (ha : Principal (· + ·) a) (b : Ordinal) :
    Principal (· + ·) (a^b) := by
  rcases principal_add_iff_zero_or_omega_opow.1 ha with (rfl | ⟨c, rfl⟩)
  · rcases eq_or_ne b 0 with (rfl | hb)
    · 

Proof state:
case inl.inl
ha : Principal (fun x x_1 => x + x_1) 0
⊢ Principal (fun x x_1 => x + x_1) (0 ^ 0)

Next tactic:
rw [opow_zero]
theorem opow_principal_add_of_principal_add {a} (ha : Principal (· + ·) a) (b : Ordinal) :
    Principal (· + ·) (a^b) := by
  rcases principal_add_iff_zero_or_omega_opow.1 ha with (rfl | ⟨c, rfl⟩)
  · rcases eq_or_ne b 0 with (rfl | hb)
    · rw [opow_zero]
      

Proof state:
case inl.inl
ha : Principal (fun x x_1 => x + x_1) 0
⊢ Principal (fun x x_1 => x + x_1) 1

Next tactic:
exact principal_add_one
theorem opow_principal_add_of_principal_add {a} (ha : Principal (· + ·) a) (b : Ordinal) :
    Principal (· + ·) (a^b) := by
  rcases principal_add_iff_zero_or_omega_opow.1 ha with (rfl | ⟨c, rfl⟩)
  · rcases eq_or_ne b 0 with (rfl | hb)
    · rw [opow_zero]
      exact principal_add_one
    · 

Proof state:
case inl.inr
b : Ordinal.{u_1}
ha : Principal (fun x x_1 => x + x_1) 0
hb : b ≠ 0
⊢ Principal (fun x x_1 => x + x_1) (0 ^ b)

Next tactic:
rwa [zero_opow hb]
theorem opow_principal_add_of_principal_add {a} (ha : Principal (· + ·) a) (b : Ordinal) :
    Principal (· + ·) (a^b) := by
  rcases principal_add_iff_zero_or_omega_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]
  · 

Proof state:
case inr.intro
b c : Ordinal.{u_1}
ha : Principal (fun x x_1 => x + x_1) (ω ^ c)
⊢ Principal (fun x x_1 => x + x_1) ((ω ^ c) ^ b)

Next tactic:
rw [← opow_mul]
theorem opow_principal_add_of_principal_add {a} (ha : Principal (· + ·) a) (b : Ordinal) :
    Principal (· + ·) (a^b) := by
  rcases principal_add_iff_zero_or_omega_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]
    

Proof state:
case inr.intro
b c : Ordinal.{u_1}
ha : Principal (fun x x_1 => x + x_1) (ω ^ c)
⊢ Principal (fun x x_1 => x + x_1) (ω ^ (c * b))

Next tactic:
exact principal_add_omega_opow _
theorem add_absorp {a b c : Ordinal} (h₁ : a < (omega^b)) (h₂ : (omega^b) ≤ c) : a + c = c := by
  

Proof state:
a b c : Ordinal.{u_1}
h₁ : a < ω ^ b
h₂ : ω ^ b ≤ c
⊢ a + c = c

Next tactic:
rw [← Ordinal.add_sub_cancel_of_le h₂, ← add_assoc, add_omega_opow h₁]
theorem mul_principal_add_is_principal_add (a : Ordinal.{u}) {b : Ordinal.{u}} (hb₁ : b ≠ 1)
    (hb : Principal (· + ·) b) : Principal (· + ·) (a * b) := by
  

Proof state:
a b : Ordinal.{u}
hb₁ : b ≠ 1
hb : Principal (fun x x_1 => x + x_1) b
⊢ Principal (fun x x_1 => x + x_1) (a * b)

Next tactic:
rcases eq_zero_or_pos a with (rfl | _)
theorem mul_principal_add_is_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 | _)
  · 

Proof state:
case inl
b : Ordinal.{u}
hb₁ : b ≠ 1
hb : Principal (fun x x_1 => x + x_1) b
⊢ Principal (fun x x_1 => x + x_1) (0 * b)

Next tactic:
rw [zero_mul]
theorem mul_principal_add_is_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]
    

Proof state:
case inl
b : Ordinal.{u}
hb₁ : b ≠ 1
hb : Principal (fun x x_1 => x + x_1) b
⊢ Principal (fun x x_1 => x + x_1) 0

Next tactic:
exact principal_zero
theorem mul_principal_add_is_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
  · 

Proof state:
case inr
a b : Ordinal.{u}
hb₁ : b ≠ 1
hb : Principal (fun x x_1 => x + x_1) b
h✝ : 0 < a
⊢ Principal (fun x x_1 => x + x_1) (a * b)

Next tactic:
rcases eq_zero_or_pos b with (rfl | hb₁')
theorem mul_principal_add_is_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₁')
    · 

Proof state:
case inr.inl
a : Ordinal.{u}
h✝ : 0 < a
hb₁ : 0 ≠ 1
hb : Principal (fun x x_1 => x + x_1) 0
⊢ Principal (fun x x_1 => x + x_1) (a * 0)

Next tactic:
rw [mul_zero]
theorem mul_principal_add_is_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]
      

Proof state:
case inr.inl
a : Ordinal.{u}
h✝ : 0 < a
hb₁ : 0 ≠ 1
hb : Principal (fun x x_1 => x + x_1) 0
⊢ Principal (fun x x_1 => x + x_1) 0

Next tactic:
exact principal_zero
theorem mul_principal_add_is_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
    · 

Proof state:
case inr.inr
a b : Ordinal.{u}
hb₁ : b ≠ 1
hb : Principal (fun x x_1 => x + x_1) b
h✝ : 0 < a
hb₁' : 0 < b
⊢ Principal (fun x x_1 => x + x_1) (a * b)

Next tactic:
rw [← succ_le_iff, succ_zero] at hb₁'
theorem mul_principal_add_is_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₁'
      

Proof state:
case inr.inr
a b : Ordinal.{u}
hb₁ : b ≠ 1
hb : Principal (fun x x_1 => x + x_1) b
h✝ : 0 < a
hb₁' : 1 ≤ b
⊢ Principal (fun x x_1 => x + x_1) (a * b)

Next tactic:
intro c d hc hd
theorem mul_principal_add_is_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
      

Proof state:
case inr.inr
a b : Ordinal.{u}
hb₁ : b ≠ 1
hb : Principal (fun x x_1 => x + x_1) b
h✝ : 0 < a
hb₁' : 1 ≤ b
c d : Ordinal.{u}
hc : c < a * b
hd : d < a * b
⊢ (fun x x_1 => x + x_1) c d < a * b

Next tactic:
rw [lt_mul_of_limit (principal_add_isLimit (lt_of_le_of_ne hb₁' hb₁.symm) hb)] at *
theorem mul_principal_add_is_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_of_limit (principal_add_isLimit (lt_of_le_of_ne hb₁' hb₁.symm) hb)] at *
      · 

Proof state:
case inr.inr
a b : Ordinal.{u}
hb₁ : b ≠ 1
hb : Principal (fun x x_1 => x + x_1) b
h✝ : 0 < a
hb₁' : 1 ≤ b
c d : Ordinal.{u}
hc : ∃ c' < b, c < a * c'
hd : ∃ c' < b, d < a * c'
⊢ ∃ c' < b, (fun x x_1 => x + x_1) c d < a * c'

Next tactic:
rcases hc with ⟨x, hx, hx'⟩
theorem mul_principal_add_is_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_of_limit (principal_add_isLimit (lt_of_le_of_ne hb₁' hb₁.symm) hb)] at *
      · rcases hc with ⟨x, hx, hx'⟩
        

Proof state:
case inr.inr.intro.intro
a b : Ordinal.{u}
hb₁ : b ≠ 1
hb : Principal (fun x x_1 => x + x_1) b
h✝ : 0 < a
hb₁' : 1 ≤ b
c d : Ordinal.{u}
hd : ∃ c' < b, d < a * c'
x : Ordinal.{u}
hx : x < b
hx' : c < a * x
⊢ ∃ c' < b, (fun x x_1 => x + x_1) c d < a * c'

Next tactic:
rcases hd with ⟨y, hy, hy'⟩
theorem mul_principal_add_is_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_of_limit (principal_add_isLimit (lt_of_le_of_ne hb₁' hb₁.symm) hb)] at *
      · rcases hc with ⟨x, hx, hx'⟩
        rcases hd with ⟨y, hy, hy'⟩
        

Proof state:
case inr.inr.intro.intro.intro.intro
a b : Ordinal.{u}
hb₁ : b ≠ 1
hb : Principal (fun x x_1 => x + x_1) b
h✝ : 0 < a
hb₁' : 1 ≤ b
c d x : Ordinal.{u}
hx : x < b
hx' : c < a * x
y : Ordinal.{u}
hy : y < b
hy' : d < a * y
⊢ ∃ c' < b, (fun x x_1 => x + x_1) c d < a * c'

Next tactic:
use x + y, hb hx hy
theorem mul_principal_add_is_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_of_limit (principal_add_isLimit (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
        

Proof state:
case right
a b : Ordinal.{u}
hb₁ : b ≠ 1
hb : Principal (fun x x_1 => x + x_1) b
h✝ : 0 < a
hb₁' : 1 ≤ b
c d x : Ordinal.{u}
hx : x < b
hx' : c < a * x
y : Ordinal.{u}
hy : y < b
hy' : d < a * y
⊢ (fun x x_1 => x + x_1) c d < a * (x + y)

Next tactic:
rw [mul_add]
theorem mul_principal_add_is_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_of_limit (principal_add_isLimit (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]
        

Proof state:
case right
a b : Ordinal.{u}
hb₁ : b ≠ 1
hb : Principal (fun x x_1 => x + x_1) b
h✝ : 0 < a
hb₁' : 1 ≤ b
c d x : Ordinal.{u}
hx : x < b
hx' : c < a * x
y : Ordinal.{u}
hy : y < b
hy' : d < a * y
⊢ (fun x x_1 => x + x_1) c d < a * x + a * y

Next tactic:
exact Left.add_lt_add hx' hy'
theorem principal_mul_one : Principal (· * ·) 1 := by
  

Proof state:
⊢ Principal (fun x x_1 => x * x_1) 1

Next tactic:
rw [principal_one_iff]
theorem principal_mul_one : Principal (· * ·) 1 := by
  rw [principal_one_iff]
  

Proof state:
⊢ 0 * 0 = 0

Next tactic:
exact zero_mul _
theorem principal_mul_two : Principal (· * ·) 2 := fun a b ha hb => by
  

Proof state:
a b : Ordinal.{u_1}
ha : a < 2
hb : b < 2
⊢ (fun x x_1 => x * x_1) a b < 2

Next tactic:
have h₂ : succ (1 : Ordinal) = 2 := by simp
theorem principal_mul_two : Principal (· * ·) 2 := fun a b ha hb => by
  have h₂ : succ (1 : Ordinal) = 2 := by 

Proof state:
a b : Ordinal.{u_1}
ha : a < 2
hb : b < 2
⊢ succ 1 = 2

Next tactic:
simp
theorem principal_mul_two : Principal (· * ·) 2 := fun a b ha hb => by
  have h₂ : succ (1 : Ordinal) = 2 := by simp
  

Proof state:
a b : Ordinal.{u_1}
ha : a < 2
hb : b < 2
h₂ : succ 1 = 2
⊢ (fun x x_1 => x * x_1) a b < 2

Next tactic:
dsimp only
theorem principal_mul_two : Principal (· * ·) 2 := fun a b ha hb => by
  have h₂ : succ (1 : Ordinal) = 2 := by simp
  dsimp only
  

Proof state:
a b : Ordinal.{u_1}
ha : a < 2
hb : b < 2
h₂ : succ 1 = 2
⊢ a * b < 2

Next tactic:
rw [← h₂, lt_succ_iff] at ha hb ⊢
theorem principal_mul_two : Principal (· * ·) 2 := fun a b ha hb => by
  have h₂ : succ (1 : Ordinal) = 2 := by simp
  dsimp only
  rw [← h₂, lt_succ_iff] at ha hb ⊢
  

Proof state:
a b : Ordinal.{u_1}
ha : a ≤ 1
hb : b ≤ 1
h₂ : succ 1 = 2
⊢ a * b ≤ 1

Next tactic:
convert mul_le_mul' ha hb
theorem principal_mul_two : Principal (· * ·) 2 := fun a b ha hb => by
  have h₂ : succ (1 : Ordinal) = 2 := by simp
  dsimp only
  rw [← h₂, lt_succ_iff] at ha hb ⊢
  convert mul_le_mul' ha hb
  

Proof state:
case h.e'_4
a b : Ordinal.{u_1}
ha : a ≤ 1
hb : b ≤ 1
h₂ : succ 1 = 2
⊢ 1 = 1 * 1

Next tactic:
exact (mul_one 1).symm
theorem principal_mul_of_le_two {o : Ordinal} (ho : o ≤ 2) : Principal (· * ·) o := by
  

Proof state:
o : Ordinal.{u_1}
ho : o ≤ 2
⊢ Principal (fun x x_1 => x * x_1) o

Next tactic:
rcases lt_or_eq_of_le ho with (ho | rfl)
theorem principal_mul_of_le_two {o : Ordinal} (ho : o ≤ 2) : Principal (· * ·) o := by
  rcases lt_or_eq_of_le ho with (ho | rfl)
  · 

Proof state:
case inl
o : Ordinal.{u_1}
ho✝ : o ≤ 2
ho : o < 2
⊢ Principal (fun x x_1 => x * x_1) o

Next tactic:
have h₂ : succ (1 : Ordinal) = 2 := by simp
theorem principal_mul_of_le_two {o : Ordinal} (ho : o ≤ 2) : Principal (· * ·) o := by
  rcases lt_or_eq_of_le ho with (ho | rfl)
  · have h₂ : succ (1 : Ordinal) = 2 := by 

Proof state:
o : Ordinal.{u_1}
ho✝ : o ≤ 2
ho : o < 2
⊢ succ 1 = 2

Next tactic:
simp
theorem principal_mul_of_le_two {o : Ordinal} (ho : o ≤ 2) : Principal (· * ·) o := by
  rcases lt_or_eq_of_le ho with (ho | rfl)
  · have h₂ : succ (1 : Ordinal) = 2 := by simp
    

Proof state:
case inl
o : Ordinal.{u_1}
ho✝ : o ≤ 2
ho : o < 2
h₂ : succ 1 = 2
⊢ Principal (fun x x_1 => x * x_1) o

Next tactic:
rw [← h₂, lt_succ_iff] at ho
theorem principal_mul_of_le_two {o : Ordinal} (ho : o ≤ 2) : Principal (· * ·) o := by
  rcases lt_or_eq_of_le ho with (ho | rfl)
  · have h₂ : succ (1 : Ordinal) = 2 := by simp
    rw [← h₂, lt_succ_iff] at ho
    

Proof state:
case inl
o : Ordinal.{u_1}
ho✝ : o ≤ 2
ho : o ≤ 1
h₂ : succ 1 = 2
⊢ Principal (fun x x_1 => x * x_1) o

Next tactic:
rcases lt_or_eq_of_le ho with (ho | rfl)
theorem principal_mul_of_le_two {o : Ordinal} (ho : o ≤ 2) : Principal (· * ·) o := by
  rcases lt_or_eq_of_le ho with (ho | rfl)
  · have h₂ : succ (1 : Ordinal) = 2 := by simp
    rw [← h₂, lt_succ_iff] at ho
    rcases lt_or_eq_of_le ho with (ho | rfl)
    · 

Proof state:
case inl.inl
o : Ordinal.{u_1}
ho✝¹ : o ≤ 2
ho✝ : o ≤ 1
h₂ : succ 1 = 2
ho : o < 1
⊢ Principal (fun x x_1 => x * x_1) o

Next tactic:
rw [lt_one_iff_zero.1 ho]