l3lab/ntp-mathlib huggingface dataset:
theorem add_eq_right_iff_mul_omega_le {a b : Ordinal} : a + b = b ↔ a * omega ≤ b := by
  refine' ⟨fun h => _, fun h => _⟩
  · rw [← nfp_add_zero a, ← deriv_zero]
    

Proof state:
case refine'_1
a b : Ordinal.{u_1}
h : a + b = b
⊢ deriv (fun x => a + x) 0 ≤ b

Next tactic:
cases' (add_isNormal a).fp_iff_deriv.1 h with c hc
theorem add_eq_right_iff_mul_omega_le {a b : Ordinal} : a + b = b ↔ a * omega ≤ b := by
  refine' ⟨fun h => _, fun h => _⟩
  · rw [← nfp_add_zero a, ← deriv_zero]
    cases' (add_isNormal a).fp_iff_deriv.1 h with c hc
    

Proof state:
case refine'_1.intro
a b : Ordinal.{u_1}
h : a + b = b
c : Ordinal.{u_1}
hc : deriv (fun x => a + x) c = b
⊢ deriv (fun x => a + x) 0 ≤ b

Next tactic:
rw [← hc]
theorem add_eq_right_iff_mul_omega_le {a b : Ordinal} : a + b = b ↔ a * omega ≤ b := by
  refine' ⟨fun h => _, fun h => _⟩
  · rw [← nfp_add_zero a, ← deriv_zero]
    cases' (add_isNormal a).fp_iff_deriv.1 h with c hc
    rw [← hc]
    

Proof state:
case refine'_1.intro
a b : Ordinal.{u_1}
h : a + b = b
c : Ordinal.{u_1}
hc : deriv (fun x => a + x) c = b
⊢ deriv (fun x => a + x) 0 ≤ deriv (fun x => a + x) c

Next tactic:
exact (deriv_isNormal _).monotone (Ordinal.zero_le _)
theorem add_eq_right_iff_mul_omega_le {a b : Ordinal} : a + b = b ↔ a * omega ≤ b := by
  refine' ⟨fun h => _, fun h => _⟩
  · rw [← nfp_add_zero a, ← deriv_zero]
    cases' (add_isNormal a).fp_iff_deriv.1 h with c hc
    rw [← hc]
    exact (deriv_isNormal _).monotone (Ordinal.zero_le _)
  · 

Proof state:
case refine'_2
a b : Ordinal.{u_1}
h : a * ω ≤ b
⊢ a + b = b

Next tactic:
have := Ordinal.add_sub_cancel_of_le h
theorem add_eq_right_iff_mul_omega_le {a b : Ordinal} : a + b = b ↔ a * omega ≤ b := by
  refine' ⟨fun h => _, fun h => _⟩
  · rw [← nfp_add_zero a, ← deriv_zero]
    cases' (add_isNormal a).fp_iff_deriv.1 h with c hc
    rw [← hc]
    exact (deriv_isNormal _).monotone (Ordinal.zero_le _)
  · have := Ordinal.add_sub_cancel_of_le h
    

Proof state:
case refine'_2
a b : Ordinal.{u_1}
h : a * ω ≤ b
this : a * ω + (b - a * ω) = b
⊢ a + b = b

Next tactic:
nth_rw 1 [← this]
theorem add_eq_right_iff_mul_omega_le {a b : Ordinal} : a + b = b ↔ a * omega ≤ b := by
  refine' ⟨fun h => _, fun h => _⟩
  · rw [← nfp_add_zero a, ← deriv_zero]
    cases' (add_isNormal a).fp_iff_deriv.1 h with c hc
    rw [← hc]
    exact (deriv_isNormal _).monotone (Ordinal.zero_le _)
  · have := Ordinal.add_sub_cancel_of_le h
    nth_rw 1 [← this]
    

Proof state:
case refine'_2
a b : Ordinal.{u_1}
h : a * ω ≤ b
this : a * ω + (b - a * ω) = b
⊢ a + (a * ω + (b - a * ω)) = b

Next tactic:
rwa [← add_assoc, ← mul_one_add, one_add_omega]
theorem add_le_right_iff_mul_omega_le {a b : Ordinal} : a + b ≤ b ↔ a * omega ≤ b := by
  

Proof state:
a b : Ordinal.{u_1}
⊢ a + b ≤ b ↔ a * ω ≤ b

Next tactic:
rw [← add_eq_right_iff_mul_omega_le]
theorem add_le_right_iff_mul_omega_le {a b : Ordinal} : a + b ≤ b ↔ a * omega ≤ b := by
  rw [← add_eq_right_iff_mul_omega_le]
  

