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;
