reserve a for Real;
reserve p,q for Point of TOP-REAL 2;

theorem Th2:
  for X being non empty TopStruct, g being Function of X,R^1,B
being Subset of X,
  a being Real st g is continuous & B={p where p is Point of X
  : g/.p < a } holds B is open
proof
  let X be non empty TopStruct,g be Function of X,R^1, B be Subset of X,a be
  Real;
  assume that
A1: g is continuous and
A2: B={p where p is Point of X:g/.p < a };
  {r where r is Real: r<a} c= the carrier of R^1
  proof
    let x be object;
    assume x in {r where r is Real: r<a};
    then consider r being Real such that
A3:    r=x & r<a;
     r in REAL by XREAL_0:def 1;
    hence thesis by A3,TOPMETR:17;
  end;
  then reconsider D={r where r is Real: r<a} as Subset of R^1;
A4: g"D c= B
  proof
    let x be object;
    assume
A5: x in g"D;
    then reconsider p=x as Point of X;
    g.x in D by A5,FUNCT_1:def 7;
    then
A6: ex r being Real st r=g.x & r<a;
    g/.p=g.p;
    hence thesis by A2,A6;
  end;
A7: [#]R^1 <> {} & D is open by JORDAN2B:24;
  B c= g"D
  proof
    let x be object;
    assume x in B;
    then consider p being Point of X such that
A8: p=x and
A9: g/.p < a by A2;
    dom g=the carrier of X & g.x in D by A8,A9,FUNCT_2:def 1;
    hence thesis by A8,FUNCT_1:def 7;
  end;
  then B=g"D by A4,XBOOLE_0:def 10;
  hence thesis by A1,A7,TOPS_2:43;
end;
