reserve V,W for Z_Module;

theorem
  for F,G being FinSequence of INT, v be Integer holds
  len F = len G + 1 & G = F | (dom G) & v = F.(len F) implies
  Sum(F) = Sum(G) + v
  proof
    let F,G be FinSequence of INT, v be Integer;
    assume that
    A1: len F = len G + 1 and
    A2: G = F | (dom G) and
    A3: v = F.(len F);
    reconsider Fr = F, Gr = G as real-valued FinSequence;
    reconsider vr = v as Real;
    set k = len G;
    dom G = Seg k by FINSEQ_1:def 3;
    then Fr = Gr^<*vr*> by A1,A2,A3,FINSEQ_3:55;
    hence thesis by RVSUM_1:74;
  end;
