l3lab/ntp-mathlib huggingface dataset:
theorem diagonalSucc_inv_single_left (g : G) (f : Gⁿ →₀ k) (r : k) :
    (diagonalSucc k G n).inv.hom (Finsupp.single g r ⊗ₜ f) =
      Finsupp.lift (Gⁿ⁺¹ →₀ k) k Gⁿ (fun f => single (g • partialProd f) r) f := by
  refine' f.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.tmul_zero, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', mul_one, TensorProduct.tmul_add, map_add,
      diagonalSucc_inv_single_single, hx, Finsupp.sum_single_index, mul_comm b,
      zero_mul, single_zero] -/
  · 

Proof state:
case refine'_1
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G
f : (Fin n → G) →₀ k
r : k
⊢ (diagonalSucc k G n).inv.hom ((fun₀ | g => r) ⊗ₜ[k] 0) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r) 0

Next tactic:
rw [TensorProduct.tmul_zero, map_zero]
theorem diagonalSucc_inv_single_left (g : G) (f : Gⁿ →₀ k) (r : k) :
    (diagonalSucc k G n).inv.hom (Finsupp.single g r ⊗ₜ f) =
      Finsupp.lift (Gⁿ⁺¹ →₀ k) k Gⁿ (fun f => single (g • partialProd f) r) f := by
  refine' f.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.tmul_zero, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', mul_one, TensorProduct.tmul_add, map_add,
      diagonalSucc_inv_single_single, hx, Finsupp.sum_single_index, mul_comm b,
      zero_mul, single_zero] -/
  · rw [TensorProduct.tmul_zero, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    

Proof state:
case refine'_1
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G
f : (Fin n → G) →₀ k
r : k
⊢ (diagonalSucc k G n).inv.hom 0 = 0

Next tactic:
erw [map_zero]
theorem diagonalSucc_inv_single_left (g : G) (f : Gⁿ →₀ k) (r : k) :
    (diagonalSucc k G n).inv.hom (Finsupp.single g r ⊗ₜ f) =
      Finsupp.lift (Gⁿ⁺¹ →₀ k) k Gⁿ (fun f => single (g • partialProd f) r) f := by
  refine' f.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.tmul_zero, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', mul_one, TensorProduct.tmul_add, map_add,
      diagonalSucc_inv_single_single, hx, Finsupp.sum_single_index, mul_comm b,
      zero_mul, single_zero] -/
  · rw [TensorProduct.tmul_zero, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [map_zero]
  · 

Proof state:
case refine'_2
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G
f : (Fin n → G) →₀ k
r : k
⊢ ∀ (a : Fin n → G) (b : k) (f : (Fin n → G) →₀ k),
    a ∉ f.support →
      b ≠ 0 →
        (diagonalSucc k G n).inv.hom ((fun₀ | g => r) ⊗ₜ[k] f) =
            ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r) f →
          (diagonalSucc k G n).inv.hom ((fun₀ | g => r) ⊗ₜ[k] ((fun₀ | a => b) + f)) =
            ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r)
              ((fun₀ | a => b) + f)

Next tactic:
intro _ _ _ _ _ hx
theorem diagonalSucc_inv_single_left (g : G) (f : Gⁿ →₀ k) (r : k) :
    (diagonalSucc k G n).inv.hom (Finsupp.single g r ⊗ₜ f) =
      Finsupp.lift (Gⁿ⁺¹ →₀ k) k Gⁿ (fun f => single (g • partialProd f) r) f := by
  refine' f.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.tmul_zero, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', mul_one, TensorProduct.tmul_add, map_add,
      diagonalSucc_inv_single_single, hx, Finsupp.sum_single_index, mul_comm b,
      zero_mul, single_zero] -/
  · rw [TensorProduct.tmul_zero, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [map_zero]
  · intro _ _ _ _ _ hx
    

Proof state:
case refine'_2
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G
f : (Fin n → G) →₀ k
r : k
a✝² : Fin n → G
b✝ : k
f✝ : (Fin n → G) →₀ k
a✝¹ : a✝² ∉ f✝.support
a✝ : b✝ ≠ 0
hx :
  (diagonalSucc k G n).inv.hom ((fun₀ | g => r) ⊗ₜ[k] f✝) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r) f✝
