reserve x,y for Real,
  u,v,w for set,
  r for positive Real;

theorem Th58:
  for x being Real, w being Rational ex f being
  continuous Function of Sorgenfrey-line, I[01] st for a being Point of
  Sorgenfrey-line holds (a in [.x,w.[ implies f.a = 0) & (not a in [.x,w.[
  implies f.a = 1)
proof
  reconsider 00 = 0, 01 = 1 as Element of I[01] by BORSUK_1:40,XXREAL_1:1;
  let x be Real;
  set X = Sorgenfrey-line;
  let w be Rational;
  reconsider V = [.x,w.[ as open closed Subset of X by Th57,TOPGEN_3:11;
  defpred P[object] means $1 in [.x,w.[;
  deffunc 00(object) = 0;
  deffunc 01(object) = 1;
   :: funkcja charakterystyczna zbioru [.x,w.[ !!! ???
  reconsider f1 = (X|V) --> 00 as continuous Function of X|V, I[01];
  reconsider f2 = (X|V`) --> 01 as continuous Function of X|V`, I[01];
A1: for a being object st a in the carrier of X holds (P[a] implies 00(a) in
  the carrier of I[01]) & (not P[a] implies 01(a) in the carrier of I[01]) by
BORSUK_1:40,XXREAL_1:1;
  consider f being Function of X, I[01] such that
A2: for a being object st a in the carrier of X holds (P[a] implies f.a =
  00(a)) & (not P[a] implies f.a = 01(a)) from FUNCT_2:sch 5(A1);
 the carrier of X|V = V by PRE_TOPC:8;
  then
A4: dom f1 = V;
A5: the carrier of X|V` = V` by PRE_TOPC:8;
  then
A6: dom f2 = V`;
A7: dom f = [#]X by FUNCT_2:def 1;
A8: now
    let u be object;
    assume u in dom f1 \/ dom f2;
    then reconsider x = u as Point of X by A7,A4,A6,PRE_TOPC:2;
    hereby
      assume
A9:   u in dom f2;
      then
A10:  (V`-->1).u = 1 by A5,FUNCOP_1:7;
      not x in V by A9,A5,XBOOLE_0:def 5;
      hence f.u = f2.u by A10,A5,A2;
    end;
    assume not u in dom f2;
    then
 x in V by A6,SUBSET_1:29;
    hence f.u = 0 by A2
      .= f1.u;
  end;
  V \/ V` = [#]X by PRE_TOPC:2;
  then f = f1+*f2 by A8,A7,A4,A6,FUNCT_4:def 1;
  then reconsider f as continuous Function of Sorgenfrey-line, I[01] by Th12;
  take f;
  let a be Point of Sorgenfrey-line;
  thus thesis by A2;
end;
