reserve x,y for set;
reserve a,b for Real;
reserve i,j for Integer;
reserve V for RealLinearSpace;
reserve W1,W2,W3 for Subspace of V;
reserve v,v1,v2,v3,u,w,w1,w2,w3 for VECTOR of V;
reserve A,B,C for Subset of V;
reserve L,L1,L2 for Linear_Combination of V;
reserve l,l1,l2 for Linear_Combination of A;

theorem Th30:
for RS be RealLinearSpace,
      f be FinSequence of RS,
       i be Nat st i in Seg (len f) holds f/.i in Z_Lin(f)
proof
  let RS be RealLinearSpace, f be FinSequence of RS;
  let i be Nat;
  assume A1: i in Seg (len f);
  set s = ( (Seg len f) --> 0) +* ( {i} --> 1);
A2:dom s = Seg len f
  proof
  dom s = dom ((Seg (len f)) --> 0) \/ dom( {i} -->1) by FUNCT_4:def 1
  .= (Seg (len f)) \/ dom( {i} -->1) by FUNCOP_1:13
  .= (Seg (len f)) \/ {i} by FUNCOP_1:13;
  hence thesis by A1,ZFMISC_1:40;
end; then
A3: s is FinSequence-like;
rng s c= INT by INT_1:def 2;
then
reconsider s as FinSequence of INT by A3,FINSEQ_1:def 4;
  len s = len f by A2,FINSEQ_1:def 3; then
 reconsider s as (len f)-element INT-valued FinSequence by CARD_1:def 7;
  defpred Q[Nat,set] means $2=s.$1*f/.$1;
A6: for k be Nat st k in Seg (len f) holds
      ex x being Element of RS st Q[k,x];
  consider w be FinSequence of RS such that
A7: dom w = Seg len f & for i be Nat st i in Seg (len f) holds
          Q[i,w.i] from FINSEQ_1:sch 5(A6);
A8:len w = len f by A7,FINSEQ_1:def 3;
 then reconsider w as (len f)-element FinSequence of RS by CARD_1:def 7;
now let i be Nat;
   assume A9: i in Seg len f;
     hence w/.i=w.i by A7,PARTFUN1:def 6
        .=s.i*f/.i by A7,A9;
end; then
A10:Sum(w) in Z_Lin(f);
A11:w = ( (Seg (len w)) --> 0.RS) +* ( {i} --> f/.i)
proof
  consider w1 be Function such that A12: w1 = (( Seg (len f)) --> 0.RS);
  A13: dom w1 = Seg (len f) by A12,FUNCOP_1:13;
  consider w2 be Function such that A14: w2 = ( {i} --> f/.i);
  A15: dom w2 = {i} by A14,FUNCOP_1:13;
  consider ww be Function such that A16: ww = w1 +* w2;
  A17: dom ww = Seg (len f) \/ {i} by A13,A15,A16,FUNCT_4:def 1
  .= Seg (len f) by A1,ZFMISC_1:40; then
  reconsider ww as FinSequence by FINSEQ_1:def 2;
  rng w1 c= {0.RS} by A12,FUNCOP_1:13;
  then A18: rng w1 c= (the carrier of RS) by XBOOLE_1:1;
  rng w2 c= {f/.i} by A14,FUNCOP_1:13;
  then A19: rng w2 c= (the carrier of RS) by XBOOLE_1:1;
  A20: rng ww c= rng w1 \/ rng w2 by A16,FUNCT_4:17;
  rng w1 \/ rng w2 c= (the carrier of RS) by A18,A19,XBOOLE_1:8;
  then rng ww c= (the carrier of RS) by A20;
  then
  reconsider ww as FinSequence of RS by FINSEQ_1:def 4;
  for j being Nat st j in dom w holds w/.j = ww/.j
  proof
    let j be Nat such that A21: j in dom w;
    A22: dom({i} --> 1) ={i} by FUNCOP_1:13;
    per cases;
    suppose A23: j in dom w2;
      then A24: j = i by A15,TARSKI:def 1;
      then w/.j = w.i by A21,PARTFUN1:def 6;
      then A25: w/.j = s.i*f/.i by A7,A21,A24;
      A26:i in {i} by TARSKI:def 1;
      then A27: s.i = ({i} --> 1).i by A22,FUNCT_4:13
      .= 1 by A26,FUNCOP_1:7;
      ww/.j = ww.j by A7,A17,A21,PARTFUN1:def 6
      .= w2.j by A16,A23,FUNCT_4:13
      .= f/.i by A14,A15,A23,FUNCOP_1:7;
      hence thesis by A25,A27,RLVECT_1:def 8;
    end;
    suppose A28: not j in dom w2;
      w/.j = w.j by A21,PARTFUN1:def 6;
      then A29: w/.j = s.j*f/.j by A7,A21;
      not j in dom({i} --> 1) by A15,A28;
      then A30: s.j = ( (Seg (len f)) --> 0).j by FUNCT_4:11
      .= 0 by A7,A21,FUNCOP_1:7;
      ww/.j = ww.j by A7,A17,A21,PARTFUN1:def 6
      .= w1.j by A16,A28,FUNCT_4:11
      .= 0.RS by A7,A12,A21,FUNCOP_1:7;
      hence thesis by A29,A30,RLVECT_1:10;
    end;
  end;
  hence thesis by A7,A8,A12,A14,A16,A17,FINSEQ_5:12;
end;
i in Seg (len w) by A7,A1,FINSEQ_1:def 3;
hence f/.i in Z_Lin(f) by A10,A11,Th29;
end;
