l3lab/ntp-mathlib huggingface dataset:
theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ := by
  cases' e₁ : split o₁ with a m
  cases' nf_repr_split e₁ with N₁ r₁
  cases' a with a0 n a'
  · cases' m with m
    · by_cases h : o₂ = 0 <;> simp [opow_def, opowAux2, opow, e₁, h, r₁]
      have := mt repr_inj.1 h
      rw [zero_opow this]
    · cases' e₂ : split' o₂ with b' k
      cases' nf_repr_split' e₂ with _ r₂
      by_cases h : m = 0
      · simp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]
      simp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr,
          opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero, _root_.zero_add, mul_one,
          add_zero, one_opow, npow_eq_pow]
      rw [opow_add, opow_mul, opow_omega, add_one_eq_succ]
      congr
      conv_lhs =>
        simp only [(· ^ ·)]
        simp [Pow.pow, opow, Ordinal.succ_ne_zero]
      · simpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)
      · rw [← Nat.cast_succ, lt_omega]
        

Proof state:
case neg.h
o₁ o₂ : ONote
inst✝¹ : NF o₁
inst✝ : NF o₂
N₁ : NF zero
m : ℕ
e₁ : split o₁ = (zero, Nat.succ m)
r₁ : repr o₁ = repr zero + ↑(Nat.succ m)
b' : ONote
k : ℕ
e₂ : split' o₂ = (b', k)
left✝ : NF b'
r₂ : repr o₂ = ω * repr b' + ↑k
h : ¬m = 0
⊢ ∃ n, ↑(Nat.succ m) = ↑n

Next tactic:
exact ⟨_, rfl⟩
theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ := by
  cases' e₁ : split o₁ with a m
  cases' nf_repr_split e₁ with N₁ r₁
  cases' a with a0 n a'
  · cases' m with m
    · by_cases h : o₂ = 0 <;> simp [opow_def, opowAux2, opow, e₁, h, r₁]
      have := mt repr_inj.1 h
      rw [zero_opow this]
    · cases' e₂ : split' o₂ with b' k
      cases' nf_repr_split' e₂ with _ r₂
      by_cases h : m = 0
      · simp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]
      simp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr,
          opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero, _root_.zero_add, mul_one,
          add_zero, one_opow, npow_eq_pow]
      rw [opow_add, opow_mul, opow_omega, add_one_eq_succ]
      congr
      conv_lhs =>
        simp only [(· ^ ·)]
        simp [Pow.pow, opow, Ordinal.succ_ne_zero]
      · simpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)
      · rw [← Nat.cast_succ, lt_omega]
        exact ⟨_, rfl⟩
  · 

Proof state:
case mk.intro.oadd
o₁ o₂ : ONote
inst✝¹ : NF o₁
inst✝ : NF o₂
m : ℕ
a0 : ONote
n : ℕ+
a' : ONote
e₁ : split o₁ = (oadd a0 n a', m)
N₁ : NF (oadd a0 n a')
r₁ : repr o₁ = repr (oadd a0 n a') + ↑m
⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂

Next tactic:
haveI := N₁.fst
theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ := by
  cases' e₁ : split o₁ with a m
  cases' nf_repr_split e₁ with N₁ r₁
  cases' a with a0 n a'
  · cases' m with m
    · by_cases h : o₂ = 0 <;> simp [opow_def, opowAux2, opow, e₁, h, r₁]
      have := mt repr_inj.1 h
      rw [zero_opow this]
    · cases' e₂ : split' o₂ with b' k
      cases' nf_repr_split' e₂ with _ r₂
      by_cases h : m = 0
      · simp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]
      simp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr,
          opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero, _root_.zero_add, mul_one,
          add_zero, one_opow, npow_eq_pow]
      rw [opow_add, opow_mul, opow_omega, add_one_eq_succ]
      congr
      conv_lhs =>
        simp only [(· ^ ·)]
        simp [Pow.pow, opow, Ordinal.succ_ne_zero]
      · simpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)
      · rw [← Nat.cast_succ, lt_omega]
        exact ⟨_, rfl⟩
  · haveI := N₁.fst
    

