
theorem Th80:
for f be nonnegative Function of [:NAT,NAT:],ExtREAL st
  Partial_Sums f is convergent_in_cod1_to_finite holds
  for m be Element of NAT holds
    (Partial_Sums(lim_in_cod1(Partial_Sums_in_cod1 f))).m
   = lim(ProjMap2(Partial_Sums_in_cod1(Partial_Sums_in_cod2 f),m))
proof
   let f be nonnegative Function of [:NAT,NAT:],ExtREAL;
   assume
A1: Partial_Sums f is convergent_in_cod1_to_finite; then
A2:Partial_Sums_in_cod1 f is convergent_in_cod1_to_finite by Th79;
   let m be Element of NAT;
   defpred P[Nat] means
    for k be Element of NAT st k<=$1 holds
      (Partial_Sums(lim_in_cod1 Partial_Sums_in_cod1 f)).k
       = lim(ProjMap2(Partial_Sums_in_cod1(Partial_Sums_in_cod2 f),k));
   now let k be Element of NAT;
    assume k <= 0; then
A5: k = 0;
A6: (Partial_Sums(lim_in_cod1 Partial_Sums_in_cod1 f)).0
     = (lim_in_cod1 Partial_Sums_in_cod1 f).0 by MESFUNC9:def 1
    .= lim ProjMap2(Partial_Sums_in_cod1 f,0) by D1DEF5;
    consider G be Real such that
A7:  lim ProjMap2(Partial_Sums_in_cod1 f,0) = G &
     for p be Real st 0<p ex N be Nat st for n be Nat st N<=n holds
       |. ProjMap2(Partial_Sums_in_cod1 f,0).n
            - lim ProjMap2(Partial_Sums_in_cod1 f,0) .| < p by A2,MESFUNC9:7;
    reconsider G1= G as R_eal by XXREAL_0:def 1;
    ProjMap2(Partial_Sums_in_cod1(Partial_Sums_in_cod2 f),0)
     = ProjMap2(Partial_Sums f,0) by Lm8; then
A8: ProjMap2(Partial_Sums_in_cod1(Partial_Sums_in_cod2 f),0)
      is convergent_to_finite_number by A1;
    for p be Real st 0<p ex N be Nat st for n be Nat st N<=n holds
     |. ProjMap2(Partial_Sums_in_cod1(Partial_Sums_in_cod2 f),0).n - G1 .| < p
    proof
     let p be Real;
     assume 0<p; then
     consider N be Nat such that
A11:  for n be Nat st N<=n holds
       |. ProjMap2(Partial_Sums_in_cod1 f,0).n - G1 .| < p by A7;
     now let n be Nat;
      reconsider n1=n as Element of NAT by ORDINAL1:def 12;
      assume A12: N<=n;
      ProjMap2(Partial_Sums_in_cod1(Partial_Sums_in_cod2 f),0).n1
       = (Partial_Sums_in_cod1(Partial_Sums_in_cod2 f)).(n,0) by MESFUNC9:def 7
      .= (Partial_Sums f).(n,0) by Lm8
      .= ProjMap2(Partial_Sums f,0).n1 by MESFUNC9:def 7
      .= ProjMap2(Partial_Sums_in_cod1 f,0).n1 by Th54;
      hence |. ProjMap2(Partial_Sums_in_cod1(Partial_Sums_in_cod2 f),0).n
         - G1.| < p by A11,A12;
     end;
     hence thesis;
    end;
    hence (Partial_Sums(lim_in_cod1 Partial_Sums_in_cod1 f)).k
       = lim(ProjMap2(Partial_Sums_in_cod1(Partial_Sums_in_cod2 f),k))
        by A5,A6,A7,A8,MESFUNC5:def 12;
   end; then
