reserve k, k1, n, n1, m for Nat;
reserve X, y for set;
reserve p for Real;
reserve r for Real;
reserve a, a1, a2, b, b1, b2, x, x0, z, z0 for Complex;
reserve s1, s3, seq, seq1 for Complex_Sequence;
reserve Y for Subset of COMPLEX;
reserve f, f1, f2 for PartFunc of COMPLEX,COMPLEX;
reserve Nseq for increasing sequence of NAT;
reserve h for 0-convergent non-zero Complex_Sequence;
reserve c for constant Complex_Sequence;
reserve R, R1, R2 for C_RestFunc;
reserve L, L1, L2 for C_LinearFunc;

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