reserve x for object;
reserve x0,r,r1,r2,g,g1,g2,p,y0 for Real;
reserve n,m,k,l for Element of NAT;
reserve a,b,d for Real_Sequence;
reserve h,h1,h2 for non-zero 0-convergent Real_Sequence;
reserve c,c1 for constant Real_Sequence;
reserve A for open Subset of REAL;
reserve f,f1,f2 for PartFunc of REAL,REAL;
reserve L for LinearFunc;
reserve R for RestFunc;

theorem Th44:
  [#](REAL) c= dom f & f is_differentiable_on [#](REAL) & ((for x0
  holds 0 < diff(f,x0)) or for x0 holds diff(f,x0) < 0) implies rng f is open
proof
  assume
A1: [#](REAL) c= dom f;
  assume that
A2: f is_differentiable_on [#](REAL) and
A3: (for x0 holds 0 < diff(f,x0)) or for x0 holds diff(f,x0) < 0;
A4: f|[#]REAL is continuous by A2,FDIFF_1:25;
  now
    per cases by A3;
    suppose
      for x0 holds 0 < diff(f,x0);
      then f|[#]REAL is increasing by A2,Th37;
      hence thesis by A1,A4,FCONT_3:26;
    end;
    suppose
      for x0 holds diff(f,x0) < 0;
      then f|[#]REAL is decreasing by A2,Th38;
      hence thesis by A1,A4,FCONT_3:26;
    end;
  end;
  hence thesis;
end;
