l3lab/ntp-mathlib huggingface dataset:
theorem scale_opowAux (e a0 a : ONote) [NF e] [NF a0] [NF a] :
    ∀ k m, repr (opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a k m)
  | 0, m => by cases m <;> simp [opowAux]
  | k + 1, m => by
    by_cases h : m = 0
    · 

Proof state:
case pos
e a0 a : ONote
inst✝² : NF e
inst✝¹ : NF a0
inst✝ : NF a
k m : ℕ
h : m = 0
⊢ repr (opowAux e a0 a (k + 1) m) = ω ^ repr e * repr (opowAux 0 a0 a (k + 1) m)

Next tactic:
simp [h, opowAux, mul_add, opow_add, mul_assoc, scale_opowAux _ _ _ k]
theorem scale_opowAux (e a0 a : ONote) [NF e] [NF a0] [NF a] :
    ∀ k m, repr (opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a k m)
  | 0, m => by cases m <;> simp [opowAux]
  | k + 1, m => by
    by_cases h : m = 0
    · simp [h, opowAux, mul_add, opow_add, mul_assoc, scale_opowAux _ _ _ k]
    · -- Porting note: rewrote proof
      

Proof state:
case neg
e a0 a : ONote
inst✝² : NF e
inst✝¹ : NF a0
inst✝ : NF a
k m : ℕ
h : ¬m = 0
⊢ repr (opowAux e a0 a (k + 1) m) = ω ^ repr e * repr (opowAux 0 a0 a (k + 1) m)

Next tactic:
rw [opowAux]
theorem scale_opowAux (e a0 a : ONote) [NF e] [NF a0] [NF a] :
    ∀ k m, repr (opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a k m)
  | 0, m => by cases m <;> simp [opowAux]
  | k + 1, m => by
    by_cases h : m = 0
    · simp [h, opowAux, mul_add, opow_add, mul_assoc, scale_opowAux _ _ _ k]
    · -- Porting note: rewrote proof
      rw [opowAux]; 

Proof state:
case neg
e a0 a : ONote
inst✝² : NF e
inst✝¹ : NF a0
inst✝ : NF a
k m : ℕ
h : ¬m = 0
⊢ repr (scale (e + mulNat a0 k) a + opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a (k + 1) m)
case neg.x_2 e a0 a : ONote inst✝² : NF e inst✝¹ : NF a0 inst✝ : NF a k m : ℕ h : ¬m = 0 ⊢ m = 0 → False

Next tactic:
swap
theorem scale_opowAux (e a0 a : ONote) [NF e] [NF a0] [NF a] :
    ∀ k m, repr (opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a k m)
  | 0, m => by cases m <;> simp [opowAux]
  | k + 1, m => by
    by_cases h : m = 0
    · simp [h, opowAux, mul_add, opow_add, mul_assoc, scale_opowAux _ _ _ k]
    · -- Porting note: rewrote proof
      rw [opowAux]; swap; 

Proof state:
case neg.x_2
e a0 a : ONote
inst✝² : NF e
inst✝¹ : NF a0
inst✝ : NF a
k m : ℕ
h : ¬m = 0
⊢ m = 0 → False
case neg
e a0 a : ONote
inst✝² : NF e
inst✝¹ : NF a0
inst✝ : NF a
k m : ℕ
h : ¬m = 0
⊢ repr (scale (e + mulNat a0 k) a + opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a (k + 1) m)

Next tactic:
assumption
theorem scale_opowAux (e a0 a : ONote) [NF e] [NF a0] [NF a] :
    ∀ k m, repr (opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a k m)
  | 0, m => by cases m <;> simp [opowAux]
  | k + 1, m => by
    by_cases h : m = 0
    · simp [h, opowAux, mul_add, opow_add, mul_assoc, scale_opowAux _ _ _ k]
    · -- Porting note: rewrote proof
      rw [opowAux]; swap; assumption
      

Proof state:
case neg
e a0 a : ONote
inst✝² : NF e
inst✝¹ : NF a0
inst✝ : NF a
k m : ℕ
h : ¬m = 0
⊢ repr (scale (e + mulNat a0 k) a + opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a (k + 1) m)

Next tactic:
rw [opowAux]
theorem scale_opowAux (e a0 a : ONote) [NF e] [NF a0] [NF a] :
    ∀ k m, repr (opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a k m)
  | 0, m => by cases m <;> simp [opowAux]
  | k + 1, m => by
    by_cases h : m = 0
    · simp [h, opowAux, mul_add, opow_add, mul_assoc, scale_opowAux _ _ _ k]
    · -- Porting note: rewrote proof
      rw [opowAux]; swap; assumption
      rw [opowAux]; 