Proof state:
a b : Ordinal.{u_1}
⊢ a + b ≤ b ↔ a + b = b

Next tactic:
exact (add_isNormal a).le_iff_eq
theorem deriv_add_eq_mul_omega_add (a b : Ordinal.{u}) : deriv (a + ·) b = a * omega + b := by
  

Proof state:
a b : Ordinal.{u}
⊢ deriv (fun x => a + x) b = a * ω + b

Next tactic:
revert b
theorem deriv_add_eq_mul_omega_add (a b : Ordinal.{u}) : deriv (a + ·) b = a * omega + b := by
  revert b
  

Proof state:
a : Ordinal.{u}
⊢ ∀ (b : Ordinal.{u}), deriv (fun x => a + x) b = a * ω + b

Next tactic:
rw [← funext_iff, IsNormal.eq_iff_zero_and_succ (deriv_isNormal _) (add_isNormal _)]
theorem deriv_add_eq_mul_omega_add (a b : Ordinal.{u}) : deriv (a + ·) b = a * omega + b := by
  revert b
  rw [← funext_iff, IsNormal.eq_iff_zero_and_succ (deriv_isNormal _) (add_isNormal _)]
  

Proof state:
a : Ordinal.{u}
⊢ deriv (fun x => a + x) 0 = a * ω + 0 ∧
    ∀ (a_1 : Ordinal.{u}),
      deriv (fun x => a + x) a_1 = a * ω + a_1 → deriv (fun x => a + x) (succ a_1) = a * ω + succ a_1

Next tactic:
refine' ⟨_, fun a h => _⟩
theorem deriv_add_eq_mul_omega_add (a b : Ordinal.{u}) : deriv (a + ·) b = a * omega + b := by
  revert b
  rw [← funext_iff, IsNormal.eq_iff_zero_and_succ (deriv_isNormal _) (add_isNormal _)]
  refine' ⟨_, fun a h => _⟩
  · 

Proof state:
case refine'_1
a : Ordinal.{u}
⊢ deriv (fun x => a + x) 0 = a * ω + 0

Next tactic:
rw [deriv_zero, add_zero]
theorem deriv_add_eq_mul_omega_add (a b : Ordinal.{u}) : deriv (a + ·) b = a * omega + b := by
  revert b
  rw [← funext_iff, IsNormal.eq_iff_zero_and_succ (deriv_isNormal _) (add_isNormal _)]
  refine' ⟨_, fun a h => _⟩
  · rw [deriv_zero, add_zero]
    

Proof state:
case refine'_1
a : Ordinal.{u}
⊢ nfp (fun x => a + x) 0 = a * ω

Next tactic:
exact nfp_add_zero a
theorem deriv_add_eq_mul_omega_add (a b : Ordinal.{u}) : deriv (a + ·) b = a * omega + b := by
  revert b
  rw [← funext_iff, IsNormal.eq_iff_zero_and_succ (deriv_isNormal _) (add_isNormal _)]
  refine' ⟨_, fun a h => _⟩
  · rw [deriv_zero, add_zero]
    exact nfp_add_zero a
  · 

Proof state:
case refine'_2
a✝ a : Ordinal.{u}
h : deriv (fun x => a✝ + x) a = a✝ * ω + a
⊢ deriv (fun x => a✝ + x) (succ a) = a✝ * ω + succ a

Next tactic:
rw [deriv_succ, h, add_succ]
theorem deriv_add_eq_mul_omega_add (a b : Ordinal.{u}) : deriv (a + ·) b = a * omega + b := by
  revert b
  rw [← funext_iff, IsNormal.eq_iff_zero_and_succ (deriv_isNormal _) (add_isNormal _)]
  refine' ⟨_, fun a h => _⟩
  · rw [deriv_zero, add_zero]
    exact nfp_add_zero a
  · rw [deriv_succ, h, add_succ]
    

Proof state:
case refine'_2
a✝ a : Ordinal.{u}
h : deriv (fun x => a✝ + x) a = a✝ * ω + a
⊢ nfp (fun x => a✝ + x) (succ (a✝ * ω + a)) = succ (a✝ * ω + a)

Next tactic:
exact nfp_eq_self (add_eq_right_iff_mul_omega_le.2 ((le_add_right _ _).trans (le_succ _)))
@[simp]
theorem nfp_mul_one {a : Ordinal} (ha : 0 < a) : nfp (a * ·) 1 = (a^omega) := by
  