A13:P[0];
A14:for n be Nat st P[n] holds P[n+1]
   proof
    let n be Nat;
    reconsider n1=n as Element of NAT by ORDINAL1:def 12;
    assume A15: P[n];
    now let k be Element of NAT;
     assume A16: k <= n+1;
     per cases;
     suppose k < n+1; then
      k <= n by NAT_1:13;
      hence (Partial_Sums(lim_in_cod1 Partial_Sums_in_cod1 f)).k
         = lim ProjMap2(Partial_Sums_in_cod1(Partial_Sums_in_cod2 f),k) by A15;
     end;
     suppose k >= n+1; then
A17:  k = n+1 by A16,XXREAL_0:1; then
A18:  (Partial_Sums(lim_in_cod1 Partial_Sums_in_cod1 f)).k
       = (Partial_Sums(lim_in_cod1 Partial_Sums_in_cod1 f)).n
        + (lim_in_cod1 Partial_Sums_in_cod1 f).(n+1) by MESFUNC9:def 1
      .= lim ProjMap2(Partial_Sums_in_cod1(Partial_Sums_in_cod2 f),n1)
        + (lim_in_cod1 Partial_Sums_in_cod1 f).(n+1) by A15
      .= lim ProjMap2(Partial_Sums f,n1)
        + (lim_in_cod1 Partial_Sums_in_cod1 f).(n+1) by Lm8
      .= lim ProjMap2(Partial_Sums f,n1)
        + lim ProjMap2(Partial_Sums_in_cod1 f,k) by A17,D1DEF5;
      consider Gn be Real such that
A19:   lim ProjMap2(Partial_Sums f,n1) = Gn &
       for p be Real st 0<p ex I be Nat st for i be Nat st I<=i holds
        |. ProjMap2(Partial_Sums f,n1).i
           - lim ProjMap2(Partial_Sums f,n1) .| < p by A1,MESFUNC9:7;
      consider Gn1 be Real such that
A20:   lim ProjMap2(Partial_Sums_in_cod1 f,k) = Gn1 &
       for p be Real st 0<p ex I be Nat st for i be Nat st I<=i holds
        |. ProjMap2(Partial_Sums_in_cod1 f,k).i
           - lim ProjMap2(Partial_Sums_in_cod1 f,k) .| < p by A2,MESFUNC9:7;
      reconsider Gna=Gn, Gn1a=Gn1 as R_eal by XXREAL_0:def 1;
      set G = Gna + Gn1a;
A21:  lim ProjMap2(Partial_Sums_in_cod1(Partial_Sums_in_cod2 f),k)
       = (lim_in_cod1 Partial_Sums_in_cod1(Partial_Sums_in_cod2 f)).k by D1DEF5
      .= (lim_in_cod1 Partial_Sums f).k by Lm8
      .= lim ProjMap2(Partial_Sums f,k) by D1DEF5;
A22:  ProjMap2(Partial_Sums f,k) is convergent_to_finite_number by A1;
      for p be Real st 0<p ex I be Nat st for i be Nat st I<=i holds
       |. ProjMap2(Partial_Sums f,k).i - G .| < p
      proof
       let p be Real;
       assume A24: 0<p; then
       consider I1 be Nat such that
A25:    for i be Nat st I1<=i holds
         |. ProjMap2(Partial_Sums f,n1).i
           - lim ProjMap2(Partial_Sums f,n1) .| < p/2 by A19;
       consider I2 be Nat such that
A26:    for i be Nat st I2<=i holds
        |. ProjMap2(Partial_Sums_in_cod1 f,k).i
           - lim ProjMap2(Partial_Sums_in_cod1 f,k) .| < p/2 by A20,A24;
       reconsider I = max(I1,I2) as Nat by XXREAL_0:16;
A27:   I >= I1 & I >= I2 by XXREAL_0:25;
       now let i be Nat;
        reconsider i1 = i as Element of NAT by ORDINAL1:def 12;
        assume I<=i; then
        I1<=i & I2<=i by A27,XXREAL_0:2; then
        |. ProjMap2(Partial_Sums f,n1).i - Gn .| < p/2
      & |. ProjMap2(Partial_Sums_in_cod1 f,k).i - Gn1 .| < p/2
             by A19,A20,A25,A26; then