⊢ (diagonalSucc k G n).inv.hom ((fun₀ | g => r) ⊗ₜ[k] ((fun₀ | a✝² => b✝) + f✝)) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r)
      ((fun₀ | a✝² => b✝) + f✝)

Next tactic:
rw [TensorProduct.tmul_add, map_add]
theorem diagonalSucc_inv_single_left (g : G) (f : Gⁿ →₀ k) (r : k) :
    (diagonalSucc k G n).inv.hom (Finsupp.single g r ⊗ₜ f) =
      Finsupp.lift (Gⁿ⁺¹ →₀ k) k Gⁿ (fun f => single (g • partialProd f) r) f := by
  refine' f.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.tmul_zero, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', mul_one, TensorProduct.tmul_add, map_add,
      diagonalSucc_inv_single_single, hx, Finsupp.sum_single_index, mul_comm b,
      zero_mul, single_zero] -/
  · rw [TensorProduct.tmul_zero, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [map_zero]
  · intro _ _ _ _ _ hx
    rw [TensorProduct.tmul_add, map_add]; 

Proof state:
case refine'_2
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G
f : (Fin n → G) →₀ k
r : k
a✝² : Fin n → G
b✝ : k
f✝ : (Fin n → G) →₀ k
a✝¹ : a✝² ∉ f✝.support
a✝ : b✝ ≠ 0
hx :
  (diagonalSucc k G n).inv.hom ((fun₀ | g => r) ⊗ₜ[k] f✝) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r) f✝
⊢ (diagonalSucc k G n).inv.hom (((fun₀ | g => r) ⊗ₜ[k] fun₀ | a✝² => b✝) + (fun₀ | g => r) ⊗ₜ[k] f✝) =
    (((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r) fun₀ | a✝² => b✝) +
      ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r) f✝

Next tactic:
erw [map_add, hx]
theorem diagonalSucc_inv_single_left (g : G) (f : Gⁿ →₀ k) (r : k) :
    (diagonalSucc k G n).inv.hom (Finsupp.single g r ⊗ₜ f) =
      Finsupp.lift (Gⁿ⁺¹ →₀ k) k Gⁿ (fun f => single (g • partialProd f) r) f := by
  refine' f.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.tmul_zero, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', mul_one, TensorProduct.tmul_add, map_add,
      diagonalSucc_inv_single_single, hx, Finsupp.sum_single_index, mul_comm b,
      zero_mul, single_zero] -/
  · rw [TensorProduct.tmul_zero, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [map_zero]
  · intro _ _ _ _ _ hx
    rw [TensorProduct.tmul_add, map_add]; erw [map_add, hx]
    

Proof state:
case refine'_2
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G
f : (Fin n → G) →₀ k
r : k
a✝² : Fin n → G
b✝ : k
f✝ : (Fin n → G) →₀ k
a✝¹ : a✝² ∉ f✝.support
a✝ : b✝ ≠ 0
hx :
  (diagonalSucc k G n).inv.hom ((fun₀ | g => r) ⊗ₜ[k] f✝) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r) f✝
⊢ (diagonalSucc k G n).inv.hom ((fun₀ | g => r) ⊗ₜ[k] fun₀ | a✝² => b✝) +
      ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r) f✝ =
    (((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r) fun₀ | a✝² => b✝) +
      ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r) f✝

Next tactic:
simp_rw [lift_apply, smul_single, smul_eq_mul]
theorem diagonalSucc_inv_single_left (g : G) (f : Gⁿ →₀ k) (r : k) :
    (diagonalSucc k G n).inv.hom (Finsupp.single g r ⊗ₜ f) =
      Finsupp.lift (Gⁿ⁺¹ →₀ k) k Gⁿ (fun f => single (g • partialProd f) r) f := by
  refine' f.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.tmul_zero, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', mul_one, TensorProduct.tmul_add, map_add,
      diagonalSucc_inv_single_single, hx, Finsupp.sum_single_index, mul_comm b,
      zero_mul, single_zero] -/
  · rw [TensorProduct.tmul_zero, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [map_zero]
  · intro _ _ _ _ _ hx
    rw [TensorProduct.tmul_add, map_add]; erw [map_add, hx]
    simp_rw [lift_apply, smul_single, smul_eq_mul]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    

Proof state:
case refine'_2
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G
f : (Fin n → G) →₀ k
r : k
a✝² : Fin n → G
b✝ : k
f✝ : (Fin n → G) →₀ k
a✝¹ : a✝² ∉ f✝.support
a✝ : b✝ ≠ 0
hx :
  (diagonalSucc k G n).inv.hom ((fun₀ | g => r) ⊗ₜ[k] f✝) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r) f✝