Proof state:
a : Ordinal.{u_1}
ha : 0 < a
⊢ nfp (fun x => a * x) 1 = a ^ ω

Next tactic:
rw [← sup_iterate_eq_nfp, ← sup_opow_nat]
@[simp]
theorem nfp_mul_one {a : Ordinal} (ha : 0 < a) : nfp (a * ·) 1 = (a^omega) := by
  rw [← sup_iterate_eq_nfp, ← sup_opow_nat]
  · 

Proof state:
a : Ordinal.{u_1}
ha : 0 < a
⊢ (fun a_1 => sup fun n => (fun x => a * x)^[n] a_1) 1 = sup fun n => a ^ ↑n

Next tactic:
dsimp
@[simp]
theorem nfp_mul_one {a : Ordinal} (ha : 0 < a) : nfp (a * ·) 1 = (a^omega) := by
  rw [← sup_iterate_eq_nfp, ← sup_opow_nat]
  · dsimp
    

Proof state:
a : Ordinal.{u_1}
ha : 0 < a
⊢ (sup fun n => (fun x => a * x)^[n] 1) = sup fun n => a ^ ↑n

Next tactic:
congr
@[simp]
theorem nfp_mul_one {a : Ordinal} (ha : 0 < a) : nfp (a * ·) 1 = (a^omega) := by
  rw [← sup_iterate_eq_nfp, ← sup_opow_nat]
  · dsimp
    congr
    

Proof state:
case e_f
a : Ordinal.{u_1}
ha : 0 < a
⊢ (fun n => (fun x => a * x)^[n] 1) = fun n => a ^ ↑n

Next tactic:
funext n
@[simp]
theorem nfp_mul_one {a : Ordinal} (ha : 0 < a) : nfp (a * ·) 1 = (a^omega) := by
  rw [← sup_iterate_eq_nfp, ← sup_opow_nat]
  · dsimp
    congr
    funext n
    

Proof state:
case e_f.h
a : Ordinal.{u_1}
ha : 0 < a
n : ℕ
⊢ (fun x => a * x)^[n] 1 = a ^ ↑n

Next tactic:
induction' n with n hn
@[simp]
theorem nfp_mul_one {a : Ordinal} (ha : 0 < a) : nfp (a * ·) 1 = (a^omega) := by
  rw [← sup_iterate_eq_nfp, ← sup_opow_nat]
  · dsimp
    congr
    funext n
    induction' n with n hn
    · 

Proof state:
case e_f.h.zero
a : Ordinal.{u_1}
ha : 0 < a
⊢ (fun x => a * x)^[Nat.zero] 1 = a ^ ↑Nat.zero

Next tactic:
rw [Nat.cast_zero, opow_zero, iterate_zero_apply]
@[simp]
theorem nfp_mul_one {a : Ordinal} (ha : 0 < a) : nfp (a * ·) 1 = (a^omega) := by
  rw [← sup_iterate_eq_nfp, ← sup_opow_nat]
  · dsimp
    congr
    funext n
    induction' n with n hn
    · rw [Nat.cast_zero, opow_zero, iterate_zero_apply]
    

Proof state:
case e_f.h.succ
a : Ordinal.{u_1}
ha : 0 < a
n : ℕ
hn : (fun x => a * x)^[n] 1 = a ^ ↑n
⊢ (fun x => a * x)^[Nat.succ n] 1 = a ^ ↑(Nat.succ n)

Next tactic:
nth_rw 2 [Nat.succ_eq_one_add]
@[simp]
theorem nfp_mul_one {a : Ordinal} (ha : 0 < a) : nfp (a * ·) 1 = (a^omega) := by
  rw [← sup_iterate_eq_nfp, ← sup_opow_nat]
  · dsimp
    congr
    funext n
    induction' n with n hn
    · rw [Nat.cast_zero, opow_zero, iterate_zero_apply]
    nth_rw 2 [Nat.succ_eq_one_add]
    

Proof state:
case e_f.h.succ
a : Ordinal.{u_1}
ha : 0 < a
n : ℕ
hn : (fun x => a * x)^[n] 1 = a ^ ↑n
⊢ (fun x => a * x)^[Nat.succ n] 1 = a ^ ↑(1 + n)

