 reserve Rseq, Rseq1, Rseq2 for Function of [:NAT,NAT:],REAL;

theorem lm80:
  Rseq is nonnegative-yielding implies
    Partial_Sums_in_cod2 Rseq is nonnegative-yielding &
    Partial_Sums_in_cod1 Rseq is nonnegative-yielding
proof
   assume a1: Rseq is nonnegative-yielding;
   now
   let i,j be Nat;
   defpred C[Nat] means (Partial_Sums_in_cod2(Rseq)).(i,$1) >= 0;
   (Partial_Sums_in_cod2(Rseq)).(i,0) = Rseq.(i,0) by DefCS; then
a2:C[0] by a1;
a3:for k be Nat st C[k] holds C[k+1]
   proof
    let k be Nat;
    assume C[k]; then
a4: (Partial_Sums_in_cod2(Rseq)).(i,k) >= 0 & Rseq.(i,k+1) >= 0 by a1;
    (Partial_Sums_in_cod2(Rseq)).(i,k+1)
      = (Partial_Sums_in_cod2(Rseq)).(i,k) + Rseq.(i,k+1)
      by DefCS;
    hence C[k+1] by a4;
   end;
   for k be Nat holds C[k] from NAT_1:sch 2(a2,a3);
   hence (Partial_Sums_in_cod2(Rseq)).(i,j) >= 0;
   defpred R[Nat] means (Partial_Sums_in_cod1(Rseq)).($1,j) >= 0;
   (Partial_Sums_in_cod1(Rseq)).(0,j) = Rseq.(0,j) by DefRS; then
a5:R[0] by a1;
a6:for k be Nat st R[k] holds R[k+1]
   proof
    let k be Nat;
    assume R[k]; then
a7: (Partial_Sums_in_cod1(Rseq)).(k,j) >= 0 & Rseq.(k+1,j) >= 0 by a1;
    (Partial_Sums_in_cod1(Rseq)).(k+1,j)
     = (Partial_Sums_in_cod1(Rseq)).(k,j) + Rseq.(k+1,j)
      by DefRS;
    hence R[k+1] by a7;
   end;
   for k be Nat holds R[k] from NAT_1:sch 2(a5,a6);
   hence (Partial_Sums_in_cod1(Rseq)).(i,j) >= 0;
   end;
   hence thesis;
end;