⊢ ((diagonalSucc k G n).inv.hom ((fun₀ | g => r) ⊗ₜ[k] fun₀ | a✝² => b✝) +
      sum f✝ fun x r_1 => fun₀ | g • partialProd x => r_1 * r) =
    (sum (fun₀ | a✝² => b✝) fun x r_1 => fun₀ | g • partialProd x => r_1 * r) +
      sum f✝ fun x r_1 => fun₀ | g • partialProd x => r_1 * r

Next tactic:
erw [diagonalSucc_inv_single_single]
theorem diagonalSucc_inv_single_left (g : G) (f : Gⁿ →₀ k) (r : k) :
    (diagonalSucc k G n).inv.hom (Finsupp.single g r ⊗ₜ f) =
      Finsupp.lift (Gⁿ⁺¹ →₀ k) k Gⁿ (fun f => single (g • partialProd f) r) f := by
  refine' f.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.tmul_zero, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', mul_one, TensorProduct.tmul_add, map_add,
      diagonalSucc_inv_single_single, hx, Finsupp.sum_single_index, mul_comm b,
      zero_mul, single_zero] -/
  · rw [TensorProduct.tmul_zero, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [map_zero]
  · intro _ _ _ _ _ hx
    rw [TensorProduct.tmul_add, map_add]; erw [map_add, hx]
    simp_rw [lift_apply, smul_single, smul_eq_mul]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [diagonalSucc_inv_single_single]
    

Proof state:
case refine'_2
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G
f : (Fin n → G) →₀ k
r : k
a✝² : Fin n → G
b✝ : k
f✝ : (Fin n → G) →₀ k
a✝¹ : a✝² ∉ f✝.support
a✝ : b✝ ≠ 0
hx :
  (diagonalSucc k G n).inv.hom ((fun₀ | g => r) ⊗ₜ[k] f✝) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r) f✝
⊢ ((fun₀ | g • partialProd a✝² => r * b✝) + sum f✝ fun x r_1 => fun₀ | g • partialProd x => r_1 * r) =
    (sum (fun₀ | a✝² => b✝) fun x r_1 => fun₀ | g • partialProd x => r_1 * r) +
      sum f✝ fun x r_1 => fun₀ | g • partialProd x => r_1 * r

Next tactic:
rw [sum_single_index, mul_comm]
theorem diagonalSucc_inv_single_left (g : G) (f : Gⁿ →₀ k) (r : k) :
    (diagonalSucc k G n).inv.hom (Finsupp.single g r ⊗ₜ f) =
      Finsupp.lift (Gⁿ⁺¹ →₀ k) k Gⁿ (fun f => single (g • partialProd f) r) f := by
  refine' f.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.tmul_zero, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', mul_one, TensorProduct.tmul_add, map_add,
      diagonalSucc_inv_single_single, hx, Finsupp.sum_single_index, mul_comm b,
      zero_mul, single_zero] -/
  · rw [TensorProduct.tmul_zero, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [map_zero]
  · intro _ _ _ _ _ hx
    rw [TensorProduct.tmul_add, map_add]; erw [map_add, hx]
    simp_rw [lift_apply, smul_single, smul_eq_mul]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [diagonalSucc_inv_single_single]
    rw [sum_single_index, mul_comm]
    · 

Proof state:
case refine'_2
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G
f : (Fin n → G) →₀ k
r : k
a✝² : Fin n → G
b✝ : k
f✝ : (Fin n → G) →₀ k
a✝¹ : a✝² ∉ f✝.support
a✝ : b✝ ≠ 0
hx :
  (diagonalSucc k G n).inv.hom ((fun₀ | g => r) ⊗ₜ[k] f✝) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => fun₀ | g • partialProd f => r) f✝
