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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Next tactic:
simp only [single_zero, single_add, forall_true_iff, add_mul,
        mul_add, zero_mul, mul_zero, sum_zero, sum_add]
instance nonAssocSemiring : NonAssocSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    natCast := fun n => single 0 n
    natCast_zero := by simp
    natCast_succ := fun _ => by simp; rfl
    one_mul := fun f => by
      

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddZeroClass G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f : k[G]
⊢ 1 * f = f

Next tactic:
simp only [mul_def, one_def, sum_single_index, zero_mul, single_zero, sum_zero, zero_add,
        one_mul, sum_single]
instance nonAssocSemiring : NonAssocSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    natCast := fun n => single 0 n
    natCast_zero := by simp
    natCast_succ := fun _ => by simp; rfl
    one_mul := fun f => by
      simp only [mul_def, one_def, sum_single_index, zero_mul, single_zero, sum_zero, zero_add,
        one_mul, sum_single]
    mul_one := fun f => by
      

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddZeroClass G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
f : k[G]
⊢ f * 1 = f

Next tactic:
simp only [mul_def, one_def, sum_single_index, mul_zero, single_zero, sum_zero, add_zero,
        mul_one, sum_single]
instance nonAssocSemiring : NonAssocSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    natCast := fun n => single 0 n
    natCast_zero := by 

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddZeroClass G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
⊢ NatCast.natCast 0 = 0

Next tactic:
simp
instance nonAssocSemiring : NonAssocSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    natCast := fun n => single 0 n
    natCast_zero := by simp
    natCast_succ := fun _ => by 

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddZeroClass G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
x✝ : ℕ
⊢ NatCast.natCast (x✝ + 1) = NatCast.natCast x✝ + 1