Next tactic:
rw [Nat.cast_add, Nat.cast_one, opow_add, opow_one, iterate_succ_apply', hn]
@[simp]
theorem nfp_mul_one {a : Ordinal} (ha : 0 < a) : nfp (a * ·) 1 = (a^omega) := by
  rw [← sup_iterate_eq_nfp, ← sup_opow_nat]
  · dsimp
    congr
    funext n
    induction' n with n hn
    · rw [Nat.cast_zero, opow_zero, iterate_zero_apply]
    nth_rw 2 [Nat.succ_eq_one_add]
    rw [Nat.cast_add, Nat.cast_one, opow_add, opow_one, iterate_succ_apply', hn]
  · 

Proof state:
a : Ordinal.{u_1}
ha : 0 < a
⊢ 0 < a

Next tactic:
exact ha
@[simp]
theorem nfp_mul_zero (a : Ordinal) : nfp (a * ·) 0 = 0 := by
  

Proof state:
a : Ordinal.{u_1}
⊢ nfp (fun x => a * x) 0 = 0

Next tactic:
rw [← Ordinal.le_zero, nfp_le_iff]
@[simp]
theorem nfp_mul_zero (a : Ordinal) : nfp (a * ·) 0 = 0 := by
  rw [← Ordinal.le_zero, nfp_le_iff]
  

Proof state:
a : Ordinal.{u_1}
⊢ ∀ (n : ℕ), (fun x => a * x)^[n] 0 ≤ 0

Next tactic:
intro n
@[simp]
theorem nfp_mul_zero (a : Ordinal) : nfp (a * ·) 0 = 0 := by
  rw [← Ordinal.le_zero, nfp_le_iff]
  intro n
  

Proof state:
a : Ordinal.{u_1}
n : ℕ
⊢ (fun x => a * x)^[n] 0 ≤ 0

Next tactic:
induction' n with n hn
@[simp]
theorem nfp_mul_zero (a : Ordinal) : nfp (a * ·) 0 = 0 := by
  rw [← Ordinal.le_zero, nfp_le_iff]
  intro n
  induction' n with n hn; · 

Proof state:
case zero
a : Ordinal.{u_1}
⊢ (fun x => a * x)^[Nat.zero] 0 ≤ 0

Next tactic:
rfl
@[simp]
theorem nfp_mul_zero (a : Ordinal) : nfp (a * ·) 0 = 0 := by
  rw [← Ordinal.le_zero, nfp_le_iff]
  intro n
  induction' n with n hn; · rfl
  

Proof state:
case succ
a : Ordinal.{u_1}
n : ℕ
hn : (fun x => a * x)^[n] 0 ≤ 0
⊢ (fun x => a * x)^[Nat.succ n] 0 ≤ 0

Next tactic:
dsimp only
@[simp]
theorem nfp_mul_zero (a : Ordinal) : nfp (a * ·) 0 = 0 := by
  rw [← Ordinal.le_zero, nfp_le_iff]
  intro n
  induction' n with n hn; · rfl
  dsimp only; 

Proof state:
case succ
a : Ordinal.{u_1}
n : ℕ
hn : (fun x => a * x)^[n] 0 ≤ 0
⊢ (fun x => a * x)^[Nat.succ n] 0 ≤ 0

Next tactic:
rwa [iterate_succ_apply, mul_zero]
@[simp]
theorem nfp_zero_mul : nfp (HMul.hMul 0) = id := by
  

Proof state:
⊢ nfp (HMul.hMul 0) = id

Next tactic:
rw [← sup_iterate_eq_nfp]
@[simp]
theorem nfp_zero_mul : nfp (HMul.hMul 0) = id := by
  rw [← sup_iterate_eq_nfp]
  

Proof state:
⊢ (fun a => sup fun n => (HMul.hMul 0)^[n] a) = id

Next tactic:
refine' funext fun a => (sup_le fun n => _).antisymm (le_sup (fun n => (0 * ·)^[n] a) 0)
@[simp]
theorem nfp_zero_mul : nfp (HMul.hMul 0) = id := by
  rw [← sup_iterate_eq_nfp]
  refine' funext fun a => (sup_le fun n => _).antisymm (le_sup (fun n => (0 * ·)^[n] a) 0)
  

Proof state:
a : Ordinal.{u_1}
n : ℕ
⊢ (HMul.hMul 0)^[n] a ≤ id a

Next tactic:
induction' n with n _
@[simp]
theorem nfp_zero_mul : nfp (HMul.hMul 0) = id := by
  rw [← sup_iterate_eq_nfp]
  refine' funext fun a => (sup_le fun n => _).antisymm (le_sup (fun n => (0 * ·)^[n] a) 0)
  induction' n with n _
  · 

Proof state:
case zero
a : Ordinal.{u_1}
⊢ (HMul.hMul 0)^[Nat.zero] a ≤ id a

Next tactic:
rfl
@[simp]
theorem nfp_zero_mul : nfp (HMul.hMul 0) = id := by
  rw [← sup_iterate_eq_nfp]
  refine' funext fun a => (sup_le fun n => _).antisymm (le_sup (fun n => (0 * ·)^[n] a) 0)
  induction' n with n _
  · rfl
  

Proof state:
case succ
a : Ordinal.{u_1}
n : ℕ
n_ih✝ : (HMul.hMul 0)^[n] a ≤ id a
⊢ (HMul.hMul 0)^[Nat.succ n] a ≤ id a

Next tactic:
rw [Function.iterate_succ']
@[simp]
theorem nfp_zero_mul : nfp (HMul.hMul 0) = id := by
  rw [← sup_iterate_eq_nfp]
  refine' funext fun a => (sup_le fun n => _).antisymm (le_sup (fun n => (0 * ·)^[n] a) 0)
  induction' n with n _
  · rfl
  rw [Function.iterate_succ']
  

Proof state:
case succ
a : Ordinal.{u_1}
n : ℕ
n_ih✝ : (HMul.hMul 0)^[n] a ≤ id a
⊢ (HMul.hMul 0 ∘ (HMul.hMul 0)^[n]) a ≤ id a

Next tactic:
change 0 * _ ≤ a
@[simp]
theorem nfp_zero_mul : nfp (HMul.hMul 0) = id := by
  rw [← sup_iterate_eq_nfp]
  refine' funext fun a => (sup_le fun n => _).antisymm (le_sup (fun n => (0 * ·)^[n] a) 0)
  induction' n with n _
  · rfl
  rw [Function.iterate_succ']
  change 0 * _ ≤ a
  

Proof state:
case succ
a : Ordinal.{u_1}
n : ℕ
n_ih✝ : (HMul.hMul 0)^[n] a ≤ id a
⊢ 0 * (HMul.hMul 0)^[n] a ≤ a

Next tactic:
rw [zero_mul]
@[simp]
theorem nfp_zero_mul : nfp (HMul.hMul 0) = id := by
  rw [← sup_iterate_eq_nfp]
  refine' funext fun a => (sup_le fun n => _).antisymm (le_sup (fun n => (0 * ·)^[n] a) 0)
  induction' n with n _
  · rfl
  rw [Function.iterate_succ']
  change 0 * _ ≤ a
  rw [zero_mul]
  

Proof state:
case succ
a : Ordinal.{u_1}
n : ℕ
n_ih✝ : (HMul.hMul 0)^[n] a ≤ id a
⊢ 0 ≤ a

Next tactic:
exact Ordinal.zero_le a
theorem nfp_mul_eq_opow_omega {a b : Ordinal} (hb : 0 < b) (hba : b ≤ (a^omega)) :
    nfp (a * ·) b = (a^omega.{u}) := by
  

Proof state:
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
⊢ nfp (fun x => a * x) b = a ^ ω

Next tactic:
rcases eq_zero_or_pos a with ha | ha
theorem nfp_mul_eq_opow_omega {a b : Ordinal} (hb : 0 < b) (hba : b ≤ (a^omega)) :
    nfp (a * ·) b = (a^omega.{u}) := by
  rcases eq_zero_or_pos a with ha | ha
  · 

Proof state:
case inl
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
ha : a = 0
⊢ nfp (fun x => a * x) b = a ^ ω

Next tactic:
rw [ha, zero_opow omega_ne_zero] at hba ⊢
theorem nfp_mul_eq_opow_omega {a b : Ordinal} (hb : 0 < b) (hba : b ≤ (a^omega)) :
    nfp (a * ·) b = (a^omega.{u}) := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_opow omega_ne_zero] at hba ⊢
    

Proof state:
case inl
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ 0
ha : a = 0
⊢ nfp (fun x => 0 * x) b = 0

Next tactic:
rw [Ordinal.le_zero.1 hba, nfp_zero_mul]
theorem nfp_mul_eq_opow_omega {a b : Ordinal} (hb : 0 < b) (hba : b ≤ (a^omega)) :
    nfp (a * ·) b = (a^omega.{u}) := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_opow omega_ne_zero] at hba ⊢
    rw [Ordinal.le_zero.1 hba, nfp_zero_mul]
    

Proof state:
case inl
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ 0
ha : a = 0
⊢ id 0 = 0

Next tactic:
rfl
theorem nfp_mul_eq_opow_omega {a b : Ordinal} (hb : 0 < b) (hba : b ≤ (a^omega)) :
    nfp (a * ·) b = (a^omega.{u}) := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_opow omega_ne_zero] at hba ⊢
    rw [Ordinal.le_zero.1 hba, nfp_zero_mul]
    rfl
  

Proof state:
case inr
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
ha : 0 < a
⊢ nfp (fun x => a * x) b = a ^ ω

Next tactic:
apply le_antisymm
theorem nfp_mul_eq_opow_omega {a b : Ordinal} (hb : 0 < b) (hba : b ≤ (a^omega)) :
    nfp (a * ·) b = (a^omega.{u}) := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_opow omega_ne_zero] at hba ⊢
    rw [Ordinal.le_zero.1 hba, nfp_zero_mul]
    rfl
  apply le_antisymm
  · 

Proof state:
case inr.a
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
ha : 0 < a
⊢ nfp (fun x => a * x) b ≤ a ^ ω

Next tactic:
apply nfp_le_fp (mul_isNormal ha).monotone hba
theorem nfp_mul_eq_opow_omega {a b : Ordinal} (hb : 0 < b) (hba : b ≤ (a^omega)) :
    nfp (a * ·) b = (a^omega.{u}) := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_opow omega_ne_zero] at hba ⊢
    rw [Ordinal.le_zero.1 hba, nfp_zero_mul]
    rfl
  apply le_antisymm
  · apply nfp_le_fp (mul_isNormal ha).monotone hba
    

Proof state:
case inr.a
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
ha : 0 < a
⊢ a * a ^ ω ≤ a ^ ω

Next tactic:
rw [← opow_one_add, one_add_omega]
theorem nfp_mul_eq_opow_omega {a b : Ordinal} (hb : 0 < b) (hba : b ≤ (a^omega)) :
    nfp (a * ·) b = (a^omega.{u}) := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_opow omega_ne_zero] at hba ⊢
    rw [Ordinal.le_zero.1 hba, nfp_zero_mul]
    rfl
  apply le_antisymm
  · apply nfp_le_fp (mul_isNormal ha).monotone hba
    rw [← opow_one_add, one_add_omega]
  