Proof state:
case neg
e a0 a : ONote
inst✝² : NF e
inst✝¹ : NF a0
inst✝ : NF a
k m : ℕ
h : ¬m = 0
⊢ repr (scale (e + mulNat a0 k) a + opowAux e a0 a k m) =
    ω ^ repr e * repr (scale (0 + mulNat a0 k) a + opowAux 0 a0 a k m)
case neg.x_2 e a0 a : ONote inst✝² : NF e inst✝¹ : NF a0 inst✝ : NF a k m : ℕ h : ¬m = 0 ⊢ m = 0 → False

Next tactic:
swap
theorem scale_opowAux (e a0 a : ONote) [NF e] [NF a0] [NF a] :
    ∀ k m, repr (opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a k m)
  | 0, m => by cases m <;> simp [opowAux]
  | k + 1, m => by
    by_cases h : m = 0
    · simp [h, opowAux, mul_add, opow_add, mul_assoc, scale_opowAux _ _ _ k]
    · -- Porting note: rewrote proof
      rw [opowAux]; swap; assumption
      rw [opowAux]; swap; 

Proof state:
case neg.x_2
e a0 a : ONote
inst✝² : NF e
inst✝¹ : NF a0
inst✝ : NF a
k m : ℕ
h : ¬m = 0
⊢ m = 0 → False
case neg
e a0 a : ONote
inst✝² : NF e
inst✝¹ : NF a0
inst✝ : NF a
k m : ℕ
h : ¬m = 0
⊢ repr (scale (e + mulNat a0 k) a + opowAux e a0 a k m) =
    ω ^ repr e * repr (scale (0 + mulNat a0 k) a + opowAux 0 a0 a k m)

Next tactic:
assumption
theorem scale_opowAux (e a0 a : ONote) [NF e] [NF a0] [NF a] :
    ∀ k m, repr (opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a k m)
  | 0, m => by cases m <;> simp [opowAux]
  | k + 1, m => by
    by_cases h : m = 0
    · simp [h, opowAux, mul_add, opow_add, mul_assoc, scale_opowAux _ _ _ k]
    · -- Porting note: rewrote proof
      rw [opowAux]; swap; assumption
      rw [opowAux]; swap; assumption
      

Proof state:
case neg
e a0 a : ONote
inst✝² : NF e
inst✝¹ : NF a0
inst✝ : NF a
k m : ℕ
h : ¬m = 0
⊢ repr (scale (e + mulNat a0 k) a + opowAux e a0 a k m) =
    ω ^ repr e * repr (scale (0 + mulNat a0 k) a + opowAux 0 a0 a k m)

Next tactic:
rw [repr_add, repr_scale, scale_opowAux _ _ _ k]
theorem scale_opowAux (e a0 a : ONote) [NF e] [NF a0] [NF a] :
    ∀ k m, repr (opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a k m)
  | 0, m => by cases m <;> simp [opowAux]
  | k + 1, m => by
    by_cases h : m = 0
    · simp [h, opowAux, mul_add, opow_add, mul_assoc, scale_opowAux _ _ _ k]
    · -- Porting note: rewrote proof
      rw [opowAux]; swap; assumption
      rw [opowAux]; swap; assumption
      rw [repr_add, repr_scale, scale_opowAux _ _ _ k]
      

Proof state:
case neg
e a0 a : ONote
inst✝² : NF e
inst✝¹ : NF a0
inst✝ : NF a
k m : ℕ
h : ¬m = 0
⊢ ω ^ repr (e + mulNat a0 k) * repr a + ω ^ repr e * repr (opowAux 0 a0 a k m) =
    ω ^ repr e * repr (scale (0 + mulNat a0 k) a + opowAux 0 a0 a k m)

Next tactic:
simp only [repr_add, repr_scale, opow_add, mul_assoc, zero_add, mul_add]
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  

