reserve TS for 1-sorted,
  K, Q for Subset of TS;
reserve TS for TopSpace,
  GX for TopStruct,
  x for set,
  P, Q for Subset of TS,
  K , L for Subset of TS,
  R, S for Subset of GX,
  T, W for Subset of GX;

theorem
  P is closed implies (P is boundary iff for Q st Q <> {} & Q is open ex
  G being Subset of TS st G c= Q & G <> {} & G is open & P misses G)
proof
  assume
A1: P is closed;
  hereby
    assume P is boundary;
    then
A2: P` is dense;
A3: P misses (P`) by XBOOLE_1:79;
    let Q such that
A4: Q <> {} and
A5: Q is open;
    P /\ ((P`) /\ Q) = (P /\ (P`)) /\ Q by XBOOLE_1:16
      .= {} TS /\ Q by A3
      .= {};
    then
A6: P misses ((P`) /\ Q);
    (P`) meets Q by A2,A4,A5,Th45;
    then (P`) /\ Q <> {};
    hence ex G being Subset of TS st G c= Q & G <> {} & G is open & P misses G
    by A1,A5,A6,XBOOLE_1:17;
  end;
  assume
A7: for Q st Q <> {} & Q is open ex G being Subset of TS st G c= Q & G
  <> {} & G is open & P misses G;
  now
    let Q such that
A8: Q <> {} and
A9: Q is open;
    consider G being Subset of TS such that
A10: G c= Q and
A11: G <> {} and
    G is open and
A12: P misses G by A7,A8,A9;
    G misses (P``) by A12;
    then G c= P` by SUBSET_1:24;
    hence (P`) meets Q by A10,A11,XBOOLE_1:67;
  end;
  then P` is dense by Th45;
  hence thesis;
end;