Proof state:
case mk.intro.oadd
o₁ o₂ : ONote
inst✝¹ : NF o₁
inst✝ : NF o₂
m : ℕ
a0 : ONote
n : ℕ+
a' : ONote
e₁ : split o₁ = (oadd a0 n a', m)
N₁ : NF (oadd a0 n a')
r₁ : repr o₁ = repr (oadd a0 n a') + ↑m
this : NF a0
⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂

Next tactic:
haveI := N₁.snd
theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ := by
  cases' e₁ : split o₁ with a m
  cases' nf_repr_split e₁ with N₁ r₁
  cases' a with a0 n a'
  · cases' m with m
    · by_cases h : o₂ = 0 <;> simp [opow_def, opowAux2, opow, e₁, h, r₁]
      have := mt repr_inj.1 h
      rw [zero_opow this]
    · cases' e₂ : split' o₂ with b' k
      cases' nf_repr_split' e₂ with _ r₂
      by_cases h : m = 0
      · simp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]
      simp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr,
          opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero, _root_.zero_add, mul_one,
          add_zero, one_opow, npow_eq_pow]
      rw [opow_add, opow_mul, opow_omega, add_one_eq_succ]
      congr
      conv_lhs =>
        simp only [(· ^ ·)]
        simp [Pow.pow, opow, Ordinal.succ_ne_zero]
      · simpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)
      · rw [← Nat.cast_succ, lt_omega]
        exact ⟨_, rfl⟩
  · haveI := N₁.fst
    haveI := N₁.snd
    

Proof state:
case mk.intro.oadd
o₁ o₂ : ONote
inst✝¹ : NF o₁
inst✝ : NF o₂
m : ℕ
a0 : ONote
n : ℕ+
a' : ONote
e₁ : split o₁ = (oadd a0 n a', m)
N₁ : NF (oadd a0 n a')
r₁ : repr o₁ = repr (oadd a0 n a') + ↑m
this✝ : NF a0
this : NF a'
⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂

Next tactic:
cases' N₁.of_dvd_omega (split_dvd e₁) with a00 ad
theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ := by
  cases' e₁ : split o₁ with a m
  cases' nf_repr_split e₁ with N₁ r₁
  cases' a with a0 n a'
  · cases' m with m
    · by_cases h : o₂ = 0 <;> simp [opow_def, opowAux2, opow, e₁, h, r₁]
      have := mt repr_inj.1 h
      rw [zero_opow this]
    · cases' e₂ : split' o₂ with b' k
      cases' nf_repr_split' e₂ with _ r₂
      by_cases h : m = 0
      · simp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]
      simp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr,
          opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero, _root_.zero_add, mul_one,
          add_zero, one_opow, npow_eq_pow]
      rw [opow_add, opow_mul, opow_omega, add_one_eq_succ]
      congr
      conv_lhs =>
        simp only [(· ^ ·)]
        simp [Pow.pow, opow, Ordinal.succ_ne_zero]
      · simpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)
      · rw [← Nat.cast_succ, lt_omega]
        exact ⟨_, rfl⟩
  · haveI := N₁.fst
    haveI := N₁.snd
    cases' N₁.of_dvd_omega (split_dvd e₁) with a00 ad
    

Proof state:
case mk.intro.oadd.intro
o₁ o₂ : ONote
inst✝¹ : NF o₁
inst✝ : NF o₂
m : ℕ
a0 : ONote
n : ℕ+
a' : ONote
e₁ : split o₁ = (oadd a0 n a', m)
N₁ : NF (oadd a0 n a')
r₁ : repr o₁ = repr (oadd a0 n a') + ↑m
this✝ : NF a0
this : NF a'
a00 : repr a0 ≠ 0
ad : ω ∣ repr a'
⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂

Next tactic:
have al := split_add_lt e₁
theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ := by
  cases' e₁ : split o₁ with a m
  cases' nf_repr_split e₁ with N₁ r₁
  cases' a with a0 n a'
  · cases' m with m
    · by_cases h : o₂ = 0 <;> simp [opow_def, opowAux2, opow, e₁, h, r₁]
      have := mt repr_inj.1 h
      rw [zero_opow this]
    · cases' e₂ : split' o₂ with b' k
      cases' nf_repr_split' e₂ with _ r₂
      by_cases h : m = 0
      · simp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]
      simp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr,
          opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero, _root_.zero_add, mul_one,
          add_zero, one_opow, npow_eq_pow]
      rw [opow_add, opow_mul, opow_omega, add_one_eq_succ]
      congr
      conv_lhs =>
        simp only [(· ^ ·)]
        simp [Pow.pow, opow, Ordinal.succ_ne_zero]
      · simpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)
      · rw [← Nat.cast_succ, lt_omega]
        exact ⟨_, rfl⟩
  · haveI := N₁.fst
    haveI := N₁.snd
    cases' N₁.of_dvd_omega (split_dvd e₁) with a00 ad
    have al := split_add_lt e₁
    

