
theorem Th3:
  for M be non empty MetrSpace,
      X be Subset of TopSpaceMetr M holds
    for x be object holds
        x in Cl X
      iff
        ex S be sequence of M
          st (for n be Nat holds S.n in X)
           & S is convergent & lim S = x
  proof
    let M be non empty MetrSpace,
        X be Subset of TopSpaceMetr M;
    let x be object;
    hereby
      assume
      A1: x in Cl X;
      reconsider x0 = x as Element of M by A1;
      defpred P[Element of NAT, object] means
      $2 in X & $2 in Ball(x0, 1/($1+1));
  A2: for n be Element of NAT ex p be Element of M st P[n,p]
      proof
        let n be Element of NAT;
        set r = 1/(n+1);
        reconsider G = Ball(x0,r) as Subset of TopSpaceMetr M;
        dist(x0,x0) = 0 by METRIC_1:1; then
        G is open & x0 in G by METRIC_1:11,TOPMETR:14; then
        X meets Ball(x0,r) by A1,PRE_TOPC:def 7; then
        consider p be object such that
        A3: p in X /\ Ball(x0,r) by XBOOLE_0:def 1;
        reconsider p as Element of M by A3;
        take p;
        thus thesis by A3,XBOOLE_0:def 4;
      end;
      consider S be sequence of M such that
      A4: for n be Element of NAT holds P[n,S.n] from FUNCT_2:sch 3(A2);
      A5: now
        let n be Nat;
        n in NAT by ORDINAL1:def 12; then
        S.n in X & S.n in Ball(x0,1/(n+1)) by A4;
        hence S.n in X & dist(S.n,x0) < 1/(n+1) by METRIC_1:11;
      end;
  A6: now
        let s be Real;
        assume
        A7: 0 < s;
        consider n be Nat such that
        A8: s"<n by SEQ_4:3;
        take k=n;
        let m be Nat;
        assume k<=m; then
        k+1<=m+1 by XREAL_1:6; then
        A9: 1/(m+1)<=1/(k+1) by XREAL_1:118;
        s"+0 <n+1 by A8,XREAL_1:8; then
        1/(n+1)<1/s" by A7,XREAL_1:76; then
        1/(m+1)<s by A9,XXREAL_0:2;
        hence dist(S.m,x0) < s by A5,XXREAL_0:2;
      end; then
      A10: S is convergent; then
      lim S = x by A6,TBSP_1:def 3;
      hence ex S be sequence of M
              st (for n be Nat holds S.n in X)
               & S is convergent & lim S = x by A5,A10;
    end;
    given S be sequence of M such that
    A11: for n be Nat holds S.n in X and
    A12: S is convergent and
    A13: lim S = x;
    X c= Cl X by PRE_TOPC:18; then
    A14: for n be Nat holds S.n in Cl X by A11,TARSKI:def 3;
    Cl (Cl X) = Cl X;
    hence x in Cl X by A12,A13,A14,PRE_TOPC:22,TOPMETR3:1;
  end;
