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

theorem SH8:
  for s1,s2 being Real_Sequence, n being Nat
    st s1,s2 are_fiberwise_equipotent & s1 is nonnegative
   ex m being Nat st (Partial_Sums s1).n <= (Partial_Sums s2).m
proof
   let s1,s2 be Real_Sequence;
   let n be Nat;
   assume that
A1: s1,s2 are_fiberwise_equipotent and
A2: s1 is nonnegative;
B1:s2 is nonnegative by A1,A2,TMP6;
   consider m being Nat, F2 be Subset of Shift(s2|Segm m,1) such that
A3: Shift(s1|Segm(n+1),1),F2 are_fiberwise_equipotent by A1,SH6;
   take m;
   reconsider FS1 = Shift(s1|Segm(n+1),1),
              FS2 = Shift(s2|Segm m,1) as FinSequence of REAL by SH2;
   reconsider F2 as Subset of FS2;
   Seq F2,F2 are_fiberwise_equipotent by SH7; then
A4:Sum FS1 = Sum(Seq F2) by A3,CLASSES1:76,RFINSEQ:9;
   now let i be Element of NAT;
    assume A6: i in dom FS2; then
    reconsider i1 = i-1 as Element of NAT by NAT_1:21,FINSEQ_3:25;
    i1+1 = i; then
    FS2.i = s2.i1 by A6,SH3;
    hence 0 <= FS2.i by A1,A2,TMP6,RINFSUP1:def 3;
   end; then
   Sum(Seq F2) <= Sum FS2 by GLIB_003:2; then
A7:(Partial_Sums s1).n <= Sum FS2 by A4,SH5;
   Shift(s2|Segm(m+1),1) = Shift(s2|Segm m,1) ^ <*s2.m*> by SH4; then
   Sum(Shift(s2|Segm(m+1),1)) = Sum FS2 + s2.m by RVSUM_1:74; then
A8:(Partial_Sums s2).m = Sum FS2 + s2.m by SH5;
   (Partial_Sums s2).m >= Sum FS2 by A8,XREAL_1:31,B1;
   hence (Partial_Sums s1).n <= (Partial_Sums s2).m by A7,XXREAL_0:2;
end;