Proof state:
case inr.a
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
ha : 0 < a
⊢ a ^ ω ≤ nfp (fun x => a * x) b

Next tactic:
rw [← nfp_mul_one ha]
theorem nfp_mul_eq_opow_omega {a b : Ordinal} (hb : 0 < b) (hba : b ≤ (a^omega)) :
    nfp (a * ·) b = (a^omega.{u}) := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_opow omega_ne_zero] at hba ⊢
    rw [Ordinal.le_zero.1 hba, nfp_zero_mul]
    rfl
  apply le_antisymm
  · apply nfp_le_fp (mul_isNormal ha).monotone hba
    rw [← opow_one_add, one_add_omega]
  rw [← nfp_mul_one ha]
  

Proof state:
case inr.a
a b : Ordinal.{u}
hb : 0 < b
hba : b ≤ a ^ ω
ha : 0 < a
⊢ nfp (fun x => a * x) 1 ≤ nfp (fun x => a * x) b

Next tactic:
exact nfp_monotone (mul_isNormal ha).monotone (one_le_iff_pos.2 hb)
theorem eq_zero_or_opow_omega_le_of_mul_eq_right {a b : Ordinal} (hab : a * b = b) :
    b = 0 ∨ (a^omega.{u}) ≤ b := by
  

Proof state:
a b : Ordinal.{u}
hab : a * b = b
⊢ b = 0 ∨ a ^ ω ≤ b

