/--
When summing over an `AddMonoidHom`, the decidability assumption is not needed, and the result is
also an `AddMonoidHom`.
-/
def sumAddHom [∀ i, AddZeroClass (β i)] [AddCommMonoid γ] (φ : ∀ i, β i →+ γ) :
    (Π₀ i, β i) →+ γ where
  toFun f :=
    (f.support'.lift fun s => ∑ i in Multiset.toFinset s.1, φ i (f i)) <| by
      rintro ⟨sx, hx⟩ ⟨sy, hy⟩
      dsimp only [Subtype.coe_mk, toFun_eq_coe] at *
      have H1 : sx.toFinset ∩ sy.toFinset ⊆ sx.toFinset := Finset.inter_subset_left _ _
      have H2 : sx.toFinset ∩ sy.toFinset ⊆ sy.toFinset := Finset.inter_subset_right _ _
      refine'
        (Finset.sum_subset H1 _).symm.trans
          ((Finset.sum_congr rfl _).trans (Finset.sum_subset H2 _))
      · intro i H1 H2
        rw [Finset.mem_inter] at H2
        simp only [Multiset.mem_toFinset] at H1 H2
        convert AddMonoidHom.map_zero (φ i)
        exact (hy i).resolve_left (mt (And.intro H1) H2)
      · intro i _
        rfl
      · intro i H1 H2
        rw [Finset.mem_inter] at H2
        simp only [Multiset.mem_toFinset] at H1 H2
        convert AddMonoidHom.map_zero (φ i)
        exact (hx i).resolve_left (mt (fun H3 => And.intro H3 H1) H2)
  map_add' := by
    rintro ⟨f, sf, hf⟩ ⟨g, sg, hg⟩
    

Proof state:
case mk'.mk.mk.mk'.mk.mk
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → AddZeroClass (β i)
inst✝ : AddCommMonoid γ
φ : (i : ι) → β i →+ γ
f : (i : ι) → β i
support'✝¹ : Trunc { s // ∀ (i : ι), i ∈ s ∨ f i = 0 }
sf : Multiset ι
hf : ∀ (i : ι), i ∈ sf ∨ f i = 0
g : (i : ι) → β i
support'✝ : Trunc { s // ∀ (i : ι), i ∈ s ∨ g i = 0 }
sg : Multiset ι
hg : ∀ (i : ι), i ∈ sg ∨ g i = 0
⊢ ZeroHom.toFun
      {
        toFun := fun f =>
          (fun c => Trunc.lift (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) c f.support')
            (_ :
              ∀ (a b : { s // ∀ (i : ι), i ∈ s ∨ toFun f i = 0 }),
                (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) a =
                  (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) b),
        map_zero' :=
          (_ :
            (fun f =>
                  (fun c => Trunc.lift (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) c f.support')
                    (_ :
                      ∀ (a b : { s // ∀ (i : ι), i ∈ s ∨ toFun f i = 0 }),
                        (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) a =
                          (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) b))
                0 =
              0) }
      ({ toFun := f, support' := Quot.mk Setoid.r { val := sf, property := hf } } +
        { toFun := g, support' := Quot.mk Setoid.r { val := sg, property := hg } }) =
    ZeroHom.toFun
        {
          toFun := fun f =>
            (fun c => Trunc.lift (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) c f.support')
              (_ :
                ∀ (a b : { s // ∀ (i : ι), i ∈ s ∨ toFun f i = 0 }),
                  (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) a =
                    (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) b),
          map_zero' :=
            (_ :
              (fun f =>
                    (fun c => Trunc.lift (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) c f.support')
                      (_ :
                        ∀ (a b : { s // ∀ (i : ι), i ∈ s ∨ toFun f i = 0 }),
                          (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) a =
                            (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) b))
                  0 =
                0) }
        { toFun := f, support' := Quot.mk Setoid.r { val := sf, property := hf } } +
      ZeroHom.toFun
        {
          toFun := fun f =>
            (fun c => Trunc.lift (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) c f.support')
              (_ :
                ∀ (a b : { s // ∀ (i : ι), i ∈ s ∨ toFun f i = 0 }),
                  (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) a =
                    (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) b),
          map_zero' :=
            (_ :
              (fun f =>
                    (fun c => Trunc.lift (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) c f.support')
                      (_ :
                        ∀ (a b : { s // ∀ (i : ι), i ∈ s ∨ toFun f i = 0 }),
                          (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) a =
                            (fun s => ∑ i in Multiset.toFinset ↑s, (φ i) (f i)) b))
                  0 =
                0) }
        { toFun := g, support' := Quot.mk Setoid.r { val := sg, property := hg } }

Next tactic:
change (∑ i in _, _) = (∑ i in _, _) + ∑ i in _, _