[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
F : (i : ι) → M i →ₗ[R] N
c : R
f : Π₀ (i : ι), M i
⊢ AddHom.toFun
      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
        map_add' :=
          (_ :
            ∀ (a b : Π₀ (i : ι), M i),
              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
      (c • f) =
    ↑(RingHom.id R) c •
      AddHom.toFun
        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
          map_add' :=
            (_ :
              ∀ (a b : Π₀ (i : ι), M i),
                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
        f
[PROOFSTEP]
dsimp
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
F : (i : ι) → M i →ₗ[R] N
c : R
f : Π₀ (i : ι), M i
⊢ ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (c • f) =
    c • ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) f
[PROOFSTEP]
apply DFinsupp.induction f
[GOAL]
case h0
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
F : (i : ι) → M i →ₗ[R] N
c : R
f : Π₀ (i : ι), M i
⊢ ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (c • 0) =
    c • ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) 0
[PROOFSTEP]
rw [smul_zero, AddMonoidHom.map_zero, smul_zero]
[GOAL]
case ha
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
F : (i : ι) → M i →ₗ[R] N
c : R
f : Π₀ (i : ι), M i
⊢ ∀ (i : ι) (b : M i) (f : Π₀ (i : ι), M i),
    ↑f i = 0 →
      b ≠ 0 →
        ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (c • f) =
            c • ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) f →
          ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (c • (single i b + f)) =
            c • ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (single i b + f)
[PROOFSTEP]
intro a b f _ _ hf
[GOAL]
case ha
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
F : (i : ι) → M i →ₗ[R] N
c : R
f✝ : Π₀ (i : ι), M i
a : ι
b : M a
f : Π₀ (i : ι), M i
a✝¹ : ↑f a = 0
a✝ : b ≠ 0
hf :
  ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (c • f) =
    c • ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) f
⊢ ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (c • (single a b + f)) =
    c • ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (single a b + f)
