
theorem Th101:
for f be without-infty Function of [:NAT,NAT:],ExtREAL holds
   sup rng f <> +infty
 iff ex K be Real st 0 < K & for n,m be Nat holds f.(n,m) <= K
proof
   let f be without-infty Function of [:NAT,NAT:],ExtREAL;
A1: -infty < f.(1,1) by MESFUNC5:def 5;
A2:dom f = [:NAT,NAT:] by FUNCT_2:def 1; then
   [1,1] in dom f by ZFMISC_1:87; then
A3:f.(1,1) <= sup rng f by FUNCT_1:3,XXREAL_2:4;
A4:now assume sup rng f <> +infty; then
    not sup rng f in {-infty,+infty} by A1,A3,TARSKI:def 2; then
    sup rng f in REAL by XBOOLE_0:def 3,XXREAL_0:def 4; then
    reconsider S = sup rng f as Real;
    take K = max(S,1);
    thus 0 < K by XXREAL_0:25;
    let n,m be Nat;
    n in NAT & m in NAT by ORDINAL1:def 12; then
    [n,m] in [:NAT,NAT:] by ZFMISC_1:87; then
A5: f.(n,m) <= sup rng f by A2,FUNCT_1:3,XXREAL_2:4;
    S <= K by XXREAL_0:25;
    hence f.(n,m) <= K by A5,XXREAL_0:2;
   end;
   now given K be Real such that
     0 < K and
A6:  for n,m be Nat holds f.(n,m) <= K;
    now let w be ExtReal;
     assume w in rng f; then
     consider z be object such that
A7:   z in dom f & w = 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;
     w = f.(n,m) by A7,A8;
     hence w <= K by A6;
    end; then
    K is UpperBound of rng f by XXREAL_2:def 1; then
    sup rng f <= K by XXREAL_2:def 3;
    hence sup rng f <> +infty by XXREAL_0:9,XREAL_0:def 1;
   end;
   hence thesis by A4;
end;
