reserve i,n,m for Nat,
  x,y,X,Y for set,
  r,s for Real;

theorem Th10:
  for M be non empty MetrSpace holds M is complete iff for S be
non-empty pointwise_bounded closed SetSequence of M st S is non-ascending &
lim diameter S = 0 holds meet S is non empty
proof
  let M be non empty MetrSpace;
  set T=TopSpaceMetr(M);
  thus M is complete implies
  for S be non-empty pointwise_bounded closed SetSequence of
  M st S is non-ascending & lim diameter S = 0 holds meet S is non empty
  proof
    assume
A1: M is complete;
    let S be non-empty pointwise_bounded closed SetSequence of M such that
A2: S is non-ascending and
A3: lim diameter S = 0;
    defpred P[object,object] means $2 in S.$1;
   :: Funkcja Kuratowskiego !!!
A4: for x being object st x in NAT
ex y being object st y in the carrier of M & P[x,y]
    proof
A5:   dom S=NAT by FUNCT_2:def 1;
      let x being object such that
A6:   x in NAT;
      S.x is non empty by A6,A5,FUNCT_1:def 9;
      then
A7:   ex y being object st y in S.x by XBOOLE_0:def 1;
      S.x in rng S by A6,A5,FUNCT_1:def 3;
      hence thesis by A7;
    end;
    consider F be sequence of the carrier of M such that
A8: for x being object st x in NAT holds P[x,F.x] from FUNCT_2:sch 1(A4);
    for i holds F.i in S.i by A8,ORDINAL1:def 12;
    then F is Cauchy by A2,A3,Th4;
    then F is convergent by A1;
    then consider x be Point of M such that
A9: F is_convergent_in_metrspace_to x by METRIC_6:10;
    reconsider F9 = F as sequence of T;
    reconsider x9 = x as Point of T;
    now
      let i be Nat;
      set F1=F9^\i;
      reconsider Si=S.i as Subset of T;
A10:  rng F1 c= Si
      proof
        let x be object;
        assume x in rng F1;
        then consider y being object such that
A11:    y in dom F1 and
A12:    F1.y=x by FUNCT_1:def 3;
        reconsider y as Element of NAT by A11;
        i<=y+i by NAT_1:11;
        then
A13:    S.(y+i) c= S.i by A2,PROB_1:def 4;
A14:     y+i in NAT by ORDINAL1:def 12;
        x=F.(y+i) by A12,NAT_1:def 3;
        then x in S.(y+i) by A8,A14;
        hence thesis by A13;
      end;
      F9 is_convergent_to x9 by A9,FRECHET2:28;
      then F1 is_convergent_to x9 by FRECHET2:15;
      then
A15:  x in Lim F1 by FRECHET:def 5;
      S.i is closed by Def8;
      then Si is closed by Th6;
      then Lim F1 c= Si by A10,FRECHET2:9;
      hence x in S.i by A15;
    end;
    hence thesis by KURATO_0:3;
  end;
  assume
A16: for S be non-empty pointwise_bounded closed SetSequence of M st S is
  non-ascending & lim diameter S = 0 holds meet S is non empty;
  let F be sequence of M such that
A17: F is Cauchy;
  consider S be non-empty closed SetSequence of M such that
A18: S is non-ascending and
A19: F is Cauchy implies S is pointwise_bounded & lim diameter S = 0 and
A20: for i ex U be Subset of T st U={ F.j where j is Nat:j >=
  i} & S.i = Cl U by Th9;
  set d=diameter S;
A21: d is non-increasing by A17,A18,A19,Th2;
  meet S is non empty by A16,A17,A18,A19;
  then consider x being object such that
A22: x in meet S by XBOOLE_0:def 1;
A23: d is bounded_below by A17,A19,Th1;
  reconsider x as Point of M by A22;
  take x;
  let r;
  assume r>0;
  then consider n be Nat such that
A24: for m be Nat st n<=m holds |.d.m-0 .|<r by A17,A19,A23,A21,
SEQ_2:def 7;
  take n;
  let m be Nat;
  assume n<=m;
  then
A25: |.d.m-0 .|<r by A24;
A26: S.m is bounded by A17,A19;
A27: x in S.m by A22,KURATO_0:3;
A28: diameter (S.m)=d.m by Def2;
  consider U be Subset of T such that
A29: U = { F.j where j is Nat: j >= m } and
A30: S.m = Cl U by A20;
A31: U c= Cl U by PRE_TOPC:18;
  F.m in U by A29;
  then
A32: dist(F.m,x) <= diameter (S.m) by A30,A31,A27,A26,TBSP_1:def 8;
  diameter (S.m)>=0 by A26,TBSP_1:21;
  then d.m <r by A28,A25,ABSVALUE:def 1;
  hence thesis by A32,A28,XXREAL_0:2;
end;
