l3lab/ntp-mathlib huggingface dataset:
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
⊢ a✝ * (b✝ + c✝) = a✝ * b✝ + a✝ * c✝

Next tactic:
ext
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; 

Proof state:
case refine'_1.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
x✝ : α → ℕ
⊢ (a✝ * (b✝ + c✝)) x✝ = (a✝ * b✝ + a✝ * c✝) x✝

Next tactic:
simp only [add_apply, mul_apply]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        

Proof state:
case refine'_1.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
x✝ : α → ℕ
⊢ a✝ x✝ * (b✝ x✝ + c✝ x✝) = a✝ x✝ * b✝ x✝ + a✝ x✝ * c✝ x✝

Next tactic:
first
          | rw [mul_add]
          | rw [add_mul]
          | rw [zero_apply, zero_mul]
          | rw [zero_apply, mul_zero]
          | rw [← mul_assoc]
          | rw [one_apply, one_mul]
          | rw [one_apply, mul_one]
          | rw [mul_comm]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | 

Proof state:
case refine'_1.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
x✝ : α → ℕ
⊢ a✝ x✝ * (b✝ x✝ + c✝ x✝) = a✝ x✝ * b✝ x✝ + a✝ x✝ * c✝ x✝

Next tactic:
rw [mul_add]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
⊢ ∀ (a b c : Poly α), (a + b) * c = a * c + b * c

Next tactic:
intros
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
⊢ (a✝ + b✝) * c✝ = a✝ * c✝ + b✝ * c✝

Next tactic:
first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | rw [mul_add]
          | rw [add_mul]
          | rw [zero_apply, zero_mul]
          | rw [zero_apply, mul_zero]
          | rw [← mul_assoc]
          | rw [one_apply, one_mul]
          | rw [one_apply, mul_one]
          | rw [mul_comm]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
⊢ (a✝ + b✝) * c✝ = a✝ * c✝ + b✝ * c✝

Next tactic:
rfl
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
⊢ (a✝ + b✝) * c✝ = a✝ * c✝ + b✝ * c✝

Next tactic:
ext
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; 

Proof state:
case refine'_2.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
x✝ : α → ℕ
⊢ ((a✝ + b✝) * c✝) x✝ = (a✝ * c✝ + b✝ * c✝) x✝

Next tactic:
simp only [add_apply, mul_apply]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        

Proof state:
case refine'_2.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
x✝ : α → ℕ
⊢ (a✝ x✝ + b✝ x✝) * c✝ x✝ = a✝ x✝ * c✝ x✝ + b✝ x✝ * c✝ x✝

Next tactic:
first
          | rw [mul_add]
          | rw [add_mul]
          | rw [zero_apply, zero_mul]
          | rw [zero_apply, mul_zero]
          | rw [← mul_assoc]
          | rw [one_apply, one_mul]
          | rw [one_apply, mul_one]
          | rw [mul_comm]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | 

Proof state:
case refine'_2.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
x✝ : α → ℕ
⊢ (a✝ x✝ + b✝ x✝) * c✝ x✝ = a✝ x✝ * c✝ x✝ + b✝ x✝ * c✝ x✝

Next tactic:
rw [mul_add]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | rw [mul_add]
          | 

Proof state:
case refine'_2.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
x✝ : α → ℕ
⊢ (a✝ x✝ + b✝ x✝) * c✝ x✝ = a✝ x✝ * c✝ x✝ + b✝ x✝ * c✝ x✝

Next tactic:
rw [add_mul]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    

Proof state:
case refine'_3
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
⊢ ∀ (a : Poly α), 0 * a = 0

Next tactic:
intros
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    

Proof state:
case refine'_3
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
⊢ 0 * a✝ = 0

Next tactic:
first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | rw [mul_add]
          | rw [add_mul]
          | rw [zero_apply, zero_mul]
          | rw [zero_apply, mul_zero]
          | rw [← mul_assoc]
          | rw [one_apply, one_mul]
          | rw [one_apply, mul_one]
          | rw [mul_comm]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | 

Proof state:
case refine'_3
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
⊢ 0 * a✝ = 0

Next tactic:
rfl
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | 

Proof state:
case refine'_3
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
⊢ 0 * a✝ = 0

Next tactic:
ext
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; 

Proof state:
case refine'_3.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
x✝ : α → ℕ
⊢ (0 * a✝) x✝ = 0 x✝

Next tactic:
simp only [add_apply, mul_apply]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        

Proof state:
case refine'_3.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
x✝ : α → ℕ
⊢ 0 x✝ * a✝ x✝ = 0 x✝

Next tactic:
first
          | rw [mul_add]
          | rw [add_mul]
          | rw [zero_apply, zero_mul]
          | rw [zero_apply, mul_zero]
          | rw [← mul_assoc]
          | rw [one_apply, one_mul]
          | rw [one_apply, mul_one]
          | rw [mul_comm]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | 

Proof state:
case refine'_3.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
x✝ : α → ℕ
⊢ 0 x✝ * a✝ x✝ = 0 x✝

Next tactic:
rw [mul_add]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | rw [mul_add]
          | 

Proof state:
case refine'_3.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
x✝ : α → ℕ
⊢ 0 x✝ * a✝ x✝ = 0 x✝