Next tactic:
rcases eq_zero_or_pos a with ha | ha
theorem eq_zero_or_opow_omega_le_of_mul_eq_right {a b : Ordinal} (hab : a * b = b) :
    b = 0 ∨ (a^omega.{u}) ≤ b := by
  rcases eq_zero_or_pos a with ha | ha
  · 

Proof state:
case inl
a b : Ordinal.{u}
hab : a * b = b
ha : a = 0
⊢ b = 0 ∨ a ^ ω ≤ b

Next tactic:
rw [ha, zero_opow omega_ne_zero]
theorem eq_zero_or_opow_omega_le_of_mul_eq_right {a b : Ordinal} (hab : a * b = b) :
    b = 0 ∨ (a^omega.{u}) ≤ b := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_opow omega_ne_zero]
    

Proof state:
case inl
a b : Ordinal.{u}
hab : a * b = b
ha : a = 0
⊢ b = 0 ∨ 0 ≤ b

Next tactic:
exact Or.inr (Ordinal.zero_le b)
theorem eq_zero_or_opow_omega_le_of_mul_eq_right {a b : Ordinal} (hab : a * b = b) :
    b = 0 ∨ (a^omega.{u}) ≤ b := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_opow omega_ne_zero]
    exact Or.inr (Ordinal.zero_le b)
  