Next tactic:
simp
instance nonAssocSemiring : NonAssocSemiring k[G] :=
  { AddMonoidAlgebra.nonUnitalNonAssocSemiring with
    natCast := fun n => single 0 n
    natCast_zero := by simp
    natCast_succ := fun _ => by simp; 

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddZeroClass G
src✝ : NonUnitalNonAssocSemiring k[G] := nonUnitalNonAssocSemiring
x✝ : ℕ
⊢ ((fun₀ | 0 => ↑x✝) + fun₀ | 0 => 1) = single 0 ↑x✝ + 1

Next tactic:
rfl
instance nonAssocRing [Ring k] [AddZeroClass G] : NonAssocRing k[G] :=
  { AddMonoidAlgebra.addCommGroup,
    AddMonoidAlgebra.nonAssocSemiring with
    intCast := fun z => single 0 (z : k)
    -- Porting note: Both were `simpa`.
    intCast_ofNat := fun n => by 

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Ring k
inst✝ : AddZeroClass G
src✝¹ : AddCommGroup k[G] := addCommGroup
src✝ : NonAssocSemiring k[G] := nonAssocSemiring
n : ℕ
⊢ IntCast.intCast ↑n = ↑n

Next tactic:
simp
instance nonAssocRing [Ring k] [AddZeroClass G] : NonAssocRing k[G] :=
  { AddMonoidAlgebra.addCommGroup,
    AddMonoidAlgebra.nonAssocSemiring with
    intCast := fun z => single 0 (z : k)
    -- Porting note: Both were `simpa`.
    intCast_ofNat := fun n => by simp; 

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Ring k
inst✝ : AddZeroClass G
src✝¹ : AddCommGroup k[G] := addCommGroup
src✝ : NonAssocSemiring k[G] := nonAssocSemiring
n : ℕ
⊢ single 0 ↑n = ↑n

Next tactic:
rfl
instance nonAssocRing [Ring k] [AddZeroClass G] : NonAssocRing k[G] :=
  { AddMonoidAlgebra.addCommGroup,
    AddMonoidAlgebra.nonAssocSemiring with
    intCast := fun z => single 0 (z : k)
    -- Porting note: Both were `simpa`.
    intCast_ofNat := fun n => by simp; rfl
    intCast_negSucc := fun n => by 

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Ring k
inst✝ : AddZeroClass G
src✝¹ : AddCommGroup k[G] := addCommGroup
src✝ : NonAssocSemiring k[G] := nonAssocSemiring
n : ℕ
⊢ IntCast.intCast (Int.negSucc n) = -↑(n + 1)

Next tactic:
simp
instance nonAssocRing [Ring k] [AddZeroClass G] : NonAssocRing k[G] :=
  { AddMonoidAlgebra.addCommGroup,
    AddMonoidAlgebra.nonAssocSemiring with
    intCast := fun z => single 0 (z : k)
    -- Porting note: Both were `simpa`.
    intCast_ofNat := fun n => by simp; rfl
    intCast_negSucc := fun n => by simp; 

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Ring k
inst✝ : AddZeroClass G
src✝¹ : AddCommGroup k[G] := addCommGroup
src✝ : NonAssocSemiring k[G] := nonAssocSemiring
n : ℕ
⊢ ((-fun₀ | 0 => 1) + -fun₀ | 0 => ↑n) = -1 + -↑n

Next tactic:
rfl
theorem single_pow [AddMonoid G] {a : G} {b : k} : ∀ n : ℕ, single a b ^ n = single (n • a) (b ^ n)
  | 0 => by
    

Proof state:
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)

Next tactic:
simp only [pow_zero, zero_nsmul]
theorem single_pow [AddMonoid G] {a : G} {b : k} : ∀ n : ℕ, single a b ^ n = single (n • a) (b ^ n)
  | 0 => by
    simp only [pow_zero, zero_nsmul]
    

Proof state:
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

Next tactic:
rfl
theorem single_pow [AddMonoid G] {a : G} {b : k} : ∀ n : ℕ, single a b ^ n = single (n • a) (b ^ n)
  | 0 => by
    simp only [pow_zero, zero_nsmul]
    rfl
  | n + 1 => by
    

Proof state:
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))

Next tactic:
rw [pow_succ, pow_succ, single_pow n, single_mul_single, add_comm, add_nsmul, one_nsmul]
/-- Like `Finsupp.mapDomain_zero`, but for the `1` we define in this file -/
@[simp]
theorem mapDomain_one {α : Type*} {β : Type*} {α₂ : Type*} [Semiring β] [Zero α] [Zero α₂]
    {F : Type*} [ZeroHomClass F α α₂] (f : F) :
    (mapDomain f (1 : AddMonoidAlgebra β α) : AddMonoidAlgebra β α₂) =
      (1 : AddMonoidAlgebra β α₂) :=
  by 

Proof state:
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

Next tactic:
simp_rw [one_def, mapDomain_single, map_zero]
/-- Like `Finsupp.mapDomain_add`, but for the convolutive multiplication we define in this file -/
theorem mapDomain_mul {α : Type*} {β : Type*} {α₂ : Type*} [Semiring β] [Add α] [Add α₂]
    {F : Type*} [AddHomClass F α α₂] (f : F) (x y : AddMonoidAlgebra β α) :
    mapDomain f (x * y) = mapDomain f x * mapDomain f y := by
  

Proof state:
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 : β[α]
⊢ mapDomain (⇑f) (x * y) = mapDomain (⇑f) x * mapDomain (⇑f) y

Next tactic:
simp_rw [mul_def, mapDomain_sum, mapDomain_single, map_add]
/-- Like `Finsupp.mapDomain_add`, but for the convolutive multiplication we define in this file -/
theorem mapDomain_mul {α : Type*} {β : Type*} {α₂ : Type*} [Semiring β] [Add α] [Add α₂]
    {F : Type*} [AddHomClass F α α₂] (f : F) (x y : AddMonoidAlgebra β α) :
    mapDomain f (x * y) = mapDomain f x * mapDomain f y := by
  simp_rw [mul_def, mapDomain_sum, mapDomain_single, map_add]
  

Proof state:
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 : β[α]
⊢ (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₂)

Next tactic:
rw [Finsupp.sum_mapDomain_index]
/-- Like `Finsupp.mapDomain_add`, but for the convolutive multiplication we define in this file -/
theorem mapDomain_mul {α : Type*} {β : Type*} {α₂ : Type*} [Semiring β] [Add α] [Add α₂]
    {F : Type*} [AddHomClass F α α₂] (f : F) (x y : AddMonoidAlgebra β α) :
    mapDomain f (x * y) = mapDomain f x * mapDomain f y := by
  simp_rw [mul_def, mapDomain_sum, mapDomain_single, map_add]
  rw [Finsupp.sum_mapDomain_index]
  · 

Proof state:
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 : β[α]
⊢ (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₂)

Next tactic:
congr
/-- Like `Finsupp.mapDomain_add`, but for the convolutive multiplication we define in this file -/
theorem mapDomain_mul {α : Type*} {β : Type*} {α₂ : Type*} [Semiring β] [Add α] [Add α₂]
    {F : Type*} [AddHomClass F α α₂] (f : F) (x y : AddMonoidAlgebra β α) :
    mapDomain f (x * y) = mapDomain f x * mapDomain f y := by
  simp_rw [mul_def, mapDomain_sum, mapDomain_single, map_add]
  rw [Finsupp.sum_mapDomain_index]
  · congr
    

Proof state:
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 : β[α]
⊢ (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₂)

Next tactic:
ext a b
/-- Like `Finsupp.mapDomain_add`, but for the convolutive multiplication we define in this file -/
theorem mapDomain_mul {α : Type*} {β : Type*} {α₂ : Type*} [Semiring β] [Add α] [Add α₂]
    {F : Type*} [AddHomClass F α α₂] (f : F) (x y : AddMonoidAlgebra β α) :
    mapDomain f (x * y) = mapDomain f x * mapDomain f y := by
  simp_rw [mul_def, mapDomain_sum, mapDomain_single, map_add]
  rw [Finsupp.sum_mapDomain_index]
  · congr
    ext a b
    

Proof state:
case e_g.h.h
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : 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 : β[α]
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₂)

Next tactic:
rw [Finsupp.sum_mapDomain_index]
/-- Like `Finsupp.mapDomain_add`, but for the convolutive multiplication we define in this file -/
theorem mapDomain_mul {α : Type*} {β : Type*} {α₂ : Type*} [Semiring β] [Add α] [Add α₂]
    {F : Type*} [AddHomClass F α α₂] (f : F) (x y : AddMonoidAlgebra β α) :
    mapDomain f (x * y) = mapDomain f x * mapDomain f y := by
  simp_rw [mul_def, mapDomain_sum, mapDomain_single, map_add]
  rw [Finsupp.sum_mapDomain_index]
  · congr
    ext a b
    rw [Finsupp.sum_mapDomain_index]
    · 

Proof state:
case e_g.h.h.h_zero
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : 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 : β[α]
a : α
b : β
⊢ ∀ (b_1 : α₂), single (f a + b_1) (b * 0) = 0

Next tactic:
simp
/-- Like `Finsupp.mapDomain_add`, but for the convolutive multiplication we define in this file -/
theorem mapDomain_mul {α : Type*} {β : Type*} {α₂ : Type*} [Semiring β] [Add α] [Add α₂]
    {F : Type*} [AddHomClass F α α₂] (f : F) (x y : AddMonoidAlgebra β α) :
    mapDomain f (x * y) = mapDomain f x * mapDomain f y := by
  simp_rw [mul_def, mapDomain_sum, mapDomain_single, map_add]
  rw [Finsupp.sum_mapDomain_index]
  · congr
    ext a b
    rw [Finsupp.sum_mapDomain_index]
    · simp
    · 

Proof state:
case e_g.h.h.h_add
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝⁴ : Semiring k
α : 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 : β[α]
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₂)