Next tactic:
rw [add_mul]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | rw [mul_add]
          | rw [add_mul]
          | 

Proof state:
case refine'_3.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
x✝ : α → ℕ
⊢ 0 x✝ * a✝ x✝ = 0 x✝

Next tactic:
rw [zero_apply, zero_mul]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    

Proof state:
case refine'_4
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
⊢ ∀ (a : Poly α), a * 0 = 0

Next tactic:
intros
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    

Proof state:
case refine'_4
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
⊢ a✝ * 0 = 0

Next tactic:
first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | rw [mul_add]
          | rw [add_mul]
          | rw [zero_apply, zero_mul]
          | rw [zero_apply, mul_zero]
          | rw [← mul_assoc]
          | rw [one_apply, one_mul]
          | rw [one_apply, mul_one]
          | rw [mul_comm]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | 

Proof state:
case refine'_4
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
⊢ a✝ * 0 = 0

Next tactic:
rfl
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | 

Proof state:
case refine'_4
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
⊢ a✝ * 0 = 0

Next tactic:
ext
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; 

Proof state:
case refine'_4.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
x✝ : α → ℕ
⊢ (a✝ * 0) x✝ = 0 x✝

Next tactic:
simp only [add_apply, mul_apply]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        

Proof state:
case refine'_4.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
x✝ : α → ℕ
⊢ a✝ x✝ * 0 x✝ = 0 x✝

Next tactic:
first
          | rw [mul_add]
          | rw [add_mul]
          | rw [zero_apply, zero_mul]
          | rw [zero_apply, mul_zero]
          | rw [← mul_assoc]
          | rw [one_apply, one_mul]
          | rw [one_apply, mul_one]
          | rw [mul_comm]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | 

Proof state:
case refine'_4.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
x✝ : α → ℕ
⊢ a✝ x✝ * 0 x✝ = 0 x✝

Next tactic:
rw [mul_add]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | rw [mul_add]
          | 

Proof state:
case refine'_4.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
x✝ : α → ℕ
⊢ a✝ x✝ * 0 x✝ = 0 x✝

Next tactic:
rw [add_mul]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | rw [mul_add]
          | rw [add_mul]
          | 

Proof state:
case refine'_4.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
x✝ : α → ℕ
⊢ a✝ x✝ * 0 x✝ = 0 x✝

Next tactic:
rw [zero_apply, zero_mul]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | rw [mul_add]
          | rw [add_mul]
          | rw [zero_apply, zero_mul]
          | 

Proof state:
case refine'_4.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ : Poly α
x✝ : α → ℕ
⊢ a✝ x✝ * 0 x✝ = 0 x✝

Next tactic:
rw [zero_apply, mul_zero]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    

Proof state:
case refine'_5
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
⊢ ∀ (a b c : Poly α), a * b * c = a * (b * c)

Next tactic:
intros
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    

Proof state:
case refine'_5
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
⊢ a✝ * b✝ * c✝ = a✝ * (b✝ * c✝)

Next tactic:
first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | rw [mul_add]
          | rw [add_mul]
          | rw [zero_apply, zero_mul]
          | rw [zero_apply, mul_zero]
          | rw [← mul_assoc]
          | rw [one_apply, one_mul]
          | rw [one_apply, mul_one]
          | rw [mul_comm]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | 

Proof state:
case refine'_5
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
⊢ a✝ * b✝ * c✝ = a✝ * (b✝ * c✝)

Next tactic:
rfl
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | 

Proof state:
case refine'_5
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
⊢ a✝ * b✝ * c✝ = a✝ * (b✝ * c✝)

Next tactic:
ext
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; 

Proof state:
case refine'_5.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
x✝ : α → ℕ
⊢ (a✝ * b✝ * c✝) x✝ = (a✝ * (b✝ * c✝)) x✝

Next tactic:
simp only [add_apply, mul_apply]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        

Proof state:
case refine'_5.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
x✝ : α → ℕ
⊢ a✝ x✝ * b✝ x✝ * c✝ x✝ = a✝ x✝ * (b✝ x✝ * c✝ x✝)

Next tactic:
first
          | rw [mul_add]
          | rw [add_mul]
          | rw [zero_apply, zero_mul]
          | rw [zero_apply, mul_zero]
          | rw [← mul_assoc]
          | rw [one_apply, one_mul]
          | rw [one_apply, mul_one]
          | rw [mul_comm]
instance : CommRing (Poly α) := by
  refine' { (inferInstance : AddCommGroup (Poly α)),
            (inferInstance : AddGroupWithOne (Poly α)) with
              mul := (· * ·)
              npow := @npowRec _ ⟨(1 : Poly α)⟩ ⟨(· * ·)⟩
              .. }
  all_goals
    intros
    first
      | rfl
      | ext; simp only [add_apply, mul_apply]
        first
          | 

Proof state:
case refine'_5.a
α : Type u_1
β : Type u_2
γ : Type u_3
src✝¹ : AddCommGroup (Poly α) := inferInstance
src✝ : AddGroupWithOne (Poly α) := inferInstance
a✝ b✝ c✝ : Poly α
x✝ : α → ℕ
⊢ a✝ x✝ * b✝ x✝ * c✝ x✝ = a✝ x✝ * (b✝ x✝ * c✝ x✝)

Next tactic:
rw [mul_add]