[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : MonoidAlgebra k G
⊢ f * (g + h) = f * g + f * h
[PROOFSTEP]
haveI := Classical.decEq G
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : MonoidAlgebra k G
this : DecidableEq G
⊢ f * (g + h) = f * g + f * h
[PROOFSTEP]
simp only [mul_def]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : MonoidAlgebra k G
this : DecidableEq G
⊢ (sum f fun a₁ b₁ => sum (g + h) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) =
    (sum f fun a₁ b₁ => sum g fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) +
      sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)
[PROOFSTEP]
refine Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_add_index ?_ ?_)) ?_
[GOAL]
case refine_1
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : MonoidAlgebra k G
this : DecidableEq G
a₁ : G
b₁ : k
⊢ ∀ (a : G), a ∈ g.support ∪ h.support → single (a₁ * a) (b₁ * 0) = 0
[PROOFSTEP]
simp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]
[GOAL]
case refine_2
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : MonoidAlgebra k G
this : DecidableEq G
a₁ : G
b₁ : k
⊢ ∀ (a : G),
    a ∈ g.support ∪ h.support →
      ∀ (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)
[PROOFSTEP]
simp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]
[GOAL]
case refine_3
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : MonoidAlgebra k G
this : DecidableEq G
⊢ (sum f fun a₁ b₁ => (sum g fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) + sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) =
    (sum f fun a₁ b₁ => sum g fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) +
      sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)
[PROOFSTEP]
simp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : MonoidAlgebra k G
⊢ (f + g) * h = f * h + g * h
[PROOFSTEP]
haveI := Classical.decEq G
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : MonoidAlgebra k G
this : DecidableEq G
⊢ (f + g) * h = f * h + g * h
[PROOFSTEP]
simp only [mul_def]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : MonoidAlgebra 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₂)
[PROOFSTEP]
refine Eq.trans (sum_add_index ?_ ?_) ?_
[GOAL]
case refine_1
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : MonoidAlgebra k G
this : DecidableEq G
⊢ ∀ (a : G), a ∈ f.support ∪ g.support → (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0
[PROOFSTEP]
simp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]
[GOAL]
case refine_2
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : MonoidAlgebra k G
this : DecidableEq G
⊢ ∀ (a : 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)
[PROOFSTEP]
simp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]
[GOAL]
case refine_3
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f g h : MonoidAlgebra 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₂)
[PROOFSTEP]
simp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f : MonoidAlgebra k G
⊢ 0 * f = 0
[PROOFSTEP]
simp only [mul_def]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f : MonoidAlgebra k G
⊢ (sum 0 fun a₁ b₁ => sum f fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) = 0
[PROOFSTEP]
exact sum_zero_index
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f : MonoidAlgebra k G
⊢ f * 0 = 0
[PROOFSTEP]
simp only [mul_def]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid
f : MonoidAlgebra k G
⊢ (sum f fun a₁ b₁ => sum 0 fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) = 0
[PROOFSTEP]
exact Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_zero_index)) sum_zero
[GOAL]
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)
⊢ ↑(liftNC ↑f ↑g) (a * b) = ↑(liftNC ↑f ↑g) a * ↑(liftNC ↑f ↑g) b
[PROOFSTEP]
conv_rhs =>
  rw [← sum_single a, ← sum_single b]
    -- Porting note: `(liftNC _ g).map_finsupp_sum` → `map_finsupp_sum`
[GOAL]
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)
| ↑(liftNC ↑f ↑g) a * ↑(liftNC ↑f ↑g) b
[PROOFSTEP]
rw [← sum_single a, ← sum_single b]
    -- Porting note: `(liftNC _ g).map_finsupp_sum` → `map_finsupp_sum`
[GOAL]
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)
| ↑(liftNC ↑f ↑g) a * ↑(liftNC ↑f ↑g) b
[PROOFSTEP]
rw [← sum_single a, ← sum_single b]
    -- Porting note: `(liftNC _ g).map_finsupp_sum` → `map_finsupp_sum`
[GOAL]
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)
| ↑(liftNC ↑f ↑g) a * ↑(liftNC ↑f ↑g) b
[PROOFSTEP]
rw [← sum_single a, ← sum_single b]
  -- Porting note: `(liftNC _ g).map_finsupp_sum` → `map_finsupp_sum`
[GOAL]
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)
⊢ ↑(liftNC ↑f ↑g) (a * b) = ↑(liftNC ↑f ↑g) (sum a single) * ↑(liftNC ↑f ↑g) (sum b single)
[PROOFSTEP]
simp_rw [mul_def, map_finsupp_sum, liftNC_single, Finsupp.sum_mul, Finsupp.mul_sum]
[GOAL]
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)
⊢ (sum a fun a b_1 => sum b fun a_1 b => ↑↑f (b_1 * b) * ↑g (a * a_1)) =
    sum a fun a c => sum b fun a_1 c_1 => ↑↑f c * ↑g a * (↑↑f c_1 * ↑g a_1)
[PROOFSTEP]
refine Finset.sum_congr rfl fun y hy => Finset.sum_congr rfl fun x _hx => ?_
[GOAL]
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)
[PROOFSTEP]
simp [mul_assoc, (h_comm hy).left_comm]
[GOAL]
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)
[PROOFSTEP]
simp only [mul_def]
[GOAL]
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₂)
[PROOFSTEP]
rw [sum_sum_index]
[GOAL]
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)
[PROOFSTEP]
congr
[GOAL]
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)
[PROOFSTEP]
ext a₁ b₁
[GOAL]
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)
[PROOFSTEP]
rw [sum_sum_index, sum_sum_index]
[GOAL]
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)
[PROOFSTEP]
congr
[GOAL]
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)
[PROOFSTEP]
ext a₂ b₂
[GOAL]
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)
[PROOFSTEP]
rw [sum_sum_index, sum_single_index]
[GOAL]
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₂_1 => single (a₁ * a₂ * a₂_1) (b₁ * b₂ * b₂_1)) =
    sum h fun a b => sum (single (a₂ * a) (b₂ * b)) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)
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
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
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₂)
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)
[PROOFSTEP]
congr
[GOAL]
case e_g.h.h.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
a₂ : G
b₂ : k
⊢ (fun a₂_1 b₂_1 => single (a₁ * a₂ * a₂_1) (b₁ * b₂ * b₂_1)) = fun a b =>
    sum (single (a₂ * a) (b₂ * b)) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)
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
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
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₂)
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)
[PROOFSTEP]
ext a₃ b₃
[GOAL]
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₁ * b₂ * b₃) = sum (single (a₂ * a₃) (b₂ * b₃)) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)
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
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
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₂)
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)
[PROOFSTEP]
rw [sum_single_index, mul_assoc, mul_assoc]
[GOAL]
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
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
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
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₂)
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)
[PROOFSTEP]
all_goals simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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₂)
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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₂)
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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)
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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)
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : NonAssocSemiring R
inst✝² : Semiring k
inst✝¹ : One G
g_hom : Type u_3
inst✝ : OneHomClass g_hom G R
f : k →+* R
g : g_hom
⊢ ↑(liftNC ↑f ↑g) 1 = 1
[PROOFSTEP]
simp [one_def]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : MulOneClass G
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f : MonoidAlgebra k G
⊢ 1 * f = f
[PROOFSTEP]
simp only [mul_def, one_def, sum_single_index, zero_mul, single_zero, sum_zero, zero_add, one_mul, sum_single]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : MulOneClass G
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
f : MonoidAlgebra k G
⊢ f * 1 = f
[PROOFSTEP]
simp only [mul_def, one_def, sum_single_index, mul_zero, single_zero, sum_zero, add_zero, mul_one, sum_single]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : MulOneClass G
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
⊢ NatCast.natCast 0 = 0
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : MulOneClass G
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
x✝ : ℕ
⊢ NatCast.natCast (x✝ + 1) = NatCast.natCast x✝ + 1
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : MulOneClass G
src✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring
x✝ : ℕ
⊢ Finsupp.single 1 ↑x✝ + Finsupp.single 1 1 = single 1 ↑x✝ + 1
[PROOFSTEP]
rfl
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : CommSemiring k
inst✝ : CommSemigroup G
src✝ : NonUnitalSemiring (MonoidAlgebra k G) := nonUnitalSemiring
f g : MonoidAlgebra k G
⊢ f * g = g * f
[PROOFSTEP]
simp only [mul_def, Finsupp.sum, mul_comm]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : CommSemiring k
inst✝ : CommSemigroup G
src✝ : NonUnitalSemiring (MonoidAlgebra k G) := nonUnitalSemiring
f g : MonoidAlgebra k G
⊢ ∑ x in f.support, ∑ x_1 in g.support, single (x * x_1) (↑f x * ↑g x_1) =
    ∑ x in g.support, ∑ x_1 in f.support, single (x * x_1) (↑f x_1 * ↑g x)
[PROOFSTEP]
rw [Finset.sum_comm]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : CommSemiring k
inst✝ : CommSemigroup G
src✝ : NonUnitalSemiring (MonoidAlgebra k G) := nonUnitalSemiring
f g : MonoidAlgebra k G
⊢ ∑ y in g.support, ∑ x in f.support, single (x * y) (↑f x * ↑g y) =
    ∑ x in g.support, ∑ x_1 in f.support, single (x * x_1) (↑f x_1 * ↑g x)