⊢ (fun₀ | g • partialProd a✝² => 0 * r) = 0

Next tactic:
rw [zero_mul, single_zero]
theorem diagonalSucc_inv_single_right (g : G →₀ k) (f : Gⁿ) (r : k) :
    (diagonalSucc k G n).inv.hom (g ⊗ₜ Finsupp.single f r) =
      Finsupp.lift _ k G (fun a => single (a • partialProd f) r) g := by
  

Proof state:
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G →₀ k
f : Fin n → G
r : k
⊢ (diagonalSucc k G n).inv.hom (g ⊗ₜ[k] fun₀ | f => r) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) g

Next tactic:
refine' g.induction _ _
theorem diagonalSucc_inv_single_right (g : G →₀ k) (f : Gⁿ) (r : k) :
    (diagonalSucc k G n).inv.hom (g ⊗ₜ Finsupp.single f r) =
      Finsupp.lift _ k G (fun a => single (a • partialProd f) r) g := by
  refine' g.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.zero_tmul, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', map_add, hx, diagonalSucc_inv_single_single,
      TensorProduct.add_tmul, Finsupp.sum_single_index, zero_mul, single_zero] -/
  · 

Proof state:
case refine'_1
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G →₀ k
f : Fin n → G
r : k
⊢ (diagonalSucc k G n).inv.hom (0 ⊗ₜ[k] fun₀ | f => r) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) 0

Next tactic:
rw [TensorProduct.zero_tmul, map_zero]
theorem diagonalSucc_inv_single_right (g : G →₀ k) (f : Gⁿ) (r : k) :
    (diagonalSucc k G n).inv.hom (g ⊗ₜ Finsupp.single f r) =
      Finsupp.lift _ k G (fun a => single (a • partialProd f) r) g := by
  refine' g.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.zero_tmul, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', map_add, hx, diagonalSucc_inv_single_single,
      TensorProduct.add_tmul, Finsupp.sum_single_index, zero_mul, single_zero] -/
  · rw [TensorProduct.zero_tmul, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    

Proof state:
case refine'_1
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G →₀ k
f : Fin n → G
r : k
⊢ (diagonalSucc k G n).inv.hom 0 = 0

Next tactic:
erw [map_zero]
theorem diagonalSucc_inv_single_right (g : G →₀ k) (f : Gⁿ) (r : k) :
    (diagonalSucc k G n).inv.hom (g ⊗ₜ Finsupp.single f r) =
      Finsupp.lift _ k G (fun a => single (a • partialProd f) r) g := by
  refine' g.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.zero_tmul, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', map_add, hx, diagonalSucc_inv_single_single,
      TensorProduct.add_tmul, Finsupp.sum_single_index, zero_mul, single_zero] -/
  · rw [TensorProduct.zero_tmul, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [map_zero]
  · 

Proof state:
case refine'_2
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G →₀ k
f : Fin n → G
r : k
⊢ ∀ (a : G) (b : k) (f_1 : G →₀ k),
    a ∉ f_1.support →
      b ≠ 0 →
        (diagonalSucc k G n).inv.hom (f_1 ⊗ₜ[k] fun₀ | f => r) =
            ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) f_1 →
          (diagonalSucc k G n).inv.hom (((fun₀ | a => b) + f_1) ⊗ₜ[k] fun₀ | f => r) =
            ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) ((fun₀ | a => b) + f_1)

Next tactic:
intro _ _ _ _ _ hx
theorem diagonalSucc_inv_single_right (g : G →₀ k) (f : Gⁿ) (r : k) :
    (diagonalSucc k G n).inv.hom (g ⊗ₜ Finsupp.single f r) =
      Finsupp.lift _ k G (fun a => single (a • partialProd f) r) g := by
  refine' g.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.zero_tmul, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', map_add, hx, diagonalSucc_inv_single_single,
      TensorProduct.add_tmul, Finsupp.sum_single_index, zero_mul, single_zero] -/
  · rw [TensorProduct.zero_tmul, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [map_zero]
  · intro _ _ _ _ _ hx
    

Proof state:
case refine'_2
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G →₀ k
f : Fin n → G
r : k
a✝² : G
b✝ : k
f✝ : G →₀ k
a✝¹ : a✝² ∉ f✝.support
a✝ : b✝ ≠ 0
hx :
  (diagonalSucc k G n).inv.hom (f✝ ⊗ₜ[k] fun₀ | f => r) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) f✝
