l3lab/ntp-mathlib huggingface dataset:
instance nonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring k[G] :=
  { Finsupp.addCommMonoid with
    -- Porting note: `refine` & `exact` are required because `simp` behaves differently.
    left_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_add_index ?_ ?_)) ?_ <;>
        simp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]
    right_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : k[G]
this : DecidableEq G
⊢ (sum (f + g) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =
    (sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) +
      sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)

Next tactic:
refine Eq.trans (sum_add_index ?_ ?_) ?_
instance nonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring k[G] :=
  { Finsupp.addCommMonoid with
    -- Porting note: `refine` & `exact` are required because `simp` behaves differently.
    left_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_add_index ?_ ?_)) ?_ <;>
        simp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]
    right_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (sum_add_index ?_ ?_) ?_ <;>
        

Proof state:
case refine_1
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : k[G]
this : DecidableEq G
⊢ ∀ a ∈ f.support ∪ g.support, (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0

Next tactic:
simp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]
instance nonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring k[G] :=
  { Finsupp.addCommMonoid with
    -- Porting note: `refine` & `exact` are required because `simp` behaves differently.
    left_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_add_index ?_ ?_)) ?_ <;>
        simp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]
    right_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (sum_add_index ?_ ?_) ?_ <;>
        

Proof state:
case refine_2
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : k[G]
this : DecidableEq G
⊢ ∀ a ∈ f.support ∪ g.support,
    ∀ (b₁ b₂ : k),
      (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =
        (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)

Next tactic:
simp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]
instance nonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring k[G] :=
  { Finsupp.addCommMonoid with
    -- Porting note: `refine` & `exact` are required because `simp` behaves differently.
    left_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_add_index ?_ ?_)) ?_ <;>
        simp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]
    right_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (sum_add_index ?_ ?_) ?_ <;>
        

Proof state:
case refine_3
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : k[G]
this : DecidableEq G
⊢ ((sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) +
      sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =
    (sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) +
      sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)

Next tactic:
simp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]
instance nonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring k[G] :=
  { Finsupp.addCommMonoid with
    -- Porting note: `refine` & `exact` are required because `simp` behaves differently.
    left_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_add_index ?_ ?_)) ?_ <;>
        simp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]
    right_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (sum_add_index ?_ ?_) ?_ <;>
        simp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]
    zero_mul := fun f => by
      

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f : k[G]
⊢ 0 * f = 0

Next tactic:
simp only [mul_def]
instance nonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring k[G] :=
  { Finsupp.addCommMonoid with
    -- Porting note: `refine` & `exact` are required because `simp` behaves differently.
    left_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_add_index ?_ ?_)) ?_ <;>
        simp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]
    right_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (sum_add_index ?_ ?_) ?_ <;>
        simp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]
    zero_mul := fun f => by
      simp only [mul_def]
      

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f : k[G]
⊢ (sum 0 fun a₁ b₁ => sum f fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) = 0

Next tactic:
exact sum_zero_index
instance nonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring k[G] :=
  { Finsupp.addCommMonoid with
    -- Porting note: `refine` & `exact` are required because `simp` behaves differently.
    left_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_add_index ?_ ?_)) ?_ <;>
        simp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]
    right_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (sum_add_index ?_ ?_) ?_ <;>
        simp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]
    zero_mul := fun f => by
      simp only [mul_def]
      exact sum_zero_index
    mul_zero := fun f => by
      

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f : k[G]
⊢ f * 0 = 0

Next tactic:
simp only [mul_def]
instance nonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring k[G] :=
  { Finsupp.addCommMonoid with
    -- Porting note: `refine` & `exact` are required because `simp` behaves differently.
    left_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_add_index ?_ ?_)) ?_ <;>
        simp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]
    right_distrib := fun f g h => by
      haveI := Classical.decEq G
      simp only [mul_def]
      refine Eq.trans (sum_add_index ?_ ?_) ?_ <;>
        simp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]
    zero_mul := fun f => by
      simp only [mul_def]
      exact sum_zero_index
    mul_zero := fun f => by
      simp only [mul_def]
      

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f : k[G]
⊢ (sum f fun a₁ b₁ => sum 0 fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) = 0

Next tactic:
exact Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_zero_index)) sum_zero
instance nonUnitalSemiring : NonUnitalSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    mul_assoc := fun f g h => by
      -- Porting note: `reducible` cannot be `local` so proof gets long.
      

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ f * g * h = f * (g * h)

