reserve i,j,k,n,n1,n2,m for Nat;
reserve a,r,x,y for Real;
reserve A for non empty closed_interval Subset of REAL;
reserve C for non empty set;
reserve X for set;

theorem Th24:
  for f being Function of A,REAL st (for x,y st x in A & y in A
  holds |.f.x-f.y.|<=a) holds upper_bound rng f - lower_bound rng f <= a
proof
  let f be Function of A,REAL;
  assume
A1: for x,y st x in A & y in A holds |.f.x-f.y.|<=a;
A2: for y be Real st y in A holds upper_bound rng f - a <= f.y
  proof
    let y be Real;
    assume
A3: y in A;
    for b be Real st b in rng f holds b <= a+f.y
    proof
      let b be Real;
      assume b in rng f;
      then consider x being Element of A such that
      x in dom f and
A4:   b=f.x by PARTFUN1:3;
      |.f.x-f.y.|<=a by A1,A3;
      then f.x-f.y <= a by ABSVALUE:5;
      hence thesis by A4,XREAL_1:20;
    end;
    then upper_bound rng f <= a + f.y by SEQ_4:45;
    hence thesis by XREAL_1:20;
  end;
  for b be Real st b in rng f holds upper_bound rng f - a <= b
  proof
    let b be Real;
    assume b in rng f;
    then ex x being Element of A st x in dom f & b=f.x by PARTFUN1:3;
    hence thesis by A2;
  end;
  then upper_bound rng f - a <= lower_bound rng f by SEQ_4:43;
  then upper_bound rng f <= a + lower_bound rng f by XREAL_1:20;
  hence thesis by XREAL_1:20;
end;
