reserve n,m,k for Nat;
reserve a,p,r for Real;
reserve s,s1,s2,s3 for Real_Sequence;

theorem
  s is summable implies
   for n holds Sum(s) = Partial_Sums(s).n + Sum(s^\(n+1))
proof
  defpred X[Nat] means
Sum(s) = Partial_Sums(s).$1 + Sum(s^\($1+1));
  assume
A1: s is summable;
A2: for n st X[n] holds X[n+1]
  proof
    let n;
    assume
A3: Sum(s) = Partial_Sums(s).n + Sum(s^\(n+1));
    set s1 = seq_const (s^\(n+1)).0;
    for k holds s1.k= (s^\(n+1)).0 by SEQ_1:57;
    then
A4: Partial_Sums(s^\(n+1)^\1) = (Partial_Sums(s^\(n+1))^\1) - s1 by Th11;
    s^\(n+1) is summable by A1,Th12;
    then
A5: Partial_Sums(s^\(n+1)) is convergent;
    lim Partial_Sums(s^\(n+1+1)) = lim Partial_Sums(s^\(n+1)^\1) by NAT_1:48
      .= lim (Partial_Sums(s^\(n+1))^\1) - lim s1 by A5,A4,SEQ_2:12
      .= lim Partial_Sums(s^\(n+1)) - lim s1 by A5,SEQ_4:20
      .= Sum(s^\(n+1)) - s1.0 by SEQ_4:26
      .= Sum(s^\(n+1)) - (s^\(n+1)).0 by SEQ_1:57;
    then Sum(s^\(n+1+1)) = Sum(s) - (Partial_Sums(s).n + (s^\(n+1)).0) by A3
      .= Sum(s) - (Partial_Sums(s).n + s.(0+(n+1))) by NAT_1:def 3
      .= Sum(s) - Partial_Sums(s).(n+1) by Def1;
    hence thesis;
  end;
A6: X[0]
  proof
    set s1 = seq_const s.0;
A7: Partial_Sums(s) is convergent by A1;
    for k holds s1.k= s.0 by SEQ_1:57;
    then Partial_Sums(s^\1) = (Partial_Sums(s)^\1) - s1 by Th11;
    then lim Partial_Sums(s^\1) = lim (Partial_Sums(s)^\1) - lim s1 by A7,
SEQ_2:12
      .= lim Partial_Sums(s) - lim s1 by A7,SEQ_4:20
      .= Sum(s) - s1.0 by SEQ_4:26
      .= Sum(s) - s.0 by SEQ_1:57;
    then Sum(s) = Sum(s^\1) +(-(-s.0));
    hence thesis by Def1;
  end;
  thus for n holds X[n] from NAT_1:sch 2(A6,A2);
end;