Proof state:
case inr
a b : Ordinal.{u}
hab : a * b = b
ha : 0 < a
⊢ b = 0 ∨ a ^ ω ≤ b

Next tactic:
rw [or_iff_not_imp_left]
theorem eq_zero_or_opow_omega_le_of_mul_eq_right {a b : Ordinal} (hab : a * b = b) :
    b = 0 ∨ (a^omega.{u}) ≤ b := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_opow omega_ne_zero]
    exact Or.inr (Ordinal.zero_le b)
  rw [or_iff_not_imp_left]
  

Proof state:
case inr
a b : Ordinal.{u}
hab : a * b = b
ha : 0 < a
⊢ ¬b = 0 → a ^ ω ≤ b

Next tactic:
intro hb
theorem eq_zero_or_opow_omega_le_of_mul_eq_right {a b : Ordinal} (hab : a * b = b) :
    b = 0 ∨ (a^omega.{u}) ≤ b := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_opow omega_ne_zero]
    exact Or.inr (Ordinal.zero_le b)
  rw [or_iff_not_imp_left]
  intro hb
  

Proof state:
case inr
a b : Ordinal.{u}
hab : a * b = b
ha : 0 < a
hb : ¬b = 0
⊢ a ^ ω ≤ b

Next tactic:
rw [← nfp_mul_one ha]
theorem eq_zero_or_opow_omega_le_of_mul_eq_right {a b : Ordinal} (hab : a * b = b) :
    b = 0 ∨ (a^omega.{u}) ≤ b := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_opow omega_ne_zero]
    exact Or.inr (Ordinal.zero_le b)
  rw [or_iff_not_imp_left]
  intro hb
  rw [← nfp_mul_one ha]
  

Proof state:
case inr
a b : Ordinal.{u}
hab : a * b = b
ha : 0 < a
hb : ¬b = 0
⊢ nfp (fun x => a * x) 1 ≤ b

Next tactic:
rw [← Ne.def, ← one_le_iff_ne_zero] at hb
theorem eq_zero_or_opow_omega_le_of_mul_eq_right {a b : Ordinal} (hab : a * b = b) :
    b = 0 ∨ (a^omega.{u}) ≤ b := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_opow omega_ne_zero]
    exact Or.inr (Ordinal.zero_le b)
  rw [or_iff_not_imp_left]
  intro hb
  rw [← nfp_mul_one ha]
  rw [← Ne.def, ← one_le_iff_ne_zero] at hb
  

Proof state:
case inr
a b : Ordinal.{u}
hab : a * b = b
ha : 0 < a
hb : 1 ≤ b
⊢ nfp (fun x => a * x) 1 ≤ b

Next tactic:
exact nfp_le_fp (mul_isNormal ha).monotone hb (le_of_eq hab)
theorem mul_eq_right_iff_opow_omega_dvd {a b : Ordinal} : a * b = b ↔ (a^omega) ∣ b := by
  

Proof state:
a b : Ordinal.{u_1}
⊢ a * b = b ↔ a ^ ω ∣ b

Next tactic:
rcases eq_zero_or_pos a with ha | ha
theorem mul_eq_right_iff_opow_omega_dvd {a b : Ordinal} : a * b = b ↔ (a^omega) ∣ b := by
  rcases eq_zero_or_pos a with ha | ha
  · 

Proof state:
case inl
a b : Ordinal.{u_1}
ha : a = 0
⊢ a * b = b ↔ a ^ ω ∣ b

Next tactic:
rw [ha, zero_mul, zero_opow omega_ne_zero, zero_dvd_iff]
theorem mul_eq_right_iff_opow_omega_dvd {a b : Ordinal} : a * b = b ↔ (a^omega) ∣ b := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_mul, zero_opow omega_ne_zero, zero_dvd_iff]
    

Proof state:
case inl
a b : Ordinal.{u_1}
ha : a = 0
⊢ 0 = b ↔ b = 0