A28:    |. ProjMap2(Partial_Sums f,n1).i - Gn .|
         + |. ProjMap2(Partial_Sums_in_cod1 f,k).i - Gn1 .| <
         (p/2)qua ExtReal+p/2 by XXREAL_3:64;
A29:    ProjMap2(Partial_Sums f,k).i1
         = (Partial_Sums f).(i,k) by MESFUNC9:def 7
        .= (Partial_Sums_in_cod1(Partial_Sums_in_cod2 f)).(i,k) by Lm8
        .= (Partial_Sums_in_cod1 f).(i,k)
            + (Partial_Sums_in_cod1(Partial_Sums_in_cod2 f)).(i,n)
              by A17,Th47
        .= (Partial_Sums f).(i,n) + (Partial_Sums_in_cod1 f).(i,k) by Lm8
        .= ProjMap2(Partial_Sums f,n1).i1
             + (Partial_Sums_in_cod1 f).(i,k) by MESFUNC9:def 7
        .= ProjMap2(Partial_Sums f,n1).i1
             + ProjMap2(Partial_Sums_in_cod1 f,k).i1 by MESFUNC9:def 7;
        ProjMap2(Partial_Sums_in_cod1 f,k).i1 <> -infty by SUPINF_2:51; then
A30:    ProjMap2(Partial_Sums_in_cod1 f,k).i1 - Gn1a <> -infty
           by XXREAL_3:19; then
A31:    (ProjMap2(Partial_Sums_in_cod1 f,k).i1 - Gn1a) + Gn1a <> -infty
           by XXREAL_3:17;
        ProjMap2(Partial_Sums f,n1).i1 >= 0 by SUPINF_2:51; then
A32:    ProjMap2(Partial_Sums f,n1).i - Gna <> -infty by XXREAL_3:19;
        ProjMap2(Partial_Sums f,n1).i
         = ProjMap2(Partial_Sums f,n1).i - Gna + Gna
      & ProjMap2(Partial_Sums_in_cod1 f,k).i
         = ProjMap2(Partial_Sums_in_cod1 f,k).i - Gn1a + Gn1a
              by XXREAL_3:22; then
        ProjMap2(Partial_Sums f,k).i
         = (ProjMap2(Partial_Sums f,n1).i - Gna)
         + (((ProjMap2(Partial_Sums_in_cod1 f,k).i - Gn1a) + Gn1a) + Gna)
              by A29,A31,A32,XXREAL_3:29
        .= (ProjMap2(Partial_Sums f,n1).i - Gna)
         + ( (ProjMap2(Partial_Sums_in_cod1 f,k).i - Gn1a) + (Gn1a + Gna) )
              by XXREAL_3:29
        .= (ProjMap2(Partial_Sums f,n1).i - Gna)
         + (ProjMap2(Partial_Sums_in_cod1 f,k).i - Gn1a) + (Gna + Gn1a)
              by A30,A32,XXREAL_3:29; then
        ProjMap2(Partial_Sums f,k).i - G
         = (ProjMap2(Partial_Sums f,n1).i - Gna)
         + (ProjMap2(Partial_Sums_in_cod1 f,k).i - Gn1a)
              by XXREAL_3:22; then
        |. ProjMap2(Partial_Sums f,k).i - G .|
         <= |. ProjMap2(Partial_Sums f,n1).i - Gna .|
          + |. ProjMap2(Partial_Sums_in_cod1 f,k).i - Gn1a .|
         by EXTREAL1:24;
        hence |. ProjMap2(Partial_Sums f,k).i - G .| < p by A28,XXREAL_0:2;
       end;
       hence thesis;
      end;
      hence (Partial_Sums(lim_in_cod1 Partial_Sums_in_cod1 f)).k
        = lim ProjMap2(Partial_Sums_in_cod1(Partial_Sums_in_cod2 f),k)
          by A18,A19,A20,A21,A22,MESFUNC5:def 12;
     end;
    end;
    hence P[n+1];
   end;
   for n be Nat holds P[n] from NAT_1:sch 2(A13,A14);
   hence thesis;
end;