Proof state:
e a : ONote
Ne : NF e
Na : NF a
a' : Ordinal.{0}
e0 : repr e ≠ 0
h : a' < ω ^ repr e
aa : repr a = a'
n : ℕ+
⊢ (ω ^ repr e * ↑↑n + a') ^ ω = (ω ^ repr e) ^ ω

Next tactic:
subst aa
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  

Proof state:
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h : repr a < ω ^ repr e
⊢ (ω ^ repr e * ↑↑n + repr a) ^ ω = (ω ^ repr e) ^ ω

Next tactic:
have No := Ne.oadd n (Na.below_of_lt' h)
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  

Proof state:
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h : repr a < ω ^ repr e
No : NF (oadd e n a)
⊢ (ω ^ repr e * ↑↑n + repr a) ^ ω = (ω ^ repr e) ^ ω

Next tactic:
have := omega_le_oadd e n a
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  

Proof state:
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h : repr a < ω ^ repr e
No : NF (oadd e n a)
this : ω ^ repr e ≤ repr (oadd e n a)
⊢ (ω ^ repr e * ↑↑n + repr a) ^ ω = (ω ^ repr e) ^ ω

Next tactic:
rw [repr] at this
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  rw [repr] at this
  

Proof state:
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h : repr a < ω ^ repr e
No : NF (oadd e n a)
this : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a
⊢ (ω ^ repr e * ↑↑n + repr a) ^ ω = (ω ^ repr e) ^ ω

Next tactic:
refine' le_antisymm _ (opow_le_opow_left _ this)
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  rw [repr] at this
  refine' le_antisymm _ (opow_le_opow_left _ this)
  

Proof state:
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h : repr a < ω ^ repr e
No : NF (oadd e n a)
this : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a
⊢ (ω ^ repr e * ↑↑n + repr a) ^ ω ≤ (ω ^ repr e) ^ ω

Next tactic:
apply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_isLimit).2
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  rw [repr] at this
  refine' le_antisymm _ (opow_le_opow_left _ this)
  apply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_isLimit).2
  

Proof state:
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h : repr a < ω ^ repr e
No : NF (oadd e n a)
this : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a
⊢ ∀ b' < ω, (ω ^ repr e * ↑↑n + repr a) ^ b' ≤ (ω ^ repr e) ^ ω

Next tactic:
intro b l
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  rw [repr] at this
  refine' le_antisymm _ (opow_le_opow_left _ this)
  apply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_isLimit).2
  intro b l
  

Proof state:
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h : repr a < ω ^ repr e
No : NF (oadd e n a)
this : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a
b : Ordinal.{0}
l : b < ω
⊢ (ω ^ repr e * ↑↑n + repr a) ^ b ≤ (ω ^ repr e) ^ ω

Next tactic:
have := (No.below_of_lt (lt_succ _)).repr_lt
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  rw [repr] at this
  refine' le_antisymm _ (opow_le_opow_left _ this)
  apply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_isLimit).2
  intro b l
  have := (No.below_of_lt (lt_succ _)).repr_lt
  

Proof state:
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h : repr a < ω ^ repr e
No : NF (oadd e n a)
this✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a
b : Ordinal.{0}
l : b < ω
this : repr (oadd e n a) < ω ^ succ (repr e)
⊢ (ω ^ repr e * ↑↑n + repr a) ^ b ≤ (ω ^ repr e) ^ ω

Next tactic:
rw [repr] at this
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  rw [repr] at this
  refine' le_antisymm _ (opow_le_opow_left _ this)
  apply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_isLimit).2
  intro b l
  have := (No.below_of_lt (lt_succ _)).repr_lt
  rw [repr] at this
  

Proof state:
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h : repr a < ω ^ repr e
No : NF (oadd e n a)
this✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a
b : Ordinal.{0}
l : b < ω
this : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)
⊢ (ω ^ repr e * ↑↑n + repr a) ^ b ≤ (ω ^ repr e) ^ ω

Next tactic:
apply (opow_le_opow_left b <| this.le).trans
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  rw [repr] at this
  refine' le_antisymm _ (opow_le_opow_left _ this)
  apply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_isLimit).2
  intro b l
  have := (No.below_of_lt (lt_succ _)).repr_lt
  rw [repr] at this
  apply (opow_le_opow_left b <| this.le).trans
  

Proof state:
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h : repr a < ω ^ repr e
No : NF (oadd e n a)
this✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a
b : Ordinal.{0}
l : b < ω
this : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)
⊢ (ω ^ succ (repr e)) ^ b ≤ (ω ^ repr e) ^ ω

Next tactic:
rw [← opow_mul, ← opow_mul]
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  rw [repr] at this
  refine' le_antisymm _ (opow_le_opow_left _ this)
  apply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_isLimit).2
  intro b l
  have := (No.below_of_lt (lt_succ _)).repr_lt
  rw [repr] at this
  apply (opow_le_opow_left b <| this.le).trans
  rw [← opow_mul, ← opow_mul]
  

Proof state:
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h : repr a < ω ^ repr e
No : NF (oadd e n a)
this✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a
b : Ordinal.{0}
l : b < ω
this : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)
⊢ ω ^ (succ (repr e) * b) ≤ ω ^ (repr e * ω)

