reserve n,k for Element of NAT;
reserve x,y,X for set;
reserve g,r,p for Real;
reserve S for RealNormSpace;
reserve rseq for Real_Sequence;
reserve seq,seq1 for sequence of S;
reserve x0 for Point of S;
reserve Y for Subset of S;

theorem Th2:
  for X being Subset of S st X is open for r be Point of S st r in
  X ex N being Neighbourhood of r st N c= X
proof
  let X be Subset of S;
  assume X is open;
  then
A1: X` is closed;
  let r be Point of S;
  assume that
A2: r in X and
A3: for N be Neighbourhood of r holds not N c= X;
  defpred P[Element of NAT,Point of S] means $2 in {y where y is Point of S:
  ||.y-r.|| < 1/($1+1)} & $2 in X`;
A4: now
    let g be Real such that
A5: 0<g;
    set N={y where y is Point of S:||.y-r.|| < g};
    N is Neighbourhood of r by A5,NFCONT_1:3;
    then not N c= X by A3;
    then consider x be object such that
A6: x in N and
A7: not x in X;
    consider s be Point of S such that
A8: x=s and
A9: ||.s-r.|| <g by A6;
    take s;
    thus s in N by A9;
    thus s in X` by A7,A8,XBOOLE_0:def 5;
  end;
A10: for n ex s be Point of S st P[n,s]
  proof
    let n;
    0 < 1 * (n + 1)";
    then 0 < 1/(n + 1) by XCMPLX_0:def 9;
    hence thesis by A4;
  end;
  consider s1 be sequence of S such that
A11: for n being Element of NAT holds P[n,s1.n] from FUNCT_2:sch 3(A10);
A12: rng s1 c= X`
  proof
    let x be object;
    assume x in rng s1;
    then consider y be object such that
A13: y in dom s1 and
A14: s1.y=x by FUNCT_1:def 3;
    reconsider y as Element of NAT by A13;
    s1.y in X` by A11;
    hence thesis by A14;
  end;
A15: now
    let p be Real;
    assume
A16: 0<p;
    consider n being Nat such that
A17: p"<n by SEQ_4:3;
    p" + 0 < n + 1 by A17,XREAL_1:8;
    then 1/(n+1) < 1/p" by A16,XREAL_1:76;
    then
A18: 1/(n+1) < p by XCMPLX_1:216;
    take n;
    let m be Nat;
A19:  m in NAT by ORDINAL1:def 12;
    assume n<=m;
    then
A20: n + 1 <= m + 1 by XREAL_1:6;
    s1.m in {y where y is Point of S:||.y-r.|| < 1/(m+1)} by A11,A19;
    then
A21: ex y be Point of S st s1.m=y & ||.y-r.|| < 1/(m+1);
    1/(m+1) <= 1/(n+1) by A20,XREAL_1:118;
    then ||.s1.m - r.|| < 1/(n+1) by A21,XXREAL_0:2;
    hence ||.s1.m - r.|| <p by A18,XXREAL_0:2;
  end;
  then
A22: s1 is convergent;
  then lim s1 = r by A15,NORMSP_1:def 7;
  then r in X` by A22,A12,A1;
  hence contradiction by A2,XBOOLE_0:def 5;
end;
