
theorem Th102:
for f be Function of [:NAT,NAT:],ExtREAL, c be ExtReal st
 (for n,m be Nat holds f.(n,m) = c) holds
  f is P-convergent & P-lim f = c & P-lim f = sup rng f
proof
   let f be Function of [:NAT,NAT:],ExtREAL, c be ExtReal;
   reconsider cc = c as R_eal by XXREAL_0:def 1;
A1:dom f = [:NAT,NAT:] by FUNCT_2:def 1;
   c in ExtREAL by XXREAL_0:def 1; then
A2:c in REAL or c in {-infty,+infty} by XBOOLE_0:def 3,XXREAL_0:def 4;
   assume A3:for n,m be Nat holds f.(n,m) = c; then
A4:f.(1,1) = c;
   now let v be ExtReal;
    assume v in rng f; then
    consider z be object such that
A7:  z in dom f & v = f.z by FUNCT_1:def 3;
    consider n,m be object such that
A8:  n in NAT & m in NAT & z = [n,m] by A7,ZFMISC_1:def 2;
    reconsider n,m as Element of NAT by A8;
    v = f.(n,m) by A7,A8;
    hence v <= c by A3;
   end; then
A5:c is UpperBound of rng f by XXREAL_2:def 1;
   per cases by A2,TARSKI:def 2;
   suppose c in REAL; then
    reconsider rc = c as Real;
A6: now reconsider N=0 as Nat;
     let p be Real;
     assume A7: 0 < p;
     take N;
     let n1,m1 be Nat such that
     N <= n1 & N <= m1;
     f.(n1,m1) - rc = f.(n1,m1) - f.(n1,m1) by A3;
     hence |. f.(n1,m1) - rc .| < p by A7,EXTREAL1:16,XXREAL_3:7;
    end;  then
A8: f is P-convergent_to_finite_number;
    hence f is P-convergent;
    hence
A9:  P-lim f = c by A6,A8,Def5;
    [1,1] in dom f by A1,ZFMISC_1:87;
    hence thesis by A9,A5,A4,FUNCT_1:3,XXREAL_2:55;
   end;
   suppose A10: c = -infty;
    for p be Real st p < 0 ex N be Nat st
     for n,m be Nat st n >= N & m >= N holds f.(n,m) <= p
    proof
     let p be Real such that p < 0;
     take 0;
     now let n,m be Nat such that 0 <= n & 0 <= m;
      f.(n,m) = -infty by A3,A10;
      hence f.(n,m) <= p by XREAL_0:def 1,XXREAL_0:12;
     end;
     hence thesis;
    end; then
A12:f is P-convergent_to_-infty;
    hence f is P-convergent;
    hence
A13: P-lim f = c by A10,A12,Def5;
    [1,1] in dom f by A1,ZFMISC_1:87;
    hence thesis by A5,A4,A13,FUNCT_1:3,XXREAL_2:55;
   end;
   suppose A14: c = +infty;
    for p be Real st 0 < p ex N be Nat st
     for n,m be Nat st n >= N & m >= N holds p <= f.(n,m)
    proof
     let p be Real such that 0 < p;
     take 0;
     now let n,m be Nat such that n >= 0 & m >= 0;
      f.(n,m) = +infty by A3,A14;
      hence p <= f.(n,m) by XREAL_0:def 1,XXREAL_0:9;
     end;
     hence thesis;
    end; then
A16:f is P-convergent_to_+infty;
    hence f is P-convergent;
    hence
A17: P-lim f = c by A14,A16,Def5;
    [1,1] in dom f by A1,ZFMISC_1:87;
    hence thesis by A5,A4,A17,FUNCT_1:3,XXREAL_2:55;
   end;
end;