Next tactic:
simp only [mul_def]
instance nonUnitalSemiring : NonUnitalSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    mul_assoc := fun f g h => by
      -- Porting note: `reducible` cannot be `local` so proof gets long.
      simp only [mul_def]
      

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ (sum (sum f fun a₁ b₁ => sum g fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) fun a₁ b₁ =>
      sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =
    sum f fun a₁ b₁ =>
      sum (sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)

Next tactic:
rw [sum_sum_index]
instance nonUnitalSemiring : NonUnitalSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    mul_assoc := fun f g h => by
      -- Porting note: `reducible` cannot be `local` so proof gets long.
      simp only [mul_def]
      rw [sum_sum_index]; 

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ (sum f fun a b =>
      sum (sum g fun a₂ b₂ => single (a + a₂) (b * b₂)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =
    sum f fun a₁ b₁ =>
      sum (sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)
case h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0
case h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ ∀ (a : G) (b₁ b₂ : k),
    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =
      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)

Next tactic:
congr
instance nonUnitalSemiring : NonUnitalSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    mul_assoc := fun f g h => by
      -- Porting note: `reducible` cannot be `local` so proof gets long.
      simp only [mul_def]
      rw [sum_sum_index]; congr; 

Proof state:
case e_g
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ (fun a b =>
      sum (sum g fun a₂ b₂ => single (a + a₂) (b * b₂)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =
    fun a₁ b₁ =>
    sum (sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)
case h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0
case h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ ∀ (a : G) (b₁ b₂ : k),
    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =
      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)

Next tactic:
ext a₁ b₁
instance nonUnitalSemiring : NonUnitalSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    mul_assoc := fun f g h => by
      -- Porting note: `reducible` cannot be `local` so proof gets long.
      simp only [mul_def]
      rw [sum_sum_index]; congr; ext a₁ b₁
      

Proof state:
case e_g.h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ (sum (sum g fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =
    sum (sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)
case h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0
case h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ ∀ (a : G) (b₁ b₂ : k),
    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =
      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)

Next tactic:
rw [sum_sum_index, sum_sum_index]
instance nonUnitalSemiring : NonUnitalSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    mul_assoc := fun f g h => by
      -- Porting note: `reducible` cannot be `local` so proof gets long.
      simp only [mul_def]
      rw [sum_sum_index]; congr; ext a₁ b₁
      rw [sum_sum_index, sum_sum_index]; 

Proof state:
case e_g.h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ (sum g fun a b => sum (single (a₁ + a) (b₁ * b)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =
    sum g fun a b => sum (sum h fun a₂ b₂ => single (a + a₂) (b * b₂)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)
case e_g.h.h.h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0
case e_g.h.h.h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)
case e_g.h.h.h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0
case e_g.h.h.h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ ∀ (a : G) (b₁ b₂ : k),
    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =
      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)
case h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0
case h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ ∀ (a : G) (b₁ b₂ : k),
    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =
      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)

Next tactic:
congr
instance nonUnitalSemiring : NonUnitalSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    mul_assoc := fun f g h => by
      -- Porting note: `reducible` cannot be `local` so proof gets long.
      simp only [mul_def]
      rw [sum_sum_index]; congr; ext a₁ b₁
      rw [sum_sum_index, sum_sum_index]; congr; 

Proof state:
case e_g.h.h.e_g
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ (fun a b => sum (single (a₁ + a) (b₁ * b)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) = fun a b =>
    sum (sum h fun a₂ b₂ => single (a + a₂) (b * b₂)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)
case e_g.h.h.h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0
case e_g.h.h.h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)
case e_g.h.h.h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0
case e_g.h.h.h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ ∀ (a : G) (b₁ b₂ : k),
    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =
      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)
case h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0
case h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ ∀ (a : G) (b₁ b₂ : k),
    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =
      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)

Next tactic:
ext a₂ b₂
instance nonUnitalSemiring : NonUnitalSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    mul_assoc := fun f g h => by
      -- Porting note: `reducible` cannot be `local` so proof gets long.
      simp only [mul_def]
      rw [sum_sum_index]; congr; ext a₁ b₁
      rw [sum_sum_index, sum_sum_index]; congr; ext a₂ b₂
      

Proof state:
case e_g.h.h.e_g.h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ (sum (single (a₁ + a₂) (b₁ * b₂)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =
    sum (sum h fun a₂_1 b₂_1 => single (a₂ + a₂_1) (b₂ * b₂_1)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)
case e_g.h.h.h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0
case e_g.h.h.h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)
case e_g.h.h.h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0
case e_g.h.h.h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
⊢ ∀ (a : G) (b₁ b₂ : k),
    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =
      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)
case h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0
case h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
⊢ ∀ (a : G) (b₁ b₂ : k),
    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =
      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)

Next tactic:
rw [sum_sum_index, sum_single_index]
instance nonUnitalSemiring : NonUnitalSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    mul_assoc := fun f g h => by
      -- Porting note: `reducible` cannot be `local` so proof gets long.
      simp only [mul_def]
      rw [sum_sum_index]; congr; ext a₁ b₁
      rw [sum_sum_index, sum_sum_index]; congr; ext a₂ b₂
      rw [sum_sum_index, sum_single_index]; congr; ext a₃ b₃
      rw [sum_single_index, mul_assoc, add_assoc]
      all_goals 

Proof state:
case e_g.h.h.e_g.h.h.e_g.h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
a₂ : G
b₂ : k
a₃ : G
b₃ : k
⊢ single (a₁ + (a₂ + a₃)) (b₁ * 0) = 0

Next tactic:
simp only [single_zero, single_add, forall_true_iff, add_mul,
        mul_add, zero_mul, mul_zero, sum_zero, sum_add]
instance nonUnitalSemiring : NonUnitalSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    mul_assoc := fun f g h => by
      -- Porting note: `reducible` cannot be `local` so proof gets long.
      simp only [mul_def]
      rw [sum_sum_index]; congr; ext a₁ b₁
      rw [sum_sum_index, sum_sum_index]; congr; ext a₂ b₂
      rw [sum_sum_index, sum_single_index]; congr; ext a₃ b₃
      rw [sum_single_index, mul_assoc, add_assoc]
      all_goals 

Proof state:
case e_g.h.h.e_g.h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f g h : k[G]
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ (sum h fun a₂_1 b₂ => single (a₁ + a₂ + a₂_1) (0 * b₂)) = 0

Next tactic:
simp only [single_zero, single_add, forall_true_iff, add_mul,
        mul_add, zero_mul, mul_zero, sum_zero, sum_add]