/-- The canonical isomorphism between families of additive monoid homomorphisms `α → (M →+ N)`
and monoid homomorphisms `(α →₀ M) →+ N`. -/
def liftAddHom [AddZeroClass M] [AddCommMonoid N] : (α → M →+ N) ≃+ ((α →₀ M) →+ N)
    where
  toFun F :=
    { toFun := fun f ↦ f.sum fun x ↦ F x
      map_zero' := Finset.sum_empty
      map_add' := fun _ _ => sum_add_index' (fun x => (F x).map_zero) fun x => (F x).map_add }
  invFun F x := F.comp (singleAddHom x)
  left_inv F := by
    ext
    simp [singleAddHom]
  right_inv F := by
  -- Porting note: This was `ext` and used the wrong lemma
    apply Finsupp.addHom_ext'
    simp [singleAddHom, AddMonoidHom.comp, Function.comp]
  map_add' F G := by
    ext x
    

Proof state:
case H.h
α : Type u_1
ι : Type u_2
γ : Type u_3
A : Type u_4
B : Type u_5
C : Type u_6
inst✝⁴ : AddCommMonoid A
inst✝³ : AddCommMonoid B
inst✝² : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s : Finset α
f : α → ι →₀ A
i : ι
g : ι →₀ A
k : ι → A → γ → B
x✝¹ : γ
β : Type u_7
M : Type u_8
M' : Type u_9
N : Type u_10
P : Type u_11
G✝ : Type u_12
H : Type u_13
R : Type u_14
S : Type u_15
inst✝¹ : AddZeroClass M
inst✝ : AddCommMonoid N
F G : α → M →+ N
x : α
x✝ : M
⊢ (AddMonoidHom.comp
        (Equiv.toFun
          {
            toFun := fun F =>
              {
                toZeroHom :=
                  { toFun := fun f => sum f fun x => ⇑(F x),
                    map_zero' := (_ : ∑ x in ∅, (fun x => ⇑(F x)) x (0 x) = 0) },
                map_add' :=
                  (_ :
                    ∀ (x x_1 : α →₀ M),
                      (sum (x + x_1) fun a => ⇑(F a)) = (sum x fun a => ⇑(F a)) + sum x_1 fun a => ⇑(F a)) },
            invFun := fun F x => AddMonoidHom.comp F (singleAddHom x),
            left_inv :=
              (_ :
                ∀ (F : α → M →+ N),
                  (fun F x => AddMonoidHom.comp F (singleAddHom x))
                      ((fun F =>
                          {
                            toZeroHom :=
                              { toFun := fun f => sum f fun x => ⇑(F x),
                                map_zero' := (_ : ∑ x in ∅, (fun x => ⇑(F x)) x (0 x) = 0) },
                            map_add' :=
                              (_ :
                                ∀ (x x_1 : α →₀ M),
                                  (sum (x + x_1) fun a => ⇑(F a)) =
                                    (sum x fun a => ⇑(F a)) + sum x_1 fun a => ⇑(F a)) })
                        F) =
                    F),
            right_inv :=
              (_ :
                ∀ (F : (α →₀ M) →+ N),
                  (fun F =>
                        {
                          toZeroHom :=
                            { toFun := fun f => sum f fun x => ⇑(F x),
                              map_zero' := (_ : ∑ x in ∅, (fun x => ⇑(F x)) x (0 x) = 0) },
                          map_add' :=
                            (_ :
                              ∀ (x x_1 : α →₀ M),
                                (sum (x + x_1) fun a => ⇑(F a)) = (sum x fun a => ⇑(F a)) + sum x_1 fun a => ⇑(F a)) })
                      ((fun F x => AddMonoidHom.comp F (singleAddHom x)) F) =
                    F) }
          (F + G))
        (singleAddHom x))
      x✝ =
    (AddMonoidHom.comp
        (Equiv.toFun
            {
              toFun := fun F =>
                {
                  toZeroHom :=
                    { toFun := fun f => sum f fun x => ⇑(F x),
                      map_zero' := (_ : ∑ x in ∅, (fun x => ⇑(F x)) x (0 x) = 0) },
                  map_add' :=
                    (_ :
                      ∀ (x x_1 : α →₀ M),
                        (sum (x + x_1) fun a => ⇑(F a)) = (sum x fun a => ⇑(F a)) + sum x_1 fun a => ⇑(F a)) },
              invFun := fun F x => AddMonoidHom.comp F (singleAddHom x),
              left_inv :=
                (_ :
                  ∀ (F : α → M →+ N),
                    (fun F x => AddMonoidHom.comp F (singleAddHom x))
                        ((fun F =>
                            {
                              toZeroHom :=
                                { toFun := fun f => sum f fun x => ⇑(F x),
                                  map_zero' := (_ : ∑ x in ∅, (fun x => ⇑(F x)) x (0 x) = 0) },
                              map_add' :=
                                (_ :
                                  ∀ (x x_1 : α →₀ M),
                                    (sum (x + x_1) fun a => ⇑(F a)) =
                                      (sum x fun a => ⇑(F a)) + sum x_1 fun a => ⇑(F a)) })
                          F) =
                      F),
              right_inv :=
                (_ :
                  ∀ (F : (α →₀ M) →+ N),
                    (fun F =>
                          {
                            toZeroHom :=
                              { toFun := fun f => sum f fun x => ⇑(F x),
                                map_zero' := (_ : ∑ x in ∅, (fun x => ⇑(F x)) x (0 x) = 0) },
                            map_add' :=
                              (_ :
                                ∀ (x x_1 : α →₀ M),
                                  (sum (x + x_1) fun a => ⇑(F a)) =
                                    (sum x fun a => ⇑(F a)) + sum x_1 fun a => ⇑(F a)) })
                        ((fun F x => AddMonoidHom.comp F (singleAddHom x)) F) =
                      F) }
            F +
          Equiv.toFun
            {
              toFun := fun F =>
                {
                  toZeroHom :=
                    { toFun := fun f => sum f fun x => ⇑(F x),
                      map_zero' := (_ : ∑ x in ∅, (fun x => ⇑(F x)) x (0 x) = 0) },
                  map_add' :=
                    (_ :
                      ∀ (x x_1 : α →₀ M),
                        (sum (x + x_1) fun a => ⇑(F a)) = (sum x fun a => ⇑(F a)) + sum x_1 fun a => ⇑(F a)) },
              invFun := fun F x => AddMonoidHom.comp F (singleAddHom x),
              left_inv :=
                (_ :
                  ∀ (F : α → M →+ N),
                    (fun F x => AddMonoidHom.comp F (singleAddHom x))
                        ((fun F =>
                            {
                              toZeroHom :=
                                { toFun := fun f => sum f fun x => ⇑(F x),
                                  map_zero' := (_ : ∑ x in ∅, (fun x => ⇑(F x)) x (0 x) = 0) },
                              map_add' :=
                                (_ :
                                  ∀ (x x_1 : α →₀ M),
                                    (sum (x + x_1) fun a => ⇑(F a)) =
                                      (sum x fun a => ⇑(F a)) + sum x_1 fun a => ⇑(F a)) })
                          F) =
                      F),
              right_inv :=
                (_ :
                  ∀ (F : (α →₀ M) →+ N),
                    (fun F =>
                          {
                            toZeroHom :=
                              { toFun := fun f => sum f fun x => ⇑(F x),
                                map_zero' := (_ : ∑ x in ∅, (fun x => ⇑(F x)) x (0 x) = 0) },
                            map_add' :=
                              (_ :
                                ∀ (x x_1 : α →₀ M),
                                  (sum (x + x_1) fun a => ⇑(F a)) =
                                    (sum x fun a => ⇑(F a)) + sum x_1 fun a => ⇑(F a)) })
                        ((fun F x => AddMonoidHom.comp F (singleAddHom x)) F) =
                      F) }
            G)
        (singleAddHom x))
      x✝

Next tactic:
exact sum_add