reserve a,b,c,x,y,z for object,X,Y,Z for set,
  n for Nat,
  i,j for Integer,
  r,r1,r2,r3,s for Real,
  c1,c2 for Complex,
  p for Point of TOP-REAL n;

theorem Th28:
  for S being Subset of R^1 st S = RAT
  for T being connected TopSpace, f being Function of T, R^1 | S
  st f is continuous holds f is constant
  proof
    let S be Subset of R^1 such that
A1: S = RAT;
    let T be connected TopSpace;
    let f be Function of T, R^1 | S such that
A2: f is continuous;
    per cases;
    suppose
A3:   T is non empty;
      set GX = Image f;
      let x, y be object such that
A4:   x in dom f & y in dom f and
A5:   f.x <> f.y;
      per cases by A5,XXREAL_0:1;
      suppose f.x < f.y;
        then ex Q1, Q2 being Subset of GX st
        Q1 misses Q2 & Q1 <> {}GX & Q2 <> {}GX & Q1 is open & Q2 is open &
        [#]GX = Q1 \/ Q2 by A1,A3,A4,Lm9;
        hence thesis by A1,A2,A3,CONNSP_1:11;
      end;
      suppose f.y < f.x;
        then ex Q1, Q2 being Subset of GX st
        Q1 misses Q2 & Q1 <> {}GX & Q2 <> {}GX & Q1 is open & Q2 is open &
        [#]GX = Q1 \/ Q2 by A1,A3,A4,Lm9;
        hence thesis by A1,A2,A3,CONNSP_1:11;
      end;
    end;
    suppose T is empty;
      hence thesis;
    end;
  end;