[PROOFSTEP]
simp only [mul_comm]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Ring k
inst✝ : MulOneClass G
src✝¹ : AddCommGroup (MonoidAlgebra k G) := addCommGroup
src✝ : NonAssocSemiring (MonoidAlgebra k G) := nonAssocSemiring
n : ℕ
⊢ IntCast.intCast ↑n = ↑n
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Ring k
inst✝ : MulOneClass G
src✝¹ : AddCommGroup (MonoidAlgebra k G) := addCommGroup
src✝ : NonAssocSemiring (MonoidAlgebra k G) := nonAssocSemiring
n : ℕ
⊢ single 1 ↑n = ↑n
[PROOFSTEP]
rfl
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Ring k
inst✝ : MulOneClass G
src✝¹ : AddCommGroup (MonoidAlgebra k G) := addCommGroup
src✝ : NonAssocSemiring (MonoidAlgebra k G) := nonAssocSemiring
n : ℕ
⊢ IntCast.intCast (Int.negSucc n) = -↑(n + 1)
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Ring k
inst✝ : MulOneClass G
src✝¹ : AddCommGroup (MonoidAlgebra k G) := addCommGroup
src✝ : NonAssocSemiring (MonoidAlgebra k G) := nonAssocSemiring
n : ℕ
⊢ -Finsupp.single 1 1 + -Finsupp.single 1 ↑n = -1 + -↑n
[PROOFSTEP]
rfl
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝² : Semiring k
inst✝¹ : DecidableEq G
inst✝ : Mul G
f g : MonoidAlgebra k G
x : G
⊢ ↑(f * g) x = sum f fun a₁ b₁ => sum g fun a₂ b₂ => if a₁ * a₂ = x then b₁ * b₂ else 0
[PROOFSTEP]
rw [mul_def, Finsupp.sum_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝² : Semiring k
inst✝¹ : DecidableEq G
inst✝ : Mul G
f g : MonoidAlgebra k G
x : G
⊢ (sum f fun a₁ b => ↑(sum g fun a₂ b₂ => single (a₁ * a₂) (b * b₂)) x) =
    sum f fun a₁ b₁ => sum g fun a₂ b₂ => if a₁ * a₂ = x then b₁ * b₂ else 0
[PROOFSTEP]
congr
[GOAL]
case e_g
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝² : Semiring k
inst✝¹ : DecidableEq G
inst✝ : Mul G
f g : MonoidAlgebra k G
x : G
⊢ (fun a₁ b => ↑(sum g fun a₂ b₂ => single (a₁ * a₂) (b * b₂)) x) = fun a₁ b₁ =>
    sum g fun a₂ b₂ => if a₁ * a₂ = x then b₁ * b₂ else 0
[PROOFSTEP]
ext
[GOAL]
case e_g.h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝² : Semiring k
inst✝¹ : DecidableEq G
inst✝ : Mul G
f g : MonoidAlgebra k G
x x✝¹ : G
x✝ : k
⊢ ↑(sum g fun a₂ b₂ => single (x✝¹ * a₂) (x✝ * b₂)) x = sum g fun a₂ b₂ => if x✝¹ * a₂ = x then x✝ * b₂ else 0
[PROOFSTEP]
rw [Finsupp.sum_apply]
[GOAL]
case e_g.h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝² : Semiring k
inst✝¹ : DecidableEq G
inst✝ : Mul G
f g : MonoidAlgebra k G
x x✝¹ : G
x✝ : k
⊢ (sum g fun a₁ b => ↑(single (x✝¹ * a₁) (x✝ * b)) x) = sum g fun a₂ b₂ => if x✝¹ * a₂ = x then x✝ * b₂ else 0
[PROOFSTEP]
congr
[GOAL]
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✝¹ : DecidableEq G
inst✝ : Mul G
f g : MonoidAlgebra k G
x x✝¹ : G
x✝ : k
⊢ (fun a₁ b => ↑(single (x✝¹ * a₁) (x✝ * b)) x) = fun a₂ b₂ => if x✝¹ * a₂ = x then x✝ * b₂ else 0
[PROOFSTEP]
ext
[GOAL]
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✝¹ : DecidableEq G
inst✝ : Mul G
f g : MonoidAlgebra k G
x x✝³ : G
x✝² : k
x✝¹ : G
x✝ : k
⊢ ↑(single (x✝³ * x✝¹) (x✝² * x✝)) x = if x✝³ * x✝¹ = x then x✝² * x✝ else 0
[PROOFSTEP]
apply single_apply
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f g : MonoidAlgebra k G
x : G
s : Finset (G × G)
hs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x
⊢ ↑(f * g) x = ∑ p in s, ↑f p.fst * ↑g p.snd
[PROOFSTEP]
classical exact
  let F : G × G → k := fun p => if p.1 * p.2 = x then f p.1 * g p.2 else 0
  calc
    (f * g) x = ∑ a₁ in f.support, ∑ a₂ in g.support, F (a₁, a₂) := mul_apply f g x
    _ = ∑ p in f.support ×ˢ g.support, F p := Finset.sum_product.symm
    _ = ∑ p in (f.support ×ˢ g.support).filter fun p : G × G => p.1 * p.2 = x, f p.1 * g p.2 :=
      (Finset.sum_filter _ _).symm
    _ = ∑ p in s.filter fun p : G × G => p.1 ∈ f.support ∧ p.2 ∈ g.support, f p.1 * g p.2 :=
      (sum_congr
        (by
          ext
          simp only [mem_filter, mem_product, hs, and_comm])
        fun _ _ => rfl)
    _ = ∑ p in s, f p.1 * g p.2 :=
      sum_subset (filter_subset _ _) fun p hps hp =>
        by
        simp only [mem_filter, mem_support_iff, not_and, Classical.not_not] at hp ⊢
        by_cases h1 : f p.1 = 0
        · rw [h1, zero_mul]
        · rw [hp hps h1, mul_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f g : MonoidAlgebra k G
x : G
s : Finset (G × G)
hs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x
⊢ ↑(f * g) x = ∑ p in s, ↑f p.fst * ↑g p.snd
[PROOFSTEP]
exact
  let F : G × G → k := fun p => if p.1 * p.2 = x then f p.1 * g p.2 else 0
  calc
    (f * g) x = ∑ a₁ in f.support, ∑ a₂ in g.support, F (a₁, a₂) := mul_apply f g x
    _ = ∑ p in f.support ×ˢ g.support, F p := Finset.sum_product.symm
    _ = ∑ p in (f.support ×ˢ g.support).filter fun p : G × G => p.1 * p.2 = x, f p.1 * g p.2 :=
      (Finset.sum_filter _ _).symm
    _ = ∑ p in s.filter fun p : G × G => p.1 ∈ f.support ∧ p.2 ∈ g.support, f p.1 * g p.2 :=
      (sum_congr
        (by
          ext
          simp only [mem_filter, mem_product, hs, and_comm])
        fun _ _ => rfl)
    _ = ∑ p in s, f p.1 * g p.2 :=
      sum_subset (filter_subset _ _) fun p hps hp =>
        by
        simp only [mem_filter, mem_support_iff, not_and, Classical.not_not] at hp ⊢
        by_cases h1 : f p.1 = 0
        · rw [h1, zero_mul]
        · rw [hp hps h1, mul_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f g : MonoidAlgebra k G
x : G
s : Finset (G × G)
hs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x
F : G × G → k := fun p => if p.fst * p.snd = x then ↑f p.fst * ↑g p.snd else 0
⊢ Finset.filter (fun p => p.fst * p.snd = x) (f.support ×ˢ g.support) =
    Finset.filter (fun p => p.fst ∈ f.support ∧ p.snd ∈ g.support) s
[PROOFSTEP]
ext
[GOAL]
case a
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f g : MonoidAlgebra k G
x : G
s : Finset (G × G)
hs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x
F : G × G → k := fun p => if p.fst * p.snd = x then ↑f p.fst * ↑g p.snd else 0
a✝ : G × G
⊢ a✝ ∈ Finset.filter (fun p => p.fst * p.snd = x) (f.support ×ˢ g.support) ↔
    a✝ ∈ Finset.filter (fun p => p.fst ∈ f.support ∧ p.snd ∈ g.support) s
[PROOFSTEP]
simp only [mem_filter, mem_product, hs, and_comm]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f g : MonoidAlgebra k G
x : G
s : Finset (G × G)
hs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x
F : G × G → k := fun p => if p.fst * p.snd = x then ↑f p.fst * ↑g p.snd else 0
p : G × G
hps : p ∈ s
hp : ¬p ∈ Finset.filter (fun p => p.fst ∈ f.support ∧ p.snd ∈ g.support) s
⊢ ↑f p.fst * ↑g p.snd = 0
[PROOFSTEP]
simp only [mem_filter, mem_support_iff, not_and, Classical.not_not] at hp ⊢
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f g : MonoidAlgebra k G
x : G
s : Finset (G × G)
hs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x
F : G × G → k := fun p => if p.fst * p.snd = x then ↑f p.fst * ↑g p.snd else 0
p : G × G
hps : p ∈ s
hp : p ∈ s → ↑f p.fst ≠ 0 → ↑g p.snd = 0
⊢ ↑f p.fst * ↑g p.snd = 0
[PROOFSTEP]
by_cases h1 : f p.1 = 0
[GOAL]
case pos
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f g : MonoidAlgebra k G
x : G
s : Finset (G × G)
hs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x
F : G × G → k := fun p => if p.fst * p.snd = x then ↑f p.fst * ↑g p.snd else 0
p : G × G
hps : p ∈ s
hp : p ∈ s → ↑f p.fst ≠ 0 → ↑g p.snd = 0
h1 : ↑f p.fst = 0
⊢ ↑f p.fst * ↑g p.snd = 0
[PROOFSTEP]
rw [h1, zero_mul]
[GOAL]
case neg
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f g : MonoidAlgebra k G
x : G
s : Finset (G × G)
hs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x
F : G × G → k := fun p => if p.fst * p.snd = x then ↑f p.fst * ↑g p.snd else 0
p : G × G
hps : p ∈ s
hp : p ∈ s → ↑f p.fst ≠ 0 → ↑g p.snd = 0
h1 : ¬↑f p.fst = 0
⊢ ↑f p.fst * ↑g p.snd = 0
[PROOFSTEP]
rw [hp hps h1, mul_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
a₁ a₂ : G
b₁ b₂ : k
⊢ (sum (single a₂ b₂) fun a₂ b₂ => single (a₁ * a₂) (0 * b₂)) = 0
[PROOFSTEP]
simp only [zero_mul, single_zero, sum_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
a₁ a₂ : G
b₁ b₂ : k
⊢ single (a₁ * a₂) (b₁ * 0) = 0
[PROOFSTEP]
rw [mul_zero, single_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
a : G
b : k
⊢ single a b ^ 0 = single (a ^ 0) (b ^ 0)
[PROOFSTEP]
simp only [pow_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
a : G
b : k
⊢ 1 = single 1 1
[PROOFSTEP]
rfl
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
a : G
b : k
n : ℕ
⊢ single a b ^ (n + 1) = single (a ^ (n + 1)) (b ^ (n + 1))
[PROOFSTEP]
simp only [pow_succ, single_pow n, single_mul_single]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : One α
inst✝¹ : One α₂
F : Type u_6
inst✝ : OneHomClass F α α₂
f : F
⊢ mapDomain (↑f) 1 = 1
[PROOFSTEP]
simp_rw [one_def, mapDomain_single, map_one]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Mul α
inst✝¹ : Mul α₂
F : Type u_6
inst✝ : MulHomClass F α α₂
f : F
x y : MonoidAlgebra β α
⊢ mapDomain (↑f) (x * y) = mapDomain (↑f) x * mapDomain (↑f) y
[PROOFSTEP]
simp_rw [mul_def, mapDomain_sum, mapDomain_single, map_mul]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Mul α
inst✝¹ : Mul α₂
F : Type u_6
inst✝ : MulHomClass F α α₂
f : F
x y : MonoidAlgebra β α
⊢ (sum x fun a b => sum y fun a_1 b_1 => Finsupp.single (↑f a * ↑f a_1) (b * b_1)) =
    sum (mapDomain (↑f) x) fun a₁ b₁ => sum (mapDomain (↑f) y) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)
[PROOFSTEP]
rw [Finsupp.sum_mapDomain_index]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Mul α
inst✝¹ : Mul α₂
F : Type u_6
inst✝ : MulHomClass F α α₂
f : F
x y : MonoidAlgebra β α
⊢ (sum x fun a b => sum y fun a_1 b_1 => Finsupp.single (↑f a * ↑f a_1) (b * b_1)) =
    sum x fun a m => sum (mapDomain (↑f) y) fun a₂ b₂ => single (↑f a * a₂) (m * b₂)
[PROOFSTEP]
congr
[GOAL]
case e_g
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Mul α
inst✝¹ : Mul α₂
F : Type u_6
inst✝ : MulHomClass F α α₂
f : F
x y : MonoidAlgebra β α
⊢ (fun a b => sum y fun a_1 b_1 => Finsupp.single (↑f a * ↑f a_1) (b * b_1)) = fun a m =>
    sum (mapDomain (↑f) y) fun a₂ b₂ => single (↑f a * a₂) (m * b₂)
[PROOFSTEP]
ext a b
[GOAL]
case e_g.h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Mul α
inst✝¹ : Mul α₂
F : Type u_6
inst✝ : MulHomClass F α α₂
f : F
x y : MonoidAlgebra β α
a : α
b : β
⊢ (sum y fun a_1 b_1 => Finsupp.single (↑f a * ↑f a_1) (b * b_1)) =
    sum (mapDomain (↑f) y) fun a₂ b₂ => single (↑f a * a₂) (b * b₂)
[PROOFSTEP]
rw [Finsupp.sum_mapDomain_index]
[GOAL]
case e_g.h.h.h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Mul α
inst✝¹ : Mul α₂
F : Type u_6
inst✝ : MulHomClass F α α₂
f : F
x y : MonoidAlgebra β α
a : α
b : β
⊢ ∀ (b_1 : α₂), single (↑f a * b_1) (b * 0) = 0
[PROOFSTEP]
simp
[GOAL]
case e_g.h.h.h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Mul α
inst✝¹ : Mul α₂
F : Type u_6
inst✝ : MulHomClass F α α₂
f : F
x y : MonoidAlgebra β α
a : α
b : β
⊢ ∀ (b_1 : α₂) (m₁ m₂ : β),
    single (↑f a * b_1) (b * (m₁ + m₂)) = single (↑f a * b_1) (b * m₁) + single (↑f a * b_1) (b * m₂)
[PROOFSTEP]
simp [mul_add]
[GOAL]
case h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Mul α
inst✝¹ : Mul α₂
F : Type u_6
inst✝ : MulHomClass F α α₂
f : F
x y : MonoidAlgebra β α
⊢ ∀ (b : α₂), (sum (mapDomain (↑f) y) fun a₂ b₂ => single (b * a₂) (0 * b₂)) = 0
[PROOFSTEP]
simp
[GOAL]
case h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Mul α
inst✝¹ : Mul α₂
F : Type u_6
inst✝ : MulHomClass F α α₂
f : F
x y : MonoidAlgebra β α
⊢ ∀ (b : α₂) (m₁ m₂ : β),
    (sum (mapDomain (↑f) y) fun a₂ b₂ => single (b * a₂) ((m₁ + m₂) * b₂)) =
      (sum (mapDomain (↑f) y) fun a₂ b₂ => single (b * a₂) (m₁ * b₂)) +
        sum (mapDomain (↑f) y) fun a₂ b₂ => single (b * a₂) (m₂ * b₂)
[PROOFSTEP]
simp [add_mul]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
a b : G
⊢ (fun a => single a 1) (a * b) = (fun a => single a 1) a * (fun a => single a 1) b
[PROOFSTEP]
simp only [mul_def, mul_one, sum_single_index, single_eq_zero, mul_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : MulOneClass G
g : G
r : k
⊢ r • ↑(of k G) g = single g r
[PROOFSTEP]
rw [of_apply, smul_single', mul_one]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝² : Semiring k
inst✝¹ : MulOneClass G
inst✝ : Nontrivial k
a b : G
h : ↑(of k G) a = ↑(of k G) b
⊢ a = b
[PROOFSTEP]
simpa using (single_eq_single_iff _ _ _ _).mp h
[GOAL]
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), a * x = z ↔ a = y
⊢ ↑(f * single x r) z = ↑f y * r
[PROOFSTEP]
classical exact
  have A : ∀ a₁ b₁, ((single x r).sum fun a₂ b₂ => ite (a₁ * a₂ = z) (b₁ * b₂) 0) = ite (a₁ * x = z) (b₁ * r) 0 :=
    fun a₁ b₁ => sum_single_index <| by simp
  calc
    (HMul.hMul (β := MonoidAlgebra k G) f (single x r)) z = sum f fun a b => if a = y then b * r else 0 := by
      simp only [mul_apply, A, H]
    _ = if y ∈ f.support then f y * r else 0 := (f.support.sum_ite_eq' _ _)
    _ = f y * r := by split_ifs with h <;> simp at h  <;> simp [h]
[GOAL]
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), a * x = z ↔ a = y
⊢ ↑(f * single x r) z = ↑f y * r
[PROOFSTEP]
exact
  have A : ∀ a₁ b₁, ((single x r).sum fun a₂ b₂ => ite (a₁ * a₂ = z) (b₁ * b₂) 0) = ite (a₁ * x = z) (b₁ * r) 0 :=
    fun a₁ b₁ => sum_single_index <| by simp
  calc
    (HMul.hMul (β := MonoidAlgebra k G) f (single x r)) z = sum f fun a b => if a = y then b * r else 0 := by
      simp only [mul_apply, A, H]
    _ = if y ∈ f.support then f y * r else 0 := (f.support.sum_ite_eq' _ _)
    _ = f y * r := by split_ifs with h <;> simp at h  <;> simp [h]
[GOAL]
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), a * x = z ↔ a = y
a₁ : G
b₁ : k
⊢ (if a₁ * x = z then b₁ * 0 else 0) = 0
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), a * x = z ↔ a = y
A :
  ∀ (a₁ : G) (b₁ : k),
    (sum (single x r) fun a₂ b₂ => if a₁ * a₂ = z then b₁ * b₂ else 0) = if a₁ * x = z then b₁ * r else 0
⊢ ↑(f * single x r) z = sum f fun a b => if a = y then b * r else 0
[PROOFSTEP]
simp only [mul_apply, A, H]
[GOAL]
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), a * x = z ↔ a = y
A :
  ∀ (a₁ : G) (b₁ : k),
    (sum (single x r) fun a₂ b₂ => if a₁ * a₂ = z then b₁ * b₂ else 0) = if a₁ * x = z then b₁ * r else 0
⊢ (if y ∈ f.support then ↑f y * r else 0) = ↑f y * r
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), a * x = z ↔ a = y
A :
  ∀ (a₁ : G) (b₁ : k),
    (sum (single x r) fun a₂ b₂ => if a₁ * a₂ = z then b₁ * b₂ else 0) = if a₁ * x = z then b₁ * r else 0
h : y ∈ f.support
⊢ ↑f y * r = ↑f y * r
[PROOFSTEP]
simp at h
[GOAL]
case neg
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), a * x = z ↔ a = y
A :
  ∀ (a₁ : G) (b₁ : k),
    (sum (single x r) fun a₂ b₂ => if a₁ * a₂ = z then b₁ * b₂ else 0) = if a₁ * x = z then b₁ * r else 0
h : ¬y ∈ f.support
⊢ 0 = ↑f y * r
[PROOFSTEP]
simp at h
[GOAL]
case pos
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), a * x = z ↔ a = y
A :
  ∀ (a₁ : G) (b₁ : k),
    (sum (single x r) fun a₂ b₂ => if a₁ * a₂ = z then b₁ * b₂ else 0) = if a₁ * x = z then b₁ * r else 0
h : ¬↑f y = 0
⊢ ↑f y * r = ↑f y * r
[PROOFSTEP]
simp [h]
[GOAL]
case neg
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), a * x = z ↔ a = y
A :
  ∀ (a₁ : G) (b₁ : k),
    (sum (single x r) fun a₂ b₂ => if a₁ * a₂ = z then b₁ * b₂ else 0) = if a₁ * x = z then b₁ * r else 0
h : ↑f y = 0
⊢ 0 = ↑f y * r
[PROOFSTEP]
simp [h]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : MulOneClass G
f : MonoidAlgebra k G
r : k
x a : G
⊢ a * 1 = x ↔ a = x
[PROOFSTEP]
rw [mul_one]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = d * g
⊢ ↑(x * single g r) g' = 0
[PROOFSTEP]
classical
rw [mul_apply, Finsupp.sum_comm, Finsupp.sum_single_index]
swap
· simp_rw [Finsupp.sum, mul_zero, ite_self, Finset.sum_const_zero]
· apply Finset.sum_eq_zero
  simp_rw [ite_eq_right_iff]
  rintro g'' _hg'' rfl
  exfalso
  exact h ⟨_, rfl⟩
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = d * g
⊢ ↑(x * single g r) g' = 0
[PROOFSTEP]
rw [mul_apply, Finsupp.sum_comm, Finsupp.sum_single_index]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = d * g
⊢ (sum x fun x v => if x * g = g' then v * r else 0) = 0
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = d * g
⊢ (sum x fun x v => if x * g = g' then v * 0 else 0) = 0
[PROOFSTEP]
swap
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = d * g
⊢ (sum x fun x v => if x * g = g' then v * 0 else 0) = 0
[PROOFSTEP]
simp_rw [Finsupp.sum, mul_zero, ite_self, Finset.sum_const_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = d * g
⊢ (sum x fun x v => if x * g = g' then v * r else 0) = 0
[PROOFSTEP]
apply Finset.sum_eq_zero
[GOAL]
case h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = d * g
⊢ ∀ (x_1 : G), x_1 ∈ x.support → (fun x v => if x * g = g' then v * r else 0) x_1 (↑x x_1) = 0
[PROOFSTEP]
simp_rw [ite_eq_right_iff]
[GOAL]
case h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = d * g
⊢ ∀ (x_1 : G), x_1 ∈ x.support → x_1 * g = g' → ↑x x_1 * r = 0
[PROOFSTEP]
rintro g'' _hg'' rfl
[GOAL]
case h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g : G
x : MonoidAlgebra k G
g'' : G
_hg'' : g'' ∈ x.support
h : ¬∃ d, g'' * g = d * g
⊢ ↑x g'' * r = 0
[PROOFSTEP]
exfalso
[GOAL]
case h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g : G
x : MonoidAlgebra k G
g'' : G
_hg'' : g'' ∈ x.support
h : ¬∃ d, g'' * g = d * g
⊢ False
[PROOFSTEP]
exact h ⟨_, rfl⟩
[GOAL]
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), x * a = y ↔ a = z
⊢ ↑(single x r * f) y = r * ↑f z
[PROOFSTEP]
classical exact
  have : (f.sum fun a b => ite (x * a = y) (0 * b) 0) = 0 := by simp
  calc
    (HMul.hMul (α := MonoidAlgebra k G) (single x r) f) y = sum f fun a b => ite (x * a = y) (r * b) 0 :=
      (mul_apply _ _ _).trans <| sum_single_index this
    _ = f.sum fun a b => ite (a = z) (r * b) 0 := by simp only [H]
    _ = if z ∈ f.support then r * f z else 0 := (f.support.sum_ite_eq' _ _)
    _ = _ := by split_ifs with h <;> simp at h  <;> simp [h]
[GOAL]
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), x * a = y ↔ a = z
⊢ ↑(single x r * f) y = r * ↑f z
[PROOFSTEP]
exact
  have : (f.sum fun a b => ite (x * a = y) (0 * b) 0) = 0 := by simp
  calc
    (HMul.hMul (α := MonoidAlgebra k G) (single x r) f) y = sum f fun a b => ite (x * a = y) (r * b) 0 :=
      (mul_apply _ _ _).trans <| sum_single_index this
    _ = f.sum fun a b => ite (a = z) (r * b) 0 := by simp only [H]
    _ = if z ∈ f.support then r * f z else 0 := (f.support.sum_ite_eq' _ _)
    _ = _ := by split_ifs with h <;> simp at h  <;> simp [h]
[GOAL]
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), x * a = y ↔ a = z
⊢ (sum f fun a b => if x * a = y then 0 * b else 0) = 0
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), x * a = y ↔ a = z
this : (sum f fun a b => if x * a = y then 0 * b else 0) = 0
⊢ (sum f fun a b => if x * a = y then r * b else 0) = sum f fun a b => if a = z then r * b else 0
[PROOFSTEP]
simp only [H]
[GOAL]
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), x * a = y ↔ a = z
this : (sum f fun a b => if x * a = y then 0 * b else 0) = 0
⊢ (if z ∈ f.support then r * ↑f z else 0) = r * ↑f z
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), x * a = y ↔ a = z
this : (sum f fun a b => if x * a = y then 0 * b else 0) = 0
h : z ∈ f.support
⊢ r * ↑f z = r * ↑f z
[PROOFSTEP]
simp at h
[GOAL]
case neg
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), x * a = y ↔ a = z
this : (sum f fun a b => if x * a = y then 0 * b else 0) = 0
h : ¬z ∈ f.support
⊢ 0 = r * ↑f z
[PROOFSTEP]
simp at h
[GOAL]
case pos
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), x * a = y ↔ a = z
this : (sum f fun a b => if x * a = y then 0 * b else 0) = 0
h : ¬↑f z = 0
⊢ r * ↑f z = r * ↑f z
[PROOFSTEP]
simp [h]
[GOAL]
case neg
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
x y z : G
H : ∀ (a : G), x * a = y ↔ a = z
this : (sum f fun a b => if x * a = y then 0 * b else 0) = 0
h : ↑f z = 0
⊢ 0 = r * ↑f z
[PROOFSTEP]
simp [h]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : MulOneClass G
f : MonoidAlgebra k G
r : k
x a : G
⊢ 1 * a = x ↔ a = x
[PROOFSTEP]
rw [one_mul]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ ↑(single g r * x) g' = 0
[PROOFSTEP]
classical
rw [mul_apply, Finsupp.sum_single_index]
swap
· simp_rw [Finsupp.sum, zero_mul, ite_self, Finset.sum_const_zero]
· apply Finset.sum_eq_zero
  simp_rw [ite_eq_right_iff]
  rintro g'' _hg'' rfl
  exfalso
  exact h ⟨_, rfl⟩
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ ↑(single g r * x) g' = 0
[PROOFSTEP]
rw [mul_apply, Finsupp.sum_single_index]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then r * b₂ else 0) = 0
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then 0 * b₂ else 0) = 0
[PROOFSTEP]
swap
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then 0 * b₂ else 0) = 0
[PROOFSTEP]
simp_rw [Finsupp.sum, zero_mul, ite_self, Finset.sum_const_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then r * b₂ else 0) = 0
[PROOFSTEP]
apply Finset.sum_eq_zero
[GOAL]
case h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ ∀ (x_1 : G), x_1 ∈ x.support → (fun a₂ b₂ => if g * a₂ = g' then r * b₂ else 0) x_1 (↑x x_1) = 0
[PROOFSTEP]
simp_rw [ite_eq_right_iff]
[GOAL]
case h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ ∀ (x_1 : G), x_1 ∈ x.support → g * x_1 = g' → r * ↑x x_1 = 0
[PROOFSTEP]
rintro g'' _hg'' rfl
[GOAL]
case h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g : G
x : MonoidAlgebra k G
g'' : G
_hg'' : g'' ∈ x.support
h : ¬∃ d, g * g'' = g * d
⊢ r * ↑x g'' = 0
[PROOFSTEP]
exfalso
[GOAL]
case h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g : G
x : MonoidAlgebra k G
g'' : G
_hg'' : g'' ∈ x.support
h : ¬∃ d, g * g'' = g * d
⊢ False
[PROOFSTEP]
exact h ⟨_, rfl⟩
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R✝ : Type u_2
inst✝² : Semiring k
inst✝¹ : MulOneClass G
R : Type u_3
inst✝ : Semiring R
f : k →+* R
g : G →* R
c : k
φ : MonoidAlgebra k G
⊢ ↑(liftNC ↑f ↑g) (c • φ) = ↑f c * ↑(liftNC ↑f ↑g) φ
[PROOFSTEP]
suffices : (liftNC (↑f) g).comp (smulAddHom k (MonoidAlgebra k G) c) = (AddMonoidHom.mulLeft (f c)).comp (liftNC (↑f) g)
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R✝ : Type u_2
inst✝² : Semiring k
inst✝¹ : MulOneClass G
R : Type u_3
inst✝ : Semiring R
f : k →+* R
g : G →* R
c : k
φ : MonoidAlgebra k G
this :
  AddMonoidHom.comp (liftNC ↑f ↑g) (↑(smulAddHom k (MonoidAlgebra k G)) c) =
    AddMonoidHom.comp (AddMonoidHom.mulLeft (↑f c)) (liftNC ↑f ↑g)
⊢ ↑(liftNC ↑f ↑g) (c • φ) = ↑f c * ↑(liftNC ↑f ↑g) φ
case this
k : Type u₁
G : Type u₂
H : Type u_1
R✝ : Type u_2
inst✝² : Semiring k
inst✝¹ : MulOneClass G
R : Type u_3
inst✝ : Semiring R
f : k →+* R
g : G →* R
c : k
φ : MonoidAlgebra k G
⊢ AddMonoidHom.comp (liftNC ↑f ↑g) (↑(smulAddHom k (MonoidAlgebra k G)) c) =
    AddMonoidHom.comp (AddMonoidHom.mulLeft (↑f c)) (liftNC ↑f ↑g)
[PROOFSTEP]
exact FunLike.congr_fun this φ
[GOAL]
case this
k : Type u₁
G : Type u₂
H : Type u_1
R✝ : Type u_2
inst✝² : Semiring k
inst✝¹ : MulOneClass G
R : Type u_3
inst✝ : Semiring R
f : k →+* R
g : G →* R
c : k
φ : MonoidAlgebra k G
⊢ AddMonoidHom.comp (liftNC ↑f ↑g) (↑(smulAddHom k (MonoidAlgebra k G)) c) =
    AddMonoidHom.comp (AddMonoidHom.mulLeft (↑f c)) (liftNC ↑f ↑g)
[PROOFSTEP]
refine
  addHom_ext' fun a =>
    AddMonoidHom.ext fun b =>
      ?_
        -- Porting note: `reducible` cannot be `local` so the proof gets more complex.
[GOAL]
case this
k : Type u₁
G : Type u₂
H : Type u_1
R✝ : Type u_2
inst✝² : Semiring k
inst✝¹ : MulOneClass G
R : Type u_3
inst✝ : Semiring R
f : k →+* R
g : G →* R
c : k
φ : MonoidAlgebra k G
a : G
b : k
⊢ ↑(AddMonoidHom.comp (AddMonoidHom.comp (liftNC ↑f ↑g) (↑(smulAddHom k (MonoidAlgebra k G)) c)) (singleAddHom a)) b =
    ↑(AddMonoidHom.comp (AddMonoidHom.comp (AddMonoidHom.mulLeft (↑f c)) (liftNC ↑f ↑g)) (singleAddHom a)) b
[PROOFSTEP]
unfold MonoidAlgebra
[GOAL]
case this
k : Type u₁
G : Type u₂
H : Type u_1
R✝ : Type u_2
inst✝² : Semiring k
inst✝¹ : MulOneClass G
R : Type u_3
inst✝ : Semiring R
f : k →+* R
g : G →* R
c : k
φ : MonoidAlgebra k G
a : G
b : k
⊢ ↑(AddMonoidHom.comp (AddMonoidHom.comp (liftNC ↑f ↑g) (↑(smulAddHom k (G →₀ k)) c)) (singleAddHom a)) b =
    ↑(AddMonoidHom.comp (AddMonoidHom.comp (AddMonoidHom.mulLeft (↑f c)) (liftNC ↑f ↑g)) (singleAddHom a)) b
[PROOFSTEP]
simp
[GOAL]
case this
k : Type u₁
G : Type u₂
H : Type u_1
R✝ : Type u_2
inst✝² : Semiring k
inst✝¹ : MulOneClass G
R : Type u_3
inst✝ : Semiring R
f : k →+* R
g : G →* R
c : k
φ : MonoidAlgebra k G
a : G
b : k
⊢ ↑(liftNC ↑f ↑g) (Finsupp.single a (c * b)) = ↑f c * ↑(liftNC ↑f ↑g) (Finsupp.single a b)
[PROOFSTEP]
rw [liftNC_single, liftNC_single, AddMonoidHom.coe_coe, map_mul, mul_assoc]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : IsScalarTower R k k
t : R
a b : MonoidAlgebra k G
⊢ (t • a) • b = t • a • b
[PROOFSTEP]
refine
  Finsupp.ext fun m =>
    ?_
      -- Porting note: `refine` & `rw` are required because `simp` behaves differently.
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : IsScalarTower R k k
t : R
a b : MonoidAlgebra k G
m : G
⊢ ↑((t • a) • b) m = ↑(t • a • b) m
[PROOFSTEP]
classical
simp only [smul_eq_mul, mul_apply]
rw [coe_smul]
refine Eq.trans (sum_smul_index' (g := a) (b := t) ?_) ?_ <;>
  simp only [mul_apply, Finsupp.smul_sum, smul_ite, smul_mul_assoc, zero_mul, ite_self, imp_true_iff, sum_zero,
    Pi.smul_apply, smul_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : IsScalarTower R k k
t : R
a b : MonoidAlgebra k G
m : G
⊢ ↑((t • a) • b) m = ↑(t • a • b) m
[PROOFSTEP]
simp only [smul_eq_mul, mul_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : IsScalarTower R k k
t : R
a b : MonoidAlgebra k G
m : G
⊢ (sum (t • a) fun a₁ b₁ => sum b fun a₂ b₂ => if a₁ * a₂ = m then b₁ * b₂ else 0) = ↑(t • (a * b)) m
[PROOFSTEP]
rw [coe_smul]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : IsScalarTower R k k
t : R
a b : MonoidAlgebra k G
m : G
⊢ (sum (t • a) fun a₁ b₁ => sum b fun a₂ b₂ => if a₁ * a₂ = m then b₁ * b₂ else 0) = (t • ↑(a * b)) m
[PROOFSTEP]
refine Eq.trans (sum_smul_index' (g := a) (b := t) ?_) ?_
[GOAL]
case refine_1
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : IsScalarTower R k k
t : R
a b : MonoidAlgebra k G
m : G
⊢ ∀ (i : G), (sum b fun a₂ b₂ => if i * a₂ = m then 0 * b₂ else 0) = 0
[PROOFSTEP]
simp only [mul_apply, Finsupp.smul_sum, smul_ite, smul_mul_assoc, zero_mul, ite_self, imp_true_iff, sum_zero,
  Pi.smul_apply, smul_zero]
[GOAL]
case refine_2
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : IsScalarTower R k k
t : R
a b : MonoidAlgebra k G
m : G
⊢ (sum a fun i c => sum b fun a₂ b₂ => if i * a₂ = m then t • c * b₂ else 0) = (t • ↑(a * b)) m
[PROOFSTEP]
simp only [mul_apply, Finsupp.smul_sum, smul_ite, smul_mul_assoc, zero_mul, ite_self, imp_true_iff, sum_zero,
  Pi.smul_apply, smul_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : SMulCommClass R k k
t : R
a b : MonoidAlgebra k G
⊢ t • a • b = a • t • b
[PROOFSTEP]
refine
  Finsupp.ext fun m =>
    ?_
      -- Porting note: `refine` & `rw` are required because `simp` behaves differently.
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : SMulCommClass R k k
t : R
a b : MonoidAlgebra k G
m : G
⊢ ↑(t • a • b) m = ↑(a • t • b) m
[PROOFSTEP]
classical
simp only [smul_eq_mul, mul_apply]
rw [coe_smul]
refine Eq.symm (Eq.trans (congr_arg (sum a) (funext₂ fun a₁ b₁ => sum_smul_index' (g := b) (b := t) ?_)) ?_) <;>
  simp only [mul_apply, Finsupp.sum, Finset.smul_sum, smul_ite, mul_smul_comm, imp_true_iff, ite_eq_right_iff,
    Pi.smul_apply, mul_zero, smul_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : SMulCommClass R k k
t : R
a b : MonoidAlgebra k G
m : G
⊢ ↑(t • a • b) m = ↑(a • t • b) m
[PROOFSTEP]
simp only [smul_eq_mul, mul_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : SMulCommClass R k k
t : R
a b : MonoidAlgebra k G
m : G
⊢ ↑(t • (a * b)) m = sum a fun a₁ b₁ => sum (t • b) fun a₂ b₂ => if a₁ * a₂ = m then b₁ * b₂ else 0
[PROOFSTEP]
rw [coe_smul]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : SMulCommClass R k k
t : R
a b : MonoidAlgebra k G
m : G
⊢ (t • ↑(a * b)) m = sum a fun a₁ b₁ => sum (t • b) fun a₂ b₂ => if a₁ * a₂ = m then b₁ * b₂ else 0
[PROOFSTEP]
refine Eq.symm (Eq.trans (congr_arg (sum a) (funext₂ fun a₁ b₁ => sum_smul_index' (g := b) (b := t) ?_)) ?_)
[GOAL]
case refine_1
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : SMulCommClass R k k
t : R
a b : MonoidAlgebra k G
m a₁ : G
b₁ : k
⊢ ∀ (i : G), (if a₁ * i = m then b₁ * 0 else 0) = 0
[PROOFSTEP]
simp only [mul_apply, Finsupp.sum, Finset.smul_sum, smul_ite, mul_smul_comm, imp_true_iff, ite_eq_right_iff,
  Pi.smul_apply, mul_zero, smul_zero]
[GOAL]
case refine_2
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : SMulCommClass R k k
t : R
a b : MonoidAlgebra k G
m : G
⊢ (sum a fun a₁ b₁ => sum b fun i c => if a₁ * i = m then b₁ * t • c else 0) = (t • ↑(a * b)) m
[PROOFSTEP]
simp only [mul_apply, Finsupp.sum, Finset.smul_sum, smul_ite, mul_smul_comm, imp_true_iff, ite_eq_right_iff,
  Pi.smul_apply, mul_zero, smul_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : SMulCommClass k R k
t : MonoidAlgebra k G
a : R
b : MonoidAlgebra k G
⊢ t • a • b = a • t • b
[PROOFSTEP]
haveI := SMulCommClass.symm k R k
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : Semiring k
inst✝² : DistribSMul R k
inst✝¹ : Mul G
inst✝ : SMulCommClass k R k
t : MonoidAlgebra k G
a : R
b : MonoidAlgebra k G
this : SMulCommClass R k k
⊢ t • a • b = a • t • b
[PROOFSTEP]
rw [← smul_comm]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
t' : k
a : MonoidAlgebra k G
⊢ (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a
[PROOFSTEP]
dsimp only []
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
t' : k
a : MonoidAlgebra k G
⊢ (sum (t' • a) fun m t => t • ↑f m) = t' • sum a fun m t => t • ↑f m
[PROOFSTEP]
rw [Finsupp.smul_sum, sum_smul_index']
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
t' : k
a : MonoidAlgebra k G
⊢ (sum a fun i c => (t' • c) • ↑f i) = sum a fun a b => t' • b • ↑f a
[PROOFSTEP]
simp_rw [smul_assoc]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
t' : k
a : MonoidAlgebra k G
⊢ ∀ (i : G), 0 • ↑f i = 0
[PROOFSTEP]
intro m
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
t' : k
a : MonoidAlgebra k G
m : G
⊢ 0 • ↑f m = 0
[PROOFSTEP]
exact zero_smul k (f m)
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
⊢ MulActionHom.toFun
      {
          toMulActionHom :=
            { toFun := fun a => sum a fun m t => t • ↑f m,
              map_smul' :=
                (_ :
                  ∀ (t' : k) (a : MonoidAlgebra k G),
                    (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },
          map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
          map_add' :=
            (_ :
              ∀ (x y : G →₀ k),
                ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
      (a₁ * a₂) =
    MulActionHom.toFun
        {
            toMulActionHom :=
              { toFun := fun a => sum a fun m t => t • ↑f m,
                map_smul' :=
                  (_ :
                    ∀ (t' : k) (a : MonoidAlgebra k G),
                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },
            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
            map_add' :=
              (_ :
                ∀ (x y : G →₀ k),
                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
        a₁ *
      MulActionHom.toFun
        {
            toMulActionHom :=
              { toFun := fun a => sum a fun m t => t • ↑f m,
                map_smul' :=
                  (_ :
                    ∀ (t' : k) (a : MonoidAlgebra k G),
                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },
            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
            map_add' :=
              (_ :
                ∀ (x y : G →₀ k),
                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
        a₂
[PROOFSTEP]
let g : G → k → A := fun m t => t • f m
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • ↑f m
⊢ MulActionHom.toFun
      {
          toMulActionHom :=
            { toFun := fun a => sum a fun m t => t • ↑f m,
              map_smul' :=
                (_ :
                  ∀ (t' : k) (a : MonoidAlgebra k G),
                    (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },
          map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
          map_add' :=
            (_ :
              ∀ (x y : G →₀ k),
                ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
      (a₁ * a₂) =
    MulActionHom.toFun
        {
            toMulActionHom :=
              { toFun := fun a => sum a fun m t => t • ↑f m,
                map_smul' :=
                  (_ :
                    ∀ (t' : k) (a : MonoidAlgebra k G),
                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },
            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
            map_add' :=
              (_ :
                ∀ (x y : G →₀ k),
                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
        a₁ *
      MulActionHom.toFun
        {
            toMulActionHom :=
              { toFun := fun a => sum a fun m t => t • ↑f m,
                map_smul' :=
                  (_ :
                    ∀ (t' : k) (a : MonoidAlgebra k G),
                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },
            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
            map_add' :=
              (_ :
                ∀ (x y : G →₀ k),
                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
        a₂
[PROOFSTEP]
have h₁ : ∀ m, g m 0 = 0 := by
  intro m
  exact zero_smul k (f m)
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • ↑f m
⊢ ∀ (m : G), g m 0 = 0
[PROOFSTEP]
intro m
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • ↑f m
m : G
⊢ g m 0 = 0
[PROOFSTEP]
exact zero_smul k (f m)
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • ↑f m
h₁ : ∀ (m : G), g m 0 = 0
⊢ MulActionHom.toFun
      {
          toMulActionHom :=
            { toFun := fun a => sum a fun m t => t • ↑f m,
              map_smul' :=
                (_ :
                  ∀ (t' : k) (a : MonoidAlgebra k G),
                    (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },
          map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
          map_add' :=
            (_ :
              ∀ (x y : G →₀ k),
                ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
      (a₁ * a₂) =
    MulActionHom.toFun
        {
            toMulActionHom :=
              { toFun := fun a => sum a fun m t => t • ↑f m,
                map_smul' :=
                  (_ :
                    ∀ (t' : k) (a : MonoidAlgebra k G),
                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },
            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
            map_add' :=
              (_ :
                ∀ (x y : G →₀ k),
                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
        a₁ *
      MulActionHom.toFun
        {
            toMulActionHom :=
              { toFun := fun a => sum a fun m t => t • ↑f m,
                map_smul' :=
                  (_ :
                    ∀ (t' : k) (a : MonoidAlgebra k G),
                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },
            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
            map_add' :=
              (_ :
                ∀ (x y : G →₀ k),
                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
        a₂
[PROOFSTEP]
have h₂ : ∀ (m) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂ :=
  by
  intros
  rw [← add_smul]
    -- Porting note: `reducible` cannot be `local` so proof gets long.
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • ↑f m
h₁ : ∀ (m : G), g m 0 = 0
⊢ ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂
[PROOFSTEP]
intros
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • ↑f m
h₁ : ∀ (m : G), g m 0 = 0
m✝ : G
t₁✝ t₂✝ : k
⊢ g m✝ (t₁✝ + t₂✝) = g m✝ t₁✝ + g m✝ t₂✝
[PROOFSTEP]
rw [← add_smul]
  -- Porting note: `reducible` cannot be `local` so proof gets long.
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • ↑f m
h₁ : ∀ (m : G), g m 0 = 0
h₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂
⊢ MulActionHom.toFun
      {
          toMulActionHom :=
            { toFun := fun a => sum a fun m t => t • ↑f m,
              map_smul' :=
                (_ :
                  ∀ (t' : k) (a : MonoidAlgebra k G),
                    (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },
          map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
          map_add' :=
            (_ :
              ∀ (x y : G →₀ k),
                ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
      (a₁ * a₂) =
    MulActionHom.toFun
        {
            toMulActionHom :=
              { toFun := fun a => sum a fun m t => t • ↑f m,
                map_smul' :=
                  (_ :
                    ∀ (t' : k) (a : MonoidAlgebra k G),
                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },
            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
            map_add' :=
              (_ :
                ∀ (x y : G →₀ k),
                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
        a₁ *
      MulActionHom.toFun
        {
            toMulActionHom :=
              { toFun := fun a => sum a fun m t => t • ↑f m,
                map_smul' :=
                  (_ :
                    ∀ (t' : k) (a : MonoidAlgebra k G),
                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },
            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),
            map_add' :=
              (_ :
                ∀ (x y : G →₀ k),
                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom
        a₂
[PROOFSTEP]
simp_rw [Finsupp.mul_sum, Finsupp.sum_mul, smul_mul_smul, ← f.map_mul, mul_def, sum_comm a₂ a₁]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • ↑f m
h₁ : ∀ (m : G), g m 0 = 0
h₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂
⊢ (sum (sum a₁ fun a₁ b₁ => sum a₂ fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) fun m t => t • ↑f m) =
    sum a₁ fun x' v' => sum a₂ fun x v => (v' * v) • ↑f (x' * x)
[PROOFSTEP]
rw [sum_sum_index h₁ h₂]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • ↑f m
h₁ : ∀ (m : G), g m 0 = 0
h₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂
⊢ (sum a₁ fun a b => sum (sum a₂ fun a₂ b₂ => single (a * a₂) (b * b₂)) fun a => g a) =
    sum a₁ fun x' v' => sum a₂ fun x v => (v' * v) • ↑f (x' * x)
[PROOFSTEP]
congr
[GOAL]
case e_g
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • ↑f m
h₁ : ∀ (m : G), g m 0 = 0
h₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂
⊢ (fun a b => sum (sum a₂ fun a₂ b₂ => single (a * a₂) (b * b₂)) fun a => g a) = fun x' v' =>
    sum a₂ fun x v => (v' * v) • ↑f (x' * x)
[PROOFSTEP]
ext
[GOAL]
case e_g.h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • ↑f m
h₁ : ∀ (m : G), g m 0 = 0
h₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂
x✝¹ : G
x✝ : k
⊢ (sum (sum a₂ fun a₂ b₂ => single (x✝¹ * a₂) (x✝ * b₂)) fun a => g a) = sum a₂ fun x v => (x✝ * v) • ↑f (x✝¹ * x)
[PROOFSTEP]
rw [sum_sum_index h₁ h₂]
[GOAL]
case e_g.h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • ↑f m
h₁ : ∀ (m : G), g m 0 = 0
h₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂
x✝¹ : G
x✝ : k
⊢ (sum a₂ fun a b => sum (single (x✝¹ * a) (x✝ * b)) fun a => g a) = sum a₂ fun x v => (x✝ * v) • ↑f (x✝¹ * x)
[PROOFSTEP]
congr
[GOAL]
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✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • ↑f m
h₁ : ∀ (m : G), g m 0 = 0
h₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂
x✝¹ : G
x✝ : k
⊢ (fun a b => sum (single (x✝¹ * a) (x✝ * b)) fun a => g a) = fun x v => (x✝ * v) • ↑f (x✝¹ * x)
[PROOFSTEP]
ext
[GOAL]
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✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
src✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=
  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)
a₁ a₂ : MonoidAlgebra k G
g : G → k → A := fun m t => t • ↑f m
h₁ : ∀ (m : G), g m 0 = 0
h₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂
x✝³ : G
x✝² : k
x✝¹ : G
x✝ : k
⊢ (sum (single (x✝³ * x✝¹) (x✝² * x✝)) fun a => g a) = (x✝² * x✝) • ↑f (x✝³ * x✝¹)
[PROOFSTEP]
rw [sum_single_index (h₁ _)]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
⊢ (fun F => MulHom.comp (NonUnitalAlgHom.toMulHom F) (ofMagma k G))
      ((fun f =>
          let src := ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x);
          {
            toDistribMulActionHom :=
              {
                toMulActionHom :=
                  { toFun := fun a => sum a fun m t => t • ↑f m,
                    map_smul' :=
                      (_ :
                        ∀ (t' : k) (a : MonoidAlgebra k G),
                          (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                            t' • (fun a => sum a fun m t => t • ↑f m) a) },
                map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                map_add' :=
                  (_ :
                    ∀ (x y : G →₀ k), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },
            map_mul' :=
              (_ :
                ∀ (a₁ a₂ : MonoidAlgebra k G),
                  MulActionHom.toFun
                      {
                          toMulActionHom :=
                            { toFun := fun a => sum a fun m t => t • ↑f m,
                              map_smul' :=
                                (_ :
                                  ∀ (t' : k) (a : MonoidAlgebra k G),
                                    (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                                      t' • (fun a => sum a fun m t => t • ↑f m) a) },
                          map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                          map_add' :=
                            (_ :
                              ∀ (x y : G →₀ k),
                                ZeroHom.toFun (↑src) (x + y) =
                                  ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom
                      (a₁ * a₂) =
                    MulActionHom.toFun
                        {
                            toMulActionHom :=
                              { toFun := fun a => sum a fun m t => t • ↑f m,
                                map_smul' :=
                                  (_ :
                                    ∀ (t' : k) (a : MonoidAlgebra k G),
                                      (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                                        t' • (fun a => sum a fun m t => t • ↑f m) a) },
                            map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                            map_add' :=
                              (_ :
                                ∀ (x y : G →₀ k),
                                  ZeroHom.toFun (↑src) (x + y) =
                                    ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom
                        a₁ *
                      MulActionHom.toFun
                        {
                            toMulActionHom :=
                              { toFun := fun a => sum a fun m t => t • ↑f m,
                                map_smul' :=
                                  (_ :
                                    ∀ (t' : k) (a : MonoidAlgebra k G),
                                      (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                                        t' • (fun a => sum a fun m t => t • ↑f m) a) },
                            map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                            map_add' :=
                              (_ :
                                ∀ (x y : G →₀ k),
                                  ZeroHom.toFun (↑src) (x + y) =
                                    ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom
                        a₂) })
        f) =
    f
[PROOFSTEP]
ext m
[GOAL]
case h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
f : G →ₙ* A
m : G
⊢ ↑((fun F => MulHom.comp (NonUnitalAlgHom.toMulHom F) (ofMagma k G))
          ((fun f =>
              let src := ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x);
              {
                toDistribMulActionHom :=
                  {
                    toMulActionHom :=
                      { toFun := fun a => sum a fun m t => t • ↑f m,
                        map_smul' :=
                          (_ :
                            ∀ (t' : k) (a : MonoidAlgebra k G),
                              (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                                t' • (fun a => sum a fun m t => t • ↑f m) a) },
                    map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                    map_add' :=
                      (_ :
                        ∀ (x y : G →₀ k),
                          ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },
                map_mul' :=
                  (_ :
                    ∀ (a₁ a₂ : MonoidAlgebra k G),
                      MulActionHom.toFun
                          {
                              toMulActionHom :=
                                { toFun := fun a => sum a fun m t => t • ↑f m,
                                  map_smul' :=
                                    (_ :
                                      ∀ (t' : k) (a : MonoidAlgebra k G),
                                        (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                                          t' • (fun a => sum a fun m t => t • ↑f m) a) },
                              map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                              map_add' :=
                                (_ :
                                  ∀ (x y : G →₀ k),
                                    ZeroHom.toFun (↑src) (x + y) =
                                      ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom
                          (a₁ * a₂) =
                        MulActionHom.toFun
                            {
                                toMulActionHom :=
                                  { toFun := fun a => sum a fun m t => t • ↑f m,
                                    map_smul' :=
                                      (_ :
                                        ∀ (t' : k) (a : MonoidAlgebra k G),
                                          (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                                            t' • (fun a => sum a fun m t => t • ↑f m) a) },
                                map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                                map_add' :=
                                  (_ :
                                    ∀ (x y : G →₀ k),
                                      ZeroHom.toFun (↑src) (x + y) =
                                        ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom
                            a₁ *
                          MulActionHom.toFun
                            {
                                toMulActionHom :=
                                  { toFun := fun a => sum a fun m t => t • ↑f m,
                                    map_smul' :=
                                      (_ :
                                        ∀ (t' : k) (a : MonoidAlgebra k G),
                                          (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                                            t' • (fun a => sum a fun m t => t • ↑f m) a) },
                                map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                                map_add' :=
                                  (_ :
                                    ∀ (x y : G →₀ k),
                                      ZeroHom.toFun (↑src) (x + y) =
                                        ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom
                            a₂) })
            f))
      m =
    ↑f m
[PROOFSTEP]
simp only [NonUnitalAlgHom.coe_mk, ofMagma_apply, NonUnitalAlgHom.toMulHom_eq_coe, sum_single_index,
  Function.comp_apply, one_smul, zero_smul, MulHom.coe_comp, NonUnitalAlgHom.coe_to_mulHom]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
F : MonoidAlgebra k G →ₙₐ[k] A
⊢ (fun f =>
        let src := ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x);
        {
          toDistribMulActionHom :=
            {
              toMulActionHom :=
                { toFun := fun a => sum a fun m t => t • ↑f m,
                  map_smul' :=
                    (_ :
                      ∀ (t' : k) (a : MonoidAlgebra k G),
                        (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },
              map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
              map_add' :=
                (_ :
                  ∀ (x y : G →₀ k), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },
          map_mul' :=
            (_ :
              ∀ (a₁ a₂ : MonoidAlgebra k G),
                MulActionHom.toFun
                    {
                        toMulActionHom :=
                          { toFun := fun a => sum a fun m t => t • ↑f m,
                            map_smul' :=
                              (_ :
                                ∀ (t' : k) (a : MonoidAlgebra k G),
                                  (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                                    t' • (fun a => sum a fun m t => t • ↑f m) a) },
                        map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                        map_add' :=
                          (_ :
                            ∀ (x y : G →₀ k),
                              ZeroHom.toFun (↑src) (x + y) =
                                ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom
                    (a₁ * a₂) =
                  MulActionHom.toFun
                      {
                          toMulActionHom :=
                            { toFun := fun a => sum a fun m t => t • ↑f m,
                              map_smul' :=
                                (_ :
                                  ∀ (t' : k) (a : MonoidAlgebra k G),
                                    (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                                      t' • (fun a => sum a fun m t => t • ↑f m) a) },
                          map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                          map_add' :=
                            (_ :
                              ∀ (x y : G →₀ k),
                                ZeroHom.toFun (↑src) (x + y) =
                                  ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom
                      a₁ *
                    MulActionHom.toFun
                      {
                          toMulActionHom :=
                            { toFun := fun a => sum a fun m t => t • ↑f m,
                              map_smul' :=
                                (_ :
                                  ∀ (t' : k) (a : MonoidAlgebra k G),
                                    (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                                      t' • (fun a => sum a fun m t => t • ↑f m) a) },
                          map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                          map_add' :=
                            (_ :
                              ∀ (x y : G →₀ k),
                                ZeroHom.toFun (↑src) (x + y) =
                                  ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom
                      a₂) })
      ((fun F => MulHom.comp (NonUnitalAlgHom.toMulHom F) (ofMagma k G)) F) =
    F
[PROOFSTEP]
refine nonUnitalAlgHom_ext' k (MulHom.ext fun m => ?_)
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : Semiring k
inst✝⁵ : DistribSMul R k
inst✝⁴ : Mul G
A : Type u₃
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : Module k A
inst✝¹ : IsScalarTower k A A
inst✝ : SMulCommClass k A A
F : MonoidAlgebra k G →ₙₐ[k] A
m : G
⊢ ↑(MulHom.comp
          (NonUnitalAlgHom.toMulHom
            ((fun f =>
                let src := ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x);
                {
                  toDistribMulActionHom :=
                    {
                      toMulActionHom :=
                        { toFun := fun a => sum a fun m t => t • ↑f m,
                          map_smul' :=
                            (_ :
                              ∀ (t' : k) (a : MonoidAlgebra k G),
                                (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                                  t' • (fun a => sum a fun m t => t • ↑f m) a) },
                      map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                      map_add' :=
                        (_ :
                          ∀ (x y : G →₀ k),
                            ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },
                  map_mul' :=
                    (_ :
                      ∀ (a₁ a₂ : MonoidAlgebra k G),
                        MulActionHom.toFun
                            {
                                toMulActionHom :=
                                  { toFun := fun a => sum a fun m t => t • ↑f m,
                                    map_smul' :=
                                      (_ :
                                        ∀ (t' : k) (a : MonoidAlgebra k G),
                                          (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                                            t' • (fun a => sum a fun m t => t • ↑f m) a) },
                                map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                                map_add' :=
                                  (_ :
                                    ∀ (x y : G →₀ k),
                                      ZeroHom.toFun (↑src) (x + y) =
                                        ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom
                            (a₁ * a₂) =
                          MulActionHom.toFun
                              {
                                  toMulActionHom :=
                                    { toFun := fun a => sum a fun m t => t • ↑f m,
                                      map_smul' :=
                                        (_ :
                                          ∀ (t' : k) (a : MonoidAlgebra k G),
                                            (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                                              t' • (fun a => sum a fun m t => t • ↑f m) a) },
                                  map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                                  map_add' :=
                                    (_ :
                                      ∀ (x y : G →₀ k),
                                        ZeroHom.toFun (↑src) (x + y) =
                                          ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom
                              a₁ *
                            MulActionHom.toFun
                              {
                                  toMulActionHom :=
                                    { toFun := fun a => sum a fun m t => t • ↑f m,
                                      map_smul' :=
                                        (_ :
                                          ∀ (t' : k) (a : MonoidAlgebra k G),
                                            (fun a => sum a fun m t => t • ↑f m) (t' • a) =
                                              t' • (fun a => sum a fun m t => t • ↑f m) a) },
                                  map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),
                                  map_add' :=
                                    (_ :
                                      ∀ (x y : G →₀ k),
                                        ZeroHom.toFun (↑src) (x + y) =
                                          ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom
                              a₂) })
              ((fun F => MulHom.comp (NonUnitalAlgHom.toMulHom F) (ofMagma k G)) F)))
          (ofMagma k G))
      m =
    ↑(MulHom.comp (NonUnitalAlgHom.toMulHom F) (ofMagma k G)) m
[PROOFSTEP]
simp only [NonUnitalAlgHom.coe_mk, ofMagma_apply, NonUnitalAlgHom.toMulHom_eq_coe, sum_single_index,
  Function.comp_apply, one_smul, zero_smul, MulHom.coe_comp, NonUnitalAlgHom.coe_to_mulHom]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : CommSemiring k
inst✝ : MulOneClass G
r : k
f : MonoidAlgebra k G
⊢ single 1 r * f = f * single 1 r
[PROOFSTEP]
refine Finsupp.ext fun _ => ?_
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : CommSemiring k
inst✝ : MulOneClass G
r : k
f : MonoidAlgebra k G
x✝ : G
⊢ ↑(single 1 r * f) x✝ = ↑(f * single 1 r) x✝
[PROOFSTEP]
rw [single_one_mul_apply, mul_single_one_apply, mul_comm]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : MulOneClass G
src✝ : k →+ G →₀ k := singleAddHom 1
x y : k
⊢ OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = ZeroHom.toFun (↑src✝) 1) } (x * y) =
    OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = ZeroHom.toFun (↑src✝) 1) } x *
      OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = ZeroHom.toFun (↑src✝) 1) } y
[PROOFSTEP]
simp only [ZeroHom.toFun_eq_coe, AddMonoidHom.toZeroHom_coe, singleAddHom_apply, single_mul_single, mul_one]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R✝ : Type u_2
R : Type u_3
inst✝² : Semiring k
inst✝¹ : MulOneClass G
inst✝ : Semiring R
f g : MonoidAlgebra k G →+* R
h₁ : ∀ (b : k), ↑f (single 1 b) = ↑g (single 1 b)
h_of : ∀ (a : G), ↑f (single a 1) = ↑g (single a 1)
a : G
b : k
⊢ ↑((fun f => ↑f) f) (Finsupp.single a b) = ↑((fun f => ↑f) g) (Finsupp.single a b)
[PROOFSTEP]
rw [← single, ← one_mul a, ← mul_one b, ← single_mul_single, AddMonoidHom.coe_coe f, AddMonoidHom.coe_coe g, f.map_mul,
  g.map_mul, h₁, h_of]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring k
inst✝² : Semiring A
inst✝¹ : Algebra k A
inst✝ : Monoid G
src✝ : k →+* MonoidAlgebra A G := RingHom.comp singleOneRingHom (algebraMap k A)
r : k
f : (fun x => MonoidAlgebra A G) r
⊢ ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
            map_add' :=
              (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
        r *
      f =
    f *
      ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
            map_add' :=
              (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
        r
[PROOFSTEP]
refine Finsupp.ext fun _ => ?_
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring k
inst✝² : Semiring A
inst✝¹ : Algebra k A
inst✝ : Monoid G
src✝ : k →+* MonoidAlgebra A G := RingHom.comp singleOneRingHom (algebraMap k A)
r : k
f : (fun x => MonoidAlgebra A G) r
x✝ : G
⊢ ↑(↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
                map_add' :=
                  (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
            r *
          f)
      x✝ =
    ↑(f *
          ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
                map_add' :=
                  (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
            r)
      x✝
[PROOFSTEP]
simp [single_one_mul_apply, mul_single_one_apply, Algebra.commutes]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring k
inst✝² : Semiring A
inst✝¹ : Algebra k A
inst✝ : Monoid G
src✝ : k →+* MonoidAlgebra A G := RingHom.comp singleOneRingHom (algebraMap k A)
r : k
a : (fun x => MonoidAlgebra A G) r
⊢ r • a =
    ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
            map_add' :=
              (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
        r *
      a
[PROOFSTEP]
refine
  Finsupp.ext fun _ =>
    ?_
      -- Porting note: Newly required.
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring k
inst✝² : Semiring A
inst✝¹ : Algebra k A
inst✝ : Monoid G
src✝ : k →+* MonoidAlgebra A G := RingHom.comp singleOneRingHom (algebraMap k A)
r : k
a : (fun x => MonoidAlgebra A G) r
x✝ : G
⊢ ↑(r • a) x✝ =
    ↑(↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
                map_add' :=
                  (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
            r *
          a)
      x✝
[PROOFSTEP]
rw [Finsupp.coe_smul]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring k
inst✝² : Semiring A
inst✝¹ : Algebra k A
inst✝ : Monoid G
src✝ : k →+* MonoidAlgebra A G := RingHom.comp singleOneRingHom (algebraMap k A)
r : k
a : (fun x => MonoidAlgebra A G) r
x✝ : G
⊢ (r • ↑a) x✝ =
    ↑(↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
                map_add' :=
                  (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
            r *
          a)
      x✝
[PROOFSTEP]
simp [single_one_mul_apply, Algebra.smul_def, Pi.smul_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring k
inst✝² : Semiring A
inst✝¹ : Algebra k A
inst✝ : Monoid G
src✝ : A →+* MonoidAlgebra A G := singleOneRingHom
r : k
⊢ OneHom.toFun
      (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
            map_add' :=
              (_ : ∀ (x y : A), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })
      (↑(algebraMap k A) r) =
    ↑(algebraMap k (MonoidAlgebra A G)) r
[PROOFSTEP]
refine Finsupp.ext fun _ => ?_
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring k
inst✝² : Semiring A
inst✝¹ : Algebra k A
inst✝ : Monoid G
src✝ : A →+* MonoidAlgebra A G := singleOneRingHom
r : k
x✝ : G
⊢ ↑(OneHom.toFun
          (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
                map_add' :=
                  (_ :
                    ∀ (x y : A), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })
          (↑(algebraMap k A) r))
      x✝ =
    ↑(↑(algebraMap k (MonoidAlgebra A G)) r) x✝
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring k
inst✝² : Semiring A
inst✝¹ : Algebra k A
inst✝ : Monoid G
src✝ : A →+* MonoidAlgebra A G := singleOneRingHom
r : k
x✝ : G
⊢ ↑(Finsupp.single 1 (↑(algebraMap k A) r)) x✝ = ↑(↑(algebraMap k (MonoidAlgebra A G)) r) x✝
[PROOFSTEP]
rfl
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : CommSemiring k
inst✝ : Monoid G
a : G
b : k
⊢ single a b = ↑(algebraMap k (MonoidAlgebra k G)) b * ↑(of k G) a
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring k
inst✝² : Semiring A
inst✝¹ : Algebra k A
inst✝ : Monoid G
a : G
b : k
⊢ single a (↑(algebraMap k A) b) = ↑(algebraMap k (MonoidAlgebra A G)) b * ↑(of A G) a
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
p : MonoidAlgebra k G → Prop
f : MonoidAlgebra k G
hM : ∀ (g : G), p (↑(of k G) g)
hadd : ∀ (f g : MonoidAlgebra k G), p f → p g → p (f + g)
hsmul : ∀ (r : k) (f : MonoidAlgebra k G), p f → p (r • f)
⊢ p f
[PROOFSTEP]
refine' Finsupp.induction_linear f _ (fun f g hf hg => hadd f g hf hg) fun g r => _
[GOAL]
case refine'_1
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
p : MonoidAlgebra k G → Prop
f : MonoidAlgebra k G
hM : ∀ (g : G), p (↑(of k G) g)
hadd : ∀ (f g : MonoidAlgebra k G), p f → p g → p (f + g)
hsmul : ∀ (r : k) (f : MonoidAlgebra k G), p f → p (r • f)
⊢ p 0
[PROOFSTEP]
simpa using hsmul 0 (of k G 1) (hM 1)
[GOAL]
case refine'_2
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
p : MonoidAlgebra k G → Prop
f : MonoidAlgebra k G
hM : ∀ (g : G), p (↑(of k G) g)
hadd : ∀ (f g : MonoidAlgebra k G), p f → p g → p (f + g)
hsmul : ∀ (r : k) (f : MonoidAlgebra k G), p f → p (r • f)
g : G
r : k
⊢ p (Finsupp.single g r)
[PROOFSTEP]
convert
  hsmul r (of k G g)
    (hM g)
      -- Porting note: Was `simp only`.
[GOAL]
case h.e'_1
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
p : MonoidAlgebra k G → Prop
f : MonoidAlgebra k G
hM : ∀ (g : G), p (↑(of k G) g)
hadd : ∀ (f g : MonoidAlgebra k G), p f → p g → p (f + g)
hsmul : ∀ (r : k) (f : MonoidAlgebra k G), p f → p (r • f)
g : G
r : k
⊢ Finsupp.single g r = r • ↑(of k G) g
[PROOFSTEP]
rw [of_apply, smul_single', mul_one]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : CommSemiring k
inst✝⁵ : Monoid G
inst✝⁴ : Monoid H
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
f : A →ₐ[k] B
g : G →* B
h_comm : ∀ (x : A) (y : G), Commute (↑f x) (↑g y)
src✝ : MonoidAlgebra A G →+* B := liftNCRingHom (↑f) g h_comm
⊢ ∀ (r : k),
    OneHom.toFun
        (↑↑{
              toMonoidHom :=
                {
                  toOneHom :=
                    { toFun := ↑(liftNCRingHom (↑f) g h_comm), map_one' := (_ : OneHom.toFun (↑↑src✝) 1 = 1) },
                  map_mul' :=
                    (_ :
                      ∀ (x y : MonoidAlgebra A G),
                        OneHom.toFun (↑↑src✝) (x * y) = OneHom.toFun (↑↑src✝) x * OneHom.toFun (↑↑src✝) y) },
              map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
              map_add' :=
                (_ :
                  ∀ (x y : MonoidAlgebra A G),
                    OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })
        (↑(algebraMap k (MonoidAlgebra A G)) r) =
      ↑(algebraMap k B) r
[PROOFSTEP]
simp [liftNCRingHom]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : CommSemiring k
inst✝⁵ : Monoid G
inst✝⁴ : Monoid H
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
f : G →* A
⊢ (fun f => MonoidHom.comp (↑f) (of k G))
      ((fun F =>
          liftNCAlgHom (Algebra.ofId k A) F
            (_ :
              ∀ (x : k) (x_1 : G),
                ↑(algebraMap k ((fun x => A) x)) x * ↑F x_1 = ↑F x_1 * ↑(algebraMap k ((fun x => A) x)) x))
        f) =
    f
[PROOFSTEP]
ext
[GOAL]
case h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : CommSemiring k
inst✝⁵ : Monoid G
inst✝⁴ : Monoid H
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
f : G →* A
x✝ : G
⊢ ↑((fun f => MonoidHom.comp (↑f) (of k G))
          ((fun F =>
              liftNCAlgHom (Algebra.ofId k A) F
                (_ :
                  ∀ (x : k) (x_1 : G),
                    ↑(algebraMap k ((fun x => A) x)) x * ↑F x_1 = ↑F x_1 * ↑(algebraMap k ((fun x => A) x)) x))
            f))
      x✝ =
    ↑f x✝
[PROOFSTEP]
simp [liftNCAlgHom, liftNCRingHom]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : CommSemiring k
inst✝⁵ : Monoid G
inst✝⁴ : Monoid H
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : MonoidAlgebra k G →ₐ[k] A
⊢ (fun F =>
        liftNCAlgHom (Algebra.ofId k A) F
          (_ :
            ∀ (x : k) (x_1 : G),
              ↑(algebraMap k ((fun x => A) x)) x * ↑F x_1 = ↑F x_1 * ↑(algebraMap k ((fun x => A) x)) x))
      ((fun f => MonoidHom.comp (↑f) (of k G)) F) =
    F
[PROOFSTEP]
ext
[GOAL]
case h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : CommSemiring k
inst✝⁵ : Monoid G
inst✝⁴ : Monoid H
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : MonoidAlgebra k G →ₐ[k] A
x✝ : G
⊢ ↑(MonoidHom.comp
          (↑((fun F =>
                liftNCAlgHom (Algebra.ofId k A) F
                  (_ :
                    ∀ (x : k) (x_1 : G),
                      ↑(algebraMap k ((fun x => A) x)) x * ↑F x_1 = ↑F x_1 * ↑(algebraMap k ((fun x => A) x)) x))
              ((fun f => MonoidHom.comp (↑f) (of k G)) F)))
          (of k G))
      x✝ =
    ↑(MonoidHom.comp (↑F) (of k G)) x✝
[PROOFSTEP]
simp [liftNCAlgHom, liftNCRingHom]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : CommSemiring k
inst✝⁵ : Monoid G
inst✝⁴ : Monoid H
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : G →* A
f : MonoidAlgebra k G
⊢ ↑(↑(lift k G A) F) f = sum f fun a b => b • ↑F a
[PROOFSTEP]
simp only [lift_apply', Algebra.smul_def]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : CommSemiring k
inst✝⁵ : Monoid G
inst✝⁴ : Monoid H
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : G →* A
x : G
⊢ ↑(↑(lift k G A) F) (↑(of k G) x) = ↑F x
[PROOFSTEP]
rw [of_apply, ← lift_symm_apply, Equiv.symm_apply_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : CommSemiring k
inst✝⁵ : Monoid G
inst✝⁴ : Monoid H
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : G →* A
a : G
b : k
⊢ ↑(↑(lift k G A) F) (single a b) = b • ↑F a
[PROOFSTEP]
rw [lift_def, liftNC_single, Algebra.smul_def, AddMonoidHom.coe_coe]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : CommSemiring k
inst✝⁵ : Monoid G
inst✝⁴ : Monoid H
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : MonoidAlgebra k G →ₐ[k] A
f : MonoidAlgebra k G
⊢ ↑F f = sum f fun a b => b • ↑F (single a 1)
[PROOFSTEP]
conv_lhs =>
  rw [lift_unique' F]
  simp [lift_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : CommSemiring k
inst✝⁵ : Monoid G
inst✝⁴ : Monoid H
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : MonoidAlgebra k G →ₐ[k] A
f : MonoidAlgebra k G
| ↑F f
[PROOFSTEP]
  rw [lift_unique' F]
  simp [lift_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : CommSemiring k
inst✝⁵ : Monoid G
inst✝⁴ : Monoid H
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : MonoidAlgebra k G →ₐ[k] A
f : MonoidAlgebra k G
| ↑F f
[PROOFSTEP]
  rw [lift_unique' F]
  simp [lift_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : CommSemiring k
inst✝⁵ : Monoid G
inst✝⁴ : Monoid H
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : MonoidAlgebra k G →ₐ[k] A
f : MonoidAlgebra k G
| ↑F f
[PROOFSTEP]
rw [lift_unique' F]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁶ : CommSemiring k
inst✝⁵ : Monoid G
inst✝⁴ : Monoid H
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : MonoidAlgebra k G →ₐ[k] A
f : MonoidAlgebra k G
| ↑(↑(lift k G A) (MonoidHom.comp (↑F) (of k G))) f
[PROOFSTEP]
simp [lift_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁷ : CommSemiring k
inst✝⁶ : Monoid G
inst✝⁵ : Monoid H
A : Type u₃
inst✝⁴ : Semiring A
inst✝³ : Algebra k A
B : Type u_3
inst✝² : Semiring B
inst✝¹ : Algebra k B
F : Type u_4
inst✝ : MonoidHomClass F G H
f : F
r : k
⊢ mapDomain (↑f) (↑(algebraMap k (MonoidAlgebra A G)) r) = ↑(algebraMap k (MonoidAlgebra A H)) r
[PROOFSTEP]
simp only [coe_algebraMap, mapDomain_single, map_one, (· ∘ ·)]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁹ : Monoid G
inst✝⁸ : CommSemiring k
V : Type u₃
W : Type u₄
inst✝⁷ : AddCommMonoid V
inst✝⁶ : Module k V
inst✝⁵ : Module (MonoidAlgebra k G) V
inst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V
inst✝³ : AddCommMonoid W
inst✝² : Module k W
inst✝¹ : Module (MonoidAlgebra k G) W
inst✝ : IsScalarTower k (MonoidAlgebra k G) W
f : V →ₗ[k] W
h : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v
v v' : V
⊢ ↑f (v + v') = ↑f v + ↑f v'
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁹ : Monoid G
inst✝⁸ : CommSemiring k
V : Type u₃
W : Type u₄
inst✝⁷ : AddCommMonoid V
inst✝⁶ : Module k V
inst✝⁵ : Module (MonoidAlgebra k G) V
inst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V
inst✝³ : AddCommMonoid W
inst✝² : Module k W
inst✝¹ : Module (MonoidAlgebra k G) W
inst✝ : IsScalarTower k (MonoidAlgebra k G) W
f : V →ₗ[k] W
h : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v
c : MonoidAlgebra k G
v : V
⊢ AddHom.toFun { toFun := ↑f, map_add' := (_ : ∀ (v v' : V), ↑f (v + v') = ↑f v + ↑f v') } (c • v) =
    ↑(RingHom.id (MonoidAlgebra k G)) c •
      AddHom.toFun { toFun := ↑f, map_add' := (_ : ∀ (v v' : V), ↑f (v + v') = ↑f v + ↑f v') } v
[PROOFSTEP]
dsimp only []
  -- Porting note: Was `apply`.
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁹ : Monoid G
inst✝⁸ : CommSemiring k
V : Type u₃
W : Type u₄
inst✝⁷ : AddCommMonoid V
inst✝⁶ : Module k V
inst✝⁵ : Module (MonoidAlgebra k G) V
inst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V
inst✝³ : AddCommMonoid W
inst✝² : Module k W
inst✝¹ : Module (MonoidAlgebra k G) W
inst✝ : IsScalarTower k (MonoidAlgebra k G) W
f : V →ₗ[k] W
h : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v
c : MonoidAlgebra k G
v : V
⊢ ↑f (c • v) = ↑(RingHom.id (MonoidAlgebra k G)) c • ↑f v
[PROOFSTEP]
refine Finsupp.induction c ?_ ?_
[GOAL]
case refine_1
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁹ : Monoid G
inst✝⁸ : CommSemiring k
V : Type u₃
W : Type u₄
inst✝⁷ : AddCommMonoid V
inst✝⁶ : Module k V
inst✝⁵ : Module (MonoidAlgebra k G) V
inst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V
inst✝³ : AddCommMonoid W
inst✝² : Module k W
inst✝¹ : Module (MonoidAlgebra k G) W
inst✝ : IsScalarTower k (MonoidAlgebra k G) W
f : V →ₗ[k] W
h : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v
c : MonoidAlgebra k G
v : V
⊢ ↑f (0 • v) = ↑(RingHom.id (MonoidAlgebra k G)) 0 • ↑f v
[PROOFSTEP]
simp
[GOAL]
case refine_2
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁹ : Monoid G
inst✝⁸ : CommSemiring k
V : Type u₃
W : Type u₄
inst✝⁷ : AddCommMonoid V
inst✝⁶ : Module k V
inst✝⁵ : Module (MonoidAlgebra k G) V
inst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V
inst✝³ : AddCommMonoid W
inst✝² : Module k W
inst✝¹ : Module (MonoidAlgebra k G) W
inst✝ : IsScalarTower k (MonoidAlgebra k G) W
f : V →ₗ[k] W
h : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v
c : MonoidAlgebra k G
v : V
⊢ ∀ (a : G) (b : k) (f_1 : G →₀ k),
    ¬a ∈ f_1.support →
      b ≠ 0 →
        ↑f (f_1 • v) = ↑(RingHom.id (MonoidAlgebra k G)) f_1 • ↑f v →
          ↑f ((Finsupp.single a b + f_1) • v) = ↑(RingHom.id (MonoidAlgebra k G)) (Finsupp.single a b + f_1) • ↑f v
[PROOFSTEP]
intro g r c' _nm _nz w
[GOAL]
case refine_2
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁹ : Monoid G
inst✝⁸ : CommSemiring k
V : Type u₃
W : Type u₄
inst✝⁷ : AddCommMonoid V
inst✝⁶ : Module k V
inst✝⁵ : Module (MonoidAlgebra k G) V
inst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V
inst✝³ : AddCommMonoid W
inst✝² : Module k W
inst✝¹ : Module (MonoidAlgebra k G) W
inst✝ : IsScalarTower k (MonoidAlgebra k G) W
f : V →ₗ[k] W
h : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v
c : MonoidAlgebra k G
v : V
g : G
r : k
c' : G →₀ k
_nm : ¬g ∈ c'.support
_nz : r ≠ 0
w : ↑f (c' • v) = ↑(RingHom.id (MonoidAlgebra k G)) c' • ↑f v
⊢ ↑f ((Finsupp.single g r + c') • v) = ↑(RingHom.id (MonoidAlgebra k G)) (Finsupp.single g r + c') • ↑f v
[PROOFSTEP]
dsimp at *
[GOAL]
case refine_2
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁹ : Monoid G
inst✝⁸ : CommSemiring k
V : Type u₃
W : Type u₄
inst✝⁷ : AddCommMonoid V
inst✝⁶ : Module k V
inst✝⁵ : Module (MonoidAlgebra k G) V
inst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V
inst✝³ : AddCommMonoid W
inst✝² : Module k W
inst✝¹ : Module (MonoidAlgebra k G) W
inst✝ : IsScalarTower k (MonoidAlgebra k G) W
f : V →ₗ[k] W
h : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v
c : MonoidAlgebra k G
v : V
g : G
r : k
c' : G →₀ k
_nm : ¬g ∈ c'.support
_nz : ¬r = 0
w : ↑f (c' • v) = c' • ↑f v
⊢ ↑f ((Finsupp.single g r + c') • v) = (Finsupp.single g r + c') • ↑f v
[PROOFSTEP]
simp only [add_smul, f.map_add, w, add_left_inj, single_eq_algebraMap_mul_of, ← smul_smul]
[GOAL]
case refine_2
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁹ : Monoid G
inst✝⁸ : CommSemiring k
V : Type u₃
W : Type u₄
inst✝⁷ : AddCommMonoid V
inst✝⁶ : Module k V
inst✝⁵ : Module (MonoidAlgebra k G) V
inst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V
inst✝³ : AddCommMonoid W
inst✝² : Module k W
inst✝¹ : Module (MonoidAlgebra k G) W
inst✝ : IsScalarTower k (MonoidAlgebra k G) W
f : V →ₗ[k] W
h : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v
c : MonoidAlgebra k G
v : V
g : G
r : k
c' : G →₀ k
_nm : ¬g ∈ c'.support
_nz : ¬r = 0
w : ↑f (c' • v) = c' • ↑f v
⊢ ↑f (↑(algebraMap k (MonoidAlgebra k G)) r • ↑(of k G) g • v) + c' • ↑f v =
    ↑(algebraMap k (MonoidAlgebra k G)) r • ↑(of k G) g • ↑f v + c' • ↑f v
[PROOFSTEP]
erw [algebraMap_smul (MonoidAlgebra k G) r, algebraMap_smul (MonoidAlgebra k G) r, f.map_smul, h g v, of_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
ι : Type ui
inst✝¹ : CommSemiring k
inst✝ : CommMonoid G
s✝ : Finset ι
a✝ : ι → G
b : ι → k
a : ι
s : Finset ι
has : ¬a ∈ s
ih : ∏ i in s, single (a✝ i) (b i) = single (∏ i in s, a✝ i) (∏ i in s, b i)
⊢ ∏ i in cons a s has, single (a✝ i) (b i) = single (∏ i in cons a s has, a✝ i) (∏ i in cons a s has, b i)
[PROOFSTEP]
rw [prod_cons has, ih, single_mul_single, prod_cons has, prod_cons has]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Group G
f g : MonoidAlgebra k G
x : G
⊢ ↑(f * g) x = sum f fun a b => ↑(single a b * g) x
[PROOFSTEP]
rw [← Finsupp.sum_apply, ← Finsupp.sum_mul g f, f.sum_single]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Group G
f g : MonoidAlgebra k G
x : G
⊢ (sum f fun a b => ↑(single a b * g) x) = sum f fun a b => b * ↑g (a⁻¹ * x)
[PROOFSTEP]
simp only [single_mul_apply, Finsupp.sum]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Group G
f g : MonoidAlgebra k G
x : G
⊢ ↑(f * g) x = sum g fun a b => ↑(f * single a b) x
[PROOFSTEP]
rw [← Finsupp.sum_apply, ← Finsupp.mul_sum f g, g.sum_single]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Group G
f g : MonoidAlgebra k G
x : G
⊢ (sum g fun a b => ↑(f * single a b) x) = sum g fun a b => ↑f (x * a⁻¹) * b
[PROOFSTEP]
simp only [mul_single_apply, Finsupp.sum]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
src✝ : (G →₀ k)ᵐᵒᵖ ≃+ (Gᵐᵒᵖ →₀ kᵐᵒᵖ) :=
  AddEquiv.trans (AddEquiv.symm opAddEquiv) (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv))
⊢ ∀ (x y : (MonoidAlgebra k G)ᵐᵒᵖ),
    Equiv.toFun src✝.toEquiv (x * y) = Equiv.toFun src✝.toEquiv x * Equiv.toFun src✝.toEquiv y
[PROOFSTEP]
rw [Equiv.toFun_as_coe, AddEquiv.toEquiv_eq_coe, AddEquiv.coe_toEquiv, ← AddEquiv.coe_toAddMonoidHom]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
src✝ : (G →₀ k)ᵐᵒᵖ ≃+ (Gᵐᵒᵖ →₀ kᵐᵒᵖ) :=
  AddEquiv.trans (AddEquiv.symm opAddEquiv) (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv))
⊢ ∀ (x y : (MonoidAlgebra k G)ᵐᵒᵖ),
    ↑(AddEquiv.toAddMonoidHom src✝) (x * y) = ↑(AddEquiv.toAddMonoidHom src✝) x * ↑(AddEquiv.toAddMonoidHom src✝) y
[PROOFSTEP]
refine
  Iff.mpr (AddMonoidHom.map_mul_iff (R := (MonoidAlgebra k G)ᵐᵒᵖ) (S := MonoidAlgebra kᵐᵒᵖ Gᵐᵒᵖ) _)
    ?_
      -- Porting note: Was `ext`.
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
src✝ : (G →₀ k)ᵐᵒᵖ ≃+ (Gᵐᵒᵖ →₀ kᵐᵒᵖ) :=
  AddEquiv.trans (AddEquiv.symm opAddEquiv) (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv))
⊢ AddMonoidHom.compr₂ AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝) =
    AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝))
      (AddEquiv.toAddMonoidHom src✝)
[PROOFSTEP]
refine
  AddMonoidHom.mul_op_ext _ _ <|
    addHom_ext' fun i₁ =>
      AddMonoidHom.ext fun r₁ =>
        AddMonoidHom.mul_op_ext _ _ <|
          addHom_ext' fun i₂ =>
            AddMonoidHom.ext fun r₂ =>
              ?_
                -- Porting note: `reducible` cannot be `local` so proof gets long.
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
src✝ : (G →₀ k)ᵐᵒᵖ ≃+ (Gᵐᵒᵖ →₀ kᵐᵒᵖ) :=
  AddEquiv.trans (AddEquiv.symm opAddEquiv) (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv))
i₁ : G
r₁ : k
i₂ : G
r₂ : k
⊢ ↑(AddMonoidHom.comp
          (AddMonoidHom.comp
            (↑(AddMonoidHom.comp
                  (AddMonoidHom.comp (AddMonoidHom.compr₂ AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝))
                    (AddEquiv.toAddMonoidHom opAddEquiv))
                  (singleAddHom i₁))
              r₁)
            (AddEquiv.toAddMonoidHom opAddEquiv))
          (singleAddHom i₂))
      r₂ =
    ↑(AddMonoidHom.comp
          (AddMonoidHom.comp
            (↑(AddMonoidHom.comp
                  (AddMonoidHom.comp
                    (AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝))
                      (AddEquiv.toAddMonoidHom src✝))
                    (AddEquiv.toAddMonoidHom opAddEquiv))
                  (singleAddHom i₁))
              r₁)
            (AddEquiv.toAddMonoidHom opAddEquiv))
          (singleAddHom i₂))
      r₂
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
src✝ : (G →₀ k)ᵐᵒᵖ ≃+ (Gᵐᵒᵖ →₀ kᵐᵒᵖ) :=
  AddEquiv.trans (AddEquiv.symm opAddEquiv) (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv))
i₁ : G
r₁ : k
i₂ : G
r₂ : k
⊢ ↑(AddEquiv.trans (AddEquiv.symm opAddEquiv)
          (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv)))
      (↑opAddEquiv (Finsupp.single i₁ r₁) * ↑opAddEquiv (Finsupp.single i₂ r₂)) =
    ↑(AddEquiv.trans (AddEquiv.symm opAddEquiv)
            (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv)))
        (↑opAddEquiv (Finsupp.single i₁ r₁)) *
      ↑(AddEquiv.trans (AddEquiv.symm opAddEquiv)
            (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv)))
        (↑opAddEquiv (Finsupp.single i₂ r₂))
[PROOFSTEP]
rw [AddEquiv.trans_apply, AddEquiv.trans_apply, AddEquiv.trans_apply, AddEquiv.trans_apply, AddEquiv.trans_apply,
  AddEquiv.trans_apply, MulOpposite.opAddEquiv_apply, MulOpposite.opAddEquiv_symm_apply,
  MulOpposite.unop_mul (α := MonoidAlgebra k G)]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
src✝ : (G →₀ k)ᵐᵒᵖ ≃+ (Gᵐᵒᵖ →₀ kᵐᵒᵖ) :=
  AddEquiv.trans (AddEquiv.symm opAddEquiv) (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv))
i₁ : G
r₁ : k
i₂ : G
r₂ : k
⊢ ↑(Finsupp.domCongr opEquiv)
      (↑(mapRange.addEquiv opAddEquiv) (unop (op (Finsupp.single i₂ r₂)) * unop (op (Finsupp.single i₁ r₁)))) =
    ↑(Finsupp.domCongr opEquiv) (↑(mapRange.addEquiv opAddEquiv) (unop (op (Finsupp.single i₁ r₁)))) *
      ↑(Finsupp.domCongr opEquiv) (↑(mapRange.addEquiv opAddEquiv) (unop (op (Finsupp.single i₂ r₂))))
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
r : k
x : G
⊢ ↑MonoidAlgebra.opRingEquiv (op (single x r)) = single (op x) (op r)
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Monoid G
r : kᵐᵒᵖ
x : Gᵐᵒᵖ
⊢ ↑(RingEquiv.symm MonoidAlgebra.opRingEquiv) (single x r) = op (single (unop x) (unop r))
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
V : Type u_3
inst✝³ : AddCommMonoid V
inst✝² : Module k V
inst✝¹ : Module (MonoidAlgebra k G) V
inst✝ : IsScalarTower k (MonoidAlgebra k G) V
W : Submodule k V
h : ∀ (g : G) (v : V), v ∈ W → ↑(of k G) g • v ∈ W
⊢ ∀ (c : MonoidAlgebra k G) {x : V},
    x ∈
        {
              toAddSubsemigroup :=
                { carrier := ↑W, add_mem' := (_ : ∀ {a b : V}, a ∈ W.carrier → b ∈ W.carrier → a + b ∈ W.carrier) },
              zero_mem' := (_ : 0 ∈ W.carrier) }.toAddSubsemigroup.carrier →
      c • x ∈
        {
              toAddSubsemigroup :=
                { carrier := ↑W, add_mem' := (_ : ∀ {a b : V}, a ∈ W.carrier → b ∈ W.carrier → a + b ∈ W.carrier) },
              zero_mem' := (_ : 0 ∈ W.carrier) }.toAddSubsemigroup.carrier
[PROOFSTEP]
intro f v hv
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
V : Type u_3
inst✝³ : AddCommMonoid V
inst✝² : Module k V
inst✝¹ : Module (MonoidAlgebra k G) V
inst✝ : IsScalarTower k (MonoidAlgebra k G) V
W : Submodule k V
h : ∀ (g : G) (v : V), v ∈ W → ↑(of k G) g • v ∈ W
f : MonoidAlgebra k G
v : V
hv :
  v ∈
    {
          toAddSubsemigroup :=
            { carrier := ↑W, add_mem' := (_ : ∀ {a b : V}, a ∈ W.carrier → b ∈ W.carrier → a + b ∈ W.carrier) },
          zero_mem' := (_ : 0 ∈ W.carrier) }.toAddSubsemigroup.carrier
⊢ f • v ∈
    {
          toAddSubsemigroup :=
            { carrier := ↑W, add_mem' := (_ : ∀ {a b : V}, a ∈ W.carrier → b ∈ W.carrier → a + b ∈ W.carrier) },
          zero_mem' := (_ : 0 ∈ W.carrier) }.toAddSubsemigroup.carrier
[PROOFSTEP]
rw [← Finsupp.sum_single f, Finsupp.sum, Finset.sum_smul]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
V : Type u_3
inst✝³ : AddCommMonoid V
inst✝² : Module k V
inst✝¹ : Module (MonoidAlgebra k G) V
inst✝ : IsScalarTower k (MonoidAlgebra k G) V
W : Submodule k V
h : ∀ (g : G) (v : V), v ∈ W → ↑(of k G) g • v ∈ W
f : MonoidAlgebra k G
v : V
hv :
  v ∈
    {
          toAddSubsemigroup :=
            { carrier := ↑W, add_mem' := (_ : ∀ {a b : V}, a ∈ W.carrier → b ∈ W.carrier → a + b ∈ W.carrier) },
          zero_mem' := (_ : 0 ∈ W.carrier) }.toAddSubsemigroup.carrier
⊢ ∑ i in f.support, Finsupp.single i (↑f i) • v ∈
    {
          toAddSubsemigroup :=
            { carrier := ↑W, add_mem' := (_ : ∀ {a b : V}, a ∈ W.carrier → b ∈ W.carrier → a + b ∈ W.carrier) },
          zero_mem' := (_ : 0 ∈ W.carrier) }.toAddSubsemigroup.carrier
[PROOFSTEP]
simp_rw [← smul_of, smul_assoc]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
V : Type u_3
inst✝³ : AddCommMonoid V
inst✝² : Module k V
inst✝¹ : Module (MonoidAlgebra k G) V
inst✝ : IsScalarTower k (MonoidAlgebra k G) V
W : Submodule k V
h : ∀ (g : G) (v : V), v ∈ W → ↑(of k G) g • v ∈ W
f : MonoidAlgebra k G
v : V
hv :
  v ∈
    {
          toAddSubsemigroup :=
            { carrier := ↑W, add_mem' := (_ : ∀ {a b : V}, a ∈ W.carrier → b ∈ W.carrier → a + b ∈ W.carrier) },
          zero_mem' := (_ : 0 ∈ W.carrier) }.toAddSubsemigroup.carrier
⊢ ∑ x in f.support, ↑f x • ↑(of k G) x • v ∈ ↑W
[PROOFSTEP]
exact Submodule.sum_smul_mem W _ fun g _ => h g v hv
[GOAL]
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
⊢ ∀ (x : AddMonoidAlgebra k G), (fun n f => n • f) 0 x = 0
[PROOFSTEP]
intros
[GOAL]
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
x✝ : AddMonoidAlgebra k G
⊢ (fun n f => n • f) 0 x✝ = 0
[PROOFSTEP]
refine Finsupp.ext fun _ => ?_
[GOAL]
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
x✝¹ : AddMonoidAlgebra k G
x✝ : G
⊢ ↑((fun n f => n • f) 0 x✝¹) x✝ = ↑0 x✝
[PROOFSTEP]
simp [-nsmul_eq_mul, add_smul]
[GOAL]
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
⊢ ∀ (n : ℕ) (x : AddMonoidAlgebra k G), (fun n f => n • f) (n + 1) x = x + (fun n f => n • f) n x
[PROOFSTEP]
intros
[GOAL]
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
n✝ : ℕ
x✝ : AddMonoidAlgebra k G
⊢ (fun n f => n • f) (n✝ + 1) x✝ = x✝ + (fun n f => n • f) n✝ x✝
[PROOFSTEP]
refine
  Finsupp.ext fun _ =>
    ?_
      -- Porting note: The definition of `nsmul_succ` is different, so next line is required.
[GOAL]
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
n✝ : ℕ
x✝¹ : AddMonoidAlgebra k G
x✝ : G
⊢ ↑((fun n f => n • f) (n✝ + 1) x✝¹) x✝ = ↑(x✝¹ + (fun n f => n • f) n✝ x✝¹) x✝
[PROOFSTEP]
simp only [fun n => Nat.add_comm n 1]
[GOAL]
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
n✝ : ℕ
x✝¹ : AddMonoidAlgebra k G
x✝ : G
⊢ ↑((1 + n✝) • x✝¹) x✝ = ↑(x✝¹ + n✝ • x✝¹) x✝
[PROOFSTEP]
simp [-nsmul_eq_mul, add_smul]
[GOAL]
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 : AddMonoidAlgebra k G
⊢ f * (g + h) = f * g + f * h
[PROOFSTEP]
haveI := Classical.decEq G
[GOAL]
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 : AddMonoidAlgebra k G
this : DecidableEq G
⊢ f * (g + h) = f * g + f * h
[PROOFSTEP]
simp only [mul_def]
[GOAL]
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 : AddMonoidAlgebra k G
this : DecidableEq G
⊢ (sum f fun a₁ b₁ => sum (g + h) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =
    (sum f fun a₁ b₁ => sum g fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) +
      sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)
[PROOFSTEP]
refine Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_add_index ?_ ?_)) ?_
[GOAL]
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 : AddMonoidAlgebra k G
this : DecidableEq G
a₁ : G
b₁ : k
⊢ ∀ (a : G), a ∈ g.support ∪ h.support → single (a₁ + a) (b₁ * 0) = 0
[PROOFSTEP]
simp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]
[GOAL]
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 : AddMonoidAlgebra k G
this : DecidableEq G
a₁ : G
b₁ : k
⊢ ∀ (a : G),
    a ∈ g.support ∪ h.support →
      ∀ (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)
[PROOFSTEP]
simp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]
[GOAL]
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 : AddMonoidAlgebra k G
this : DecidableEq G
⊢ (sum f fun a₁ b₁ => (sum g fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) + sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =
    (sum f fun a₁ b₁ => sum g fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) +
      sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)
[PROOFSTEP]
simp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]
[GOAL]
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 : AddMonoidAlgebra k G
⊢ (f + g) * h = f * h + g * h
[PROOFSTEP]
haveI := Classical.decEq G
[GOAL]
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 : AddMonoidAlgebra k G
this : DecidableEq G
⊢ (f + g) * h = f * h + g * h
[PROOFSTEP]
simp only [mul_def]
[GOAL]
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 : AddMonoidAlgebra 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₂)
[PROOFSTEP]
refine Eq.trans (sum_add_index ?_ ?_) ?_
[GOAL]
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 : AddMonoidAlgebra k G
this : DecidableEq G
⊢ ∀ (a : G), a ∈ f.support ∪ g.support → (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0
[PROOFSTEP]
simp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]
[GOAL]
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 : AddMonoidAlgebra k G
this : DecidableEq G
⊢ ∀ (a : 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)
[PROOFSTEP]
simp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]
[GOAL]
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 : AddMonoidAlgebra 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₂)
[PROOFSTEP]
simp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]
[GOAL]
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 : AddMonoidAlgebra k G
⊢ 0 * f = 0
[PROOFSTEP]
simp only [mul_def]
[GOAL]
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 : AddMonoidAlgebra k G
⊢ (sum 0 fun a₁ b₁ => sum f fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) = 0
[PROOFSTEP]
exact sum_zero_index
[GOAL]
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 : AddMonoidAlgebra k G
⊢ f * 0 = 0
[PROOFSTEP]
simp only [mul_def]
[GOAL]
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 : AddMonoidAlgebra k G
⊢ (sum f fun a₁ b₁ => sum 0 fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) = 0
[PROOFSTEP]
exact Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_zero_index)) sum_zero
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
⊢ f * g * h = f * (g * h)
[PROOFSTEP]
simp only [mul_def]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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₂)
[PROOFSTEP]
rw [sum_sum_index]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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)
[PROOFSTEP]
congr
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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)
[PROOFSTEP]
ext a₁ b₁
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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)
[PROOFSTEP]
rw [sum_sum_index, sum_sum_index]
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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)
[PROOFSTEP]
congr
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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)
[PROOFSTEP]
ext a₂ b₂
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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)
[PROOFSTEP]
rw [sum_sum_index, sum_single_index]
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ (sum h fun a₂_1 b₂_1 => single (a₁ + a₂ + a₂_1) (b₁ * b₂ * b₂_1)) =
    sum h fun a b => sum (single (a₂ + a) (b₂ * b)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ (sum h fun a₂_1 b₂ => single (a₁ + a₂ + a₂_1) (0 * b₂)) = 0
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✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0
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✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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₂)
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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)
[PROOFSTEP]
congr
[GOAL]
case e_g.h.h.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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ (fun a₂_1 b₂_1 => single (a₁ + a₂ + a₂_1) (b₁ * b₂ * b₂_1)) = fun a b =>
    sum (single (a₂ + a) (b₂ * b)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ (sum h fun a₂_1 b₂ => single (a₁ + a₂ + a₂_1) (0 * b₂)) = 0
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✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0
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✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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₂)
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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)
[PROOFSTEP]
ext a₃ b₃
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
a₃ : G
b₃ : k
⊢ single (a₁ + a₂ + a₃) (b₁ * b₂ * b₃) = sum (single (a₂ + a₃) (b₂ * b₃)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ (sum h fun a₂_1 b₂ => single (a₁ + a₂ + a₂_1) (0 * b₂)) = 0
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✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0
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✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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₂)
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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)
[PROOFSTEP]
rw [sum_single_index, mul_assoc, add_assoc]
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
a₃ : G
b₃ : k
⊢ single (a₁ + (a₂ + a₃)) (b₁ * 0) = 0
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ (sum h fun a₂_1 b₂ => single (a₁ + a₂ + a₂_1) (0 * b₂)) = 0
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✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0
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✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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₂)
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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)
[PROOFSTEP]
all_goals simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
a₃ : G
b₃ : k
⊢ single (a₁ + (a₂ + a₃)) (b₁ * 0) = 0
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ (sum h fun a₂_1 b₂ => single (a₁ + a₂ + a₂_1) (0 * b₂)) = 0
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
a₂ : G
b₂ : k
⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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✝ : AddSemigroup G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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₂)
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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₂)
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
a₁ : G
b₁ : k
⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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)
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra k G
⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
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 (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f g h : AddMonoidAlgebra 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)
[PROOFSTEP]
simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddZeroClass G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f : AddMonoidAlgebra k G
⊢ 1 * f = f
[PROOFSTEP]
simp only [mul_def, one_def, sum_single_index, zero_mul, single_zero, sum_zero, zero_add, one_mul, sum_single]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddZeroClass G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
f : AddMonoidAlgebra k G
⊢ f * 1 = f
[PROOFSTEP]
simp only [mul_def, one_def, sum_single_index, mul_zero, single_zero, sum_zero, add_zero, mul_one, sum_single]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddZeroClass G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
⊢ NatCast.natCast 0 = 0
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddZeroClass G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
x✝ : ℕ
⊢ NatCast.natCast (x✝ + 1) = NatCast.natCast x✝ + 1
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddZeroClass G
src✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring
x✝ : ℕ
⊢ Finsupp.single 0 ↑x✝ + Finsupp.single 0 1 = single 0 ↑x✝ + 1
[PROOFSTEP]
rfl
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Ring k
inst✝ : AddZeroClass G
src✝¹ : AddCommGroup (AddMonoidAlgebra k G) := addCommGroup
src✝ : NonAssocSemiring (AddMonoidAlgebra k G) := nonAssocSemiring
n : ℕ
⊢ IntCast.intCast ↑n = ↑n
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Ring k
inst✝ : AddZeroClass G
src✝¹ : AddCommGroup (AddMonoidAlgebra k G) := addCommGroup
src✝ : NonAssocSemiring (AddMonoidAlgebra k G) := nonAssocSemiring
n : ℕ
⊢ single 0 ↑n = ↑n
[PROOFSTEP]
rfl
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Ring k
inst✝ : AddZeroClass G
src✝¹ : AddCommGroup (AddMonoidAlgebra k G) := addCommGroup
src✝ : NonAssocSemiring (AddMonoidAlgebra k G) := nonAssocSemiring
n : ℕ
⊢ IntCast.intCast (Int.negSucc n) = -↑(n + 1)
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Ring k
inst✝ : AddZeroClass G
src✝¹ : AddCommGroup (AddMonoidAlgebra k G) := addCommGroup
src✝ : NonAssocSemiring (AddMonoidAlgebra k G) := nonAssocSemiring
n : ℕ
⊢ -Finsupp.single 0 1 + -Finsupp.single 0 ↑n = -1 + -↑n
[PROOFSTEP]
rfl
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddMonoid G
a : G
b : k
⊢ single a b ^ 0 = single (0 • a) (b ^ 0)
[PROOFSTEP]
simp only [pow_zero, zero_nsmul]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddMonoid G
a : G
b : k
⊢ 1 = single 0 1
[PROOFSTEP]
rfl
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddMonoid G
a : G
b : k
n : ℕ
⊢ single a b ^ (n + 1) = single ((n + 1) • a) (b ^ (n + 1))
[PROOFSTEP]
rw [pow_succ, pow_succ, single_pow n, single_mul_single, add_comm, add_nsmul, one_nsmul]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Zero α
inst✝¹ : Zero α₂
F : Type u_6
inst✝ : ZeroHomClass F α α₂
f : F
⊢ mapDomain (↑f) 1 = 1
[PROOFSTEP]
simp_rw [one_def, mapDomain_single, map_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Add α
inst✝¹ : Add α₂
F : Type u_6
inst✝ : AddHomClass F α α₂
f : F
x y : AddMonoidAlgebra β α
⊢ mapDomain (↑f) (x * y) = mapDomain (↑f) x * mapDomain (↑f) y
[PROOFSTEP]
simp_rw [mul_def, mapDomain_sum, mapDomain_single, map_add]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Add α
inst✝¹ : Add α₂
F : Type u_6
inst✝ : AddHomClass F α α₂
f : F
x y : AddMonoidAlgebra β α
⊢ (sum x fun a b => sum y fun a_1 b_1 => single (↑f a + ↑f a_1) (b * b_1)) =
    sum (mapDomain (↑f) x) fun a₁ b₁ => sum (mapDomain (↑f) y) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)
[PROOFSTEP]
rw [Finsupp.sum_mapDomain_index]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Add α
inst✝¹ : Add α₂
F : Type u_6
inst✝ : AddHomClass F α α₂
f : F
x y : AddMonoidAlgebra β α
⊢ (sum x fun a b => sum y fun a_1 b_1 => single (↑f a + ↑f a_1) (b * b_1)) =
    sum x fun a m => sum (mapDomain (↑f) y) fun a₂ b₂ => single (↑f a + a₂) (m * b₂)
[PROOFSTEP]
congr
[GOAL]
case e_g
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Add α
inst✝¹ : Add α₂
F : Type u_6
inst✝ : AddHomClass F α α₂
f : F
x y : AddMonoidAlgebra β α
⊢ (fun a b => sum y fun a_1 b_1 => single (↑f a + ↑f a_1) (b * b_1)) = fun a m =>
    sum (mapDomain (↑f) y) fun a₂ b₂ => single (↑f a + a₂) (m * b₂)
[PROOFSTEP]
ext a b
[GOAL]
case e_g.h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Add α
inst✝¹ : Add α₂
F : Type u_6
inst✝ : AddHomClass F α α₂
f : F
x y : AddMonoidAlgebra β α
a : α
b : β
⊢ (sum y fun a_1 b_1 => single (↑f a + ↑f a_1) (b * b_1)) =
    sum (mapDomain (↑f) y) fun a₂ b₂ => single (↑f a + a₂) (b * b₂)
[PROOFSTEP]
rw [Finsupp.sum_mapDomain_index]
[GOAL]
case e_g.h.h.h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Add α
inst✝¹ : Add α₂
F : Type u_6
inst✝ : AddHomClass F α α₂
f : F
x y : AddMonoidAlgebra β α
a : α
b : β
⊢ ∀ (b_1 : α₂), single (↑f a + b_1) (b * 0) = 0
[PROOFSTEP]
simp
[GOAL]
case e_g.h.h.h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Add α
inst✝¹ : Add α₂
F : Type u_6
inst✝ : AddHomClass F α α₂
f : F
x y : AddMonoidAlgebra β α
a : α
b : β
⊢ ∀ (b_1 : α₂) (m₁ m₂ : β),
    single (↑f a + b_1) (b * (m₁ + m₂)) = single (↑f a + b_1) (b * m₁) + single (↑f a + b_1) (b * m₂)
[PROOFSTEP]
simp [mul_add]
[GOAL]
case h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Add α
inst✝¹ : Add α₂
F : Type u_6
inst✝ : AddHomClass F α α₂
f : F
x y : AddMonoidAlgebra β α
⊢ ∀ (b : α₂), (sum (mapDomain (↑f) y) fun a₂ b₂ => single (b + a₂) (0 * b₂)) = 0
[PROOFSTEP]
simp
[GOAL]
case h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : Type u_3
β : Type u_4
α₂ : Type u_5
inst✝³ : Semiring β
inst✝² : Add α
inst✝¹ : Add α₂
F : Type u_6
inst✝ : AddHomClass F α α₂
f : F
x y : AddMonoidAlgebra β α
⊢ ∀ (b : α₂) (m₁ m₂ : β),
    (sum (mapDomain (↑f) y) fun a₂ b₂ => single (b + a₂) ((m₁ + m₂) * b₂)) =
      (sum (mapDomain (↑f) y) fun a₂ b₂ => single (b + a₂) (m₁ * b₂)) +
        sum (mapDomain (↑f) y) fun a₂ b₂ => single (b + a₂) (m₂ * b₂)
[PROOFSTEP]
simp [add_mul]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
a b : Multiplicative G
⊢ (fun a => single a 1) (a * b) = (fun a => single a 1) a * (fun a => single a 1) b
[PROOFSTEP]
simp only [mul_def, mul_one, sum_single_index, single_eq_zero, mul_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
a b : Multiplicative G
⊢ single (a * b) 1 = single (a + b) 1
[PROOFSTEP]
rfl
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝² : Semiring k
inst✝¹ : Nontrivial k
inst✝ : AddZeroClass G
a b : Multiplicative G
h : ↑(of k G) a = ↑(of k G) b
⊢ a = b
[PROOFSTEP]
simpa using (single_eq_single_iff _ _ _ _).mp h
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddZeroClass G
f : AddMonoidAlgebra k G
r : k
x a : G
⊢ a + 0 = x ↔ a = x
[PROOFSTEP]
rw [add_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddZeroClass G
f : AddMonoidAlgebra k G
r : k
x a : G
⊢ 0 + a = x ↔ a = x
[PROOFSTEP]
rw [zero_add]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddMonoid G
p : AddMonoidAlgebra k G → Prop
f : AddMonoidAlgebra k G
hM : ∀ (g : G), p (↑(of k G) (↑Multiplicative.ofAdd g))
hadd : ∀ (f g : AddMonoidAlgebra k G), p f → p g → p (f + g)
hsmul : ∀ (r : k) (f : AddMonoidAlgebra k G), p f → p (r • f)
⊢ p f
[PROOFSTEP]
refine' Finsupp.induction_linear f _ (fun f g hf hg => hadd f g hf hg) fun g r => _
[GOAL]
case refine'_1
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddMonoid G
p : AddMonoidAlgebra k G → Prop
f : AddMonoidAlgebra k G
hM : ∀ (g : G), p (↑(of k G) (↑Multiplicative.ofAdd g))
hadd : ∀ (f g : AddMonoidAlgebra k G), p f → p g → p (f + g)
hsmul : ∀ (r : k) (f : AddMonoidAlgebra k G), p f → p (r • f)
⊢ p 0
[PROOFSTEP]
simpa using hsmul 0 (of k G (Multiplicative.ofAdd 0)) (hM 0)
[GOAL]
case refine'_2
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddMonoid G
p : AddMonoidAlgebra k G → Prop
f : AddMonoidAlgebra k G
hM : ∀ (g : G), p (↑(of k G) (↑Multiplicative.ofAdd g))
hadd : ∀ (f g : AddMonoidAlgebra k G), p f → p g → p (f + g)
hsmul : ∀ (r : k) (f : AddMonoidAlgebra k G), p f → p (r • f)
g : G
r : k
⊢ p (Finsupp.single g r)
[PROOFSTEP]
convert
  hsmul r (of k G (Multiplicative.ofAdd g))
    (hM g)
      -- Porting note: Was `simp only`.
[GOAL]
case h.e'_1
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddMonoid G
p : AddMonoidAlgebra k G → Prop
f : AddMonoidAlgebra k G
hM : ∀ (g : G), p (↑(of k G) (↑Multiplicative.ofAdd g))
hadd : ∀ (f g : AddMonoidAlgebra k G), p f → p g → p (f + g)
hsmul : ∀ (r : k) (f : AddMonoidAlgebra k G), p f → p (r • f)
g : G
r : k
⊢ Finsupp.single g r = r • ↑(of k G) (↑Multiplicative.ofAdd g)
[PROOFSTEP]
rw [of_apply, toAdd_ofAdd, smul_single', mul_one]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd
x y : AddMonoidAlgebra k G
⊢ Equiv.toFun
      { toFun := equivMapDomain Multiplicative.ofAdd, invFun := src✝.invFun,
        left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
        right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
      (x * y) =
    Equiv.toFun
        { toFun := equivMapDomain Multiplicative.ofAdd, invFun := src✝.invFun,
          left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        x *
      Equiv.toFun
        { toFun := equivMapDomain Multiplicative.ofAdd, invFun := src✝.invFun,
          left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        y
[PROOFSTEP]
dsimp only []
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd
x y : AddMonoidAlgebra k G
⊢ equivMapDomain Multiplicative.ofAdd (x * y) =
    equivMapDomain Multiplicative.ofAdd x * equivMapDomain Multiplicative.ofAdd y
[PROOFSTEP]
repeat' rw [equivMapDomain_eq_mapDomain (M := k)]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd
x y : AddMonoidAlgebra k G
⊢ equivMapDomain Multiplicative.ofAdd (x * y) =
    equivMapDomain Multiplicative.ofAdd x * equivMapDomain Multiplicative.ofAdd y
[PROOFSTEP]
rw [equivMapDomain_eq_mapDomain (M := k)]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd
x y : AddMonoidAlgebra k G
⊢ Finsupp.mapDomain (↑Multiplicative.ofAdd) (x * y) =
    equivMapDomain Multiplicative.ofAdd x * equivMapDomain Multiplicative.ofAdd y
[PROOFSTEP]
rw [equivMapDomain_eq_mapDomain (M := k)]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd
x y : AddMonoidAlgebra k G
⊢ Finsupp.mapDomain (↑Multiplicative.ofAdd) (x * y) =
    Finsupp.mapDomain (↑Multiplicative.ofAdd) x * equivMapDomain Multiplicative.ofAdd y
[PROOFSTEP]
rw [equivMapDomain_eq_mapDomain (M := k)]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd
x y : AddMonoidAlgebra k G
⊢ Finsupp.mapDomain (↑Multiplicative.ofAdd) (x * y) =
    Finsupp.mapDomain (↑Multiplicative.ofAdd) x * Finsupp.mapDomain (↑Multiplicative.ofAdd) y
[PROOFSTEP]
rw [equivMapDomain_eq_mapDomain (M := k)]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd
x y : AddMonoidAlgebra k G
⊢ Finsupp.mapDomain (↑Multiplicative.ofAdd) (x * y) =
    Finsupp.mapDomain (↑Multiplicative.ofAdd) x * Finsupp.mapDomain (↑Multiplicative.ofAdd) y
[PROOFSTEP]
dsimp [Multiplicative.ofAdd]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Add G
src✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd
x y : AddMonoidAlgebra k G
⊢ Finsupp.mapDomain (fun x => x) (x * y) = Finsupp.mapDomain (fun x => x) x * Finsupp.mapDomain (fun x => x) y
[PROOFSTEP]
exact MonoidAlgebra.mapDomain_mul (α := Multiplicative G) (β := k) (MulHom.id (Multiplicative G)) x y
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul
x y : MonoidAlgebra k G
⊢ Equiv.toFun
      { toFun := equivMapDomain Additive.ofMul, invFun := src✝.invFun,
        left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
        right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
      (x * y) =
    Equiv.toFun
        { toFun := equivMapDomain Additive.ofMul, invFun := src✝.invFun,
          left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        x *
      Equiv.toFun
        { toFun := equivMapDomain Additive.ofMul, invFun := src✝.invFun,
          left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
        y
[PROOFSTEP]
dsimp only []
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul
x y : MonoidAlgebra k G
⊢ equivMapDomain Additive.ofMul (x * y) = equivMapDomain Additive.ofMul x * equivMapDomain Additive.ofMul y
[PROOFSTEP]
repeat' rw [equivMapDomain_eq_mapDomain (M := k)]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul
x y : MonoidAlgebra k G
⊢ equivMapDomain Additive.ofMul (x * y) = equivMapDomain Additive.ofMul x * equivMapDomain Additive.ofMul y
[PROOFSTEP]
rw [equivMapDomain_eq_mapDomain (M := k)]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul
x y : MonoidAlgebra k G
⊢ Finsupp.mapDomain (↑Additive.ofMul) (x * y) = equivMapDomain Additive.ofMul x * equivMapDomain Additive.ofMul y
[PROOFSTEP]
rw [equivMapDomain_eq_mapDomain (M := k)]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul
x y : MonoidAlgebra k G
⊢ Finsupp.mapDomain (↑Additive.ofMul) (x * y) = Finsupp.mapDomain (↑Additive.ofMul) x * equivMapDomain Additive.ofMul y
[PROOFSTEP]
rw [equivMapDomain_eq_mapDomain (M := k)]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul
x y : MonoidAlgebra k G
⊢ Finsupp.mapDomain (↑Additive.ofMul) (x * y) =
    Finsupp.mapDomain (↑Additive.ofMul) x * Finsupp.mapDomain (↑Additive.ofMul) y
[PROOFSTEP]
rw [equivMapDomain_eq_mapDomain (M := k)]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul
x y : MonoidAlgebra k G
⊢ Finsupp.mapDomain (↑Additive.ofMul) (x * y) =
    Finsupp.mapDomain (↑Additive.ofMul) x * Finsupp.mapDomain (↑Additive.ofMul) y
[PROOFSTEP]
dsimp [Additive.ofMul]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
src✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul
x y : MonoidAlgebra k G
⊢ Finsupp.mapDomain (fun x => x) (x * y) = Finsupp.mapDomain (fun x => x) x * Finsupp.mapDomain (fun x => x) y
[PROOFSTEP]
convert MonoidAlgebra.mapDomain_mul (β := k) (MulHom.id G) x y
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddMonoid G
src✝ : k →+ G →₀ k := singleAddHom 0
x y : k
⊢ OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = ZeroHom.toFun (↑src✝) 1) } (x * y) =
    OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = ZeroHom.toFun (↑src✝) 1) } x *
      OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = ZeroHom.toFun (↑src✝) 1) } y
[PROOFSTEP]
simp only [singleAddHom, single_mul_single, zero_add]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCommMonoid G
src✝ : (G →₀ k)ᵐᵒᵖ ≃+ (G →₀ kᵐᵒᵖ) := AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)
⊢ ∀ (x y : (AddMonoidAlgebra k G)ᵐᵒᵖ),
    Equiv.toFun src✝.toEquiv (x * y) = Equiv.toFun src✝.toEquiv x * Equiv.toFun src✝.toEquiv y
[PROOFSTEP]
rw [Equiv.toFun_as_coe, AddEquiv.toEquiv_eq_coe, AddEquiv.coe_toEquiv, ← AddEquiv.coe_toAddMonoidHom]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCommMonoid G
src✝ : (G →₀ k)ᵐᵒᵖ ≃+ (G →₀ kᵐᵒᵖ) := AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)
⊢ ∀ (x y : (AddMonoidAlgebra k G)ᵐᵒᵖ),
    ↑(AddEquiv.toAddMonoidHom src✝) (x * y) = ↑(AddEquiv.toAddMonoidHom src✝) x * ↑(AddEquiv.toAddMonoidHom src✝) y
[PROOFSTEP]
refine
  Iff.mpr (AddMonoidHom.map_mul_iff (R := (AddMonoidAlgebra k G)ᵐᵒᵖ) (S := AddMonoidAlgebra kᵐᵒᵖ G) _)
    ?_
      -- Porting note: Was `ext`.
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCommMonoid G
src✝ : (G →₀ k)ᵐᵒᵖ ≃+ (G →₀ kᵐᵒᵖ) := AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)
⊢ AddMonoidHom.compr₂ AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝) =
    AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝))
      (AddEquiv.toAddMonoidHom src✝)
[PROOFSTEP]
refine
  AddMonoidHom.mul_op_ext _ _ <|
    addHom_ext' fun i₁ =>
      AddMonoidHom.ext fun r₁ =>
        AddMonoidHom.mul_op_ext _ _ <|
          addHom_ext' fun i₂ =>
            AddMonoidHom.ext fun r₂ =>
              ?_
                -- Porting note: `reducible` cannot be `local` so proof gets long.
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCommMonoid G
src✝ : (G →₀ k)ᵐᵒᵖ ≃+ (G →₀ kᵐᵒᵖ) := AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)
i₁ : G
r₁ : k
i₂ : G
r₂ : k
⊢ ↑(AddMonoidHom.comp
          (AddMonoidHom.comp
            (↑(AddMonoidHom.comp
                  (AddMonoidHom.comp (AddMonoidHom.compr₂ AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝))
                    (AddEquiv.toAddMonoidHom opAddEquiv))
                  (singleAddHom i₁))
              r₁)
            (AddEquiv.toAddMonoidHom opAddEquiv))
          (singleAddHom i₂))
      r₂ =
    ↑(AddMonoidHom.comp
          (AddMonoidHom.comp
            (↑(AddMonoidHom.comp
                  (AddMonoidHom.comp
                    (AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝))
                      (AddEquiv.toAddMonoidHom src✝))
                    (AddEquiv.toAddMonoidHom opAddEquiv))
                  (singleAddHom i₁))
              r₁)
            (AddEquiv.toAddMonoidHom opAddEquiv))
          (singleAddHom i₂))
      r₂
[PROOFSTEP]
dsimp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCommMonoid G
src✝ : (G →₀ k)ᵐᵒᵖ ≃+ (G →₀ kᵐᵒᵖ) := AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)
i₁ : G
r₁ : k
i₂ : G
r₂ : k
⊢ ↑(AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv))
      (↑opAddEquiv (Finsupp.single i₁ r₁) * ↑opAddEquiv (Finsupp.single i₂ r₂)) =
    ↑(AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)) (↑opAddEquiv (Finsupp.single i₁ r₁)) *
      ↑(AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)) (↑opAddEquiv (Finsupp.single i₂ r₂))
[PROOFSTEP]
rw [AddEquiv.trans_apply, AddEquiv.trans_apply, AddEquiv.trans_apply, MulOpposite.opAddEquiv_apply,
  MulOpposite.opAddEquiv_symm_apply, MulOpposite.unop_mul (α := AddMonoidAlgebra k G)]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCommMonoid G
src✝ : (G →₀ k)ᵐᵒᵖ ≃+ (G →₀ kᵐᵒᵖ) := AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)
i₁ : G
r₁ : k
i₂ : G
r₂ : k
⊢ ↑(mapRange.addEquiv opAddEquiv) (unop (op (Finsupp.single i₂ r₂)) * unop (op (Finsupp.single i₁ r₁))) =
    ↑(mapRange.addEquiv opAddEquiv) (unop (op (Finsupp.single i₁ r₁))) *
      ↑(mapRange.addEquiv opAddEquiv) (unop (op (Finsupp.single i₂ r₂)))
[PROOFSTEP]
dsimp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCommMonoid G
src✝ : (G →₀ k)ᵐᵒᵖ ≃+ (G →₀ kᵐᵒᵖ) := AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)
i₁ : G
r₁ : k
i₂ : G
r₂ : k
⊢ mapRange op (_ : ↑opAddEquiv 0 = 0) (Finsupp.single i₂ r₂ * Finsupp.single i₁ r₁) =
    mapRange op (_ : ↑opAddEquiv 0 = 0) (Finsupp.single i₁ r₁) *
      mapRange op (_ : ↑opAddEquiv 0 = 0) (Finsupp.single i₂ r₂)
[PROOFSTEP]
simp only [mapRange_single, single_mul_single, ← op_mul, add_comm]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCommMonoid G
r : k
x : G
⊢ ↑AddMonoidAlgebra.opRingEquiv (op (single x r)) = single x (op r)
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCommMonoid G
r : kᵐᵒᵖ
x : Gᵐᵒᵖ
⊢ ↑(RingEquiv.symm AddMonoidAlgebra.opRingEquiv) (single x r) = op (single x (unop r))
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring k
inst✝¹ : Algebra R k
inst✝ : AddMonoid G
src✝ : R →+* AddMonoidAlgebra k G := RingHom.comp singleZeroRingHom (algebraMap R k)
r : R
f : (fun x => AddMonoidAlgebra k G) r
⊢ ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
            map_add' :=
              (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
        r *
      f =
    f *
      ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
            map_add' :=
              (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
        r
[PROOFSTEP]
refine Finsupp.ext fun _ => ?_
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring k
inst✝¹ : Algebra R k
inst✝ : AddMonoid G
src✝ : R →+* AddMonoidAlgebra k G := RingHom.comp singleZeroRingHom (algebraMap R k)
r : R
f : (fun x => AddMonoidAlgebra k G) r
x✝ : G
⊢ ↑(↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
                map_add' :=
                  (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
            r *
          f)
      x✝ =
    ↑(f *
          ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
                map_add' :=
                  (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
            r)
      x✝
[PROOFSTEP]
simp [single_zero_mul_apply, mul_single_zero_apply, Algebra.commutes]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring k
inst✝¹ : Algebra R k
inst✝ : AddMonoid G
src✝ : R →+* AddMonoidAlgebra k G := RingHom.comp singleZeroRingHom (algebraMap R k)
r : R
a : (fun x => AddMonoidAlgebra k G) r
⊢ r • a =
    ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
            map_add' :=
              (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
        r *
      a
[PROOFSTEP]
refine
  Finsupp.ext fun _ =>
    ?_
      -- Porting note: Newly required.
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring k
inst✝¹ : Algebra R k
inst✝ : AddMonoid G
src✝ : R →+* AddMonoidAlgebra k G := RingHom.comp singleZeroRingHom (algebraMap R k)
r : R
a : (fun x => AddMonoidAlgebra k G) r
x✝ : G
⊢ ↑(r • a) x✝ =
    ↑(↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
                map_add' :=
                  (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
            r *
          a)
      x✝
[PROOFSTEP]
rw [Finsupp.coe_smul]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring k
inst✝¹ : Algebra R k
inst✝ : AddMonoid G
src✝ : R →+* AddMonoidAlgebra k G := RingHom.comp singleZeroRingHom (algebraMap R k)
r : R
a : (fun x => AddMonoidAlgebra k G) r
x✝ : G
⊢ (r • ↑a) x✝ =
    ↑(↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
                map_add' :=
                  (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
            r *
          a)
      x✝
[PROOFSTEP]
simp [single_zero_mul_apply, Algebra.smul_def, Pi.smul_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring k
inst✝¹ : Algebra R k
inst✝ : AddMonoid G
src✝ : k →+* AddMonoidAlgebra k G := singleZeroRingHom
r : R
⊢ OneHom.toFun
      (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
            map_add' :=
              (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })
      (↑(algebraMap R k) r) =
    ↑(algebraMap R (AddMonoidAlgebra k G)) r
[PROOFSTEP]
refine Finsupp.ext fun _ => ?_
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring k
inst✝¹ : Algebra R k
inst✝ : AddMonoid G
src✝ : k →+* AddMonoidAlgebra k G := singleZeroRingHom
r : R
x✝ : G
⊢ ↑(OneHom.toFun
          (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
                map_add' :=
                  (_ :
                    ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })
          (↑(algebraMap R k) r))
      x✝ =
    ↑(↑(algebraMap R (AddMonoidAlgebra k G)) r) x✝
[PROOFSTEP]
simp
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring k
inst✝¹ : Algebra R k
inst✝ : AddMonoid G
src✝ : k →+* AddMonoidAlgebra k G := singleZeroRingHom
r : R
x✝ : G
⊢ ↑(Finsupp.single 0 (↑(algebraMap R k) r)) x✝ = ↑(↑(algebraMap R (AddMonoidAlgebra k G)) r) x✝
[PROOFSTEP]
rfl
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : AddMonoid G
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
f : A →ₐ[k] B
g : Multiplicative G →* B
h_comm : ∀ (x : A) (y : Multiplicative G), Commute (↑f x) (↑g y)
src✝ : AddMonoidAlgebra A G →+* B := liftNCRingHom (↑f) g h_comm
⊢ ∀ (r : k),
    OneHom.toFun
        (↑↑{
              toMonoidHom :=
                {
                  toOneHom :=
                    { toFun := ↑(liftNCRingHom (↑f) g h_comm), map_one' := (_ : OneHom.toFun (↑↑src✝) 1 = 1) },
                  map_mul' :=
                    (_ :
                      ∀ (x y : AddMonoidAlgebra A G),
                        OneHom.toFun (↑↑src✝) (x * y) = OneHom.toFun (↑↑src✝) x * OneHom.toFun (↑↑src✝) y) },
              map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
              map_add' :=
                (_ :
                  ∀ (x y : AddMonoidAlgebra A G),
                    OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })
        (↑(algebraMap k (AddMonoidAlgebra A G)) r) =
      ↑(algebraMap k B) r
[PROOFSTEP]
simp [liftNCRingHom]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : AddMonoid G
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : Multiplicative G →* A
f : MonoidAlgebra k G
⊢ ↑(↑(lift k G A) F) f = sum f fun a b => b • ↑F (↑Multiplicative.ofAdd a)
[PROOFSTEP]
simp only [lift_apply', Algebra.smul_def]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : AddMonoid G
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : Multiplicative G →* A
x : Multiplicative G
⊢ ↑(↑(lift k G A) F) (↑(of k G) x) = ↑F x
[PROOFSTEP]
rw [of_apply, ← lift_symm_apply, Equiv.symm_apply_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : AddMonoid G
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : Multiplicative G →* A
a : G
b : k
⊢ ↑(↑(lift k G A) F) (single a b) = b • ↑F (↑Multiplicative.ofAdd a)
[PROOFSTEP]
rw [lift_def, liftNC_single, Algebra.smul_def, AddMonoidHom.coe_coe]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : AddMonoid G
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : AddMonoidAlgebra k G →ₐ[k] A
f : MonoidAlgebra k G
⊢ ↑F f = sum f fun a b => b • ↑F (single a 1)
[PROOFSTEP]
conv_lhs =>
  rw [lift_unique' F]
  simp [lift_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : AddMonoid G
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : AddMonoidAlgebra k G →ₐ[k] A
f : MonoidAlgebra k G
| ↑F f
[PROOFSTEP]
  rw [lift_unique' F]
  simp [lift_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : AddMonoid G
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : AddMonoidAlgebra k G →ₐ[k] A
f : MonoidAlgebra k G
| ↑F f
[PROOFSTEP]
  rw [lift_unique' F]
  simp [lift_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : AddMonoid G
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : AddMonoidAlgebra k G →ₐ[k] A
f : MonoidAlgebra k G
| ↑F f
[PROOFSTEP]
rw [lift_unique' F]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : AddMonoid G
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : AddMonoidAlgebra k G →ₐ[k] A
f : MonoidAlgebra k G
| ↑(↑(lift k G A) (MonoidHom.comp (↑F) (of k G))) f
[PROOFSTEP]
simp [lift_apply]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : AddMonoid G
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
φ₁ φ₂ : AddMonoidAlgebra k G →ₐ[k] A
⊢ φ₁ = φ₂ → ∀ (x : G), ↑φ₁ (Finsupp.single x 1) = ↑φ₂ (Finsupp.single x 1)
[PROOFSTEP]
rintro rfl _
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁵ : CommSemiring k
inst✝⁴ : AddMonoid G
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type u_3
inst✝¹ : Semiring B
inst✝ : Algebra k B
φ₁ : AddMonoidAlgebra k G →ₐ[k] A
x✝ : G
⊢ ↑φ₁ (Finsupp.single x✝ 1) = ↑φ₁ (Finsupp.single x✝ 1)
[PROOFSTEP]
rfl
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
ι : Type ui
inst✝¹ : CommSemiring k
inst✝ : AddCommMonoid G
s✝ : Finset ι
a✝ : ι → G
b : ι → k
a : ι
s : Finset ι
has : ¬a ∈ s
ih : ∏ i in s, single (a✝ i) (b i) = single (∑ i in s, a✝ i) (∏ i in s, b i)
⊢ ∏ i in cons a s has, single (a✝ i) (b i) = single (∑ i in cons a s has, a✝ i) (∏ i in cons a s has, b i)
[PROOFSTEP]
rw [prod_cons has, ih, single_mul_single, sum_cons has, prod_cons has]
[GOAL]
k : Type u₁
G : Type u₂
H✝ : Type u_1
R : Type u_2
A : Type u_3
H : Type u_4
F : Type u_5
inst✝⁵ : CommSemiring k
inst✝⁴ : Semiring A
inst✝³ : Algebra k A
inst✝² : AddMonoid G
inst✝¹ : AddMonoid H
inst✝ : AddMonoidHomClass F G H
f : F
r : k
⊢ mapDomain (↑f) (↑(algebraMap k (AddMonoidAlgebra A G)) r) = ↑(algebraMap k (AddMonoidAlgebra A H)) r
[PROOFSTEP]
simp only [Function.comp_apply, mapDomain_single, AddMonoidAlgebra.coe_algebraMap, map_zero]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring k
inst✝¹ : Algebra R k
inst✝ : AddMonoid G
src✝ : AddMonoidAlgebra k G ≃+* MonoidAlgebra k (Multiplicative G) := AddMonoidAlgebra.toMultiplicative k G
r : R
⊢ Equiv.toFun src✝.toEquiv (↑(algebraMap R (AddMonoidAlgebra k G)) r) =
    ↑(algebraMap R (MonoidAlgebra k (Multiplicative G))) r
[PROOFSTEP]
simp [AddMonoidAlgebra.toMultiplicative]
[GOAL]
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring k
inst✝¹ : Algebra R k
inst✝ : Monoid G
src✝ : MonoidAlgebra k G ≃+* AddMonoidAlgebra k (Additive G) := MonoidAlgebra.toAdditive k G
r : R
⊢ Equiv.toFun src✝.toEquiv (↑(algebraMap R (MonoidAlgebra k G)) r) = ↑(algebraMap R (AddMonoidAlgebra k (Additive G))) r
[PROOFSTEP]
simp [MonoidAlgebra.toAdditive]