reserve x,y for object,
        D,D1,D2 for non empty set,
        i,j,k,m,n for Nat,
        f,g for FinSequence of D*,
        f1 for FinSequence of D1*,
        f2 for FinSequence of D2*;
reserve f for complex-valued Function,
        g,h for complex-valued FinSequence;

theorem Th9:
   k <= n implies ex h st
       (f,k) +...+ (f,n) = Sum h & len h = n-'k+1 &
       (h.(0+1) = f.(0+k) & ... & h.(n-'k+1) = f.(n-'k+k))
proof
  assume A1: k <= n;
  deffunc P(Nat) = f.(k+$1-1);
  set nk=n-'k+1;
  consider p be FinSequence such that
  A2: len p = nk & for i st i in dom p holds p.i=P(i) from   FINSEQ_1:sch 2;
  rng p c= COMPLEX
  proof
    let y be object;
    assume y in rng p;
    then consider x be object such that
    A4: x in dom p & p.x = y by FUNCT_1:def 3;
    reconsider x as Nat by A4;
    p.x = f.(k+x-1) by A4,A2;
    hence thesis by A4, XCMPLX_0:def 2;
  end;
  then reconsider p as complex-valued FinSequence by VALUED_0:def 1;
  A5:p.(1+0) = f.(k+0) & ... & p.(1+(n-'k)) = f.(k+(n-'k))
  proof
    let i;
    assume 0 <= i & i <= n-'k;
    then 1<= i+1 & i+1 <= nk by NAT_1:11,XREAL_1:6;
    then p.(i+1) = f.(k+(i+1)-1) by A2,FINSEQ_3:25;
    hence p.(1+i) = f.(k+i);
  end;
  then (f,k) +...+ (f,n) = Sum (p | (n-'k+1)) by A1,Def1;
  then Sum p = (f,k) +...+ (f,n) by FINSEQ_1:58,A2;
  hence thesis by A2,A5;
end;
