
theorem Th7:
  for M be non empty MetrSpace,
      X be Subset of M,
      Y be Subset of TopSpaceMetr M,
      x be Element of M,
      y be Element of TopSpaceMetr M
    st X=Y & x=y holds
      y is_an_accumulation_point_of Y
    iff
      for r be Real st 0 < r holds Ball(x,r) meets X \ {x}
  proof
    let M be non empty MetrSpace,
        X be Subset of M,
        Y be Subset of TopSpaceMetr M,
        x be Element of M,
        y be Element of TopSpaceMetr M;
    assume
A1: X=Y & x=y;
    hereby
      assume y is_an_accumulation_point_of Y; then
      A2: y in Der Y by TOPGEN_1:16;
      let r be Real;
      assume
      A3: 0 < r;
      reconsider U = Ball(x,r) as Subset of TopSpaceMetr M;
      A4: U is open by TOPMETR:14;
      dist(x,x) = 0 by METRIC_1:1; then
      consider z be Point of TopSpaceMetr M such that
      A5: z in Y /\ U & y <> z by A1,A2,A3,A4,METRIC_1:11,TOPGEN_1:17;
      z in Y & z in U & not z in {y} by A5,TARSKI:def 1,XBOOLE_0:def 4; then
      z in (Y \ {y}) & z in U by XBOOLE_0:def 5;
      hence Ball(x,r) meets X \{x} by A1,XBOOLE_0:def 4;
    end;
    assume
    A6: for r be Real st 0 < r holds Ball(x,r) meets X \ {x};
    for U be open Subset of TopSpaceMetr M st y in U
    ex z be Point of TopSpaceMetr M st z in Y /\ U & y <> z
    proof
      let U be open Subset of TopSpaceMetr M;
      assume
      A7: y in U;
      U is open; then
      consider r be Real such that
      A8: 0 < r & Ball(x,r) c= U by A1,A7,PCOMPS_1:def 4;
      Ball(x,r) meets X \ {x} by A6,A8; then
      consider z be object such that
      A9: z in Ball(x,r) /\ (X \ {x}) by XBOOLE_0:def 1;
      z in Ball(x,r) & z in X \ {x} by A9,XBOOLE_0:def 4; then
      A10: z in U & z in Y & not z in {x} by A1,A8,XBOOLE_0:def 5;
      reconsider z as Point of TopSpaceMetr M by A9;
      take z;
      thus z in Y /\ U & y <> z by A1,A10,TARSKI:def 1,XBOOLE_0:def 4;
    end; then
    y in Der Y by TOPGEN_1:17;
    hence y is_an_accumulation_point_of Y by TOPGEN_1:16;
  end;
