
theorem lemaddx:
for F being Field
for U,V being VectSp of F
for B being non empty finite Subset of U
for f being Function of B,V
for l1,l2,l3 being Linear_Combination of B
st l3 = l1 + l2 holds (f (#) l3) = (f (#) l1) + (f (#) l2)
proof
let F be Field, U,V be VectSp of F, B be non empty finite Subset of U;
let f be Function of B,V; let l1,l2,l3 be Linear_Combination of B;
assume AS: l3 = l1 + l2;
U: dom l1 = the carrier of U & dom l2 = the carrier of U &
   dom l3 = the carrier of U by FUNCT_2:def 1;
now let v be Element of V;
  per cases;
  suppose v in rng f; then

consider x being object such that
    C1: x in dom f & f.x = v by FUNCT_1:def 3;
    reconsider u = x as Element of B by C1;
    set T3 = Expand(f,l3,v), T1 = Expand(f,l1,v), T2 = Expand(f,l2,v);

    V: len(canFS f"{v}) = card(f"{v}) by FINSEQ_1:93;
    rng(canFS f"{v}) = f"{v} & f"{v} c= B &
      B c= the carrier of U by FUNCT_2:def 3; then
    W: rng(canFS f"{v}) c= dom l1 & rng(canFS f"{v}) c= dom l2 &
       rng(canFS f"{v}) c= dom l3 by U; then
    K: len T1 = card(f"{v}) by V,FINSEQ_2:29
             .= len T2 by V,W,FINSEQ_2:29;
    KP:   len T1 = card(f"{v}) by W,V,FINSEQ_2:29
             .= len T3 by V,W,FINSEQ_2:29;
  E: now let i be Nat;
       assume E0:i in dom T1; then
       E1: i in dom(canFS f"{v}) by FUNCT_1:11; then
       E2: (canFS f"{v}).i in rng(canFS f"{v}) by FUNCT_1:3;
       rng(canFS f"{v}) = f"{v} & f"{v} c= B &
         B c= the carrier of U by FUNCT_2:def 3;
       then reconsider w = (canFS f"{v}).i as Element of U by E2;
       E3: T1/.i = (l1 * (canFS f"{v})).i by E0,PARTFUN1:def 6
                .= l1.w by E1,FUNCT_1:13;
       w in dom l2 by U; then
       i in dom(l2 * (canFS f"{v})) by E1,FUNCT_1:11; then
       E4: T2/.i = (l2 * (canFS f"{v})).i by PARTFUN1:def 6
                .= l2.w by E1,FUNCT_1:13;
       thus T3.i = l3.((canFS f"{v}).i) by E1,FUNCT_1:13
                .= T1/.i + T2/.i by E3,E4,AS,VECTSP_6:22;
       end;
    C: Sum T3 = Sum T1 + Sum T2 by E,K,KP,RLVECT_2:2;
    thus (f (#) l3).v = Sum T3 by defK
                     .= Sum T1 + (f (#) l2).v by C,defK
                     .= (f (#) l1).v + (f (#) l2).v by defK
                     .= ((f (#) l1) + (f (#) l2)).v by VECTSP_6:22;
    end;
  suppose C0: not v in rng f; then
    (f (#) l1).v = 0.F by lemadd2b;
    hence ((f (#) l1) + (f (#) l2)).v
        = 0.F + (f (#) l2).v by VECTSP_6:22
       .= 0.F by C0,lemadd2b
       .= (f (#) l3).v by C0,lemadd2b;
    end;
  end;
hence thesis by VECTSP_6:def 7;
end;
