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 Th18:
  (h,1) +...+ (h,len h) = Sum h
proof
  set L=len h;
  per cases;
  suppose A1:L >=1;
    then consider w be complex-valued FinSequence such that
    A2:(h,1) +...+ (h,L) = Sum w & len w = L-'1+1 and
    A3:w.(0+1) = h.(0+1) & ... & w.(L-'1+1) = h.(L-'1+1) by Th9;
    A4:L-'1+1 = L-1+1 by A1,NAT_D:34;
    now let i such that A5:1<=i & i <= L;
      reconsider i1=i-1 as Nat by A5;
      w.(i1+1) =h.(i1+1) by A4,A5,XREAL_1:6,A3;
      hence  h.i=w.i;
    end;
    then h=w by A4,A2;
    hence thesis by A2;
  end;
  suppose L <1;
    then h=<*>REAL by FINSEQ_1:20;
    hence thesis by RVSUM_1:72,Def1;
  end;
end;
