reserve x, y, z for set,
  T for TopStruct,
  A for SubSpace of T,
  P, Q for Subset of T;
reserve TS for TopSpace;
reserve PS, QS for Subset of TS;

theorem Th6:
  TS is T_2 implies for A being Subset of TS st A <> {} & A is
compact for p being Point of TS st p in A` ex PS,QS st PS is open & QS is open
  & p in PS & A c= QS & PS misses QS
proof
  assume
A1: TS is T_2;
  let F be Subset of TS such that
A2: F <> {} and
A3: F is compact;
  set z = the Element of F;
  let a be Point of TS;
  assume a in F`;
  then
A4: not a in F by XBOOLE_0:def 5;
  defpred P[object,object,object] means
  ex PS,QS st $2=PS & $3=QS & PS is open & QS is
  open & a in PS & $1 in QS & PS /\ QS = {};
A5: for x being object holds x in F implies
   ex y,z being object st y in the topology of TS & z in the topology of
  TS & P[x,y,z]
  proof let x be object;
    assume
A6: x in F;
    then reconsider p=x as Point of TS;
    consider W,V being Subset of TS such that
A7: W is open and
A8: V is open and
A9: a in W and
A10: p in V and
A11: W misses V by A1,A4,A6;
    reconsider PS=W, QS=V as set;
    take PS,QS;
    thus PS in the topology of TS & QS in the topology of TS by A7,A8;
    take W,V;
    thus thesis by A7,A8,A9,A10,A11;
  end;
  consider f,g being Function such that
A12: dom f = F & dom g = F and
A13: for x being object st x in F holds P[x,f.x,g.x] from MCART_1:sch 1(A5);
  g.:F c= bool the carrier of TS
  proof
    let x be object;
    assume x in g.:F;
    then consider y being object such that
    y in dom g and
A14: y in F and
A15: g.y=x by FUNCT_1:def 6;
    ex PS,QS st f.y=PS & g.y=QS & PS is open & QS is open & a in PS & y
    in QS & PS /\ QS = {} by A13,A14;
    hence thesis by A15;
  end;
  then reconsider C = g.:F as Subset-Family of TS;
A16: C is open
  proof
    let G be Subset of TS;
    assume G in C;
    then consider x being object such that
    x in dom g and
A17: x in F and
A18: G = g.x by FUNCT_1:def 6;
    ex PS,QS st f.x=PS & g.x=QS & PS is open & QS is open & a in PS & x
    in QS & PS /\ QS = {} by A13,A17;
    hence thesis by A18;
  end;
  F c= union C
  proof
    let x be object;
    assume
A19: x in F;
    then consider PS,QS such that
    f.x=PS and
A20: g.x=QS and
    PS is open and
    QS is open and
    a in PS and
A21: x in QS and
    PS /\ QS = {} by A13;
    QS in C by A12,A19,A20,FUNCT_1:def 6;
    hence thesis by A21,TARSKI:def 4;
  end;
  then C is Cover of F by SETFAM_1:def 11;
  then consider C9 being Subset-Family of TS such that
A22: C9 c= C and
A23: C9 is Cover of F and
A24: C9 is finite by A3,A16;
  C9 c= rng g by A12,A22,RELAT_1:113;
  then consider H9 being set such that
A25: H9 c= dom g and
A26: H9 is finite and
A27: g.:H9 = C9 by A24,ORDERS_1:85;
  f.:H9 c= bool the carrier of TS
  proof
    let x be object;
    assume x in f.:H9;
    then consider y being object such that
    y in dom f and
A28: y in H9 and
A29: f.y=x by FUNCT_1:def 6;
    ex PS,QS st f.y=PS & g.y=QS & PS is open & QS is open & a in PS & y
    in QS & PS /\ QS = {} by A12,A13,A25,A28;
    hence thesis by A29;
  end;
  then reconsider B = f.:H9 as Subset-Family of TS;
  take G0 = meet B, G1 = union C9;
  B is open
  proof
    let G be Subset of TS;
    assume G in B;
    then consider x being object such that
A30: x in dom f and
    x in H9 and
A31: G = f.x by FUNCT_1:def 6;
    ex PS,QS st f.x=PS & g.x=QS & PS is open & QS is open & a in PS & x
    in QS & PS /\ QS = {} by A12,A13,A30;
    hence thesis by A31;
  end;
  hence G0 is open by A26,TOPS_2:20;
  thus G1 is open by A16,A22,TOPS_2:11,19;
A32: for G being set st G in B holds a in G
  proof
    let G be set;
    assume
A33: G in B;
    then reconsider G9 = G as Subset of TS;
    consider x being object such that
A34: x in dom f and
    x in H9 and
A35: G9 = f.x by A33,FUNCT_1:def 6;
    ex PS,QS st f.x=PS & g.x=QS & PS is open & QS is open & a in PS & x
    in QS & PS /\ QS = {} by A12,A13,A34;
    hence thesis by A35;
  end;
  F c= union C9 by A23,SETFAM_1:def 11;
  then z in union C9 by A2;
  then consider D being set such that
  z in D and
A36: D in C9 by TARSKI:def 4;
  reconsider D9 = D as Subset of TS by A36;
  consider y being object such that
A37: y in dom g and
A38: y in H9 and
  D9 = g.y by A27,A36,FUNCT_1:def 6;
  ex PS,QS st f.y=PS & g.y=QS & PS is open & QS is open & a in PS &
  y in QS & PS /\ QS = {} by A12,A13,A37;
  then B <> {} by A12,A37,A38,FUNCT_1:def 6;
  hence a in G0 by A32,SETFAM_1:def 1;
  thus F c= G1 by A23,SETFAM_1:def 11;
  thus G0 /\ G1 = {}
  proof
    set x = the Element of (meet B) /\ (union C9);
    assume
A39: G0 /\ G1 <> {};
    then
A40: x in meet B by XBOOLE_0:def 4;
    x in union C9 by A39,XBOOLE_0:def 4;
    then consider A being set such that
A41: x in A and
A42: A in C9 by TARSKI:def 4;
    consider z being object such that
A43: z in dom g and
A44: z in H9 and
A45: A = g.z by A27,A42,FUNCT_1:def 6;
    consider PS,QS such that
A46: f.z=PS and
A47: g.z=QS and
    PS is open and
    QS is open and
    a in PS and
    z in QS and
A48: PS /\ QS = {} by A12,A13,A43;
    PS in B by A12,A43,A44,A46,FUNCT_1:def 6;
    then x in PS by A40,SETFAM_1:def 1;
    hence contradiction by A41,A45,A47,A48,XBOOLE_0:def 4;
  end;
end;
