
theorem Th91:
for f be nonnegative Function of [:NAT,NAT:],ExtREAL,
    seq be ExtREAL_sequence st
 (for m be Element of NAT holds
    ProjMap2(f,m) is non-decreasing & seq.m = lim ProjMap2(f,m))
 holds
   lim_in_cod2(Partial_Sums_in_cod2 f) is non-decreasing
 & Sum seq = lim lim_in_cod2(Partial_Sums_in_cod2 f)
proof
   let f be nonnegative Function of [:NAT,NAT:],ExtREAL,
       seq be ExtREAL_sequence;
   assume
A1: for m be Element of NAT holds
      ProjMap2(f,m) is non-decreasing & seq.m = lim ProjMap2(f,m);
   now let m be Element of NAT;
    ProjMap2(f,m) is non-decreasing by A1; then
    ProjMap2(f,m) is convergent by RINFSUP2:37; then
    lim_inf ProjMap2(f,m) = lim ProjMap2(f,m) by RINFSUP2:41;
    hence seq.m = lim_inf ProjMap2(f,m) by A1;
   end; then
A2:Sum seq <= lim_inf lim_in_cod2(Partial_Sums_in_cod2 f) by Th83;
A3:for n,m be Nat holds f.(n,m) <= seq.m
   proof
    let n,m be Nat;
    reconsider m1=m as Element of NAT by ORDINAL1:def 12;
    ProjMap2(f,m1) is non-decreasing by A1; then
    lim ProjMap2(f,m1) = sup ProjMap2(f,m1) by RINFSUP2:37; then
A4: seq.m = sup ProjMap2(f,m1) by A1;
A5: n is Element of NAT by ORDINAL1:def 12;
    dom(ProjMap2(f,m1)) = NAT by FUNCT_2:def 1; then
    ProjMap2(f,m1).n <= sup rng ProjMap2(f,m1) by A5,FUNCT_1:3,XXREAL_2:4; then
    ProjMap2(f,m1).n <= sup ProjMap2(f,m1) by RINFSUP2:def 1;
    hence thesis by A4,A5,MESFUNC9:def 7;
   end;
   for n,m be Nat st m <= n holds
    (lim_in_cod2(Partial_Sums_in_cod2 f)).m
      <= (lim_in_cod2(Partial_Sums_in_cod2 f)).n
   proof
    let n,m be Nat;
    assume C1: m <= n;
    reconsider m1=m, n1=n as Element of NAT by ORDINAL1:def 12;
C2: (lim_in_cod2(Partial_Sums_in_cod2 f)).m
       = lim ProjMap1(Partial_Sums_in_cod2 f,m1)
  & (lim_in_cod2(Partial_Sums_in_cod2 f)).n
       = lim ProjMap1(Partial_Sums_in_cod2 f,n1) by D1DEF6;
C3: ProjMap1(Partial_Sums_in_cod2 f,m1) is convergent
  & ProjMap1(Partial_Sums_in_cod2 f,n1) is convergent by RINFSUP2:37;
    for k be Nat holds ProjMap1(Partial_Sums_in_cod2 f,m1).k
                          <= ProjMap1(Partial_Sums_in_cod2 f,n1).k
    proof
     let k be Nat;
     reconsider k1=k as Element of NAT by ORDINAL1:def 12;
     ProjMap1(Partial_Sums_in_cod2 f,m1).k1 = (Partial_Sums_in_cod2 f).(m1,k1)
   & ProjMap1(Partial_Sums_in_cod2 f,n1).k1 = (Partial_Sums_in_cod2 f).(n1,k1)
       by MESFUNC9:def 6;
     hence thesis by A1,C1,Th89;
    end;
    hence thesis by C2,C3,RINFSUP2:38;
   end;
   hence
   lim_in_cod2(Partial_Sums_in_cod2 f) is non-decreasing by RINFSUP2:7; then
B1:lim_in_cod2(Partial_Sums_in_cod2 f) is convergent by RINFSUP2:37; then
B3:Sum seq <= lim lim_in_cod2(Partial_Sums_in_cod2 f) by A2,RINFSUP2:41;
   for n be Nat holds
    (lim_in_cod2(Partial_Sums_in_cod2 f)).n <= Sum seq
   proof
    let n be Nat;
    reconsider n1=n as Element of NAT by ORDINAL1:def 12;
A6: (lim_in_cod2(Partial_Sums_in_cod2 f)).n
     = lim ProjMap1(Partial_Sums_in_cod2 f,n1) by D1DEF6;
A7: ProjMap1(Partial_Sums_in_cod2 f,n1) is convergent by RINFSUP2:37;
    for m be Element of NAT holds 0 <= seq.m
    proof
     let m be Element of NAT;
     for n be Nat holds 0. <= ProjMap2(f,m).n
     proof
      let n be Nat;
      n is Element of NAT by ORDINAL1:def 12;
      hence 0. <= ProjMap2(f,m).n by SUPINF_2:39;
     end; then
B2:  0. <= lim_inf ProjMap2(f,m) by Th87;
     ProjMap2(f,m) is non-decreasing by A1; then
     ProjMap2(f,m) is convergent by RINFSUP2:37; then
     lim_inf ProjMap2(f,m) = lim ProjMap2(f,m) by RINFSUP2:41;
     hence 0 <= seq.m by B2,A1;
    end; then
    seq is nonnegative by SUPINF_2:39; then
    Partial_Sums seq is non-decreasing by MESFUNC9:16; then
A8: Partial_Sums seq is convergent by RINFSUP2:37;
    for m be Nat holds
      ProjMap1(Partial_Sums_in_cod2 f,n1).m <= (Partial_Sums seq).m
    proof
     let m be Nat;
     m is Element of NAT by ORDINAL1:def 12; then
     ProjMap1(Partial_Sums_in_cod2 f,n1).m
      = (Partial_Sums_in_cod2 f).(n,m) by MESFUNC9:def 6;
     hence ProjMap1(Partial_Sums_in_cod2 f,n1).m <= (Partial_Sums seq).m
       by A3,Th85;
    end; then
    lim ProjMap1(Partial_Sums_in_cod2 f,n1) <= lim(Partial_Sums seq)
      by A7,A8,RINFSUP2:38;
    hence (lim_in_cod2(Partial_Sums_in_cod2 f)).n <= Sum seq
      by A6,MESFUNC9:def 3;
   end; then
   lim_sup lim_in_cod2(Partial_Sums_in_cod2 f) <= Sum seq by Th86; then
   lim lim_in_cod2(Partial_Sums_in_cod2 f) <= Sum seq by B1,RINFSUP2:41;
   hence Sum seq = lim lim_in_cod2(Partial_Sums_in_cod2 f) by B3,XXREAL_0:1;
end;
