reserve n,m for Element of NAT;
reserve x, X,X1,Z,Z1 for set;
reserve s,g,r,t,p,x0,x1,x2 for Real;
reserve s1,s2,q1 for Real_Sequence;
reserve Y for Subset of REAL;
reserve f,f1,f2 for PartFunc of REAL,REAL;

theorem
  for f be one-to-one PartFunc of REAL,REAL st p<=g & [.p,g.] c= dom f &
f|[.p,g.] is continuous holds f"|[.lower_bound (f.:[.p,g.]),upper_bound (f.:[.p
  ,g.]).] is continuous
proof
  let f be one-to-one PartFunc of REAL,REAL;
  assume that
A1: p<=g and
A2: [.p,g.] c= dom f and
A3: f|[.p,g.] is continuous;
  now
    per cases by A1,A2,A3,Th17;
    suppose
      f|[.p,g.] is increasing;
      then (f|[.p,g.])"|(f.:[.p,g.]) is increasing by RFUNCT_2:51;
      then f"|(f.:[.p,g.])|(f.:[.p,g.]) is increasing by RFUNCT_2:17;
      then f"|(f.:[.p,g.]) is monotone by RELAT_1:72;
      then
A4:   f"|[.lower_bound (f.:[.p,g.]),upper_bound (f.: [.p,g .]).] is
      monotone by A1,A2,A3,Th19;
      (f").:([.lower_bound (f.:[.p,g.]),upper_bound (f.:[.p,g.]).])=(f")
      .:(f .: [.p,g.]) by A1,A2,A3,Th19
        .=((f")|(f.:[.p,g.])).:(f.:[.p,g.]) by RELAT_1:129
        .=((f|[.p,g.])").:(f.:[.p,g.]) by RFUNCT_2:17
        .= ((f|[.p,g.])").:(rng (f|[.p,g.])) by RELAT_1:115
        .= ((f|[.p,g.])").:(dom ((f|[.p,g.])")) by FUNCT_1:33
        .= rng ((f|[.p,g.])") by RELAT_1:113
        .= dom (f|[.p,g.]) by FUNCT_1:33
        .= dom f /\ [.p,g.] by RELAT_1:61
        .= [.p,g.] by A2,XBOOLE_1:28;
      hence thesis by A1,A4,FCONT_1:46;
    end;
    suppose
      f|[.p,g.] is decreasing;
      then (f|[.p,g.])"|(f.:[.p,g.]) is decreasing by RFUNCT_2:52;
      then f"|(f.:[.p,g.])|(f.:[.p,g.]) is decreasing by RFUNCT_2:17;
      then f"|(f.:[.p,g.]) is monotone by RELAT_1:72;
      then
A5:   f"|[.lower_bound (f.:[.p,g.]),upper_bound (f.: [.p,g .]).] is
      monotone by A1,A2,A3,Th19;
      (f").:([.lower_bound (f.:[.p,g.]),upper_bound (f.:[.p,g.]).])=(f")
      .:(f .: [.p,g.]) by A1,A2,A3,Th19
        .=((f")|(f.:[.p,g.])).:(f.:[.p,g.]) by RELAT_1:129
        .=((f|[.p,g.])").:(f.:[.p,g.]) by RFUNCT_2:17
        .=((f|[.p,g.])").:(rng (f|[.p,g.])) by RELAT_1:115
        .=((f|[.p,g.])").:(dom ((f|[.p,g.])")) by FUNCT_1:33
        .=rng((f|[.p,g.])") by RELAT_1:113
        .=dom(f|[.p,g.]) by FUNCT_1:33
        .=dom f /\ [.p,g.] by RELAT_1:61
        .=[.p,g.] by A2,XBOOLE_1:28;
      hence thesis by A1,A5,FCONT_1:46;
    end;
  end;
  hence thesis;
end;