Next tactic:
apply opow_le_opow_right omega_pos
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  rw [repr] at this
  refine' le_antisymm _ (opow_le_opow_left _ this)
  apply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_isLimit).2
  intro b l
  have := (No.below_of_lt (lt_succ _)).repr_lt
  rw [repr] at this
  apply (opow_le_opow_left b <| this.le).trans
  rw [← opow_mul, ← opow_mul]
  apply opow_le_opow_right omega_pos
  

Proof state:
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h : repr a < ω ^ repr e
No : NF (oadd e n a)
this✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a
b : Ordinal.{0}
l : b < ω
this : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)
⊢ succ (repr e) * b ≤ repr e * ω

Next tactic:
rcases le_or_lt ω (repr e) with h | h
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  rw [repr] at this
  refine' le_antisymm _ (opow_le_opow_left _ this)
  apply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_isLimit).2
  intro b l
  have := (No.below_of_lt (lt_succ _)).repr_lt
  rw [repr] at this
  apply (opow_le_opow_left b <| this.le).trans
  rw [← opow_mul, ← opow_mul]
  apply opow_le_opow_right omega_pos
  rcases le_or_lt ω (repr e) with h | h
  · 

Proof state:
case inl
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h✝ : repr a < ω ^ repr e
No : NF (oadd e n a)
this✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a
b : Ordinal.{0}
l : b < ω
this : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)
h : ω ≤ repr e
⊢ succ (repr e) * b ≤ repr e * ω

Next tactic:
apply (mul_le_mul_left' (le_succ b) _).trans
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  rw [repr] at this
  refine' le_antisymm _ (opow_le_opow_left _ this)
  apply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_isLimit).2
  intro b l
  have := (No.below_of_lt (lt_succ _)).repr_lt
  rw [repr] at this
  apply (opow_le_opow_left b <| this.le).trans
  rw [← opow_mul, ← opow_mul]
  apply opow_le_opow_right omega_pos
  rcases le_or_lt ω (repr e) with h | h
  · apply (mul_le_mul_left' (le_succ b) _).trans
    

Proof state:
case inl
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h✝ : repr a < ω ^ repr e
No : NF (oadd e n a)
this✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a
b : Ordinal.{0}
l : b < ω
this : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)
h : ω ≤ repr e
⊢ succ (repr e) * succ b ≤ repr e * ω

Next tactic:
rw [← add_one_eq_succ, add_mul_succ _ (one_add_of_omega_le h), add_one_eq_succ, succ_le_iff,
      Ordinal.mul_lt_mul_iff_left (Ordinal.pos_iff_ne_zero.2 e0)]
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  rw [repr] at this
  refine' le_antisymm _ (opow_le_opow_left _ this)
  apply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_isLimit).2
  intro b l
  have := (No.below_of_lt (lt_succ _)).repr_lt
  rw [repr] at this
  apply (opow_le_opow_left b <| this.le).trans
  rw [← opow_mul, ← opow_mul]
  apply opow_le_opow_right omega_pos
  rcases le_or_lt ω (repr e) with h | h
  · apply (mul_le_mul_left' (le_succ b) _).trans
    rw [← add_one_eq_succ, add_mul_succ _ (one_add_of_omega_le h), add_one_eq_succ, succ_le_iff,
      Ordinal.mul_lt_mul_iff_left (Ordinal.pos_iff_ne_zero.2 e0)]
    

Proof state:
case inl
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h✝ : repr a < ω ^ repr e
No : NF (oadd e n a)
this✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a
b : Ordinal.{0}
l : b < ω
this : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)
h : ω ≤ repr e
⊢ succ b < ω

Next tactic:
exact omega_isLimit.2 _ l
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  rw [repr] at this
  refine' le_antisymm _ (opow_le_opow_left _ this)
  apply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_isLimit).2
  intro b l
  have := (No.below_of_lt (lt_succ _)).repr_lt
  rw [repr] at this
  apply (opow_le_opow_left b <| this.le).trans
  rw [← opow_mul, ← opow_mul]
  apply opow_le_opow_right omega_pos
  rcases le_or_lt ω (repr e) with h | h
  · apply (mul_le_mul_left' (le_succ b) _).trans
    rw [← add_one_eq_succ, add_mul_succ _ (one_add_of_omega_le h), add_one_eq_succ, succ_le_iff,
      Ordinal.mul_lt_mul_iff_left (Ordinal.pos_iff_ne_zero.2 e0)]
    exact omega_isLimit.2 _ l
  · 

Proof state:
case inr
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h✝ : repr a < ω ^ repr e
No : NF (oadd e n a)
this✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a
b : Ordinal.{0}
l : b < ω
this : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)
h : repr e < ω
⊢ succ (repr e) * b ≤ repr e * ω

