
theorem Th14:
  for M be non empty MetrSpace,
      S be non empty Subset of M holds
      S is sequentially_compact
    iff
      (M|S) is sequentially_compact
  proof
    let M be non empty MetrSpace,
        S be non empty Subset of M;
A1: the carrier of (M|S) = S by TOPMETR:def 2;
    set X = [#](M|S);
    hereby
      assume
  A2: S is sequentially_compact;
      for S1 be sequence of (M|S) st rng S1 c= X
      ex S2 be sequence of (M|S)
        st (ex N be increasing sequence of NAT st S2 = S1 * N )
         & S2 is convergent & lim S2 in X
      proof
        let S1 be sequence of (M|S);
        assume rng S1 c= X;
        A3: rng S1 c= S by A1;
        rng S1 c= [#]M by A1,XBOOLE_1:1; then
        reconsider SS1=S1 as sequence of M by FUNCT_2:6;
        consider SS2 be sequence of M such that
        A4: (ex N be increasing sequence of NAT st SS2 = SS1 * N)
           & SS2 is convergent & lim SS2 in S by A2,A3;
        consider N be increasing sequence of NAT such that
    A5: SS2 = SS1 * N by A4;
        rng SS2 c= rng SS1 by A5,RELAT_1:26; then
        rng SS2 c= [#](M|S) by A3,XBOOLE_1:1; then
        reconsider S2=SS2 as sequence of (M|S) by FUNCT_2:6;
        take S2;
        thus ex N be increasing sequence of NAT st S2 = S1 * N by A5;
        reconsider x = lim SS2 as Element of (M|S) by A4,TOPMETR:def 2;
        now
          let r be Real;
          assume 0 < r; then
          consider n be Nat such that
      A6: for m be Nat st n<=m holds dist(SS2.m,lim SS2) < r
            by A4,TBSP_1:def 3;
          take n;
          thus for m be Nat st n<=m holds dist(S2.m,x) < r
          proof
            let m be Nat;
            assume n<=m; then
            dist(SS2.m,lim SS2) < r by A6;
            hence dist(S2.m,x) < r by TOPMETR:def 1;
          end;
        end;
        hence S2 is convergent;
        thus lim S2 in X;
      end; then
      X is sequentially_compact;
      hence (M|S) is sequentially_compact;
    end;
    assume
A7: (M|S) is sequentially_compact;
    for S1 be sequence of M st rng S1 c= S
    ex S2 be sequence of M
    st (ex N be increasing sequence of NAT st S2 = S1 * N)
     & S2 is convergent & lim S2 in S
    proof
      let S1 be sequence of M;
      assume rng S1 c= S; then
  A8: rng S1 c= [#] (M|S) by TOPMETR:def 2; then
      reconsider SS1=S1 as sequence of (M|S) by FUNCT_2:6;
      consider SS2 be sequence of (M|S) such that
  A9: (ex N be increasing sequence of NAT st SS2 = SS1 * N)
         & SS2 is convergent & lim SS2 in X by A7,A8,Def1;
      consider N be increasing sequence of NAT such that
 A10: SS2 = SS1 * N by A9;
      rng SS2 c= [#]M by A1,XBOOLE_1:1; then
      reconsider S2=SS2 as sequence of M by FUNCT_2:6;
      take S2;
      thus ex N be increasing sequence of NAT st S2 = S1 * N by A10;
      reconsider x = lim SS2 as Element of M by A1,A9;
 A11: now
        let r be Real;
        assume 0 < r; then
        consider n be Nat such that
   A12: for m be Nat st n<=m holds dist(SS2.m,lim SS2) < r
              by A9,TBSP_1:def 3;
        take n;
        thus for m be Nat st n<=m holds dist(S2.m,x) < r
        proof
          let m be Nat;
          assume n<=m; then
          dist(SS2.m,lim SS2) < r by A12;
          hence dist(S2.m,x) < r by TOPMETR:def 1;
        end;
      end;
      hence S2 is convergent; then
      lim S2 = x by A11,TBSP_1:def 3;
      hence lim S2 in S by A1;
    end;
    hence S is sequentially_compact;
  end;
