reserve x,x1,x2,y,z,z1 for set;
reserve s1,r,r1,r2 for Real;
reserve s,w1,w2 for Real;
reserve n,i for Element of NAT;
reserve X for non empty TopSpace;
reserve p,p1,p2,p3 for Point of TOP-REAL n;
reserve P for Subset of TOP-REAL n;

theorem Th13:
  for s1,P,i st P = { p: s1<p/.i } & i in Seg n holds P is open
proof
  let s1,P,i such that
A1: P= { p:s1<p/.i } & i in Seg n;
  reconsider s1 as Real;
A2: the TopStruct of TOP-REAL n = TopSpaceMetr Euclid n by EUCLID:def 8;
  then reconsider PP=P as Subset of TopSpaceMetr Euclid n;
  for pe being Point of Euclid n st pe in P ex r be Real st r>0 &
  Ball(pe,r) c= P
  proof
    let pe be Point of Euclid n;
    assume pe in P;
    then consider p such that
A3: p=pe and
A4: s1<p/.i by A1;
    set r=(p/.i-s1)/2;
A5: p/.i-s1>0 by A4,XREAL_1:50;
    Ball(pe,r) c= P
    proof
      let x be object;
      assume x in Ball(pe,r);
      then x in {q where q is Element of Euclid n:dist(pe,q)<r} by METRIC_1:17;
      then consider q being Element of Euclid n such that
A6:   q=x and
A7:   dist(pe,q)<r;
      reconsider ppe=pe, pq=q as Point of TOP-REAL n by TOPREAL3:8;
      reconsider pen=ppe, pqn=pq as Element of REAL n;
      (Pitag_dist n).(pe,q)=dist(pe,q) by METRIC_1:def 1;
      then
A8:   |.pen-pqn.|<r by A7,EUCLID:def 6;
      reconsider qq = ppe-pq as Element of REAL n by EUCLID:22;
      (ppe-pq)/.i <= |.qq.| by A1,Th11;
      then (ppe-pq)/.i <= |.pen-pqn.|;
      then (ppe-pq)/.i <r by A8,XXREAL_0:2;
      then ppe/.i-pq/.i < r by A1,Th6;
      then ppe/.i-pq/.i+pq/.i < r+pq/.i by XREAL_1:6;
      then
A9:   ppe/.i-r < pq/.i+r-r by XREAL_1:9;
      p/.i-(p/.i-s1)/2 =s1+r;
      then s1< p/.i-(p/.i-s1)/2 by A5,XREAL_1:29,139;
      then s1<pq/.i by A3,A9,XXREAL_0:2;
      hence thesis by A1,A6;
    end;
    hence thesis by A5,XREAL_1:139;
  end;
  then PP is open by TOPMETR:15;
  hence thesis by A2,PRE_TOPC:30;
end;