Next tactic:
simp [mul_add]
/-- Like `Finsupp.mapDomain_add`, but for the convolutive multiplication we define in this file -/
theorem mapDomain_mul {α : Type*} {β : Type*} {α₂ : Type*} [Semiring β] [Add α] [Add α₂]
    {F : Type*} [AddHomClass F α α₂] (f : F) (x y : AddMonoidAlgebra β α) :
    mapDomain f (x * y) = mapDomain f x * mapDomain f y := by
  simp_rw [mul_def, mapDomain_sum, mapDomain_single, map_add]
  rw [Finsupp.sum_mapDomain_index]
  · congr
    ext a b
    rw [Finsupp.sum_mapDomain_index]
    · simp
    · simp [mul_add]
  · 

Proof state:
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 : β[α]
⊢ ∀ (b : α₂), (sum (mapDomain (⇑f) y) fun a₂ b₂ => single (b + a₂) (0 * b₂)) = 0

Next tactic:
simp
/-- Like `Finsupp.mapDomain_add`, but for the convolutive multiplication we define in this file -/
theorem mapDomain_mul {α : Type*} {β : Type*} {α₂ : Type*} [Semiring β] [Add α] [Add α₂]
    {F : Type*} [AddHomClass F α α₂] (f : F) (x y : AddMonoidAlgebra β α) :
    mapDomain f (x * y) = mapDomain f x * mapDomain f y := by
  simp_rw [mul_def, mapDomain_sum, mapDomain_single, map_add]
  rw [Finsupp.sum_mapDomain_index]
  · congr
    ext a b
    rw [Finsupp.sum_mapDomain_index]
    · simp
    · simp [mul_add]
  · simp
  · 