Next tactic:
apply (principal_mul_omega (omega_isLimit.2 _ h) l).le.trans
theorem repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : Ordinal} (e0 : repr e ≠ 0)
    (h : a' < (ω : Ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
    ((ω : Ordinal.{0}) ^ repr e * (n : ℕ) + a') ^ (ω : Ordinal.{0}) =
      (ω ^ repr e) ^ (ω : Ordinal.{0}) := by
  subst aa
  have No := Ne.oadd n (Na.below_of_lt' h)
  have := omega_le_oadd e n a
  rw [repr] at this
  refine' le_antisymm _ (opow_le_opow_left _ this)
  apply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_isLimit).2
  intro b l
  have := (No.below_of_lt (lt_succ _)).repr_lt
  rw [repr] at this
  apply (opow_le_opow_left b <| this.le).trans
  rw [← opow_mul, ← opow_mul]
  apply opow_le_opow_right omega_pos
  rcases le_or_lt ω (repr e) with h | h
  · apply (mul_le_mul_left' (le_succ b) _).trans
    rw [← add_one_eq_succ, add_mul_succ _ (one_add_of_omega_le h), add_one_eq_succ, succ_le_iff,
      Ordinal.mul_lt_mul_iff_left (Ordinal.pos_iff_ne_zero.2 e0)]
    exact omega_isLimit.2 _ l
  · apply (principal_mul_omega (omega_isLimit.2 _ h) l).le.trans
    

Proof state:
case inr
e a : ONote
Ne : NF e
Na : NF a
e0 : repr e ≠ 0
n : ℕ+
h✝ : repr a < ω ^ repr e
No : NF (oadd e n a)
this✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a
b : Ordinal.{0}
l : b < ω
this : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)
h : repr e < ω
⊢ ω ≤ repr e * ω

Next tactic:
simpa using mul_le_mul_right' (one_le_iff_ne_zero.2 e0) ω
set_option linter.unusedVariables false in
theorem repr_opow_aux₂ {a0 a'} [N0 : NF a0] [Na' : NF a'] (m : ℕ) (d : ω ∣ repr a')
    (e0 : repr a0 ≠ 0) (h : repr a' + m < (ω ^ repr a0)) (n : ℕ+) (k : ℕ) :
    let R := repr (opowAux 0 a0 (oadd a0 n a' * ofNat m) k m)
    (k ≠ 0 → R < ((ω ^ repr a0) ^ succ (k : Ordinal))) ∧
      ((ω ^ repr a0) ^ (k : Ordinal)) * ((ω ^ repr a0) * (n : ℕ) + repr a') + R =
        ((ω ^ repr a0) * (n : ℕ) + repr a' + m) ^ succ (k : Ordinal) := by
  

Proof state:
a0 a' : ONote
N0 : NF a0
Na' : NF a'
m : ℕ
d : ω ∣ repr a'
e0 : repr a0 ≠ 0
h : repr a' + ↑m < ω ^ repr a0
n : ℕ+
k : ℕ
⊢ let R := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m);
  (k ≠ 0 → R < (ω ^ repr a0) ^ succ ↑k) ∧
    (ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a') + R = (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑k

Next tactic:
intro R'
set_option linter.unusedVariables false in
theorem repr_opow_aux₂ {a0 a'} [N0 : NF a0] [Na' : NF a'] (m : ℕ) (d : ω ∣ repr a')
    (e0 : repr a0 ≠ 0) (h : repr a' + m < (ω ^ repr a0)) (n : ℕ+) (k : ℕ) :
    let R := repr (opowAux 0 a0 (oadd a0 n a' * ofNat m) k m)
    (k ≠ 0 → R < ((ω ^ repr a0) ^ succ (k : Ordinal))) ∧
      ((ω ^ repr a0) ^ (k : Ordinal)) * ((ω ^ repr a0) * (n : ℕ) + repr a') + R =
        ((ω ^ repr a0) * (n : ℕ) + repr a' + m) ^ succ (k : Ordinal) := by
  intro R'
  

Proof state:
a0 a' : ONote
N0 : NF a0
Na' : NF a'
m : ℕ
d : ω ∣ repr a'
e0 : repr a0 ≠ 0
h : repr a' + ↑m < ω ^ repr a0
n : ℕ+
k : ℕ
R' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)
⊢ (k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑k) ∧
    (ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a') + R' = (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑k

Next tactic:
haveI No : NF (oadd a0 n a') :=
    N0.oadd n (Na'.below_of_lt' <| lt_of_le_of_lt (le_add_right _ _) h)