Next tactic:
exact eq_comm
theorem mul_eq_right_iff_opow_omega_dvd {a b : Ordinal} : a * b = b ↔ (a^omega) ∣ b := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_mul, zero_opow omega_ne_zero, zero_dvd_iff]
    exact eq_comm
  

Proof state:
case inr
a b : Ordinal.{u_1}
ha : 0 < a
⊢ a * b = b ↔ a ^ ω ∣ b

Next tactic:
refine' ⟨fun hab => _, fun h => _⟩
theorem mul_eq_right_iff_opow_omega_dvd {a b : Ordinal} : a * b = b ↔ (a^omega) ∣ b := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_mul, zero_opow omega_ne_zero, zero_dvd_iff]
    exact eq_comm
  refine' ⟨fun hab => _, fun h => _⟩
  · 

Proof state:
case inr.refine'_1
a b : Ordinal.{u_1}
ha : 0 < a
hab : a * b = b
⊢ a ^ ω ∣ b

Next tactic:
rw [dvd_iff_mod_eq_zero]
theorem mul_eq_right_iff_opow_omega_dvd {a b : Ordinal} : a * b = b ↔ (a^omega) ∣ b := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_mul, zero_opow omega_ne_zero, zero_dvd_iff]
    exact eq_comm
  refine' ⟨fun hab => _, fun h => _⟩
  · rw [dvd_iff_mod_eq_zero]
    

Proof state:
case inr.refine'_1
a b : Ordinal.{u_1}
ha : 0 < a
hab : a * b = b
⊢ b % a ^ ω = 0

Next tactic:
rw [← div_add_mod b (a^omega), mul_add, ← mul_assoc, ← opow_one_add, one_add_omega,
      add_left_cancel] at hab
theorem mul_eq_right_iff_opow_omega_dvd {a b : Ordinal} : a * b = b ↔ (a^omega) ∣ b := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_mul, zero_opow omega_ne_zero, zero_dvd_iff]
    exact eq_comm
  refine' ⟨fun hab => _, fun h => _⟩
  · rw [dvd_iff_mod_eq_zero]
    rw [← div_add_mod b (a^omega), mul_add, ← mul_assoc, ← opow_one_add, one_add_omega,
      add_left_cancel] at hab
    

Proof state:
case inr.refine'_1
a b : Ordinal.{u_1}
ha : 0 < a
hab : a * (b % a ^ ω) = b % a ^ ω
⊢ b % a ^ ω = 0

Next tactic:
cases' eq_zero_or_opow_omega_le_of_mul_eq_right hab with hab hab
theorem mul_eq_right_iff_opow_omega_dvd {a b : Ordinal} : a * b = b ↔ (a^omega) ∣ b := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_mul, zero_opow omega_ne_zero, zero_dvd_iff]
    exact eq_comm
  refine' ⟨fun hab => _, fun h => _⟩
  · rw [dvd_iff_mod_eq_zero]
    rw [← div_add_mod b (a^omega), mul_add, ← mul_assoc, ← opow_one_add, one_add_omega,
      add_left_cancel] at hab
    cases' eq_zero_or_opow_omega_le_of_mul_eq_right hab with hab hab
    · 

Proof state:
case inr.refine'_1.inl
a b : Ordinal.{u_1}
ha : 0 < a
hab✝ : a * (b % a ^ ω) = b % a ^ ω
hab : b % a ^ ω = 0
⊢ b % a ^ ω = 0

Next tactic:
exact hab
theorem mul_eq_right_iff_opow_omega_dvd {a b : Ordinal} : a * b = b ↔ (a^omega) ∣ b := by
  rcases eq_zero_or_pos a with ha | ha
  · rw [ha, zero_mul, zero_opow omega_ne_zero, zero_dvd_iff]
    exact eq_comm
  refine' ⟨fun hab => _, fun h => _⟩
  · rw [dvd_iff_mod_eq_zero]
    rw [← div_add_mod b (a^omega), mul_add, ← mul_assoc, ← opow_one_add, one_add_omega,
      add_left_cancel] at hab
    cases' eq_zero_or_opow_omega_le_of_mul_eq_right hab with hab hab
    · exact hab
    

Proof state:
case inr.refine'_1.inr
a b : Ordinal.{u_1}
ha : 0 < a
hab✝ : a * (b % a ^ ω) = b % a ^ ω
hab : a ^ ω ≤ b % a ^ ω
⊢ b % a ^ ω = 0

Next tactic:
refine' (not_lt_of_le hab (mod_lt b (opow_ne_zero omega _))).elim