
theorem Th53:
  for F be FinSequence of ExtREAL st (for n be Nat st n in dom F
  holds 0 <= F.n) holds 0 <= Sum F
proof
  let F be FinSequence of ExtREAL;
  consider sumf be sequence of ExtREAL such that
A1: Sum F = sumf.(len F) and
A2: sumf.0 = 0 and
A3: for n be Nat st n < len F holds sumf.(n+1) = sumf.n + F.(
  n+1) by EXTREAL1:def 2;
  defpred P[Nat] means $1 <= len F implies 0 <= sumf.($1);
  assume
A4: for n be Nat st n in dom F holds 0 <= F.n;
A5: for n be Nat st P[n] holds P[n+1]
  proof
    let n be Nat;
    assume
A6: P[n];
    assume
A7: n+1 <= len F;
    reconsider n as Element of NAT by ORDINAL1:def 12;
    1 <= n+1 by NAT_1:11;
    then n+1 in Seg len F by A7;
    then n+1 in dom F by FINSEQ_1:def 3;
    then
A8: 0 <= F.(n+1) by A4;
    n < len F by A7,NAT_1:13;
    then sumf.(n+1) = sumf.n + F.(n+1) by A3;
    hence thesis by A6,A7,A8,NAT_1:13;
  end;
A9: P[ 0 ] by A2;
  for n be Nat holds P[n] from NAT_1:sch 2(A9,A5);
  hence thesis by A1;
end;