Proof state:
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 : β[α]
⊢ ∀ (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₂)

Next tactic:
simp [add_mul]
/-- The embedding of an additive magma into its additive magma algebra. -/
@[simps]
def ofMagma [Add G] : Multiplicative G →ₙ* k[G] where
  toFun a := single a 1
  map_mul' a b := by 

Proof state:
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

Next tactic:
simp only [mul_def, mul_one, sum_single_index, single_eq_zero, mul_zero]
/-- The embedding of an additive magma into its additive magma algebra. -/
@[simps]
def ofMagma [Add G] : Multiplicative G →ₙ* k[G] where
  toFun a := single a 1
  map_mul' a b := by simp only [mul_def, mul_one, sum_single_index, single_eq_zero, mul_zero]; 

Proof state:
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

Next tactic:
rfl
theorem mul_single_zero_apply [AddZeroClass G] (f : k[G]) (r : k) (x : G) :
    (f * single (0 : G) r) x = f x * r :=
  f.mul_single_apply_aux r _ _ _ fun a => by 

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddZeroClass G
f : k[G]
r : k
x a : G
⊢ a + 0 = x ↔ a = x

Next tactic:
rw [add_zero]
theorem single_zero_mul_apply [AddZeroClass G] (f : k[G]) (r : k) (x : G) :
    (single (0 : G) r * f) x = r * f x :=
  f.single_mul_apply_aux r _ _ _ fun a => by 

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddZeroClass G
f : k[G]
r : k
x a : G
⊢ 0 + a = x ↔ a = x

Next tactic:
rw [zero_add]
theorem induction_on [AddMonoid G] {p : k[G] → Prop} (f : k[G])
    (hM : ∀ g, p (of k G (Multiplicative.ofAdd g)))
    (hadd : ∀ f g : k[G], p f → p g → p (f + g))
    (hsmul : ∀ (r : k) (f), p f → p (r • f)) : p f := by
  

Proof state:
k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : AddMonoid G
p : k[G] → Prop
f : k[G]
hM : ∀ (g : G), p ((of k G) (Multiplicative.ofAdd g))
hadd : ∀ (f g : k[G]), p f → p g → p (f + g)
hsmul : ∀ (r : k) (f : k[G]), p f → p (r • f)
⊢ p f

Next tactic:
refine' Finsupp.induction_linear f _ (fun f g hf hg => hadd f g hf hg) fun g r => _