reserve
  r,s,r0,s0,t for Real;

theorem
  for T being non empty TopSpace for f being continuous RealMap of T for
  A being Subset of T st A is connected holds f.:A is interval
proof
  let T be non empty TopSpace;
  let f be continuous RealMap of T;
  let A be Subset of T;
  assume
A1: A is connected;
  let r,s be ExtReal;
A2: A c= f"(f.:A) by FUNCT_2:42;
  assume
A3: r in f.:A;
  then consider p being Point of T such that
A4: p in A and
A5: r = f.p by FUNCT_2:65;
  assume
A6: s in f.:A;
  then consider q being Point of T such that
A7: q in A and
A8: s = f.q by FUNCT_2:65;
  assume
A9: not [.r,s.] c= f.:A;
  reconsider r,s as Real by A3,A6;
  consider t being Element of REAL such that
A10: t in [.r,s.] and
A11: not t in f.:A by A9;
  reconsider r,s,t as Real;
  set P1 = f"left_open_halfline t, Q1 = f"right_open_halfline t, P = P1 /\ A,
  Q = Q1 /\ A, X = left_open_halfline t \/ right_open_halfline t;
A12: Q1 is open by PSCOMP_1:8;
  t <= s by A10,XXREAL_1:1;
  then
A13: t < s by A6,A11,XXREAL_0:1;
  right_open_halfline t = {r1 where r1 is Real: t < r1}
          by XXREAL_1:230;
  then s in right_open_halfline t by A13;
  then q in Q1 by A8,FUNCT_2:38;
  then
A14: Q <> {}T by A7,XBOOLE_0:def 4;
  left_open_halfline t /\ right_open_halfline t = ].t,t.[ by XXREAL_1:269
    .= {} by XXREAL_1:28;
  then left_open_halfline t misses right_open_halfline t;
  then P1 misses Q1 by FUNCT_1:71;
  then P1 /\ Q1 = {};
  then
A15: P1 /\ Q1 misses P \/ Q;
  reconsider Y = {t} as Subset of REAL;
  Y` = REAL \ [.t,t.] by XXREAL_1:17
    .= X by XXREAL_1:385;
  then
A16: (f"Y)` = f"X by FUNCT_2:100
    .= P1 \/ Q1 by RELAT_1:140;
  f"{t} misses f"(f.:A) by A11,FUNCT_1:71,ZFMISC_1:50;
  then f"{t} misses A by A2,XBOOLE_1:63;
  then A c= P1 \/ Q1 by A16,SUBSET_1:23;
  then
A17: A = A /\ (P1 \/ Q1) by XBOOLE_1:28
    .= P \/ Q by XBOOLE_1:23;
A18: P c= P1 by XBOOLE_1:17;
  r <= t by A10,XXREAL_1:1;
  then
A19: r < t by A3,A11,XXREAL_0:1;
  left_open_halfline t = {r1 where r1 is Real: r1 < t} by XXREAL_1:229;
  then r in left_open_halfline t by A19;
  then p in P1 by A5,FUNCT_2:38;
  then
A20: P <> {}T by A4,XBOOLE_0:def 4;
A21: Q c= Q1 by XBOOLE_1:17;
  P1 is open by PSCOMP_1:8;
  then P,Q are_separated by A12,A18,A21,A15,TSEP_1:45;
  hence contradiction by A1,A17,A20,A14,CONNSP_1:15;
end;
