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|[#]REAL is increasing
  or f|[#]REAL is decreasing) & f is total holds f"|rng f is continuous
proof
  set L = [#] REAL;
  let f be one-to-one PartFunc of REAL,REAL;
  assume that
A1: f|[#]REAL is increasing or f|[#]REAL is decreasing and
A2: f is total;
A3: dom f = [#] REAL by A2,PARTFUN1:def 2;
  now
    per cases by A1;
    suppose
A4:   f|L is increasing;
A5:   now
        let r be Element of REAL;
        assume r in f.:L;
        then consider s being Element of REAL such that
A6:     s in dom f and
        s in L and
A7:     r = f.s by PARTFUN2:59;
        s in dom f /\ L by A6,XBOOLE_0:def 4;
        then
A8:     s in dom (f|L) by RELAT_1:61;
        r = (f|L).s by A7;
        then r in rng (f|L) by A8,FUNCT_1:def 3;
        hence r in dom ((f|L)") by FUNCT_1:33;
      end;
A9:   ((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
        .= REAL by A3;
      (f|L)"|(f.:L) is increasing by A4,Th9;
      then (f|L)"|(f.:L) is continuous by A5,A9,Th16,SUBSET_1:2;
      then (f|L)"|rng f is continuous by A3,RELAT_1:113;
      hence thesis;
    end;
    suppose
A10:  f|L is decreasing;
A11:  now
        let r be Element of REAL;
        assume r in f.:L;
        then consider s being Element of REAL such that
A12:    s in dom f and
        s in L and
A13:    r = f.s by PARTFUN2:59;
        s in dom f /\ L by A12,XBOOLE_0:def 4;
        then
A14:    s in dom (f|L) by RELAT_1:61;
        r = (f|L).s by A13;
        then r in rng (f|L) by A14,FUNCT_1:def 3;
        hence r in dom ((f|L)") by FUNCT_1:33;
      end;
A15:  ((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
        .= REAL by A3;
      (f|L)"|(f.:L) is decreasing by A10,Th10;
      then (f|L)"|(f.:L) is continuous by A11,A15,Th16,SUBSET_1:2;
      then (f|L)"|rng f is continuous by A3,RELAT_1:113;
      hence thesis;
    end;
  end;
  hence thesis;
end;