⊢ (diagonalSucc k G n).inv.hom (((fun₀ | a✝² => b✝) + f✝) ⊗ₜ[k] fun₀ | f => r) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) ((fun₀ | a✝² => b✝) + f✝)

Next tactic:
rw [TensorProduct.add_tmul, map_add]
theorem diagonalSucc_inv_single_right (g : G →₀ k) (f : Gⁿ) (r : k) :
    (diagonalSucc k G n).inv.hom (g ⊗ₜ Finsupp.single f r) =
      Finsupp.lift _ k G (fun a => single (a • partialProd f) r) g := by
  refine' g.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.zero_tmul, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', map_add, hx, diagonalSucc_inv_single_single,
      TensorProduct.add_tmul, Finsupp.sum_single_index, zero_mul, single_zero] -/
  · rw [TensorProduct.zero_tmul, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [map_zero]
  · intro _ _ _ _ _ hx
    rw [TensorProduct.add_tmul, map_add]; 

Proof state:
case refine'_2
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G →₀ k
f : Fin n → G
r : k
a✝² : G
b✝ : k
f✝ : G →₀ k
a✝¹ : a✝² ∉ f✝.support
a✝ : b✝ ≠ 0
hx :
  (diagonalSucc k G n).inv.hom (f✝ ⊗ₜ[k] fun₀ | f => r) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) f✝
⊢ (diagonalSucc k G n).inv.hom (((fun₀ | a✝² => b✝) ⊗ₜ[k] fun₀ | f => r) + f✝ ⊗ₜ[k] fun₀ | f => r) =
    (((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) fun₀ | a✝² => b✝) +
      ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) f✝

Next tactic:
erw [map_add, hx]
theorem diagonalSucc_inv_single_right (g : G →₀ k) (f : Gⁿ) (r : k) :
    (diagonalSucc k G n).inv.hom (g ⊗ₜ Finsupp.single f r) =
      Finsupp.lift _ k G (fun a => single (a • partialProd f) r) g := by
  refine' g.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.zero_tmul, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', map_add, hx, diagonalSucc_inv_single_single,
      TensorProduct.add_tmul, Finsupp.sum_single_index, zero_mul, single_zero] -/
  · rw [TensorProduct.zero_tmul, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [map_zero]
  · intro _ _ _ _ _ hx
    rw [TensorProduct.add_tmul, map_add]; erw [map_add, hx]
    

Proof state:
case refine'_2
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G →₀ k
f : Fin n → G
r : k
a✝² : G
b✝ : k
f✝ : G →₀ k
a✝¹ : a✝² ∉ f✝.support
a✝ : b✝ ≠ 0
hx :
  (diagonalSucc k G n).inv.hom (f✝ ⊗ₜ[k] fun₀ | f => r) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) f✝
⊢ (diagonalSucc k G n).inv.hom ((fun₀ | a✝² => b✝) ⊗ₜ[k] fun₀ | f => r) +
      ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) f✝ =
    (((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) fun₀ | a✝² => b✝) +
      ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) f✝

