reserve X for non empty TopSpace,
  D for Subset of X;
reserve D for non empty set,
  d0 for Element of D;

theorem Th21:
  D \ {d0} is non empty implies for A being Subset of STS(D,d0)
  holds (A = {d0} implies A is closed & A is boundary) & (A is non empty & A is
  closed & A is boundary implies A = {d0})
proof
  assume
A1: D \ {d0} is non empty;
  set G = {P where P is Subset of D : d0 in P & P <> D};
  let A be Subset of STS(D,d0);
A2: Int A in the topology of STS(D,d0) by PRE_TOPC:def 2;
  thus A = {d0} implies A is closed & A is boundary
  proof
    assume
A3: A = {d0};
    hence A is closed by Th20;
A4: now
      assume
A5:   Int A = A;
      then
A6:   d0 in Int A by A3,TARSKI:def 1;
      Int A <> D by A1,A3,A5,XBOOLE_1:37;
      then Int A in G by A6;
      hence contradiction by A2,XBOOLE_0:def 5;
    end;
    Int A c= A by TOPS_1:16;
    then Int A = {} or Int A = A by A3,ZFMISC_1:33;
    hence thesis by A4,TOPS_1:48;
  end;
  thus A is non empty & A is closed & A is boundary implies A = {d0}
  proof
    set Z = A \ {d0};
    assume that
A7: A is non empty and
A8: A is closed;
A9: {d0} c= A by A7,A8,Th20;
A10: Z c= A by XBOOLE_1:36;
    reconsider Z as Subset of STS(D,d0);
    d0 in {d0} by TARSKI:def 1;
    then not ex Q being Subset of D st Q = Z & d0 in Q & Q <> D by
XBOOLE_0:def 5;
    then not Z in G;
    then Z in the topology of STS(D,d0) by XBOOLE_0:def 5;
    then
A11: Z is open;
    assume A is boundary;
    then
A12: Int A = {};
    assume
A13: A <> {d0};
    now
      assume Z = {};
      then A c= {d0} by XBOOLE_1:37;
      hence contradiction by A9,A13,XBOOLE_0:def 10;
    end;
    hence contradiction by A10,A12,A11,TOPS_1:24,XBOOLE_1:3;
  end;
end;
