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 Th43:
  right_open_halfline(p) c= dom f& f is_differentiable_on
  right_open_halfline(p) & ((for x0 st x0 in right_open_halfline(p) holds 0 <
  diff(f,x0)) or for x0 st x0 in right_open_halfline(p) holds diff(f,x0) < 0)
  implies rng (f|right_open_halfline(p)) is open
proof
  set l = right_open_halfline(p);
  assume
A1: l c= dom f;
  assume that
A2: f is_differentiable_on l and
A3: (for x0 st x0 in l holds 0 < diff(f,x0)) or for x0 st x0 in l holds
  diff(f,x0) < 0;
A4: f|l is continuous by A2,FDIFF_1:25;
  now
    per cases by A3;
    suppose
      for x0 st x0 in right_open_halfline(p) holds 0 < diff(f,x0);
      then f|right_open_halfline p is increasing by A2,Th33;
      hence thesis by A1,A4,FCONT_3:25;
    end;
    suppose
      for x0 st x0 in right_open_halfline(p) holds diff(f,x0) < 0;
      then f|right_open_halfline p is decreasing by A2,Th34;
      hence thesis by A1,A4,FCONT_3:25;
    end;
  end;
  hence thesis;
end;