Next tactic:
simp_rw [lift_apply, smul_single']
theorem diagonalSucc_inv_single_right (g : G →₀ k) (f : Gⁿ) (r : k) :
    (diagonalSucc k G n).inv.hom (g ⊗ₜ Finsupp.single f r) =
      Finsupp.lift _ k G (fun a => single (a • partialProd f) r) g := by
  refine' g.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.zero_tmul, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', map_add, hx, diagonalSucc_inv_single_single,
      TensorProduct.add_tmul, Finsupp.sum_single_index, zero_mul, single_zero] -/
  · rw [TensorProduct.zero_tmul, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [map_zero]
  · intro _ _ _ _ _ hx
    rw [TensorProduct.add_tmul, map_add]; erw [map_add, hx]
    simp_rw [lift_apply, smul_single']
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    

Proof state:
case refine'_2
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G →₀ k
f : Fin n → G
r : k
a✝² : G
b✝ : k
f✝ : G →₀ k
a✝¹ : a✝² ∉ f✝.support
a✝ : b✝ ≠ 0
hx :
  (diagonalSucc k G n).inv.hom (f✝ ⊗ₜ[k] fun₀ | f => r) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) f✝
⊢ ((diagonalSucc k G n).inv.hom ((fun₀ | a✝² => b✝) ⊗ₜ[k] fun₀ | f => r) +
      sum f✝ fun x r_1 => fun₀ | x • partialProd f => r_1 * r) =
    (sum (fun₀ | a✝² => b✝) fun x r_1 => fun₀ | x • partialProd f => r_1 * r) +
      sum f✝ fun x r_1 => fun₀ | x • partialProd f => r_1 * r

Next tactic:
erw [diagonalSucc_inv_single_single]
theorem diagonalSucc_inv_single_right (g : G →₀ k) (f : Gⁿ) (r : k) :
    (diagonalSucc k G n).inv.hom (g ⊗ₜ Finsupp.single f r) =
      Finsupp.lift _ k G (fun a => single (a • partialProd f) r) g := by
  refine' g.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.zero_tmul, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', map_add, hx, diagonalSucc_inv_single_single,
      TensorProduct.add_tmul, Finsupp.sum_single_index, zero_mul, single_zero] -/
  · rw [TensorProduct.zero_tmul, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [map_zero]
  · intro _ _ _ _ _ hx
    rw [TensorProduct.add_tmul, map_add]; erw [map_add, hx]
    simp_rw [lift_apply, smul_single']
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [diagonalSucc_inv_single_single]
    

Proof state:
case refine'_2
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G →₀ k
f : Fin n → G
r : k
a✝² : G
b✝ : k
f✝ : G →₀ k
a✝¹ : a✝² ∉ f✝.support
a✝ : b✝ ≠ 0
hx :
  (diagonalSucc k G n).inv.hom (f✝ ⊗ₜ[k] fun₀ | f => r) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) f✝
⊢ ((fun₀ | a✝² • partialProd f => b✝ * r) + sum f✝ fun x r_1 => fun₀ | x • partialProd f => r_1 * r) =
    (sum (fun₀ | a✝² => b✝) fun x r_1 => fun₀ | x • partialProd f => r_1 * r) +
      sum f✝ fun x r_1 => fun₀ | x • partialProd f => r_1 * r

Next tactic:
rw [sum_single_index]
theorem diagonalSucc_inv_single_right (g : G →₀ k) (f : Gⁿ) (r : k) :
    (diagonalSucc k G n).inv.hom (g ⊗ₜ Finsupp.single f r) =
      Finsupp.lift _ k G (fun a => single (a • partialProd f) r) g := by
  refine' g.induction _ _
/- Porting note: broken proof was
  · simp only [TensorProduct.zero_tmul, map_zero]
  · intro a b x ha hb hx
    simp only [lift_apply, smul_single', map_add, hx, diagonalSucc_inv_single_single,
      TensorProduct.add_tmul, Finsupp.sum_single_index, zero_mul, single_zero] -/
  · rw [TensorProduct.zero_tmul, map_zero]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [map_zero]
  · intro _ _ _ _ _ hx
    rw [TensorProduct.add_tmul, map_add]; erw [map_add, hx]
    simp_rw [lift_apply, smul_single']
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [diagonalSucc_inv_single_single]
    rw [sum_single_index]
    · 

Proof state:
case refine'_2
k G : Type u
inst✝¹ : CommRing k
n : ℕ
inst✝ : Group G
g : G →₀ k
f : Fin n → G
r : k
a✝² : G
b✝ : k
f✝ : G →₀ k
a✝¹ : a✝² ∉ f✝.support
a✝ : b✝ ≠ 0
hx :
  (diagonalSucc k G n).inv.hom (f✝ ⊗ₜ[k] fun₀ | f => r) =
    ((Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => fun₀ | a • partialProd f => r) f✝
⊢ (fun₀ | a✝² • partialProd f => 0 * r) = 0

Next tactic:
rw [zero_mul, single_zero]