[PROOFSTEP]
rw [smul_add, AddMonoidHom.map_add, AddMonoidHom.map_add, smul_add, hf, ← single_smul, sumAddHom_single,
  sumAddHom_single, LinearMap.toAddMonoidHom_coe, LinearMap.map_smul]
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
F G : (i : ι) → M i →ₗ[R] N
⊢ (fun F =>
        {
          toAddHom :=
            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
              map_add' :=
                (_ :
                  ∀ (a b : Π₀ (i : ι), M i),
                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
          map_smul' :=
            (_ :
              ∀ (c : R) (f : Π₀ (i : ι), M i),
                AddHom.toFun
                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                      map_add' :=
                        (_ :
                          ∀ (a b : Π₀ (i : ι), M i),
                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                    (c • f) =
                  ↑(RingHom.id R) c •
                    AddHom.toFun
                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                        map_add' :=
                          (_ :
                            ∀ (a b : Π₀ (i : ι), M i),
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                      f) })
      (F + G) =
    (fun F =>
          {
            toAddHom :=
              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                map_add' :=
                  (_ :
                    ∀ (a b : Π₀ (i : ι), M i),
                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
            map_smul' :=
              (_ :
                ∀ (c : R) (f : Π₀ (i : ι), M i),
                  AddHom.toFun
                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                        map_add' :=
                          (_ :
                            ∀ (a b : Π₀ (i : ι), M i),
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                      (c • f) =
                    ↑(RingHom.id R) c •
                      AddHom.toFun
                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                          map_add' :=
                            (_ :
                              ∀ (a b : Π₀ (i : ι), M i),
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                        f) })
        F +
      (fun F =>
          {
            toAddHom :=
              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                map_add' :=
                  (_ :
                    ∀ (a b : Π₀ (i : ι), M i),
                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
            map_smul' :=
              (_ :
                ∀ (c : R) (f : Π₀ (i : ι), M i),
                  AddHom.toFun
                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                        map_add' :=
                          (_ :
                            ∀ (a b : Π₀ (i : ι), M i),
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                      (c • f) =
                    ↑(RingHom.id R) c •
                      AddHom.toFun
                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                          map_add' :=
                            (_ :
                              ∀ (a b : Π₀ (i : ι), M i),
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                        f) })
        G
[PROOFSTEP]
refine DFinsupp.lhom_ext' (fun i ↦ ?_)
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
F G : (i : ι) → M i →ₗ[R] N
i : ι
⊢ LinearMap.comp
      ((fun F =>
          {
            toAddHom :=
              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                map_add' :=
                  (_ :
                    ∀ (a b : Π₀ (i : ι), M i),
                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
            map_smul' :=
              (_ :
                ∀ (c : R) (f : Π₀ (i : ι), M i),
                  AddHom.toFun
                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                        map_add' :=
                          (_ :
                            ∀ (a b : Π₀ (i : ι), M i),
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                      (c • f) =
                    ↑(RingHom.id R) c •
                      AddHom.toFun
                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                          map_add' :=
                            (_ :
                              ∀ (a b : Π₀ (i : ι), M i),
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                        f) })
        (F + G))
      (lsingle i) =
    LinearMap.comp
      ((fun F =>
            {
              toAddHom :=
                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                  map_add' :=
                    (_ :
                      ∀ (a b : Π₀ (i : ι), M i),
                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
              map_smul' :=
                (_ :
                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                    AddHom.toFun
                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                          map_add' :=
                            (_ :
                              ∀ (a b : Π₀ (i : ι), M i),
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                        (c • f) =
                      ↑(RingHom.id R) c •
                        AddHom.toFun
                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                            map_add' :=
                              (_ :
                                ∀ (a b : Π₀ (i : ι), M i),
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                          f) })
          F +
        (fun F =>
            {
              toAddHom :=
                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                  map_add' :=
                    (_ :
                      ∀ (a b : Π₀ (i : ι), M i),
                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
              map_smul' :=
                (_ :
                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                    AddHom.toFun
                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                          map_add' :=
                            (_ :
                              ∀ (a b : Π₀ (i : ι), M i),
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                        (c • f) =
                      ↑(RingHom.id R) c •
                        AddHom.toFun
                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                            map_add' :=
                              (_ :
                                ∀ (a b : Π₀ (i : ι), M i),
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                          f) })
          G)
      (lsingle i)
[PROOFSTEP]
ext
[GOAL]
case h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
F G : (i : ι) → M i →ₗ[R] N
i : ι
x✝ : M i
⊢ ↑(LinearMap.comp
          ((fun F =>
              {
                toAddHom :=
                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                    map_add' :=
                      (_ :
                        ∀ (a b : Π₀ (i : ι), M i),
                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                map_smul' :=
                  (_ :
                    ∀ (c : R) (f : Π₀ (i : ι), M i),
                      AddHom.toFun
                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                            map_add' :=
                              (_ :
                                ∀ (a b : Π₀ (i : ι), M i),
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                          (c • f) =
                        ↑(RingHom.id R) c •
                          AddHom.toFun
                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                              map_add' :=
                                (_ :
                                  ∀ (a b : Π₀ (i : ι), M i),
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                            f) })
            (F + G))
          (lsingle i))
      x✝ =
    ↑(LinearMap.comp
          ((fun F =>
                {
                  toAddHom :=
                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                      map_add' :=
                        (_ :
                          ∀ (a b : Π₀ (i : ι), M i),
                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                  map_smul' :=
                    (_ :
                      ∀ (c : R) (f : Π₀ (i : ι), M i),
                        AddHom.toFun
                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                              map_add' :=
                                (_ :
                                  ∀ (a b : Π₀ (i : ι), M i),
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                            (c • f) =
                          ↑(RingHom.id R) c •
                            AddHom.toFun
                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                map_add' :=
                                  (_ :
                                    ∀ (a b : Π₀ (i : ι), M i),
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                              f) })
              F +
            (fun F =>
                {
                  toAddHom :=
                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                      map_add' :=
                        (_ :
                          ∀ (a b : Π₀ (i : ι), M i),
                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                  map_smul' :=
                    (_ :
                      ∀ (c : R) (f : Π₀ (i : ι), M i),
                        AddHom.toFun
                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                              map_add' :=
                                (_ :
                                  ∀ (a b : Π₀ (i : ι), M i),
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                            (c • f) =
                          ↑(RingHom.id R) c •
                            AddHom.toFun
                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                map_add' :=
                                  (_ :
                                    ∀ (a b : Π₀ (i : ι), M i),
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                              f) })
              G)
          (lsingle i))
      x✝
[PROOFSTEP]
simp
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
c : S
F : (i : ι) → M i →ₗ[R] N
⊢ AddHom.toFun
      {
        toFun := fun F =>
          {
            toAddHom :=
              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                map_add' :=
                  (_ :
                    ∀ (a b : Π₀ (i : ι), M i),
                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
            map_smul' :=
              (_ :
                ∀ (c : R) (f : Π₀ (i : ι), M i),
                  AddHom.toFun
                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                        map_add' :=
                          (_ :
                            ∀ (a b : Π₀ (i : ι), M i),
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                      (c • f) =
                    ↑(RingHom.id R) c •
                      AddHom.toFun
                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                          map_add' :=
                            (_ :
                              ∀ (a b : Π₀ (i : ι), M i),
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                        f) },
        map_add' :=
          (_ :
            ∀ (F G : (i : ι) → M i →ₗ[R] N),
              (fun F =>
                    {
                      toAddHom :=
                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                          map_add' :=
                            (_ :
                              ∀ (a b : Π₀ (i : ι), M i),
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                      map_smul' :=
                        (_ :
                          ∀ (c : R) (f : Π₀ (i : ι), M i),
                            AddHom.toFun
                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                  map_add' :=
                                    (_ :
                                      ∀ (a b : Π₀ (i : ι), M i),
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                (c • f) =
                              ↑(RingHom.id R) c •
                                AddHom.toFun
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                  f) })
                  (F + G) =
                (fun F =>
                      {
                        toAddHom :=
                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                            map_add' :=
                              (_ :
                                ∀ (a b : Π₀ (i : ι), M i),
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                        map_smul' :=
                          (_ :
                            ∀ (c : R) (f : Π₀ (i : ι), M i),
                              AddHom.toFun
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                  (c • f) =
                                ↑(RingHom.id R) c •
                                  AddHom.toFun
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                    f) })
                    F +
                  (fun F =>
                      {
                        toAddHom :=
                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                            map_add' :=
                              (_ :
                                ∀ (a b : Π₀ (i : ι), M i),
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                        map_smul' :=
                          (_ :
                            ∀ (c : R) (f : Π₀ (i : ι), M i),
                              AddHom.toFun
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                  (c • f) =
                                ↑(RingHom.id R) c •
                                  AddHom.toFun
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                    f) })
                    G) }
      (c • F) =
    ↑(RingHom.id S) c •
      AddHom.toFun
        {
          toFun := fun F =>
            {
              toAddHom :=
                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                  map_add' :=
                    (_ :
                      ∀ (a b : Π₀ (i : ι), M i),
                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
              map_smul' :=
                (_ :
                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                    AddHom.toFun
                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                          map_add' :=
                            (_ :
                              ∀ (a b : Π₀ (i : ι), M i),
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                        (c • f) =
                      ↑(RingHom.id R) c •
                        AddHom.toFun
                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                            map_add' :=
                              (_ :
                                ∀ (a b : Π₀ (i : ι), M i),
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                          f) },
          map_add' :=
            (_ :
              ∀ (F G : (i : ι) → M i →ₗ[R] N),
                (fun F =>
                      {
                        toAddHom :=
                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                            map_add' :=
                              (_ :
                                ∀ (a b : Π₀ (i : ι), M i),
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                        map_smul' :=
                          (_ :
                            ∀ (c : R) (f : Π₀ (i : ι), M i),
                              AddHom.toFun
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                  (c • f) =
                                ↑(RingHom.id R) c •
                                  AddHom.toFun
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                    f) })
                    (F + G) =
                  (fun F =>
                        {
                          toAddHom :=
                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                              map_add' :=
                                (_ :
                                  ∀ (a b : Π₀ (i : ι), M i),
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                          map_smul' :=
                            (_ :
                              ∀ (c : R) (f : Π₀ (i : ι), M i),
                                AddHom.toFun
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                    (c • f) =
                                  ↑(RingHom.id R) c •
                                    AddHom.toFun
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                      f) })
                      F +
                    (fun F =>
                        {
                          toAddHom :=
                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                              map_add' :=
                                (_ :
                                  ∀ (a b : Π₀ (i : ι), M i),
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                          map_smul' :=
                            (_ :
                              ∀ (c : R) (f : Π₀ (i : ι), M i),
                                AddHom.toFun
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                    (c • f) =
                                  ↑(RingHom.id R) c •
                                    AddHom.toFun
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                      f) })
                      G) }
        F
[PROOFSTEP]
refine DFinsupp.lhom_ext' (fun i ↦ ?_)
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
c : S
F : (i : ι) → M i →ₗ[R] N
i : ι
⊢ LinearMap.comp
      (AddHom.toFun
        {
          toFun := fun F =>
            {
              toAddHom :=
                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                  map_add' :=
                    (_ :
                      ∀ (a b : Π₀ (i : ι), M i),
                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
              map_smul' :=
                (_ :
                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                    AddHom.toFun
                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                          map_add' :=
                            (_ :
                              ∀ (a b : Π₀ (i : ι), M i),
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                        (c • f) =
                      ↑(RingHom.id R) c •
                        AddHom.toFun
                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                            map_add' :=
                              (_ :
                                ∀ (a b : Π₀ (i : ι), M i),
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                          f) },
          map_add' :=
            (_ :
              ∀ (F G : (i : ι) → M i →ₗ[R] N),
                (fun F =>
                      {
                        toAddHom :=
                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                            map_add' :=
                              (_ :
                                ∀ (a b : Π₀ (i : ι), M i),
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                        map_smul' :=
                          (_ :
                            ∀ (c : R) (f : Π₀ (i : ι), M i),
                              AddHom.toFun
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                  (c • f) =
                                ↑(RingHom.id R) c •
                                  AddHom.toFun
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                    f) })
                    (F + G) =
                  (fun F =>
                        {
                          toAddHom :=
                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                              map_add' :=
                                (_ :
                                  ∀ (a b : Π₀ (i : ι), M i),
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                          map_smul' :=
                            (_ :
                              ∀ (c : R) (f : Π₀ (i : ι), M i),
                                AddHom.toFun
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                    (c • f) =
                                  ↑(RingHom.id R) c •
                                    AddHom.toFun
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                      f) })
                      F +
                    (fun F =>
                        {
                          toAddHom :=
                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                              map_add' :=
                                (_ :
                                  ∀ (a b : Π₀ (i : ι), M i),
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                          map_smul' :=
                            (_ :
                              ∀ (c : R) (f : Π₀ (i : ι), M i),
                                AddHom.toFun
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                    (c • f) =
                                  ↑(RingHom.id R) c •
                                    AddHom.toFun
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                      f) })
                      G) }
        (c • F))
      (lsingle i) =
    LinearMap.comp
      (↑(RingHom.id S) c •
        AddHom.toFun
          {
            toFun := fun F =>
              {
                toAddHom :=
                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                    map_add' :=
                      (_ :
                        ∀ (a b : Π₀ (i : ι), M i),
                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                map_smul' :=
                  (_ :
                    ∀ (c : R) (f : Π₀ (i : ι), M i),
                      AddHom.toFun
                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                            map_add' :=
                              (_ :
                                ∀ (a b : Π₀ (i : ι), M i),
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                          (c • f) =
                        ↑(RingHom.id R) c •
                          AddHom.toFun
                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                              map_add' :=
                                (_ :
                                  ∀ (a b : Π₀ (i : ι), M i),
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                            f) },
            map_add' :=
              (_ :
                ∀ (F G : (i : ι) → M i →ₗ[R] N),
                  (fun F =>
                        {
                          toAddHom :=
                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                              map_add' :=
                                (_ :
                                  ∀ (a b : Π₀ (i : ι), M i),
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                          map_smul' :=
                            (_ :
                              ∀ (c : R) (f : Π₀ (i : ι), M i),
                                AddHom.toFun
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                    (c • f) =
                                  ↑(RingHom.id R) c •
                                    AddHom.toFun
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                      f) })
                      (F + G) =
                    (fun F =>
                          {
                            toAddHom :=
                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                map_add' :=
                                  (_ :
                                    ∀ (a b : Π₀ (i : ι), M i),
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                            map_smul' :=
                              (_ :
                                ∀ (c : R) (f : Π₀ (i : ι), M i),
                                  AddHom.toFun
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                      (c • f) =
                                    ↑(RingHom.id R) c •
                                      AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        f) })
                        F +
                      (fun F =>
                          {
                            toAddHom :=
                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                map_add' :=
                                  (_ :
                                    ∀ (a b : Π₀ (i : ι), M i),
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                            map_smul' :=
                              (_ :
                                ∀ (c : R) (f : Π₀ (i : ι), M i),
                                  AddHom.toFun
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                      (c • f) =
                                    ↑(RingHom.id R) c •
                                      AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        f) })
                        G) }
          F)
      (lsingle i)
[PROOFSTEP]
ext
[GOAL]
case h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
c : S
F : (i : ι) → M i →ₗ[R] N
i : ι
x✝ : M i
⊢ ↑(LinearMap.comp
          (AddHom.toFun
            {
              toFun := fun F =>
                {
                  toAddHom :=
                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                      map_add' :=
                        (_ :
                          ∀ (a b : Π₀ (i : ι), M i),
                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                  map_smul' :=
                    (_ :
                      ∀ (c : R) (f : Π₀ (i : ι), M i),
                        AddHom.toFun
                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                              map_add' :=
                                (_ :
                                  ∀ (a b : Π₀ (i : ι), M i),
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                            (c • f) =
                          ↑(RingHom.id R) c •
                            AddHom.toFun
                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                map_add' :=
                                  (_ :
                                    ∀ (a b : Π₀ (i : ι), M i),
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                              f) },
              map_add' :=
                (_ :
                  ∀ (F G : (i : ι) → M i →ₗ[R] N),
                    (fun F =>
                          {
                            toAddHom :=
                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                map_add' :=
                                  (_ :
                                    ∀ (a b : Π₀ (i : ι), M i),
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                            map_smul' :=
                              (_ :
                                ∀ (c : R) (f : Π₀ (i : ι), M i),
                                  AddHom.toFun
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                      (c • f) =
                                    ↑(RingHom.id R) c •
                                      AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        f) })
                        (F + G) =
                      (fun F =>
                            {
                              toAddHom :=
                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                  map_add' :=
                                    (_ :
                                      ∀ (a b : Π₀ (i : ι), M i),
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                              map_smul' :=
                                (_ :
                                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                                    AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        (c • f) =
                                      ↑(RingHom.id R) c •
                                        AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          f) })
                          F +
                        (fun F =>
                            {
                              toAddHom :=
                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                  map_add' :=
                                    (_ :
                                      ∀ (a b : Π₀ (i : ι), M i),
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                              map_smul' :=
                                (_ :
                                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                                    AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        (c • f) =
                                      ↑(RingHom.id R) c •
                                        AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          f) })
                          G) }
            (c • F))
          (lsingle i))
      x✝ =
    ↑(LinearMap.comp
          (↑(RingHom.id S) c •
            AddHom.toFun
              {
                toFun := fun F =>
                  {
                    toAddHom :=
                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                        map_add' :=
                          (_ :
                            ∀ (a b : Π₀ (i : ι), M i),
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                    map_smul' :=
                      (_ :
                        ∀ (c : R) (f : Π₀ (i : ι), M i),
                          AddHom.toFun
                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                map_add' :=
                                  (_ :
                                    ∀ (a b : Π₀ (i : ι), M i),
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                              (c • f) =
                            ↑(RingHom.id R) c •
                              AddHom.toFun
                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                  map_add' :=
                                    (_ :
                                      ∀ (a b : Π₀ (i : ι), M i),
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                f) },
                map_add' :=
                  (_ :
                    ∀ (F G : (i : ι) → M i →ₗ[R] N),
                      (fun F =>
                            {
                              toAddHom :=
                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                  map_add' :=
                                    (_ :
                                      ∀ (a b : Π₀ (i : ι), M i),
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                              map_smul' :=
                                (_ :
                                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                                    AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        (c • f) =
                                      ↑(RingHom.id R) c •
                                        AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          f) })
                          (F + G) =
                        (fun F =>
                              {
                                toAddHom :=
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                map_smul' :=
                                  (_ :
                                    ∀ (c : R) (f : Π₀ (i : ι), M i),
                                      AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          (c • f) =
                                        ↑(RingHom.id R) c •
                                          AddHom.toFun
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                            f) })
                            F +
                          (fun F =>
                              {
                                toAddHom :=
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                map_smul' :=
                                  (_ :
                                    ∀ (c : R) (f : Π₀ (i : ι), M i),
                                      AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          (c • f) =
                                        ↑(RingHom.id R) c •
                                          AddHom.toFun
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                            f) })
                            G) }
              F)
          (lsingle i))
      x✝
[PROOFSTEP]
simp
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
F : (i : ι) → M i →ₗ[R] N
⊢ (fun F i => LinearMap.comp F (lsingle i))
      (AddHom.toFun
        {
            toAddHom :=
              {
                toFun := fun F =>
                  {
                    toAddHom :=
                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                        map_add' :=
                          (_ :
                            ∀ (a b : Π₀ (i : ι), M i),
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                    map_smul' :=
                      (_ :
                        ∀ (c : R) (f : Π₀ (i : ι), M i),
                          AddHom.toFun
                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                map_add' :=
                                  (_ :
                                    ∀ (a b : Π₀ (i : ι), M i),
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                              (c • f) =
                            ↑(RingHom.id R) c •
                              AddHom.toFun
                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                  map_add' :=
                                    (_ :
                                      ∀ (a b : Π₀ (i : ι), M i),
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                f) },
                map_add' :=
                  (_ :
                    ∀ (F G : (i : ι) → M i →ₗ[R] N),
                      (fun F =>
                            {
                              toAddHom :=
                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                  map_add' :=
                                    (_ :
                                      ∀ (a b : Π₀ (i : ι), M i),
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                              map_smul' :=
                                (_ :
                                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                                    AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        (c • f) =
                                      ↑(RingHom.id R) c •
                                        AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          f) })
                          (F + G) =
                        (fun F =>
                              {
                                toAddHom :=
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                map_smul' :=
                                  (_ :
                                    ∀ (c : R) (f : Π₀ (i : ι), M i),
                                      AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          (c • f) =
                                        ↑(RingHom.id R) c •
                                          AddHom.toFun
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                            f) })
                            F +
                          (fun F =>
                              {
                                toAddHom :=
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                map_smul' :=
                                  (_ :
                                    ∀ (c : R) (f : Π₀ (i : ι), M i),
                                      AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          (c • f) =
                                        ↑(RingHom.id R) c •
                                          AddHom.toFun
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                            f) })
                            G) },
            map_smul' :=
              (_ :
                ∀ (c : S) (F : (i : ι) → M i →ₗ[R] N),
                  AddHom.toFun
                      {
                        toFun := fun F =>
                          {
                            toAddHom :=
                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                map_add' :=
                                  (_ :
                                    ∀ (a b : Π₀ (i : ι), M i),
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                            map_smul' :=
                              (_ :
                                ∀ (c : R) (f : Π₀ (i : ι), M i),
                                  AddHom.toFun
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                      (c • f) =
                                    ↑(RingHom.id R) c •
                                      AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        f) },
                        map_add' :=
                          (_ :
                            ∀ (F G : (i : ι) → M i →ₗ[R] N),
                              (fun F =>
                                    {
                                      toAddHom :=
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                      map_smul' :=
                                        (_ :
                                          ∀ (c : R) (f : Π₀ (i : ι), M i),
                                            AddHom.toFun
                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (a b : Π₀ (i : ι), M i),
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                                (c • f) =
                                              ↑(RingHom.id R) c •
                                                AddHom.toFun
                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                    map_add' :=
                                                      (_ :
                                                        ∀ (a b : Π₀ (i : ι), M i),
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                              (a + b) =
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                b) }
                                                  f) })
                                  (F + G) =
                                (fun F =>
                                      {
                                        toAddHom :=
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                        map_smul' :=
                                          (_ :
                                            ∀ (c : R) (f : Π₀ (i : ι), M i),
                                              AddHom.toFun
                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                    map_add' :=
                                                      (_ :
                                                        ∀ (a b : Π₀ (i : ι), M i),
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                              (a + b) =
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                b) }
                                                  (c • f) =
                                                ↑(RingHom.id R) c •
                                                  AddHom.toFun
                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                      map_add' :=
                                                        (_ :
                                                          ∀ (a b : Π₀ (i : ι), M i),
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                (a + b) =
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  b) }
                                                    f) })
                                    F +
                                  (fun F =>
                                      {
                                        toAddHom :=
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                        map_smul' :=
                                          (_ :
                                            ∀ (c : R) (f : Π₀ (i : ι), M i),
                                              AddHom.toFun
                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                    map_add' :=
                                                      (_ :
                                                        ∀ (a b : Π₀ (i : ι), M i),
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                              (a + b) =
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                b) }
                                                  (c • f) =
                                                ↑(RingHom.id R) c •
                                                  AddHom.toFun
                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                      map_add' :=
                                                        (_ :
                                                          ∀ (a b : Π₀ (i : ι), M i),
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                (a + b) =
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  b) }
                                                    f) })
                                    G) }
                      (c • F) =
                    ↑(RingHom.id S) c •
                      AddHom.toFun
                        {
                          toFun := fun F =>
                            {
                              toAddHom :=
                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                  map_add' :=
                                    (_ :
                                      ∀ (a b : Π₀ (i : ι), M i),
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                              map_smul' :=
                                (_ :
                                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                                    AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        (c • f) =
                                      ↑(RingHom.id R) c •
                                        AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          f) },
                          map_add' :=
                            (_ :
                              ∀ (F G : (i : ι) → M i →ₗ[R] N),
                                (fun F =>
                                      {
                                        toAddHom :=
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                        map_smul' :=
                                          (_ :
                                            ∀ (c : R) (f : Π₀ (i : ι), M i),
                                              AddHom.toFun
                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                    map_add' :=
                                                      (_ :
                                                        ∀ (a b : Π₀ (i : ι), M i),
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                              (a + b) =
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                b) }
                                                  (c • f) =
                                                ↑(RingHom.id R) c •
                                                  AddHom.toFun
                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                      map_add' :=
                                                        (_ :
                                                          ∀ (a b : Π₀ (i : ι), M i),
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                (a + b) =
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  b) }
                                                    f) })
                                    (F + G) =
                                  (fun F =>
                                        {
                                          toAddHom :=
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                          map_smul' :=
                                            (_ :
                                              ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                AddHom.toFun
                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                      map_add' :=
                                                        (_ :
                                                          ∀ (a b : Π₀ (i : ι), M i),
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                (a + b) =
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  b) }
                                                    (c • f) =
                                                  ↑(RingHom.id R) c •
                                                    AddHom.toFun
                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                        map_add' :=
                                                          (_ :
                                                            ∀ (a b : Π₀ (i : ι), M i),
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  (a + b) =
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    a +
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    b) }
                                                      f) })
                                      F +
                                    (fun F =>
                                        {
                                          toAddHom :=
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                          map_smul' :=
                                            (_ :
                                              ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                AddHom.toFun
                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                      map_add' :=
                                                        (_ :
                                                          ∀ (a b : Π₀ (i : ι), M i),
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                (a + b) =
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  b) }
                                                    (c • f) =
                                                  ↑(RingHom.id R) c •
                                                    AddHom.toFun
                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                        map_add' :=
                                                          (_ :
                                                            ∀ (a b : Π₀ (i : ι), M i),
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  (a + b) =
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    a +
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    b) }
                                                      f) })
                                      G) }
                        F) }.toAddHom
        F) =
    F
[PROOFSTEP]
ext
[GOAL]
case h.h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
F : (i : ι) → M i →ₗ[R] N
x✝¹ : ι
x✝ : M x✝¹
⊢ ↑((fun F i => LinearMap.comp F (lsingle i))
          (AddHom.toFun
            {
                toAddHom :=
                  {
                    toFun := fun F =>
                      {
                        toAddHom :=
                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                            map_add' :=
                              (_ :
                                ∀ (a b : Π₀ (i : ι), M i),
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                        map_smul' :=
                          (_ :
                            ∀ (c : R) (f : Π₀ (i : ι), M i),
                              AddHom.toFun
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                  (c • f) =
                                ↑(RingHom.id R) c •
                                  AddHom.toFun
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                    f) },
                    map_add' :=
                      (_ :
                        ∀ (F G : (i : ι) → M i →ₗ[R] N),
                          (fun F =>
                                {
                                  toAddHom :=
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                  map_smul' :=
                                    (_ :
                                      ∀ (c : R) (f : Π₀ (i : ι), M i),
                                        AddHom.toFun
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                            (c • f) =
                                          ↑(RingHom.id R) c •
                                            AddHom.toFun
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                              f) })
                              (F + G) =
                            (fun F =>
                                  {
                                    toAddHom :=
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                    map_smul' :=
                                      (_ :
                                        ∀ (c : R) (f : Π₀ (i : ι), M i),
                                          AddHom.toFun
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                              (c • f) =
                                            ↑(RingHom.id R) c •
                                              AddHom.toFun
                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (a b : Π₀ (i : ι), M i),
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                                f) })
                                F +
                              (fun F =>
                                  {
                                    toAddHom :=
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                    map_smul' :=
                                      (_ :
                                        ∀ (c : R) (f : Π₀ (i : ι), M i),
                                          AddHom.toFun
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                              (c • f) =
                                            ↑(RingHom.id R) c •
                                              AddHom.toFun
                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (a b : Π₀ (i : ι), M i),
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                                f) })
                                G) },
                map_smul' :=
                  (_ :
                    ∀ (c : S) (F : (i : ι) → M i →ₗ[R] N),
                      AddHom.toFun
                          {
                            toFun := fun F =>
                              {
                                toAddHom :=
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                map_smul' :=
                                  (_ :
                                    ∀ (c : R) (f : Π₀ (i : ι), M i),
                                      AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          (c • f) =
                                        ↑(RingHom.id R) c •
                                          AddHom.toFun
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                            f) },
                            map_add' :=
                              (_ :
                                ∀ (F G : (i : ι) → M i →ₗ[R] N),
                                  (fun F =>
                                        {
                                          toAddHom :=
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                          map_smul' :=
                                            (_ :
                                              ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                AddHom.toFun
                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                      map_add' :=
                                                        (_ :
                                                          ∀ (a b : Π₀ (i : ι), M i),
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                (a + b) =
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  b) }
                                                    (c • f) =
                                                  ↑(RingHom.id R) c •
                                                    AddHom.toFun
                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                        map_add' :=
                                                          (_ :
                                                            ∀ (a b : Π₀ (i : ι), M i),
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  (a + b) =
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    a +
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    b) }
                                                      f) })
                                      (F + G) =
                                    (fun F =>
                                          {
                                            toAddHom :=
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                            map_smul' :=
                                              (_ :
                                                ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                  AddHom.toFun
                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                        map_add' :=
                                                          (_ :
                                                            ∀ (a b : Π₀ (i : ι), M i),
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  (a + b) =
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    a +
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    b) }
                                                      (c • f) =
                                                    ↑(RingHom.id R) c •
                                                      AddHom.toFun
                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                          map_add' :=
                                                            (_ :
                                                              ∀ (a b : Π₀ (i : ι), M i),
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    (a + b) =
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                      a +
                                                                    ↑(↑liftAddHom fun i =>
                                                                          LinearMap.toAddMonoidHom (F i))
                                                                      b) }
                                                        f) })
                                        F +
                                      (fun F =>
                                          {
                                            toAddHom :=
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                            map_smul' :=
                                              (_ :
                                                ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                  AddHom.toFun
                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                        map_add' :=
                                                          (_ :
                                                            ∀ (a b : Π₀ (i : ι), M i),
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  (a + b) =
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    a +
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    b) }
                                                      (c • f) =
                                                    ↑(RingHom.id R) c •
                                                      AddHom.toFun
                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                          map_add' :=
                                                            (_ :
                                                              ∀ (a b : Π₀ (i : ι), M i),
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    (a + b) =
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                      a +
                                                                    ↑(↑liftAddHom fun i =>
                                                                          LinearMap.toAddMonoidHom (F i))
                                                                      b) }
                                                        f) })
                                        G) }
                          (c • F) =
                        ↑(RingHom.id S) c •
                          AddHom.toFun
                            {
                              toFun := fun F =>
                                {
                                  toAddHom :=
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                  map_smul' :=
                                    (_ :
                                      ∀ (c : R) (f : Π₀ (i : ι), M i),
                                        AddHom.toFun
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                            (c • f) =
                                          ↑(RingHom.id R) c •
                                            AddHom.toFun
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                              f) },
                              map_add' :=
                                (_ :
                                  ∀ (F G : (i : ι) → M i →ₗ[R] N),
                                    (fun F =>
                                          {
                                            toAddHom :=
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                            map_smul' :=
                                              (_ :
                                                ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                  AddHom.toFun
                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                        map_add' :=
                                                          (_ :
                                                            ∀ (a b : Π₀ (i : ι), M i),
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  (a + b) =
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    a +
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    b) }
                                                      (c • f) =
                                                    ↑(RingHom.id R) c •
                                                      AddHom.toFun
                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                          map_add' :=
                                                            (_ :
                                                              ∀ (a b : Π₀ (i : ι), M i),
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    (a + b) =
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                      a +
                                                                    ↑(↑liftAddHom fun i =>
                                                                          LinearMap.toAddMonoidHom (F i))
                                                                      b) }
                                                        f) })
                                        (F + G) =
                                      (fun F =>
                                            {
                                              toAddHom :=
                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (a b : Π₀ (i : ι), M i),
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                              map_smul' :=
                                                (_ :
                                                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                    AddHom.toFun
                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                          map_add' :=
                                                            (_ :
                                                              ∀ (a b : Π₀ (i : ι), M i),
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    (a + b) =
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                      a +
                                                                    ↑(↑liftAddHom fun i =>
                                                                          LinearMap.toAddMonoidHom (F i))
                                                                      b) }
                                                        (c • f) =
                                                      ↑(RingHom.id R) c •
                                                        AddHom.toFun
                                                          {
                                                            toFun :=
                                                              ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                            map_add' :=
                                                              (_ :
                                                                ∀ (a b : Π₀ (i : ι), M i),
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                      (a + b) =
                                                                    ↑(↑liftAddHom fun i =>
                                                                            LinearMap.toAddMonoidHom (F i))
                                                                        a +
                                                                      ↑(↑liftAddHom fun i =>
                                                                            LinearMap.toAddMonoidHom (F i))
                                                                        b) }
                                                          f) })
                                          F +
                                        (fun F =>
                                            {
                                              toAddHom :=
                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (a b : Π₀ (i : ι), M i),
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                              map_smul' :=
                                                (_ :
                                                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                    AddHom.toFun
                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                          map_add' :=
                                                            (_ :
                                                              ∀ (a b : Π₀ (i : ι), M i),
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    (a + b) =
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                      a +
                                                                    ↑(↑liftAddHom fun i =>
                                                                          LinearMap.toAddMonoidHom (F i))
                                                                      b) }
                                                        (c • f) =
                                                      ↑(RingHom.id R) c •
                                                        AddHom.toFun
                                                          {
                                                            toFun :=
                                                              ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                            map_add' :=
                                                              (_ :
                                                                ∀ (a b : Π₀ (i : ι), M i),
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                      (a + b) =
                                                                    ↑(↑liftAddHom fun i =>
                                                                            LinearMap.toAddMonoidHom (F i))
                                                                        a +
                                                                      ↑(↑liftAddHom fun i =>
                                                                            LinearMap.toAddMonoidHom (F i))
                                                                        b) }
                                                          f) })
                                          G) }
                            F) }.toAddHom
            F)
          x✝¹)
      x✝ =
    ↑(F x✝¹) x✝
[PROOFSTEP]
simp
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
F : (Π₀ (i : ι), M i) →ₗ[R] N
⊢ AddHom.toFun
      {
          toAddHom :=
            {
              toFun := fun F =>
                {
                  toAddHom :=
                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                      map_add' :=
                        (_ :
                          ∀ (a b : Π₀ (i : ι), M i),
                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                  map_smul' :=
                    (_ :
                      ∀ (c : R) (f : Π₀ (i : ι), M i),
                        AddHom.toFun
                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                              map_add' :=
                                (_ :
                                  ∀ (a b : Π₀ (i : ι), M i),
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                            (c • f) =
                          ↑(RingHom.id R) c •
                            AddHom.toFun
                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                map_add' :=
                                  (_ :
                                    ∀ (a b : Π₀ (i : ι), M i),
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                              f) },
              map_add' :=
                (_ :
                  ∀ (F G : (i : ι) → M i →ₗ[R] N),
                    (fun F =>
                          {
                            toAddHom :=
                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                map_add' :=
                                  (_ :
                                    ∀ (a b : Π₀ (i : ι), M i),
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                            map_smul' :=
                              (_ :
                                ∀ (c : R) (f : Π₀ (i : ι), M i),
                                  AddHom.toFun
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                      (c • f) =
                                    ↑(RingHom.id R) c •
                                      AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        f) })
                        (F + G) =
                      (fun F =>
                            {
                              toAddHom :=
                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                  map_add' :=
                                    (_ :
                                      ∀ (a b : Π₀ (i : ι), M i),
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                              map_smul' :=
                                (_ :
                                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                                    AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        (c • f) =
                                      ↑(RingHom.id R) c •
                                        AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          f) })
                          F +
                        (fun F =>
                            {
                              toAddHom :=
                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                  map_add' :=
                                    (_ :
                                      ∀ (a b : Π₀ (i : ι), M i),
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                              map_smul' :=
                                (_ :
                                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                                    AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        (c • f) =
                                      ↑(RingHom.id R) c •
                                        AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          f) })
                          G) },
          map_smul' :=
            (_ :
              ∀ (c : S) (F : (i : ι) → M i →ₗ[R] N),
                AddHom.toFun
                    {
                      toFun := fun F =>
                        {
                          toAddHom :=
                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                              map_add' :=
                                (_ :
                                  ∀ (a b : Π₀ (i : ι), M i),
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                          map_smul' :=
                            (_ :
                              ∀ (c : R) (f : Π₀ (i : ι), M i),
                                AddHom.toFun
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                    (c • f) =
                                  ↑(RingHom.id R) c •
                                    AddHom.toFun
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                      f) },
                      map_add' :=
                        (_ :
                          ∀ (F G : (i : ι) → M i →ₗ[R] N),
                            (fun F =>
                                  {
                                    toAddHom :=
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                    map_smul' :=
                                      (_ :
                                        ∀ (c : R) (f : Π₀ (i : ι), M i),
                                          AddHom.toFun
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                              (c • f) =
                                            ↑(RingHom.id R) c •
                                              AddHom.toFun
                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (a b : Π₀ (i : ι), M i),
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                                f) })
                                (F + G) =
                              (fun F =>
                                    {
                                      toAddHom :=
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                      map_smul' :=
                                        (_ :
                                          ∀ (c : R) (f : Π₀ (i : ι), M i),
                                            AddHom.toFun
                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (a b : Π₀ (i : ι), M i),
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                                (c • f) =
                                              ↑(RingHom.id R) c •
                                                AddHom.toFun
                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                    map_add' :=
                                                      (_ :
                                                        ∀ (a b : Π₀ (i : ι), M i),
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                              (a + b) =
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                b) }
                                                  f) })
                                  F +
                                (fun F =>
                                    {
                                      toAddHom :=
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                      map_smul' :=
                                        (_ :
                                          ∀ (c : R) (f : Π₀ (i : ι), M i),
                                            AddHom.toFun
                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (a b : Π₀ (i : ι), M i),
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                                (c • f) =
                                              ↑(RingHom.id R) c •
                                                AddHom.toFun
                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                    map_add' :=
                                                      (_ :
                                                        ∀ (a b : Π₀ (i : ι), M i),
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                              (a + b) =
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                b) }
                                                  f) })
                                  G) }
                    (c • F) =
                  ↑(RingHom.id S) c •
                    AddHom.toFun
                      {
                        toFun := fun F =>
                          {
                            toAddHom :=
                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                map_add' :=
                                  (_ :
                                    ∀ (a b : Π₀ (i : ι), M i),
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                            map_smul' :=
                              (_ :
                                ∀ (c : R) (f : Π₀ (i : ι), M i),
                                  AddHom.toFun
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                      (c • f) =
                                    ↑(RingHom.id R) c •
                                      AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        f) },
                        map_add' :=
                          (_ :
                            ∀ (F G : (i : ι) → M i →ₗ[R] N),
                              (fun F =>
                                    {
                                      toAddHom :=
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                      map_smul' :=
                                        (_ :
                                          ∀ (c : R) (f : Π₀ (i : ι), M i),
                                            AddHom.toFun
                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (a b : Π₀ (i : ι), M i),
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                                (c • f) =
                                              ↑(RingHom.id R) c •
                                                AddHom.toFun
                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                    map_add' :=
                                                      (_ :
                                                        ∀ (a b : Π₀ (i : ι), M i),
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                              (a + b) =
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                b) }
                                                  f) })
                                  (F + G) =
                                (fun F =>
                                      {
                                        toAddHom :=
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                        map_smul' :=
                                          (_ :
                                            ∀ (c : R) (f : Π₀ (i : ι), M i),
                                              AddHom.toFun
                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                    map_add' :=
                                                      (_ :
                                                        ∀ (a b : Π₀ (i : ι), M i),
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                              (a + b) =
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                b) }
                                                  (c • f) =
                                                ↑(RingHom.id R) c •
                                                  AddHom.toFun
                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                      map_add' :=
                                                        (_ :
                                                          ∀ (a b : Π₀ (i : ι), M i),
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                (a + b) =
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  b) }
                                                    f) })
                                    F +
                                  (fun F =>
                                      {
                                        toAddHom :=
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                        map_smul' :=
                                          (_ :
                                            ∀ (c : R) (f : Π₀ (i : ι), M i),
                                              AddHom.toFun
                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                    map_add' :=
                                                      (_ :
                                                        ∀ (a b : Π₀ (i : ι), M i),
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                              (a + b) =
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                b) }
                                                  (c • f) =
                                                ↑(RingHom.id R) c •
                                                  AddHom.toFun
                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                      map_add' :=
                                                        (_ :
                                                          ∀ (a b : Π₀ (i : ι), M i),
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                (a + b) =
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  b) }
                                                    f) })
                                    G) }
                      F) }.toAddHom
      ((fun F i => LinearMap.comp F (lsingle i)) F) =
    F
[PROOFSTEP]
refine DFinsupp.lhom_ext' (fun i ↦ ?_)
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
F : (Π₀ (i : ι), M i) →ₗ[R] N
i : ι
⊢ LinearMap.comp
      (AddHom.toFun
        {
            toAddHom :=
              {
                toFun := fun F =>
                  {
                    toAddHom :=
                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                        map_add' :=
                          (_ :
                            ∀ (a b : Π₀ (i : ι), M i),
                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                    map_smul' :=
                      (_ :
                        ∀ (c : R) (f : Π₀ (i : ι), M i),
                          AddHom.toFun
                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                map_add' :=
                                  (_ :
                                    ∀ (a b : Π₀ (i : ι), M i),
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                              (c • f) =
                            ↑(RingHom.id R) c •
                              AddHom.toFun
                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                  map_add' :=
                                    (_ :
                                      ∀ (a b : Π₀ (i : ι), M i),
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                f) },
                map_add' :=
                  (_ :
                    ∀ (F G : (i : ι) → M i →ₗ[R] N),
                      (fun F =>
                            {
                              toAddHom :=
                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                  map_add' :=
                                    (_ :
                                      ∀ (a b : Π₀ (i : ι), M i),
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                              map_smul' :=
                                (_ :
                                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                                    AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        (c • f) =
                                      ↑(RingHom.id R) c •
                                        AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          f) })
                          (F + G) =
                        (fun F =>
                              {
                                toAddHom :=
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                map_smul' :=
                                  (_ :
                                    ∀ (c : R) (f : Π₀ (i : ι), M i),
                                      AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          (c • f) =
                                        ↑(RingHom.id R) c •
                                          AddHom.toFun
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                            f) })
                            F +
                          (fun F =>
                              {
                                toAddHom :=
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                map_smul' :=
                                  (_ :
                                    ∀ (c : R) (f : Π₀ (i : ι), M i),
                                      AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          (c • f) =
                                        ↑(RingHom.id R) c •
                                          AddHom.toFun
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                            f) })
                            G) },
            map_smul' :=
              (_ :
                ∀ (c : S) (F : (i : ι) → M i →ₗ[R] N),
                  AddHom.toFun
                      {
                        toFun := fun F =>
                          {
                            toAddHom :=
                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                map_add' :=
                                  (_ :
                                    ∀ (a b : Π₀ (i : ι), M i),
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                            map_smul' :=
                              (_ :
                                ∀ (c : R) (f : Π₀ (i : ι), M i),
                                  AddHom.toFun
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                      (c • f) =
                                    ↑(RingHom.id R) c •
                                      AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        f) },
                        map_add' :=
                          (_ :
                            ∀ (F G : (i : ι) → M i →ₗ[R] N),
                              (fun F =>
                                    {
                                      toAddHom :=
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                      map_smul' :=
                                        (_ :
                                          ∀ (c : R) (f : Π₀ (i : ι), M i),
                                            AddHom.toFun
                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (a b : Π₀ (i : ι), M i),
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                                (c • f) =
                                              ↑(RingHom.id R) c •
                                                AddHom.toFun
                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                    map_add' :=
                                                      (_ :
                                                        ∀ (a b : Π₀ (i : ι), M i),
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                              (a + b) =
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                b) }
                                                  f) })
                                  (F + G) =
                                (fun F =>
                                      {
                                        toAddHom :=
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                        map_smul' :=
                                          (_ :
                                            ∀ (c : R) (f : Π₀ (i : ι), M i),
                                              AddHom.toFun
                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                    map_add' :=
                                                      (_ :
                                                        ∀ (a b : Π₀ (i : ι), M i),
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                              (a + b) =
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                b) }
                                                  (c • f) =
                                                ↑(RingHom.id R) c •
                                                  AddHom.toFun
                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                      map_add' :=
                                                        (_ :
                                                          ∀ (a b : Π₀ (i : ι), M i),
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                (a + b) =
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  b) }
                                                    f) })
                                    F +
                                  (fun F =>
                                      {
                                        toAddHom :=
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                        map_smul' :=
                                          (_ :
                                            ∀ (c : R) (f : Π₀ (i : ι), M i),
                                              AddHom.toFun
                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                    map_add' :=
                                                      (_ :
                                                        ∀ (a b : Π₀ (i : ι), M i),
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                              (a + b) =
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                b) }
                                                  (c • f) =
                                                ↑(RingHom.id R) c •
                                                  AddHom.toFun
                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                      map_add' :=
                                                        (_ :
                                                          ∀ (a b : Π₀ (i : ι), M i),
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                (a + b) =
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  b) }
                                                    f) })
                                    G) }
                      (c • F) =
                    ↑(RingHom.id S) c •
                      AddHom.toFun
                        {
                          toFun := fun F =>
                            {
                              toAddHom :=
                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                  map_add' :=
                                    (_ :
                                      ∀ (a b : Π₀ (i : ι), M i),
                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                              map_smul' :=
                                (_ :
                                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                                    AddHom.toFun
                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                          map_add' :=
                                            (_ :
                                              ∀ (a b : Π₀ (i : ι), M i),
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                        (c • f) =
                                      ↑(RingHom.id R) c •
                                        AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          f) },
                          map_add' :=
                            (_ :
                              ∀ (F G : (i : ι) → M i →ₗ[R] N),
                                (fun F =>
                                      {
                                        toAddHom :=
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                        map_smul' :=
                                          (_ :
                                            ∀ (c : R) (f : Π₀ (i : ι), M i),
                                              AddHom.toFun
                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                    map_add' :=
                                                      (_ :
                                                        ∀ (a b : Π₀ (i : ι), M i),
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                              (a + b) =
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                b) }
                                                  (c • f) =
                                                ↑(RingHom.id R) c •
                                                  AddHom.toFun
                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                      map_add' :=
                                                        (_ :
                                                          ∀ (a b : Π₀ (i : ι), M i),
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                (a + b) =
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  b) }
                                                    f) })
                                    (F + G) =
                                  (fun F =>
                                        {
                                          toAddHom :=
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                          map_smul' :=
                                            (_ :
                                              ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                AddHom.toFun
                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                      map_add' :=
                                                        (_ :
                                                          ∀ (a b : Π₀ (i : ι), M i),
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                (a + b) =
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  b) }
                                                    (c • f) =
                                                  ↑(RingHom.id R) c •
                                                    AddHom.toFun
                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                        map_add' :=
                                                          (_ :
                                                            ∀ (a b : Π₀ (i : ι), M i),
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  (a + b) =
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    a +
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    b) }
                                                      f) })
                                      F +
                                    (fun F =>
                                        {
                                          toAddHom :=
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                          map_smul' :=
                                            (_ :
                                              ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                AddHom.toFun
                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                      map_add' :=
                                                        (_ :
                                                          ∀ (a b : Π₀ (i : ι), M i),
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                (a + b) =
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  b) }
                                                    (c • f) =
                                                  ↑(RingHom.id R) c •
                                                    AddHom.toFun
                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                        map_add' :=
                                                          (_ :
                                                            ∀ (a b : Π₀ (i : ι), M i),
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  (a + b) =
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    a +
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    b) }
                                                      f) })
                                      G) }
                        F) }.toAddHom
        ((fun F i => LinearMap.comp F (lsingle i)) F))
      (lsingle i) =
    LinearMap.comp F (lsingle i)
[PROOFSTEP]
ext
[GOAL]
case h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
F : (Π₀ (i : ι), M i) →ₗ[R] N
i : ι
x✝ : M i
⊢ ↑(LinearMap.comp
          (AddHom.toFun
            {
                toAddHom :=
                  {
                    toFun := fun F =>
                      {
                        toAddHom :=
                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                            map_add' :=
                              (_ :
                                ∀ (a b : Π₀ (i : ι), M i),
                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                        map_smul' :=
                          (_ :
                            ∀ (c : R) (f : Π₀ (i : ι), M i),
                              AddHom.toFun
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                  (c • f) =
                                ↑(RingHom.id R) c •
                                  AddHom.toFun
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                    f) },
                    map_add' :=
                      (_ :
                        ∀ (F G : (i : ι) → M i →ₗ[R] N),
                          (fun F =>
                                {
                                  toAddHom :=
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                  map_smul' :=
                                    (_ :
                                      ∀ (c : R) (f : Π₀ (i : ι), M i),
                                        AddHom.toFun
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                            (c • f) =
                                          ↑(RingHom.id R) c •
                                            AddHom.toFun
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                              f) })
                              (F + G) =
                            (fun F =>
                                  {
                                    toAddHom :=
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                    map_smul' :=
                                      (_ :
                                        ∀ (c : R) (f : Π₀ (i : ι), M i),
                                          AddHom.toFun
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                              (c • f) =
                                            ↑(RingHom.id R) c •
                                              AddHom.toFun
                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (a b : Π₀ (i : ι), M i),
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                                f) })
                                F +
                              (fun F =>
                                  {
                                    toAddHom :=
                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                        map_add' :=
                                          (_ :
                                            ∀ (a b : Π₀ (i : ι), M i),
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                    map_smul' :=
                                      (_ :
                                        ∀ (c : R) (f : Π₀ (i : ι), M i),
                                          AddHom.toFun
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                              (c • f) =
                                            ↑(RingHom.id R) c •
                                              AddHom.toFun
                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (a b : Π₀ (i : ι), M i),
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                                f) })
                                G) },
                map_smul' :=
                  (_ :
                    ∀ (c : S) (F : (i : ι) → M i →ₗ[R] N),
                      AddHom.toFun
                          {
                            toFun := fun F =>
                              {
                                toAddHom :=
                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                    map_add' :=
                                      (_ :
                                        ∀ (a b : Π₀ (i : ι), M i),
                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                map_smul' :=
                                  (_ :
                                    ∀ (c : R) (f : Π₀ (i : ι), M i),
                                      AddHom.toFun
                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                            map_add' :=
                                              (_ :
                                                ∀ (a b : Π₀ (i : ι), M i),
                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                          (c • f) =
                                        ↑(RingHom.id R) c •
                                          AddHom.toFun
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                            f) },
                            map_add' :=
                              (_ :
                                ∀ (F G : (i : ι) → M i →ₗ[R] N),
                                  (fun F =>
                                        {
                                          toAddHom :=
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                          map_smul' :=
                                            (_ :
                                              ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                AddHom.toFun
                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                      map_add' :=
                                                        (_ :
                                                          ∀ (a b : Π₀ (i : ι), M i),
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                (a + b) =
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  b) }
                                                    (c • f) =
                                                  ↑(RingHom.id R) c •
                                                    AddHom.toFun
                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                        map_add' :=
                                                          (_ :
                                                            ∀ (a b : Π₀ (i : ι), M i),
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  (a + b) =
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    a +
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    b) }
                                                      f) })
                                      (F + G) =
                                    (fun F =>
                                          {
                                            toAddHom :=
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                            map_smul' :=
                                              (_ :
                                                ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                  AddHom.toFun
                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                        map_add' :=
                                                          (_ :
                                                            ∀ (a b : Π₀ (i : ι), M i),
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  (a + b) =
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    a +
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    b) }
                                                      (c • f) =
                                                    ↑(RingHom.id R) c •
                                                      AddHom.toFun
                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                          map_add' :=
                                                            (_ :
                                                              ∀ (a b : Π₀ (i : ι), M i),
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    (a + b) =
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                      a +
                                                                    ↑(↑liftAddHom fun i =>
                                                                          LinearMap.toAddMonoidHom (F i))
                                                                      b) }
                                                        f) })
                                        F +
                                      (fun F =>
                                          {
                                            toAddHom :=
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                            map_smul' :=
                                              (_ :
                                                ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                  AddHom.toFun
                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                        map_add' :=
                                                          (_ :
                                                            ∀ (a b : Π₀ (i : ι), M i),
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  (a + b) =
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    a +
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    b) }
                                                      (c • f) =
                                                    ↑(RingHom.id R) c •
                                                      AddHom.toFun
                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                          map_add' :=
                                                            (_ :
                                                              ∀ (a b : Π₀ (i : ι), M i),
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    (a + b) =
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                      a +
                                                                    ↑(↑liftAddHom fun i =>
                                                                          LinearMap.toAddMonoidHom (F i))
                                                                      b) }
                                                        f) })
                                        G) }
                          (c • F) =
                        ↑(RingHom.id S) c •
                          AddHom.toFun
                            {
                              toFun := fun F =>
                                {
                                  toAddHom :=
                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                      map_add' :=
                                        (_ :
                                          ∀ (a b : Π₀ (i : ι), M i),
                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                  map_smul' :=
                                    (_ :
                                      ∀ (c : R) (f : Π₀ (i : ι), M i),
                                        AddHom.toFun
                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                              map_add' :=
                                                (_ :
                                                  ∀ (a b : Π₀ (i : ι), M i),
                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                            (c • f) =
                                          ↑(RingHom.id R) c •
                                            AddHom.toFun
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }
                                              f) },
                              map_add' :=
                                (_ :
                                  ∀ (F G : (i : ι) → M i →ₗ[R] N),
                                    (fun F =>
                                          {
                                            toAddHom :=
                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                map_add' :=
                                                  (_ :
                                                    ∀ (a b : Π₀ (i : ι), M i),
                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                            map_smul' :=
                                              (_ :
                                                ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                  AddHom.toFun
                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                        map_add' :=
                                                          (_ :
                                                            ∀ (a b : Π₀ (i : ι), M i),
                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                  (a + b) =
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    a +
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    b) }
                                                      (c • f) =
                                                    ↑(RingHom.id R) c •
                                                      AddHom.toFun
                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                          map_add' :=
                                                            (_ :
                                                              ∀ (a b : Π₀ (i : ι), M i),
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    (a + b) =
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                      a +
                                                                    ↑(↑liftAddHom fun i =>
                                                                          LinearMap.toAddMonoidHom (F i))
                                                                      b) }
                                                        f) })
                                        (F + G) =
                                      (fun F =>
                                            {
                                              toAddHom :=
                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (a b : Π₀ (i : ι), M i),
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                              map_smul' :=
                                                (_ :
                                                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                    AddHom.toFun
                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                          map_add' :=
                                                            (_ :
                                                              ∀ (a b : Π₀ (i : ι), M i),
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    (a + b) =
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                      a +
                                                                    ↑(↑liftAddHom fun i =>
                                                                          LinearMap.toAddMonoidHom (F i))
                                                                      b) }
                                                        (c • f) =
                                                      ↑(RingHom.id R) c •
                                                        AddHom.toFun
                                                          {
                                                            toFun :=
                                                              ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                            map_add' :=
                                                              (_ :
                                                                ∀ (a b : Π₀ (i : ι), M i),
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                      (a + b) =
                                                                    ↑(↑liftAddHom fun i =>
                                                                            LinearMap.toAddMonoidHom (F i))
                                                                        a +
                                                                      ↑(↑liftAddHom fun i =>
                                                                            LinearMap.toAddMonoidHom (F i))
                                                                        b) }
                                                          f) })
                                          F +
                                        (fun F =>
                                            {
                                              toAddHom :=
                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (a b : Π₀ (i : ι), M i),
                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =
                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +
                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },
                                              map_smul' :=
                                                (_ :
                                                  ∀ (c : R) (f : Π₀ (i : ι), M i),
                                                    AddHom.toFun
                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                          map_add' :=
                                                            (_ :
                                                              ∀ (a b : Π₀ (i : ι), M i),
                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                    (a + b) =
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                      a +
                                                                    ↑(↑liftAddHom fun i =>
                                                                          LinearMap.toAddMonoidHom (F i))
                                                                      b) }
                                                        (c • f) =
                                                      ↑(RingHom.id R) c •
                                                        AddHom.toFun
                                                          {
                                                            toFun :=
                                                              ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),
                                                            map_add' :=
                                                              (_ :
                                                                ∀ (a b : Π₀ (i : ι), M i),
                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))
                                                                      (a + b) =
                                                                    ↑(↑liftAddHom fun i =>
                                                                            LinearMap.toAddMonoidHom (F i))
                                                                        a +
                                                                      ↑(↑liftAddHom fun i =>
                                                                            LinearMap.toAddMonoidHom (F i))
                                                                        b) }
                                                          f) })
                                          G) }
                            F) }.toAddHom
            ((fun F i => LinearMap.comp F (lsingle i)) F))
          (lsingle i))
      x✝ =
    ↑(LinearMap.comp F (lsingle i)) x✝
[PROOFSTEP]
simp
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M i)
inst✝⁵ : (i : ι) → Module R (M i)
inst✝⁴ : AddCommMonoid N
inst✝³ : Module R N
inst✝² : Semiring S
inst✝¹ : Module S N
inst✝ : SMulCommClass R S N
F : (i : ι) → M i →ₗ[R] N
i : ι
x : M i
⊢ ↑(↑(lsum S) F) (single i x) = ↑(F i) x
[PROOFSTEP]
simp
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝¹⁰ : Semiring R
inst✝⁹ : (i : ι) → AddCommMonoid (M i)
inst✝⁸ : (i : ι) → Module R (M i)
inst✝⁷ : AddCommMonoid N
inst✝⁶ : Module R N
β : ι → Type u_6
β₁ : ι → Type u_7
β₂ : ι → Type u_8
inst✝⁵ : (i : ι) → AddCommMonoid (β i)
inst✝⁴ : (i : ι) → AddCommMonoid (β₁ i)
inst✝³ : (i : ι) → AddCommMonoid (β₂ i)
inst✝² : (i : ι) → Module R (β i)
inst✝¹ : (i : ι) → Module R (β₁ i)
inst✝ : (i : ι) → Module R (β₂ i)
f : (i : ι) → β₁ i → β₂ i
hf : ∀ (i : ι), f i 0 = 0
r : R
hf' : ∀ (i : ι) (x : β₁ i), f i (r • x) = r • f i x
g : Π₀ (i : ι), β₁ i
⊢ mapRange f hf (r • g) = r • mapRange f hf g
[PROOFSTEP]
ext
[GOAL]
case h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝¹⁰ : Semiring R
inst✝⁹ : (i : ι) → AddCommMonoid (M i)
inst✝⁸ : (i : ι) → Module R (M i)
inst✝⁷ : AddCommMonoid N
inst✝⁶ : Module R N
β : ι → Type u_6
β₁ : ι → Type u_7
β₂ : ι → Type u_8
inst✝⁵ : (i : ι) → AddCommMonoid (β i)
inst✝⁴ : (i : ι) → AddCommMonoid (β₁ i)
inst✝³ : (i : ι) → AddCommMonoid (β₂ i)
inst✝² : (i : ι) → Module R (β i)
inst✝¹ : (i : ι) → Module R (β₁ i)
inst✝ : (i : ι) → Module R (β₂ i)
f : (i : ι) → β₁ i → β₂ i
hf : ∀ (i : ι), f i 0 = 0
r : R
hf' : ∀ (i : ι) (x : β₁ i), f i (r • x) = r • f i x
g : Π₀ (i : ι), β₁ i
i✝ : ι
⊢ ↑(mapRange f hf (r • g)) i✝ = ↑(r • mapRange f hf g) i✝
[PROOFSTEP]
simp only [mapRange_apply f, coe_smul, Pi.smul_apply, hf']
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝¹⁰ : Semiring R
inst✝⁹ : (i : ι) → AddCommMonoid (M i)
inst✝⁸ : (i : ι) → Module R (M i)
inst✝⁷ : AddCommMonoid N
inst✝⁶ : Module R N
β : ι → Type u_6
β₁ : ι → Type u_7
β₂ : ι → Type u_8
inst✝⁵ : (i : ι) → AddCommMonoid (β i)
inst✝⁴ : (i : ι) → AddCommMonoid (β₁ i)
inst✝³ : (i : ι) → AddCommMonoid (β₂ i)
inst✝² : (i : ι) → Module R (β i)
inst✝¹ : (i : ι) → Module R (β₁ i)
inst✝ : (i : ι) → Module R (β₂ i)
⊢ (linearMap fun i => LinearMap.id) = LinearMap.id
[PROOFSTEP]
ext
[GOAL]
case h.h.h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝¹⁰ : Semiring R
inst✝⁹ : (i : ι) → AddCommMonoid (M i)
inst✝⁸ : (i : ι) → Module R (M i)
inst✝⁷ : AddCommMonoid N
inst✝⁶ : Module R N
β : ι → Type u_6
β₁ : ι → Type u_7
β₂ : ι → Type u_8
inst✝⁵ : (i : ι) → AddCommMonoid (β i)
inst✝⁴ : (i : ι) → AddCommMonoid (β₁ i)
inst✝³ : (i : ι) → AddCommMonoid (β₂ i)
inst✝² : (i : ι) → Module R (β i)
inst✝¹ : (i : ι) → Module R (β₁ i)
inst✝ : (i : ι) → Module R (β₂ i)
i✝¹ : ι
x✝ : β₂ i✝¹
i✝ : ι
⊢ ↑(↑(LinearMap.comp (linearMap fun i => LinearMap.id) (lsingle i✝¹)) x✝) i✝ =
    ↑(↑(LinearMap.comp LinearMap.id (lsingle i✝¹)) x✝) i✝
[PROOFSTEP]
simp [linearMap]
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝¹⁰ : Semiring R
inst✝⁹ : (i : ι) → AddCommMonoid (M i)
inst✝⁸ : (i : ι) → Module R (M i)
inst✝⁷ : AddCommMonoid N
inst✝⁶ : Module R N
β : ι → Type u_6
β₁ : ι → Type u_7
β₂ : ι → Type u_8
inst✝⁵ : (i : ι) → AddCommMonoid (β i)
inst✝⁴ : (i : ι) → AddCommMonoid (β₁ i)
inst✝³ : (i : ι) → AddCommMonoid (β₂ i)
inst✝² : (i : ι) → Module R (β i)
inst✝¹ : (i : ι) → Module R (β₁ i)
inst✝ : (i : ι) → Module R (β₂ i)
f : (i : ι) → β₁ i →ₗ[R] β₂ i
f₂ : (i : ι) → β i →ₗ[R] β₁ i
⊢ ∀ (i : ι), ((fun i x => ↑(f i) x) i ∘ (fun i x => ↑(f₂ i) x) i) 0 = 0
[PROOFSTEP]
simp
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝¹² : Semiring R
inst✝¹¹ : (i : ι) → AddCommMonoid (M i)
inst✝¹⁰ : (i : ι) → Module R (M i)
inst✝⁹ : AddCommMonoid N
inst✝⁸ : Module R N
β : ι → Type u_6
β₁ : ι → Type u_7
β₂ : ι → Type u_8
inst✝⁷ : (i : ι) → AddCommMonoid (β i)
inst✝⁶ : (i : ι) → AddCommMonoid (β₁ i)
inst✝⁵ : (i : ι) → AddCommMonoid (β₂ i)
inst✝⁴ : (i : ι) → Module R (β i)
inst✝³ : (i : ι) → Module R (β₁ i)
inst✝² : (i : ι) → Module R (β₂ i)
inst✝¹ : (i : ι) → (x : β₁ i) → Decidable (x ≠ 0)
inst✝ : (i : ι) → (x : β₂ i) → Decidable (x ≠ 0)
f : (i : ι) → β₁ i →ₗ[R] β₂ i
h : (i : ι) → β₂ i →ₗ[R] N
l : Π₀ (i : ι), β₁ i
⊢ ↑(↑(lsum ℕ) h) (↑(mapRange.linearMap f) l) = ↑(↑(lsum ℕ) fun i => LinearMap.comp (h i) (f i)) l
[PROOFSTEP]
simpa [DFinsupp.sumAddHom_apply] using sum_mapRange_index fun i => by simp
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝¹² : Semiring R
inst✝¹¹ : (i : ι) → AddCommMonoid (M i)
inst✝¹⁰ : (i : ι) → Module R (M i)
inst✝⁹ : AddCommMonoid N
inst✝⁸ : Module R N
β : ι → Type u_6
β₁ : ι → Type u_7
β₂ : ι → Type u_8
inst✝⁷ : (i : ι) → AddCommMonoid (β i)
inst✝⁶ : (i : ι) → AddCommMonoid (β₁ i)
inst✝⁵ : (i : ι) → AddCommMonoid (β₂ i)
inst✝⁴ : (i : ι) → Module R (β i)
inst✝³ : (i : ι) → Module R (β₁ i)
inst✝² : (i : ι) → Module R (β₂ i)
inst✝¹ : (i : ι) → (x : β₁ i) → Decidable (x ≠ 0)
inst✝ : (i : ι) → (x : β₂ i) → Decidable (x ≠ 0)
f : (i : ι) → β₁ i →ₗ[R] β₂ i
h : (i : ι) → β₂ i →ₗ[R] N
l : Π₀ (i : ι), β₁ i
i : ι
⊢ ↑(h i) 0 = 0
[PROOFSTEP]
simp
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝¹⁰ : Semiring R
inst✝⁹ : (i : ι) → AddCommMonoid (M i)
inst✝⁸ : (i : ι) → Module R (M i)
inst✝⁷ : AddCommMonoid N
inst✝⁶ : Module R N
β : ι → Type u_6
β₁ : ι → Type u_7
β₂ : ι → Type u_8
inst✝⁵ : (i : ι) → AddCommMonoid (β i)
inst✝⁴ : (i : ι) → AddCommMonoid (β₁ i)
inst✝³ : (i : ι) → AddCommMonoid (β₂ i)
inst✝² : (i : ι) → Module R (β i)
inst✝¹ : (i : ι) → Module R (β₁ i)
inst✝ : (i : ι) → Module R (β₂ i)
f : (i : ι) → β i ≃ₗ[R] β₁ i
f₂ : (i : ι) → β₁ i ≃ₗ[R] β₂ i
⊢ ∀ (i : ι), ((fun i x => ↑(f₂ i) x) i ∘ (fun i x => ↑(f i) x) i) 0 = 0
[PROOFSTEP]
simp
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝⁶ : Semiring R
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : DecidableEq ι
inst✝ : (x : N) → Decidable (x ≠ 0)
f : (i : ι) → M i →ₗ[R] N
i : ι
x : M i
⊢ ↑(coprodMap f) (single i x) = ↑(f i) x
[PROOFSTEP]
simp [coprodMap_apply]
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
⊢ iSup p = LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i))
[PROOFSTEP]
apply le_antisymm
[GOAL]
case a
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
⊢ iSup p ≤ LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i))
[PROOFSTEP]
apply iSup_le _
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
⊢ ∀ (i : ι), p i ≤ LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i))
[PROOFSTEP]
intro i y hy
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
i : ι
y : N
hy : y ∈ p i
⊢ y ∈ LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i))
[PROOFSTEP]
simp only [LinearMap.mem_range, lsum_apply_apply]
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
i : ι
y : N
hy : y ∈ p i
⊢ ∃ y_1, ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (Submodule.subtype (p i))) y_1 = y
[PROOFSTEP]
exact ⟨DFinsupp.single i ⟨y, hy⟩, DFinsupp.sumAddHom_single _ _ _⟩
[GOAL]
case a
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
⊢ LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i)) ≤ iSup p
[PROOFSTEP]
rintro x ⟨v, rfl⟩
[GOAL]
case a.intro
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
v : Π₀ (i : ι), { x // x ∈ p i }
⊢ ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) v ∈ iSup p
[PROOFSTEP]
exact dfinsupp_sumAddHom_mem _ v _ fun i _ => (le_iSup p i : p i ≤ _) (v i).2
[GOAL]
ι : Type u_1
R : Type u_2
S✝ : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Semiring R
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
p : ι → Prop
inst✝ : DecidablePred p
S : ι → Submodule R N
⊢ ⨆ (i : ι) (_ : p i), S i =
    LinearMap.range
      (LinearMap.comp (↑(lsum ℕ) fun i => Submodule.subtype (S i)) (filterLinearMap R (fun i => { x // x ∈ S i }) p))
[PROOFSTEP]
apply le_antisymm
[GOAL]
case a
ι : Type u_1
R : Type u_2
S✝ : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Semiring R
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
p : ι → Prop
inst✝ : DecidablePred p
S : ι → Submodule R N
⊢ ⨆ (i : ι) (_ : p i), S i ≤
    LinearMap.range
      (LinearMap.comp (↑(lsum ℕ) fun i => Submodule.subtype (S i)) (filterLinearMap R (fun i => { x // x ∈ S i }) p))
[PROOFSTEP]
refine' iSup₂_le fun i hi y hy => ⟨DFinsupp.single i ⟨y, hy⟩, _⟩
[GOAL]
case a
ι : Type u_1
R : Type u_2
S✝ : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Semiring R
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
p : ι → Prop
inst✝ : DecidablePred p
S : ι → Submodule R N
i : ι
hi : p i
y : N
hy : y ∈ S i
⊢ ↑(LinearMap.comp (↑(lsum ℕ) fun i => Submodule.subtype (S i)) (filterLinearMap R (fun i => { x // x ∈ S i }) p))
      (single i { val := y, property := hy }) =
    y
[PROOFSTEP]
rw [LinearMap.comp_apply, filterLinearMap_apply, filter_single_pos _ _ hi]
[GOAL]
case a
ι : Type u_1
R : Type u_2
S✝ : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Semiring R
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
p : ι → Prop
inst✝ : DecidablePred p
S : ι → Submodule R N
i : ι
hi : p i
y : N
hy : y ∈ S i
⊢ ↑(↑(lsum ℕ) fun i => Submodule.subtype (S i)) (single i { val := y, property := hy }) = y
[PROOFSTEP]
simp only [lsum_apply_apply, sumAddHom_single, LinearMap.toAddMonoidHom_coe, coeSubtype]
[GOAL]
case a
ι : Type u_1
R : Type u_2
S✝ : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Semiring R
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
p : ι → Prop
inst✝ : DecidablePred p
S : ι → Submodule R N
⊢ LinearMap.range
      (LinearMap.comp (↑(lsum ℕ) fun i => Submodule.subtype (S i)) (filterLinearMap R (fun i => { x // x ∈ S i }) p)) ≤
    ⨆ (i : ι) (_ : p i), S i
[PROOFSTEP]
rintro x ⟨v, rfl⟩
[GOAL]
case a.intro
ι : Type u_1
R : Type u_2
S✝ : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Semiring R
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
p : ι → Prop
inst✝ : DecidablePred p
S : ι → Submodule R N
v : Π₀ (i : ι), { x // x ∈ S i }
⊢ ↑(LinearMap.comp (↑(lsum ℕ) fun i => Submodule.subtype (S i)) (filterLinearMap R (fun i => { x // x ∈ S i }) p)) v ∈
    ⨆ (i : ι) (_ : p i), S i
[PROOFSTEP]
refine' dfinsupp_sumAddHom_mem _ _ _ fun i _ => _
[GOAL]
case a.intro
ι : Type u_1
R : Type u_2
S✝ : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Semiring R
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
p : ι → Prop
inst✝ : DecidablePred p
S : ι → Submodule R N
v : Π₀ (i : ι), { x // x ∈ S i }
i : ι
x✝ : ↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i ≠ 0
⊢ ↑((fun i => LinearMap.toAddMonoidHom ((fun i => Submodule.subtype (S i)) i)) i)
      (↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i) ∈
    ⨆ (i : ι) (_ : p i), S i
[PROOFSTEP]
refine' mem_iSup_of_mem i _
[GOAL]
case a.intro
ι : Type u_1
R : Type u_2
S✝ : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Semiring R
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
p : ι → Prop
inst✝ : DecidablePred p
S : ι → Submodule R N
v : Π₀ (i : ι), { x // x ∈ S i }
i : ι
x✝ : ↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i ≠ 0
⊢ ↑((fun i => LinearMap.toAddMonoidHom ((fun i => Submodule.subtype (S i)) i)) i)
      (↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i) ∈
    ⨆ (_ : p i), S i
[PROOFSTEP]
by_cases hp : p i
[GOAL]
case pos
ι : Type u_1
R : Type u_2
S✝ : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Semiring R
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
p : ι → Prop
inst✝ : DecidablePred p
S : ι → Submodule R N
v : Π₀ (i : ι), { x // x ∈ S i }
i : ι
x✝ : ↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i ≠ 0
hp : p i
⊢ ↑((fun i => LinearMap.toAddMonoidHom ((fun i => Submodule.subtype (S i)) i)) i)
      (↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i) ∈
    ⨆ (_ : p i), S i
[PROOFSTEP]
simp [hp]
[GOAL]
case neg
ι : Type u_1
R : Type u_2
S✝ : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Semiring R
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
p : ι → Prop
inst✝ : DecidablePred p
S : ι → Submodule R N
v : Π₀ (i : ι), { x // x ∈ S i }
i : ι
x✝ : ↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i ≠ 0
hp : ¬p i
⊢ ↑((fun i => LinearMap.toAddMonoidHom ((fun i => Submodule.subtype (S i)) i)) i)
      (↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i) ∈
    ⨆ (_ : p i), S i
[PROOFSTEP]
simp [hp]
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Semiring R
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
p : ι → Submodule R N
inst✝ : (i : ι) → (x : { x // x ∈ p i }) → Decidable (x ≠ 0)
x : N
⊢ x ∈ iSup p ↔ ∃ f, (sum f fun i xi => ↑xi) = x
[PROOFSTEP]
rw [mem_iSup_iff_exists_dfinsupp]
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Semiring R
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
p : ι → Submodule R N
inst✝ : (i : ι) → (x : { x // x ∈ p i }) → Decidable (x ≠ 0)
x : N
⊢ (∃ f, ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) f = x) ↔ ∃ f, (sum f fun i xi => ↑xi) = x
[PROOFSTEP]
simp_rw [DFinsupp.lsum_apply_apply, DFinsupp.sumAddHom_apply, LinearMap.toAddMonoidHom_coe, coeSubtype]
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
⊢ a ∈ ⨆ (i : ι) (_ : i ∈ s), p i ↔ ∃ μ, ∑ i in s, ↑(μ i) = a
[PROOFSTEP]
classical
rw [Submodule.mem_iSup_iff_exists_dfinsupp']
constructor <;> rintro ⟨μ, hμ⟩
· use fun i => ⟨μ i, (iSup_const_le : _ ≤ p i) (coe_mem <| μ i)⟩
  rw [← hμ]
  symm
  apply Finset.sum_subset
  · intro x
    contrapose
    intro hx
    rw [mem_support_iff, not_ne_iff]
    ext
    rw [coe_zero, ← mem_bot R]
    suffices : ⊥ = ⨆ (_ : x ∈ s), p x
    · exact this.symm ▸ coe_mem (μ x)
    exact (iSup_neg hx).symm
  · intro x _ hx
    rw [mem_support_iff, not_ne_iff] at hx 
    rw [hx]
    rfl
· refine' ⟨DFinsupp.mk s _, _⟩
  · rintro ⟨i, hi⟩
    refine' ⟨μ i, _⟩
    rw [iSup_pos]
    · exact coe_mem _
    · exact hi
  simp only [DFinsupp.sum]
  rw [Finset.sum_subset support_mk_subset, ← hμ]
  exact Finset.sum_congr rfl fun x hx => congr_arg Subtype.val <| mk_of_mem hx
  · intro x _ hx
    rw [mem_support_iff, not_ne_iff] at hx 
    rw [hx]
    rfl
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
⊢ a ∈ ⨆ (i : ι) (_ : i ∈ s), p i ↔ ∃ μ, ∑ i in s, ↑(μ i) = a
[PROOFSTEP]
rw [Submodule.mem_iSup_iff_exists_dfinsupp']
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
⊢ (∃ f, (sum f fun i xi => ↑xi) = a) ↔ ∃ μ, ∑ i in s, ↑(μ i) = a
[PROOFSTEP]
constructor
[GOAL]
case mp
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
⊢ (∃ f, (sum f fun i xi => ↑xi) = a) → ∃ μ, ∑ i in s, ↑(μ i) = a
[PROOFSTEP]
rintro ⟨μ, hμ⟩
[GOAL]
case mpr
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
⊢ (∃ μ, ∑ i in s, ↑(μ i) = a) → ∃ f, (sum f fun i xi => ↑xi) = a
[PROOFSTEP]
rintro ⟨μ, hμ⟩
[GOAL]
case mp.intro
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
⊢ ∃ μ, ∑ i in s, ↑(μ i) = a
[PROOFSTEP]
use fun i => ⟨μ i, (iSup_const_le : _ ≤ p i) (coe_mem <| μ i)⟩
[GOAL]
case h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
⊢ ∑ i in s, ↑{ val := ↑(↑μ i), property := (_ : ↑(↑μ i) ∈ p i) } = a
[PROOFSTEP]
rw [← hμ]
[GOAL]
case h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
⊢ ∑ i in s, ↑{ val := ↑(↑μ i), property := (_ : ↑(↑μ i) ∈ p i) } = sum μ fun i xi => ↑xi
[PROOFSTEP]
symm
[GOAL]
case h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
⊢ (sum μ fun i xi => ↑xi) = ∑ i in s, ↑{ val := ↑(↑μ i), property := (_ : ↑(↑μ i) ∈ p i) }
[PROOFSTEP]
apply Finset.sum_subset
[GOAL]
case h.h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
⊢ support μ ⊆ s
[PROOFSTEP]
intro x
[GOAL]
case h.h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
x : ι
⊢ x ∈ support μ → x ∈ s
[PROOFSTEP]
contrapose
[GOAL]
case h.h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
x : ι
⊢ ¬x ∈ s → ¬x ∈ support μ
[PROOFSTEP]
intro hx
[GOAL]
case h.h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
x : ι
hx : ¬x ∈ s
⊢ ¬x ∈ support μ
[PROOFSTEP]
rw [mem_support_iff, not_ne_iff]
[GOAL]
case h.h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
x : ι
hx : ¬x ∈ s
⊢ ↑μ x = 0
[PROOFSTEP]
ext
[GOAL]
case h.h.a
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
x : ι
hx : ¬x ∈ s
⊢ ↑(↑μ x) = ↑0
[PROOFSTEP]
rw [coe_zero, ← mem_bot R]
[GOAL]
case h.h.a
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
x : ι
hx : ¬x ∈ s
⊢ ↑(↑μ x) ∈ ⊥
[PROOFSTEP]
suffices : ⊥ = ⨆ (_ : x ∈ s), p x
[GOAL]
case h.h.a
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
x : ι
hx : ¬x ∈ s
this : ⊥ = ⨆ (_ : x ∈ s), p x
⊢ ↑(↑μ x) ∈ ⊥
[PROOFSTEP]
exact this.symm ▸ coe_mem (μ x)
[GOAL]
case this
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
x : ι
hx : ¬x ∈ s
⊢ ⊥ = ⨆ (_ : x ∈ s), p x
[PROOFSTEP]
exact (iSup_neg hx).symm
[GOAL]
case h.hf
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
⊢ ∀ (x : ι), x ∈ s → ¬x ∈ support μ → (fun i xi => ↑xi) x (↑μ x) = 0
[PROOFSTEP]
intro x _ hx
[GOAL]
case h.hf
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
x : ι
a✝ : x ∈ s
hx : ¬x ∈ support μ
⊢ (fun i xi => ↑xi) x (↑μ x) = 0
[PROOFSTEP]
rw [mem_support_iff, not_ne_iff] at hx 
[GOAL]
case h.hf
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
x : ι
a✝ : x ∈ s
hx : ↑μ x = 0
⊢ (fun i xi => ↑xi) x (↑μ x) = 0
[PROOFSTEP]
rw [hx]
[GOAL]
case h.hf
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }
hμ : (sum μ fun i xi => ↑xi) = a
x : ι
a✝ : x ∈ s
hx : ↑μ x = 0
⊢ (fun i xi => ↑xi) x 0 = 0
[PROOFSTEP]
rfl
[GOAL]
case mpr.intro
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : (i : ι) → { x // x ∈ p i }
hμ : ∑ i in s, ↑(μ i) = a
⊢ ∃ f, (sum f fun i xi => ↑xi) = a
[PROOFSTEP]
refine' ⟨DFinsupp.mk s _, _⟩
[GOAL]
case mpr.intro.refine'_1
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : (i : ι) → { x // x ∈ p i }
hμ : ∑ i in s, ↑(μ i) = a
⊢ (i : ↑↑s) → { x // x ∈ ⨆ (_ : ↑i ∈ s), p ↑i }
[PROOFSTEP]
rintro ⟨i, hi⟩
[GOAL]
case mpr.intro.refine'_1.mk
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : (i : ι) → { x // x ∈ p i }
hμ : ∑ i in s, ↑(μ i) = a
i : ι
hi : i ∈ ↑s
⊢ { x // x ∈ ⨆ (_ : ↑{ val := i, property := hi } ∈ s), p ↑{ val := i, property := hi } }
[PROOFSTEP]
refine' ⟨μ i, _⟩
[GOAL]
case mpr.intro.refine'_1.mk
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : (i : ι) → { x // x ∈ p i }
hμ : ∑ i in s, ↑(μ i) = a
i : ι
hi : i ∈ ↑s
⊢ ↑(μ i) ∈ ⨆ (_ : ↑{ val := i, property := hi } ∈ s), p ↑{ val := i, property := hi }
[PROOFSTEP]
rw [iSup_pos]
[GOAL]
case mpr.intro.refine'_1.mk
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : (i : ι) → { x // x ∈ p i }
hμ : ∑ i in s, ↑(μ i) = a
i : ι
hi : i ∈ ↑s
⊢ ↑(μ i) ∈ p ↑{ val := i, property := hi }
[PROOFSTEP]
exact coe_mem _
[GOAL]
case mpr.intro.refine'_1.mk
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : (i : ι) → { x // x ∈ p i }
hμ : ∑ i in s, ↑(μ i) = a
i : ι
hi : i ∈ ↑s
⊢ ↑{ val := i, property := hi } ∈ s
[PROOFSTEP]
exact hi
[GOAL]
case mpr.intro.refine'_2
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : (i : ι) → { x // x ∈ p i }
hμ : ∑ i in s, ↑(μ i) = a
⊢ (sum
      (DFinsupp.mk s fun i =>
        Subtype.casesOn i fun i hi =>
          { val := ↑(μ i),
            property := (_ : ↑(μ i) ∈ ⨆ (_ : ↑{ val := i, property := hi } ∈ s), p ↑{ val := i, property := hi }) })
      fun i xi => ↑xi) =
    a
[PROOFSTEP]
simp only [DFinsupp.sum]
[GOAL]
case mpr.intro.refine'_2
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : (i : ι) → { x // x ∈ p i }
hμ : ∑ i in s, ↑(μ i) = a
⊢ ∑ x in
      support
        (DFinsupp.mk s fun i =>
          { val := ↑(μ ↑i),
            property :=
              (_ :
                ↑(μ ↑i) ∈
                  ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),
                    p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) }),
      ↑(↑(DFinsupp.mk s fun i =>
              { val := ↑(μ ↑i),
                property :=
                  (_ :
                    ↑(μ ↑i) ∈
                      ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),
                        p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })
          x) =
    a
[PROOFSTEP]
rw [Finset.sum_subset support_mk_subset, ← hμ]
[GOAL]
case mpr.intro.refine'_2
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : (i : ι) → { x // x ∈ p i }
hμ : ∑ i in s, ↑(μ i) = a
⊢ ∑ x in s,
      ↑(↑(DFinsupp.mk s fun i =>
              { val := ↑(μ ↑i),
                property :=
                  (_ :
                    ↑(μ ↑i) ∈
                      ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),
                        p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })
          x) =
    ∑ i in s, ↑(μ i)
case mpr.intro.refine'_2
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : (i : ι) → { x // x ∈ p i }
hμ : ∑ i in s, ↑(μ i) = a
⊢ ∀ (x : ι),
    x ∈ s →
      ¬x ∈
            support
              (DFinsupp.mk s fun i =>
                { val := ↑(μ ↑i),
                  property :=
                    (_ :
                      ↑(μ ↑i) ∈
                        ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),
                          p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) }) →
        ↑(↑(DFinsupp.mk s fun i =>
                  { val := ↑(μ ↑i),
                    property :=
                      (_ :
                        ↑(μ ↑i) ∈
                          ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),
                            p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })
              x) =
          0
[PROOFSTEP]
exact Finset.sum_congr rfl fun x hx => congr_arg Subtype.val <| mk_of_mem hx
[GOAL]
case mpr.intro.refine'_2
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : (i : ι) → { x // x ∈ p i }
hμ : ∑ i in s, ↑(μ i) = a
⊢ ∀ (x : ι),
    x ∈ s →
      ¬x ∈
            support
              (DFinsupp.mk s fun i =>
                { val := ↑(μ ↑i),
                  property :=
                    (_ :
                      ↑(μ ↑i) ∈
                        ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),
                          p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) }) →
        ↑(↑(DFinsupp.mk s fun i =>
                  { val := ↑(μ ↑i),
                    property :=
                      (_ :
                        ↑(μ ↑i) ∈
                          ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),
                            p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })
              x) =
          0
[PROOFSTEP]
intro x _ hx
[GOAL]
case mpr.intro.refine'_2
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : (i : ι) → { x // x ∈ p i }
hμ : ∑ i in s, ↑(μ i) = a
x : ι
a✝ : x ∈ s
hx :
  ¬x ∈
      support
        (DFinsupp.mk s fun i =>
          { val := ↑(μ ↑i),
            property :=
              (_ :
                ↑(μ ↑i) ∈
                  ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s), p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })
⊢ ↑(↑(DFinsupp.mk s fun i =>
            { val := ↑(μ ↑i),
              property :=
                (_ :
                  ↑(μ ↑i) ∈
                    ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),
                      p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })
        x) =
    0
[PROOFSTEP]
rw [mem_support_iff, not_ne_iff] at hx 
[GOAL]
case mpr.intro.refine'_2
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : (i : ι) → { x // x ∈ p i }
hμ : ∑ i in s, ↑(μ i) = a
x : ι
a✝ : x ∈ s
hx :
  ↑(DFinsupp.mk s fun i =>
          { val := ↑(μ ↑i),
            property :=
              (_ :
                ↑(μ ↑i) ∈
                  ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s), p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })
      x =
    0
⊢ ↑(↑(DFinsupp.mk s fun i =>
            { val := ↑(μ ↑i),
              property :=
                (_ :
                  ↑(μ ↑i) ∈
                    ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),
                      p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })
        x) =
    0
[PROOFSTEP]
rw [hx]
[GOAL]
case mpr.intro.refine'_2
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset ι
p : ι → Submodule R N
a : N
μ : (i : ι) → { x // x ∈ p i }
hμ : ∑ i in s, ↑(μ i) = a
x : ι
a✝ : x ∈ s
hx :
  ↑(DFinsupp.mk s fun i =>
          { val := ↑(μ ↑i),
            property :=
              (_ :
                ↑(μ ↑i) ∈
                  ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s), p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })
      x =
    0
⊢ ↑0 = 0
[PROOFSTEP]
rfl
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
⊢ Independent p ↔
    ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
      ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
[PROOFSTEP]
simp_rw [CompleteLattice.independent_def, Submodule.disjoint_def, Submodule.mem_biSup_iff_exists_dfinsupp, exists_imp,
  filter_ne_eq_erase]
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
⊢ (∀ (i : ι) (x : N),
      x ∈ p i →
        ∀ (x_1 : Π₀ (i : ι), { x // x ∈ p i }),
          ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i x_1) = x → x = 0) ↔
    ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
      ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
[PROOFSTEP]
refine' forall_congr' fun i => Subtype.forall'.trans _
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
i : ι
⊢ (∀ (x : { a // a ∈ p i }) (x_1 : Π₀ (i : ι), { x // x ∈ p i }),
      ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i x_1) = ↑x → ↑x = 0) ↔
    ∀ (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
      ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
[PROOFSTEP]
simp_rw [Submodule.coe_eq_zero]
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
h : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
⊢ Independent p
[PROOFSTEP]
rw [independent_iff_forall_dfinsupp]
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
h : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
⊢ ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
[PROOFSTEP]
intro i x v hv
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
h : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
i : ι
x : { x // x ∈ p i }
v : Π₀ (i : ι), { x // x ∈ p i }
hv : ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x
⊢ x = 0
[PROOFSTEP]
replace hv :
  lsum ℕ (M := fun i ↦ ↥(p i)) (fun i => (p i).subtype) (erase i v) =
    lsum ℕ (M := fun i ↦ ↥(p i)) (fun i => (p i).subtype) (single i x)
[GOAL]
case hv
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
h : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
i : ι
x : { x // x ∈ p i }
v : Π₀ (i : ι), { x // x ∈ p i }
hv : ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x
⊢ ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (single i x)
[PROOFSTEP]
simpa only [lsum_single] using hv
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
h : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
i : ι
x : { x // x ∈ p i }
v : Π₀ (i : ι), { x // x ∈ p i }
hv :
  ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (single i x)
⊢ x = 0
[PROOFSTEP]
have := FunLike.ext_iff.mp (h hv) i
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
h : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
i : ι
x : { x // x ∈ p i }
v : Π₀ (i : ι), { x // x ∈ p i }
hv :
  ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (single i x)
this : ↑(erase i v) i = ↑(single i x) i
⊢ x = 0
[PROOFSTEP]
simpa [eq_comm] using this
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → AddSubmonoid N
h : Function.Injective ↑(sumAddHom fun i => AddSubmonoid.subtype (p i))
⊢ Independent p
[PROOFSTEP]
rw [← independent_map_orderIso_iff (AddSubmonoid.toNatSubmodule : AddSubmonoid N ≃o _)]
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → AddSubmonoid N
h : Function.Injective ↑(sumAddHom fun i => AddSubmonoid.subtype (p i))
⊢ Independent (↑AddSubmonoid.toNatSubmodule ∘ p)
[PROOFSTEP]
exact independent_of_dfinsupp_lsum_injective _ h
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Semiring R
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
inst✝ : (m : R) → Decidable (m ≠ 0)
p : ι → Submodule R N
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
⊢ LinearMap.comp (↑(lsum ℕ) fun i => Submodule.subtype (p i))
      (LinearMap.comp
        (mapRange.linearMap fun i =>
          LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })
        ↑(finsuppLequivDFinsupp R)) =
    Finsupp.total ι N R v
[PROOFSTEP]
ext
[GOAL]
case h.h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Semiring R
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
inst✝ : (m : R) → Decidable (m ≠ 0)
p : ι → Submodule R N
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
a✝ : ι
⊢ ↑(LinearMap.comp
          (LinearMap.comp (↑(lsum ℕ) fun i => Submodule.subtype (p i))
            (LinearMap.comp
              (mapRange.linearMap fun i =>
                LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })
              ↑(finsuppLequivDFinsupp R)))
          (Finsupp.lsingle a✝))
      1 =
    ↑(LinearMap.comp (Finsupp.total ι N R v) (Finsupp.lsingle a✝)) 1
[PROOFSTEP]
simp
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → AddSubgroup N
h : Function.Injective ↑(sumAddHom fun i => AddSubgroup.subtype (p i))
⊢ Independent p
[PROOFSTEP]
rw [← independent_map_orderIso_iff (AddSubgroup.toIntSubmodule : AddSubgroup N ≃o _)]
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → AddSubgroup N
h : Function.Injective ↑(sumAddHom fun i => AddSubgroup.subtype (p i))
⊢ Independent (↑AddSubgroup.toIntSubmodule ∘ p)
[PROOFSTEP]
exact independent_of_dfinsupp_lsum_injective _ h
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → Submodule R N
h : Independent p
⊢ Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
[PROOFSTEP]
rw [independent_iff_forall_dfinsupp] at h 
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → Submodule R N
h✝ : Independent p
h :
  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
⊢ Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
[PROOFSTEP]
suffices LinearMap.ker (lsum ℕ (M := fun i ↦ ↥(p i)) fun i => (p i).subtype) = ⊥ by
  -- Lean can't find this without our help
  letI thisI : AddCommGroup (Π₀ i, p i) := inferInstance
  rw [LinearMap.ker_eq_bot] at this 
  exact this
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → Submodule R N
h✝ : Independent p
h :
  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
this : LinearMap.ker (↑(lsum ℕ) fun i => Submodule.subtype (p i)) = ⊥
⊢ Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
[PROOFSTEP]
letI thisI : AddCommGroup (Π₀ i, p i) := inferInstance
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → Submodule R N
h✝ : Independent p
h :
  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
this : LinearMap.ker (↑(lsum ℕ) fun i => Submodule.subtype (p i)) = ⊥
thisI : AddCommGroup (Π₀ (i : ι), { x // x ∈ p i }) := inferInstance
⊢ Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
[PROOFSTEP]
rw [LinearMap.ker_eq_bot] at this 
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → Submodule R N
h✝ : Independent p
h :
  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
thisI : AddCommGroup (Π₀ (i : ι), { x // x ∈ p i }) := inferInstance
this : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
⊢ Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
[PROOFSTEP]
exact this
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → Submodule R N
h✝ : Independent p
h :
  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
⊢ LinearMap.ker (↑(lsum ℕ) fun i => Submodule.subtype (p i)) = ⊥
[PROOFSTEP]
rw [LinearMap.ker_eq_bot']
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → Submodule R N
h✝ : Independent p
h :
  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
⊢ ∀ (m : Π₀ (i : ι), { x // x ∈ p i }), ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) m = 0 → m = 0
[PROOFSTEP]
intro m hm
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → Submodule R N
h✝ : Independent p
h :
  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
m : Π₀ (i : ι), { x // x ∈ p i }
hm : ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) m = 0
⊢ m = 0
[PROOFSTEP]
ext i : 1
  -- split `m` into the piece at `i` and the pieces elsewhere, to match `h`
[GOAL]
case h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → Submodule R N
h✝ : Independent p
h :
  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
m : Π₀ (i : ι), { x // x ∈ p i }
hm : ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) m = 0
i : ι
⊢ ↑m i = ↑0 i
[PROOFSTEP]
rw [DFinsupp.zero_apply, ← neg_eq_zero]
[GOAL]
case h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → Submodule R N
h✝ : Independent p
h :
  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
m : Π₀ (i : ι), { x // x ∈ p i }
hm : ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) m = 0
i : ι
⊢ -↑m i = 0
[PROOFSTEP]
refine' h i (-m i) m _
[GOAL]
case h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → Submodule R N
h✝ : Independent p
h :
  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
m : Π₀ (i : ι), { x // x ∈ p i }
hm : ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) m = 0
i : ι
⊢ ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i m) = ↑(-↑m i)
[PROOFSTEP]
rwa [← erase_add_single i m, LinearMap.map_add, lsum_single, Submodule.subtype_apply, add_eq_zero_iff_eq_neg, ←
  Submodule.coe_neg] at hm 
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → AddSubgroup N
h : Independent p
⊢ Function.Injective ↑(sumAddHom fun i => AddSubgroup.subtype (p i))
[PROOFSTEP]
rw [← independent_map_orderIso_iff (AddSubgroup.toIntSubmodule : AddSubgroup N ≃o _)] at h 
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝² : Ring R
inst✝¹ : AddCommGroup N
inst✝ : Module R N
p : ι → AddSubgroup N
h : Independent (↑AddSubgroup.toIntSubmodule ∘ p)
⊢ Function.Injective ↑(sumAddHom fun i => AddSubgroup.subtype (p i))
[PROOFSTEP]
exact h.dfinsupp_lsum_injective
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Ring R
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : NoZeroSMulDivisors R N
p : ι → Submodule R N
hp : Independent p
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
hv' : ∀ (i : ι), v i ≠ 0
⊢ LinearIndependent R v
[PROOFSTEP]
let _ := Classical.decEq ι
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Ring R
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : NoZeroSMulDivisors R N
p : ι → Submodule R N
hp : Independent p
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
hv' : ∀ (i : ι), v i ≠ 0
x✝ : DecidableEq ι := Classical.decEq ι
⊢ LinearIndependent R v
[PROOFSTEP]
let _ := Classical.decEq R
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Ring R
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : NoZeroSMulDivisors R N
p : ι → Submodule R N
hp : Independent p
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
hv' : ∀ (i : ι), v i ≠ 0
x✝¹ : DecidableEq ι := Classical.decEq ι
x✝ : DecidableEq R := Classical.decEq R
⊢ LinearIndependent R v
[PROOFSTEP]
rw [linearIndependent_iff]
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Ring R
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : NoZeroSMulDivisors R N
p : ι → Submodule R N
hp : Independent p
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
hv' : ∀ (i : ι), v i ≠ 0
x✝¹ : DecidableEq ι := Classical.decEq ι
x✝ : DecidableEq R := Classical.decEq R
⊢ ∀ (l : ι →₀ R), ↑(Finsupp.total ι N R v) l = 0 → l = 0
[PROOFSTEP]
intro l hl
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Ring R
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : NoZeroSMulDivisors R N
p : ι → Submodule R N
hp : Independent p
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
hv' : ∀ (i : ι), v i ≠ 0
x✝¹ : DecidableEq ι := Classical.decEq ι
x✝ : DecidableEq R := Classical.decEq R
l : ι →₀ R
hl : ↑(Finsupp.total ι N R v) l = 0
⊢ l = 0
[PROOFSTEP]
let a := DFinsupp.mapRange.linearMap (fun i => LinearMap.toSpanSingleton R (p i) ⟨v i, hv i⟩) l.toDFinsupp
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Ring R
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : NoZeroSMulDivisors R N
p : ι → Submodule R N
hp : Independent p
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
hv' : ∀ (i : ι), v i ≠ 0
x✝¹ : DecidableEq ι := Classical.decEq ι
x✝ : DecidableEq R := Classical.decEq R
l : ι →₀ R
hl : ↑(Finsupp.total ι N R v) l = 0
a : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=
  ↑(mapRange.linearMap fun i =>
        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })
    (Finsupp.toDFinsupp l)
⊢ l = 0
[PROOFSTEP]
have ha : a = 0 := by
  apply hp.dfinsupp_lsum_injective
  rwa [← lsum_comp_mapRange_toSpanSingleton _ hv] at hl 
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Ring R
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : NoZeroSMulDivisors R N
p : ι → Submodule R N
hp : Independent p
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
hv' : ∀ (i : ι), v i ≠ 0
x✝¹ : DecidableEq ι := Classical.decEq ι
x✝ : DecidableEq R := Classical.decEq R
l : ι →₀ R
hl : ↑(Finsupp.total ι N R v) l = 0
a : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=
  ↑(mapRange.linearMap fun i =>
        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })
    (Finsupp.toDFinsupp l)
⊢ a = 0
[PROOFSTEP]
apply hp.dfinsupp_lsum_injective
[GOAL]
case a
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Ring R
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : NoZeroSMulDivisors R N
p : ι → Submodule R N
hp : Independent p
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
hv' : ∀ (i : ι), v i ≠ 0
x✝¹ : DecidableEq ι := Classical.decEq ι
x✝ : DecidableEq R := Classical.decEq R
l : ι →₀ R
hl : ↑(Finsupp.total ι N R v) l = 0
a : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=
  ↑(mapRange.linearMap fun i =>
        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })
    (Finsupp.toDFinsupp l)
⊢ ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) a = ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) 0
[PROOFSTEP]
rwa [← lsum_comp_mapRange_toSpanSingleton _ hv] at hl 
[GOAL]
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Ring R
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : NoZeroSMulDivisors R N
p : ι → Submodule R N
hp : Independent p
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
hv' : ∀ (i : ι), v i ≠ 0
x✝¹ : DecidableEq ι := Classical.decEq ι
x✝ : DecidableEq R := Classical.decEq R
l : ι →₀ R
hl : ↑(Finsupp.total ι N R v) l = 0
a : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=
  ↑(mapRange.linearMap fun i =>
        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })
    (Finsupp.toDFinsupp l)
ha : a = 0
⊢ l = 0
[PROOFSTEP]
ext i
[GOAL]
case h
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Ring R
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : NoZeroSMulDivisors R N
p : ι → Submodule R N
hp : Independent p
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
hv' : ∀ (i : ι), v i ≠ 0
x✝¹ : DecidableEq ι := Classical.decEq ι
x✝ : DecidableEq R := Classical.decEq R
l : ι →₀ R
hl : ↑(Finsupp.total ι N R v) l = 0
a : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=
  ↑(mapRange.linearMap fun i =>
        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })
    (Finsupp.toDFinsupp l)
ha : a = 0
i : ι
⊢ ↑l i = ↑0 i
[PROOFSTEP]
apply smul_left_injective R (hv' i)
[GOAL]
case h.a
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Ring R
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : NoZeroSMulDivisors R N
p : ι → Submodule R N
hp : Independent p
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
hv' : ∀ (i : ι), v i ≠ 0
x✝¹ : DecidableEq ι := Classical.decEq ι
x✝ : DecidableEq R := Classical.decEq R
l : ι →₀ R
hl : ↑(Finsupp.total ι N R v) l = 0
a : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=
  ↑(mapRange.linearMap fun i =>
        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })
    (Finsupp.toDFinsupp l)
ha : a = 0
i : ι
⊢ (fun c => c • v i) (↑l i) = (fun c => c • v i) (↑0 i)
[PROOFSTEP]
have : l i • v i = a i := rfl
[GOAL]
case h.a
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Ring R
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : NoZeroSMulDivisors R N
p : ι → Submodule R N
hp : Independent p
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
hv' : ∀ (i : ι), v i ≠ 0
x✝¹ : DecidableEq ι := Classical.decEq ι
x✝ : DecidableEq R := Classical.decEq R
l : ι →₀ R
hl : ↑(Finsupp.total ι N R v) l = 0
a : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=
  ↑(mapRange.linearMap fun i =>
        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })
    (Finsupp.toDFinsupp l)
ha : a = 0
i : ι
this : ↑l i • v i = ↑(↑a i)
⊢ (fun c => c • v i) (↑l i) = (fun c => c • v i) (↑0 i)
[PROOFSTEP]
simp only [coe_zero, Pi.zero_apply, ZeroMemClass.coe_zero, smul_eq_zero, ha] at this 
[GOAL]
case h.a
ι : Type u_1
R : Type u_2
S : Type u_3
M : ι → Type u_4
N : Type u_5
dec_ι : DecidableEq ι
inst✝³ : Ring R
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : NoZeroSMulDivisors R N
p : ι → Submodule R N
hp : Independent p
v : ι → N
hv : ∀ (i : ι), v i ∈ p i
hv' : ∀ (i : ι), v i ≠ 0
x✝¹ : DecidableEq ι := Classical.decEq ι
x✝ : DecidableEq R := Classical.decEq R
l : ι →₀ R
hl : ↑(Finsupp.total ι N R v) l = 0
a : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=
  ↑(mapRange.linearMap fun i =>
        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })
    (Finsupp.toDFinsupp l)
ha : a = 0
i : ι
this : ↑l i = 0 ∨ v i = 0
⊢ (fun c => c • v i) (↑l i) = (fun c => c • v i) (↑0 i)
[PROOFSTEP]
simpa