Proof state:
case mk.intro.oadd.intro
o₁ o₂ : ONote
inst✝¹ : NF o₁
inst✝ : NF o₂
m : ℕ
a0 : ONote
n : ℕ+
a' : ONote
e₁ : split o₁ = (oadd a0 n a', m)
N₁ : NF (oadd a0 n a')
r₁ : repr o₁ = repr (oadd a0 n a') + ↑m
this✝ : NF a0
this : NF a'
a00 : repr a0 ≠ 0
ad : ω ∣ repr a'
al : repr a' + ↑m < ω ^ repr a0
⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂

Next tactic:
have aa : repr (a' + ofNat m) = repr a' + m := by
      simp only [eq_self_iff_true, ONote.repr_ofNat, ONote.repr_add]
theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ := by
  cases' e₁ : split o₁ with a m
  cases' nf_repr_split e₁ with N₁ r₁
  cases' a with a0 n a'
  · cases' m with m
    · by_cases h : o₂ = 0 <;> simp [opow_def, opowAux2, opow, e₁, h, r₁]
      have := mt repr_inj.1 h
      rw [zero_opow this]
    · cases' e₂ : split' o₂ with b' k
      cases' nf_repr_split' e₂ with _ r₂
      by_cases h : m = 0
      · simp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]
      simp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr,
          opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero, _root_.zero_add, mul_one,
          add_zero, one_opow, npow_eq_pow]
      rw [opow_add, opow_mul, opow_omega, add_one_eq_succ]
      congr
      conv_lhs =>
        simp only [(· ^ ·)]
        simp [Pow.pow, opow, Ordinal.succ_ne_zero]
      · simpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)
      · rw [← Nat.cast_succ, lt_omega]
        exact ⟨_, rfl⟩
  · haveI := N₁.fst
    haveI := N₁.snd
    cases' N₁.of_dvd_omega (split_dvd e₁) with a00 ad
    have al := split_add_lt e₁
    have aa : repr (a' + ofNat m) = repr a' + m := by
      

Proof state:
o₁ o₂ : ONote
inst✝¹ : NF o₁
inst✝ : NF o₂
m : ℕ
a0 : ONote
n : ℕ+
a' : ONote
e₁ : split o₁ = (oadd a0 n a', m)
N₁ : NF (oadd a0 n a')
r₁ : repr o₁ = repr (oadd a0 n a') + ↑m
this✝ : NF a0
this : NF a'
a00 : repr a0 ≠ 0
ad : ω ∣ repr a'
al : repr a' + ↑m < ω ^ repr a0
⊢ repr (a' + ↑m) = repr a' + ↑m

Next tactic:
simp only [eq_self_iff_true, ONote.repr_ofNat, ONote.repr_add]
theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ := by
  cases' e₁ : split o₁ with a m
  cases' nf_repr_split e₁ with N₁ r₁
  cases' a with a0 n a'
  · cases' m with m
    · by_cases h : o₂ = 0 <;> simp [opow_def, opowAux2, opow, e₁, h, r₁]
      have := mt repr_inj.1 h
      rw [zero_opow this]
    · cases' e₂ : split' o₂ with b' k
      cases' nf_repr_split' e₂ with _ r₂
      by_cases h : m = 0
      · simp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]
      simp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr,
          opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero, _root_.zero_add, mul_one,
          add_zero, one_opow, npow_eq_pow]
      rw [opow_add, opow_mul, opow_omega, add_one_eq_succ]
      congr
      conv_lhs =>
        simp only [(· ^ ·)]
        simp [Pow.pow, opow, Ordinal.succ_ne_zero]
      · simpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)
      · rw [← Nat.cast_succ, lt_omega]
        exact ⟨_, rfl⟩
  · haveI := N₁.fst
    haveI := N₁.snd
    cases' N₁.of_dvd_omega (split_dvd e₁) with a00 ad
    have al := split_add_lt e₁
    have aa : repr (a' + ofNat m) = repr a' + m := by
      simp only [eq_self_iff_true, ONote.repr_ofNat, ONote.repr_add]
    

Proof state:
case mk.intro.oadd.intro
o₁ o₂ : ONote
inst✝¹ : NF o₁
inst✝ : NF o₂
m : ℕ
a0 : ONote
n : ℕ+
a' : ONote
e₁ : split o₁ = (oadd a0 n a', m)
N₁ : NF (oadd a0 n a')
r₁ : repr o₁ = repr (oadd a0 n a') + ↑m
this✝ : NF a0
this : NF a'
a00 : repr a0 ≠ 0
ad : ω ∣ repr a'
al : repr a' + ↑m < ω ^ repr a0
aa : repr (a' + ↑m) = repr a' + ↑m
⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂

Next tactic:
cases' e₂ : split' o₂ with b' k
theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ := by
  cases' e₁ : split o₁ with a m
  cases' nf_repr_split e₁ with N₁ r₁
  cases' a with a0 n a'
  · cases' m with m
    · by_cases h : o₂ = 0 <;> simp [opow_def, opowAux2, opow, e₁, h, r₁]
      have := mt repr_inj.1 h
      rw [zero_opow this]
    · cases' e₂ : split' o₂ with b' k
      cases' nf_repr_split' e₂ with _ r₂
      by_cases h : m = 0
      · simp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]
      simp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr,
          opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero, _root_.zero_add, mul_one,
          add_zero, one_opow, npow_eq_pow]
      rw [opow_add, opow_mul, opow_omega, add_one_eq_succ]
      congr
      conv_lhs =>
        simp only [(· ^ ·)]
        simp [Pow.pow, opow, Ordinal.succ_ne_zero]
      · simpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)
      · rw [← Nat.cast_succ, lt_omega]
        exact ⟨_, rfl⟩
  · haveI := N₁.fst
    haveI := N₁.snd
    cases' N₁.of_dvd_omega (split_dvd e₁) with a00 ad
    have al := split_add_lt e₁
    have aa : repr (a' + ofNat m) = repr a' + m := by
      simp only [eq_self_iff_true, ONote.repr_ofNat, ONote.repr_add]
    cases' e₂ : split' o₂ with b' k
    

Proof state:
case mk.intro.oadd.intro.mk
o₁ o₂ : ONote
inst✝¹ : NF o₁
inst✝ : NF o₂
m : ℕ
a0 : ONote
n : ℕ+
a' : ONote
e₁ : split o₁ = (oadd a0 n a', m)
N₁ : NF (oadd a0 n a')
r₁ : repr o₁ = repr (oadd a0 n a') + ↑m
this✝ : NF a0
this : NF a'
a00 : repr a0 ≠ 0
ad : ω ∣ repr a'
al : repr a' + ↑m < ω ^ repr a0
aa : repr (a' + ↑m) = repr a' + ↑m
b' : ONote
k : ℕ
e₂ : split' o₂ = (b', k)
⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂

Next tactic:
cases' nf_repr_split' e₂ with _ r₂
theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ := by
  cases' e₁ : split o₁ with a m
  cases' nf_repr_split e₁ with N₁ r₁
  cases' a with a0 n a'
  · cases' m with m
    · by_cases h : o₂ = 0 <;> simp [opow_def, opowAux2, opow, e₁, h, r₁]
      have := mt repr_inj.1 h
      rw [zero_opow this]
    · cases' e₂ : split' o₂ with b' k
      cases' nf_repr_split' e₂ with _ r₂
      by_cases h : m = 0
      · simp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]
      simp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr,
          opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero, _root_.zero_add, mul_one,
          add_zero, one_opow, npow_eq_pow]
      rw [opow_add, opow_mul, opow_omega, add_one_eq_succ]
      congr
      conv_lhs =>
        simp only [(· ^ ·)]
        simp [Pow.pow, opow, Ordinal.succ_ne_zero]
      · simpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)
      · rw [← Nat.cast_succ, lt_omega]
        exact ⟨_, rfl⟩
  · haveI := N₁.fst
    haveI := N₁.snd
    cases' N₁.of_dvd_omega (split_dvd e₁) with a00 ad
    have al := split_add_lt e₁
    have aa : repr (a' + ofNat m) = repr a' + m := by
      simp only [eq_self_iff_true, ONote.repr_ofNat, ONote.repr_add]
    cases' e₂ : split' o₂ with b' k
    cases' nf_repr_split' e₂ with _ r₂
    

Proof state:
case mk.intro.oadd.intro.mk.intro
o₁ o₂ : ONote
inst✝¹ : NF o₁
inst✝ : NF o₂
m : ℕ
a0 : ONote
n : ℕ+
a' : ONote
e₁ : split o₁ = (oadd a0 n a', m)
N₁ : NF (oadd a0 n a')
r₁ : repr o₁ = repr (oadd a0 n a') + ↑m
this✝ : NF a0
this : NF a'
a00 : repr a0 ≠ 0
ad : ω ∣ repr a'
al : repr a' + ↑m < ω ^ repr a0
aa : repr (a' + ↑m) = repr a' + ↑m
b' : ONote
k : ℕ
e₂ : split' o₂ = (b', k)
left✝ : NF b'
r₂ : repr o₂ = ω * repr b' + ↑k
⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂

Next tactic:
simp only [opow_def, opow, e₁, r₁, split_eq_scale_split' e₂, opowAux2, repr]
theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ := by
  cases' e₁ : split o₁ with a m
  cases' nf_repr_split e₁ with N₁ r₁
  cases' a with a0 n a'
  · cases' m with m
    · by_cases h : o₂ = 0 <;> simp [opow_def, opowAux2, opow, e₁, h, r₁]
      have := mt repr_inj.1 h
      rw [zero_opow this]
    · cases' e₂ : split' o₂ with b' k
      cases' nf_repr_split' e₂ with _ r₂
      by_cases h : m = 0
      · simp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]
      simp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr,
          opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero, _root_.zero_add, mul_one,
          add_zero, one_opow, npow_eq_pow]
      rw [opow_add, opow_mul, opow_omega, add_one_eq_succ]
      congr
      conv_lhs =>
        simp only [(· ^ ·)]
        simp [Pow.pow, opow, Ordinal.succ_ne_zero]
      · simpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)
      · rw [← Nat.cast_succ, lt_omega]
        exact ⟨_, rfl⟩
  · haveI := N₁.fst
    haveI := N₁.snd
    cases' N₁.of_dvd_omega (split_dvd e₁) with a00 ad
    have al := split_add_lt e₁
    have aa : repr (a' + ofNat m) = repr a' + m := by
      simp only [eq_self_iff_true, ONote.repr_ofNat, ONote.repr_add]
    cases' e₂ : split' o₂ with b' k
    cases' nf_repr_split' e₂ with _ r₂
    simp only [opow_def, opow, e₁, r₁, split_eq_scale_split' e₂, opowAux2, repr]
    

Proof state:
case mk.intro.oadd.intro.mk.intro
o₁ o₂ : ONote
inst✝¹ : NF o₁
inst✝ : NF o₂
m : ℕ
a0 : ONote
n : ℕ+
a' : ONote
e₁ : split o₁ = (oadd a0 n a', m)
N₁ : NF (oadd a0 n a')
r₁ : repr o₁ = repr (oadd a0 n a') + ↑m
this✝ : NF a0
this : NF a'
a00 : repr a0 ≠ 0
ad : ω ∣ repr a'
al : repr a' + ↑m < ω ^ repr a0
aa : repr (a' + ↑m) = repr a' + ↑m
b' : ONote
k : ℕ
e₂ : split' o₂ = (b', k)
left✝ : NF b'
r₂ : repr o₂ = ω * repr b' + ↑k
⊢ repr
      (match (scale 1 b', k) with
      | (b, 0) => oadd (a0 * b) 1 0
      | (b, Nat.succ k) =>
        scale (a0 * b + mulNat a0 k) (oadd a0 n a') + opowAux (a0 * b) a0 (mulNat (oadd a0 n a') m) k m) =
    (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ repr o₂

Next tactic:
cases' k with k
theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ := by
  cases' e₁ : split o₁ with a m
  cases' nf_repr_split e₁ with N₁ r₁
  cases' a with a0 n a'
  · cases' m with m
    · by_cases h : o₂ = 0 <;> simp [opow_def, opowAux2, opow, e₁, h, r₁]
      have := mt repr_inj.1 h
      rw [zero_opow this]
    · cases' e₂ : split' o₂ with b' k
      cases' nf_repr_split' e₂ with _ r₂
      by_cases h : m = 0
      · simp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]
      simp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr,
          opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero, _root_.zero_add, mul_one,
          add_zero, one_opow, npow_eq_pow]
      rw [opow_add, opow_mul, opow_omega, add_one_eq_succ]
      congr
      conv_lhs =>
        simp only [(· ^ ·)]
        simp [Pow.pow, opow, Ordinal.succ_ne_zero]
      · simpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)
      · rw [← Nat.cast_succ, lt_omega]
        exact ⟨_, rfl⟩
  · haveI := N₁.fst
    haveI := N₁.snd
    cases' N₁.of_dvd_omega (split_dvd e₁) with a00 ad
    have al := split_add_lt e₁
    have aa : repr (a' + ofNat m) = repr a' + m := by
      simp only [eq_self_iff_true, ONote.repr_ofNat, ONote.repr_add]
    cases' e₂ : split' o₂ with b' k
    cases' nf_repr_split' e₂ with _ r₂
    simp only [opow_def, opow, e₁, r₁, split_eq_scale_split' e₂, opowAux2, repr]
    cases' k with k <;> 

Proof state:
case mk.intro.oadd.intro.mk.intro.zero
o₁ o₂ : ONote
inst✝¹ : NF o₁
inst✝ : NF o₂
m : ℕ
a0 : ONote
n : ℕ+
a' : ONote
e₁ : split o₁ = (oadd a0 n a', m)
N₁ : NF (oadd a0 n a')
r₁ : repr o₁ = repr (oadd a0 n a') + ↑m
this✝ : NF a0
this : NF a'
a00 : repr a0 ≠ 0
ad : ω ∣ repr a'
al : repr a' + ↑m < ω ^ repr a0
aa : repr (a' + ↑m) = repr a' + ↑m
b' : ONote
left✝ : NF b'
e₂ : split' o₂ = (b', Nat.zero)
r₂ : repr o₂ = ω * repr b' + ↑Nat.zero
⊢ repr
      (match (scale 1 b', Nat.zero) with
      | (b, 0) => oadd (a0 * b) 1 0
      | (b, Nat.succ k) =>
        scale (a0 * b + mulNat a0 k) (oadd a0 n a') + opowAux (a0 * b) a0 (mulNat (oadd a0 n a') m) k m) =
    (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ repr o₂

Next tactic:
skip
theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ := by
  cases' e₁ : split o₁ with a m
  cases' nf_repr_split e₁ with N₁ r₁
  cases' a with a0 n a'
  · cases' m with m
    · by_cases h : o₂ = 0 <;> simp [opow_def, opowAux2, opow, e₁, h, r₁]
      have := mt repr_inj.1 h
      rw [zero_opow this]
    · cases' e₂ : split' o₂ with b' k
      cases' nf_repr_split' e₂ with _ r₂
      by_cases h : m = 0
      · simp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]
      simp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr,
          opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero, _root_.zero_add, mul_one,
          add_zero, one_opow, npow_eq_pow]
      rw [opow_add, opow_mul, opow_omega, add_one_eq_succ]
      congr
      conv_lhs =>
        simp only [(· ^ ·)]
        simp [Pow.pow, opow, Ordinal.succ_ne_zero]
      · simpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)
      · rw [← Nat.cast_succ, lt_omega]
        exact ⟨_, rfl⟩
  · haveI := N₁.fst
    haveI := N₁.snd
    cases' N₁.of_dvd_omega (split_dvd e₁) with a00 ad
    have al := split_add_lt e₁
    have aa : repr (a' + ofNat m) = repr a' + m := by
      simp only [eq_self_iff_true, ONote.repr_ofNat, ONote.repr_add]
    cases' e₂ : split' o₂ with b' k
    cases' nf_repr_split' e₂ with _ r₂
    simp only [opow_def, opow, e₁, r₁, split_eq_scale_split' e₂, opowAux2, repr]
    cases' k with k <;> 

Proof state:
case mk.intro.oadd.intro.mk.intro.succ
o₁ o₂ : ONote
inst✝¹ : NF o₁
inst✝ : NF o₂
m : ℕ
a0 : ONote
n : ℕ+
a' : ONote
e₁ : split o₁ = (oadd a0 n a', m)
N₁ : NF (oadd a0 n a')
r₁ : repr o₁ = repr (oadd a0 n a') + ↑m
this✝ : NF a0
this : NF a'
a00 : repr a0 ≠ 0
ad : ω ∣ repr a'
al : repr a' + ↑m < ω ^ repr a0
aa : repr (a' + ↑m) = repr a' + ↑m
b' : ONote
left✝ : NF b'
k : ℕ
e₂ : split' o₂ = (b', Nat.succ k)
r₂ : repr o₂ = ω * repr b' + ↑(Nat.succ k)
⊢ repr
      (match (scale 1 b', Nat.succ k) with
      | (b, 0) => oadd (a0 * b) 1 0
      | (b, Nat.succ k) =>
        scale (a0 * b + mulNat a0 k) (oadd a0 n a') + opowAux (a0 * b) a0 (mulNat (oadd a0 n a') m) k m) =
    (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ repr o₂

Next tactic:
skip
theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ := by
  cases' e₁ : split o₁ with a m
  cases' nf_repr_split e₁ with N₁ r₁
  cases' a with a0 n a'
  · cases' m with m
    · by_cases h : o₂ = 0 <;> simp [opow_def, opowAux2, opow, e₁, h, r₁]
      have := mt repr_inj.1 h
      rw [zero_opow this]
    · cases' e₂ : split' o₂ with b' k
      cases' nf_repr_split' e₂ with _ r₂
      by_cases h : m = 0
      · simp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]
      simp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr,
          opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero, _root_.zero_add, mul_one,
          add_zero, one_opow, npow_eq_pow]
      rw [opow_add, opow_mul, opow_omega, add_one_eq_succ]
      congr
      conv_lhs =>
        simp only [(· ^ ·)]
        simp [Pow.pow, opow, Ordinal.succ_ne_zero]
      · simpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)
      · rw [← Nat.cast_succ, lt_omega]
        exact ⟨_, rfl⟩
  · haveI := N₁.fst
    haveI := N₁.snd
    cases' N₁.of_dvd_omega (split_dvd e₁) with a00 ad
    have al := split_add_lt e₁
    have aa : repr (a' + ofNat m) = repr a' + m := by
      simp only [eq_self_iff_true, ONote.repr_ofNat, ONote.repr_add]
    cases' e₂ : split' o₂ with b' k
    cases' nf_repr_split' e₂ with _ r₂
    simp only [opow_def, opow, e₁, r₁, split_eq_scale_split' e₂, opowAux2, repr]
    cases' k with k <;> skip
    · 

Proof state:
case mk.intro.oadd.intro.mk.intro.zero
o₁ o₂ : ONote
inst✝¹ : NF o₁
inst✝ : NF o₂
m : ℕ
a0 : ONote
n : ℕ+
a' : ONote
e₁ : split o₁ = (oadd a0 n a', m)
N₁ : NF (oadd a0 n a')
r₁ : repr o₁ = repr (oadd a0 n a') + ↑m
this✝ : NF a0
this : NF a'
a00 : repr a0 ≠ 0
ad : ω ∣ repr a'
al : repr a' + ↑m < ω ^ repr a0
aa : repr (a' + ↑m) = repr a' + ↑m
b' : ONote
left✝ : NF b'
e₂ : split' o₂ = (b', Nat.zero)
r₂ : repr o₂ = ω * repr b' + ↑Nat.zero
⊢ repr
      (match (scale 1 b', Nat.zero) with
      | (b, 0) => oadd (a0 * b) 1 0
      | (b, Nat.succ k) =>
        scale (a0 * b + mulNat a0 k) (oadd a0 n a') + opowAux (a0 * b) a0 (mulNat (oadd a0 n a') m) k m) =
    (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ repr o₂

Next tactic:
simp [opow, r₂, opow_mul, repr_opow_aux₁ a00 al aa,
        add_assoc, split_eq_scale_split' e₂]