l3lab/ntp-mathlib huggingface dataset:
theorem liftNC_mul {g_hom : Type*} [MulHomClass g_hom G R] (f : k →+* R) (g : g_hom)
    (a b : MonoidAlgebra k G) (h_comm : ∀ {x y}, y ∈ a.support → Commute (f (b x)) (g y)) :
    liftNC (f : k →+ R) g (a * b) = liftNC (f : k →+ R) g a * liftNC (f : k →+ R) g b := by
  conv_rhs => rw [← sum_single a, ← sum_single b]
  -- Porting note: `(liftNC _ g).map_finsupp_sum` → `map_finsupp_sum`
  simp_rw [mul_def, map_finsupp_sum, liftNC_single, Finsupp.sum_mul, Finsupp.mul_sum]
  refine Finset.sum_congr rfl fun y hy => Finset.sum_congr rfl fun x _hx => ?_
  

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : Mul G
inst✝¹ : Semiring R
g_hom : Type u_3
inst✝ : MulHomClass g_hom G R
f : k →+* R
g : g_hom
a b : MonoidAlgebra k G
h_comm : ∀ {x y : G}, y ∈ a.support → Commute (f (b x)) (g y)
y : G
hy : y ∈ a.support
x : G
_hx : x ∈ b.support
⊢ (fun a_1 b => ↑f (a y * b) * g (y * a_1)) x (b x) = (fun a_1 c => ↑f (a y) * g y * (↑f c * g a_1)) x (b x)

Next tactic:
simp [mul_assoc, (h_comm hy).left_comm]
instance nonUnitalSemiring : NonUnitalSemiring (MonoidAlgebra k G) :=
  { MonoidAlgebra.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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra k G
⊢ f * g * h = f * (g * h)

Next tactic:
simp only [mul_def]
instance nonUnitalSemiring : NonUnitalSemiring (MonoidAlgebra k G) :=
  { MonoidAlgebra.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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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 (MonoidAlgebra k G) :=
  { MonoidAlgebra.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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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 (MonoidAlgebra k G) :=
  { MonoidAlgebra.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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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 (MonoidAlgebra k G) :=
  { MonoidAlgebra.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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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 (MonoidAlgebra k G) :=
  { MonoidAlgebra.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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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 (MonoidAlgebra k G) :=
  { MonoidAlgebra.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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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 (MonoidAlgebra k G) :=
  { MonoidAlgebra.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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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 (MonoidAlgebra k G) :=
  { MonoidAlgebra.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, mul_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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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 (MonoidAlgebra k G) :=
  { MonoidAlgebra.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, mul_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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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]
instance nonUnitalSemiring : NonUnitalSemiring (MonoidAlgebra k G) :=
  { MonoidAlgebra.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, mul_assoc]
      all_goals 

Proof state:
case e_g.h.h.e_g.h.h.h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝² : Semiring k
inst✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ ∀ (a : G), single (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 (MonoidAlgebra k G) :=
  { MonoidAlgebra.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, mul_assoc]
      all_goals 

Proof state:
case e_g.h.h.e_g.h.h.h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝² : Semiring k
inst✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra k G
a₁ : G
b₁ : k
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₂)

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 (MonoidAlgebra k G) :=
  { MonoidAlgebra.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, mul_assoc]
      all_goals 

Proof state:
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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra k G
a₁ : G
b₁ : k
⊢ ∀ (a : G), single (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 (MonoidAlgebra k G) :=
  { MonoidAlgebra.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, mul_assoc]
      all_goals 

Proof state:
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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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₂)

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 (MonoidAlgebra k G) :=
  { MonoidAlgebra.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, mul_assoc]
      all_goals 

Proof state:
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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra k G
a₁ : G
b₁ : k
⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (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]
instance nonUnitalSemiring : NonUnitalSemiring (MonoidAlgebra k G) :=
  { MonoidAlgebra.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, mul_assoc]
      all_goals 

Proof state:
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✝¹ : Semigroup G
inst✝ : Semiring R
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : MonoidAlgebra 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)

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