reserve i,j,m,n,k for Nat,
  x,y for set,
  K for Field,
  a for Element of K;
reserve V for non trivial VectSp of K,
  V1,V2 for VectSp of K,
  f for linear-transformation of V1,V1,
  v,w for Vector of V,
  v1 for Vector of V1,
  L for Scalar of K;
reserve S for 1-sorted,
  F for Function of S,S;

theorem Th41:
  for A be Subset of V1 for L be Linear_Combination of V2, f be
linear-transformation of V1,V2 st Carrier L c= f.:A ex M be Linear_Combination
  of A st f.(Sum M)=Sum L
proof
  let A be Subset of V1;
  let L be Linear_Combination of V2, f be linear-transformation of V1,V2 such
  that
A1: Carrier L c= f.:A;
  set C=Carrier L;
  consider F be FinSequence of the carrier of V2 such that
A2: F is one-to-one and
A3: rng F = Carrier(L) and
A4: Sum L = Sum(L (#) F) by VECTSP_6:def 6;
  defpred P[object,object] means $2 in A & f.$2=F.$1;
:: obciecie funkcji ??? !!!
  set D=dom F;
A5: for x being object st x in D
ex y being object st y in the carrier of V1 & P[x,y]
  proof
    let x be object;
    assume x in D;
    then F.x in rng F by FUNCT_1:def 3;
    then consider y being object such that
    y in dom f and
A6: y in A & f.y=F.x by A1,A3,FUNCT_1:def 6;
    take y;
    thus thesis by A6;
  end;
  consider p be Function of D,the carrier of V1 such that
A7: for x being object st x in D holds P[x,p.x] from FUNCT_2:sch 1(A5);
A8: rng p c= the carrier of V1 by RELAT_1:def 19;
A9: dom p=D by FUNCT_2:def 1;
  D=Seg len F by FINSEQ_1:def 3;
  then reconsider p as FinSequence by A9,FINSEQ_1:def 2;
  reconsider p as FinSequence of V1 by A8,FINSEQ_1:def 4;
A10: now
    let x1,x2 be object such that
A11: x1 in dom p & x2 in dom p and
A12: p.x1=p.x2;
    f.(p.x1)=F.x1 & f.(p.x2)=F.x2 by A7,A9,A11;
    hence x1=x2 by A2,A9,A11,A12,FUNCT_1:def 4;
  end;
  then
A13: p is one-to-one by FUNCT_1:def 4;
  reconsider RNG=rng p as finite Subset of V1 by RELAT_1:def 19;
  defpred Q[object,object] means
   ( $1 in rng p implies for x st x in D & p.x=$1
  holds $2=L.(F.x)) & ( not $1 in rng p implies $2=0.K);
A14: for x being object st x in the carrier of V1
   ex y being object st y in the carrier of K & Q[x,y]
  proof
    let x be object;
    assume x in the carrier of V1;
    then reconsider v1=x as Vector of V1;
    per cases;
    suppose
A15:  not v1 in rng p;
      take 0.K;
      thus thesis by A15;
    end;
    suppose
A16:  v1 in rng p;
      then consider y being object such that
A17:  y in dom p & p.y=v1 by FUNCT_1:def 3;
      take L.(F.y);
      L.(F/.y) in the carrier of K;
      hence thesis by A9,A10,A16,A17,PARTFUN1:def 6;
    end;
  end;
  consider M be Function of V1,K such that
A18: for x being object st x in the carrier of V1 holds Q[x,M.x]
from FUNCT_2:sch 1(
  A14 );
  reconsider M as Element of Funcs(the carrier of V1, the carrier of K) by
FUNCT_2:8;
  for v1 be Element of V1 st not v1 in RNG holds M.v1 = 0.K by A18;
  then reconsider M as Linear_Combination of V1 by VECTSP_6:def 1;
A19: Carrier M= RNG
  proof
    thus Carrier M c= RNG
    proof
      let x be object such that
A20:  x in Carrier M;
      reconsider v1=x as Vector of V1 by A20;
      M.v1 <>0.K by A20,VECTSP_6:2;
      hence thesis by A18;
    end;
    let y be object such that
A21: y in RNG;
    reconsider v1=y as Vector of V1 by A21;
    consider x being object such that
A22: x in D and
A23: p.x=v1 by A9,A21,FUNCT_1:def 3;
    F.x in C by A3,A22,FUNCT_1:def 3;
    then
A24: L.(F.x)<>0.K by VECTSP_6:2;
    M.v1= L.(F.x) by A18,A21,A22,A23;
    hence thesis by A24;
  end;
  RNG c= A
  proof
    let y be object;
    assume y in RNG;
    then ex x being object st x in D & p.x=y by A9,FUNCT_1:def 3;
    hence thesis by A7;
  end;
  then reconsider M as Linear_Combination of A by A19,VECTSP_6:def 4;
  len (M(#)p)=len p by VECTSP_6:def 5;
  then
A25: dom (M(#)p)=D by A9,FINSEQ_3:29;
  len (L(#)F) =len F by VECTSP_6:def 5;
  then
A26: dom (L(#)F) = D by FINSEQ_3:29;
A27: now
    let x be object such that
A28: x in D;
    reconsider i=x as Element of NAT by A28;
A29: F.i=F/.i by A28,PARTFUN1:def 6;
    p.i in RNG by A9,A28,FUNCT_1:def 3;
    then
A30: M.(p.i)=L.(F.i) by A18,A28;
A31: p/.i=p.i & f.(p.i)=F.i by A7,A9,A28,PARTFUN1:def 6;
    thus (f*(M(#)p)).x = f.((M(#)p).i) by A25,A28,FUNCT_1:13
      .= f.(M.(p/.i)*p/.i) by A25,A28,VECTSP_6:def 5
      .= L.(F/.i) *F/.i by A31,A29,A30,MOD_2:def 2
      .= (L(#)F).x by A26,A28,VECTSP_6:def 5;
  end;
  take M;
  dom f=[#]V1 & rng (M(#)p) c= [#]V1 by FUNCT_2:def 1,RELAT_1:def 19;
  then dom(f*(M(#)p))=dom(M(#)p) by RELAT_1:27;
  then f*(M(#)p) = L(#)F by A26,A25,A27,FUNCT_1:2;
  hence Sum L = f.(Sum(M(#)p)) by A4,MATRLIN:16
    .= f.(Sum M) by A13,A19,VECTSP_6:def 6;
end;
