reserve x,X for set;
reserve x0,r1,r2,g,g1,g2,p,s for Real;
reserve r for Real;
reserve n,m for Nat;
reserve a,b,d for Real_Sequence;
reserve f for PartFunc of REAL,REAL;

theorem
  for f be one-to-one PartFunc of REAL,REAL st (f|left_closed_halfline p
is increasing or f|left_closed_halfline p is decreasing) & left_closed_halfline
(p) c= dom f holds (f|left_closed_halfline(p))"|(f.:left_closed_halfline(p)) is
  continuous
proof
  let f be one-to-one PartFunc of REAL,REAL;
  set L = left_closed_halfline(p);
  assume that
A1: f|L is increasing or f|L is decreasing and
A2: L c= dom f;
  now
    per cases by A1;
    suppose
A3:   f|L is increasing;
A4:   now
        let r be Element of REAL;
        assume r in f.:L;
        then consider s being Element of REAL such that
A5:     s in dom f & s in L and
A6:     r = f.s by PARTFUN2:59;
        s in dom f /\ L by A5,XBOOLE_0:def 4;
        then
A7:     s in dom (f|L) by RELAT_1:61;
        then r = (f|L).s by A6,FUNCT_1:47;
        then r in rng (f|L) by A7,FUNCT_1:def 3;
        hence r in dom ((f|L)") by FUNCT_1:33;
      end;
A8:   ((f|L)").:(f.:L) = ((f|L)").:(rng (f|L)) by RELAT_1:115
        .= ((f|L)").:(dom ((f|L)")) by FUNCT_1:33
        .= rng ((f|L)") by RELAT_1:113
        .= dom (f|L) by FUNCT_1:33
        .= dom f /\ L by RELAT_1:61
        .= L by A2,XBOOLE_1:28;
      (f|L)"|(f.:L) is increasing by A3,Th9;
      hence thesis by A4,A8,Th13,SUBSET_1:2;
    end;
    suppose
A9:   f|L is decreasing;
A10:  now
        let r be Element of REAL;
        assume r in f.:L;
        then consider s being Element of REAL such that
A11:    s in dom f & s in L and
A12:    r = f.s by PARTFUN2:59;
        s in dom f /\ L by A11,XBOOLE_0:def 4;
        then
A13:    s in dom (f|L) by RELAT_1:61;
        then r = (f|L).s by A12,FUNCT_1:47;
        then r in rng (f|L) by A13,FUNCT_1:def 3;
        hence r in dom ((f|L)") by FUNCT_1:33;
      end;
A14:  ((f|L)").:(f.:L) = ((f|L)").:(rng (f|L)) by RELAT_1:115
        .= ((f|L)").:(dom ((f|L)")) by FUNCT_1:33
        .= rng ((f|L)") by RELAT_1:113
        .= dom (f|L) by FUNCT_1:33
        .= dom f /\ L by RELAT_1:61
        .= L by A2,XBOOLE_1:28;
      (f|L)"|(f.:L) is decreasing by A9,Th10;
      hence thesis by A10,A14,Th13,SUBSET_1:2;
    end;
  end;
  hence thesis;
end;
