reserve Rseq, Rseq1, Rseq2 for Function of [:NAT,NAT:],REAL;
reserve rseq1,rseq2 for convergent Real_Sequence;
reserve n,m,N,M for Nat;
reserve e,r for Real;
reserve Pseq for P-convergent Function of [:NAT,NAT:],REAL;

theorem
Rseq is uniformly_convergent_in_cod2 & lim_in_cod2 Rseq is convergent implies
 Rseq is P-convergent & P-lim Rseq = cod2_major_iterated_lim Rseq
proof
   assume that
a3: Rseq is uniformly_convergent_in_cod2 and
a2: lim_in_cod2 Rseq is convergent;
a4:now let e;
    assume a5: 0<e; then
    consider N1 be Nat such that
a6:  for n st n >= N1 holds
      for m holds |.Rseq.(n,m) - (lim_in_cod2 Rseq).m .| < e/2 by a3;
    consider z be Real such that
a7:  for e st e>0
      ex N2 be Nat st
       for n st n>=N2 holds
        |.(lim_in_cod2 Rseq).n - z.| < e by a2,SEQ_2:def 6;
a8: z = cod2_major_iterated_lim Rseq by a2,a7,def35;
    consider N2 be Nat such that
a9:  for n st n>=N2 holds |.(lim_in_cod2 Rseq).n - z.| < e/2 by a5,a7;
    set N = max(N1,N2);
a0: N is Nat by TARSKI:1;
    for n,m st n>=N & m>=N holds
     |.Rseq.(n,m) - cod2_major_iterated_lim Rseq.| < e
    proof
     let n,m;
     assume a10: n>=N & m>=N;
     N >= N1 & N >= N2 by XXREAL_0:25; then
     n >= N1 & m >= N2 by a10,XXREAL_0:2; then
     |.Rseq.(n,m) - (lim_in_cod2 Rseq).m .| <e/2
   & |.(lim_in_cod2 Rseq).m - z.| < e/2 by a6,a9; then
a12: |.Rseq.(n,m) - (lim_in_cod2 Rseq).m .|
   + |.(lim_in_cod2 Rseq).m - z.| < e/2 + e/2 by XREAL_1:8;
     |.Rseq.(n,m) - cod2_major_iterated_lim Rseq.|
      <= |.Rseq.(n,m) - (lim_in_cod2 Rseq).m .|
       + |.(lim_in_cod2 Rseq).m - cod2_major_iterated_lim Rseq.|
         by COMPLEX1:63;
     hence |.Rseq.(n,m) - cod2_major_iterated_lim Rseq.| < e
        by a8,a12,XXREAL_0:2;
    end;
    hence ex N st
     for n,m st n>=N & m>=N holds
      |.Rseq.(n,m) - cod2_major_iterated_lim Rseq.| < e by a0;
   end;
   hence Rseq is P-convergent;
   hence thesis by a4,def6;
end;
