
theorem
  for f1,f2 be Function of [:NAT,NAT:],ExtREAL st
   (for n,m be Nat holds f1.(n,m) <= f2.(n,m))
     holds sup rng f1 <= sup rng f2
proof
   let f1,f2 be Function of [:NAT,NAT:],ExtREAL;
   assume A1: for n,m be Nat holds f1.(n,m) <= f2.(n,m);
A2:now let n,m be Element of NAT;
    dom f2 = [:NAT,NAT:] by FUNCT_2:def 1; then
    [n,m] in dom f2 by ZFMISC_1:87; then
A3: f2.(n,m) in rng f2 by FUNCT_1:def 3;
A4: f1.(n,m) <= f2.(n,m) by A1;
    sup rng f2 is UpperBound of rng f2 by XXREAL_2:def 3;
    then f2.(n,m) <= sup rng f2 by A3,XXREAL_2:def 1;
    hence f1.(n,m) <= sup rng f2 by A4,XXREAL_0:2;
   end;
   now let x be ExtReal;
    assume x in rng f1; then
    consider z be object such that
A5:  z in dom f1 & x=f1.z by FUNCT_1:def 3;
    consider n,m be object such that
A6:  n in NAT & m in NAT & z = [n,m] by A5,ZFMISC_1:def 2;
    reconsider n,m as Element of NAT by A6;
    x = f1.(n,m) by A5,A6;
    hence x <= sup rng f2 by A2;
   end; then
   sup rng f2 is UpperBound of rng f1 by XXREAL_2:def 1;
   hence thesis by XXREAL_2:def 3;
end;
