let M be non empty MetrSpace; :: thesis: for C being sequence of M ex S being non-empty closed SetSequence of M st
( S is non-ascending & ( C is Cauchy implies ( S is pointwise_bounded & lim (diameter S) = 0 ) ) & ( for i being Nat ex U being Subset of (TopSpaceMetr M) st
( U = { (C . j) where j is Nat : j >= i } & S . i = Cl U ) ) )

set T = TopSpaceMetr M;
let C be sequence of M; :: thesis: ex S being non-empty closed SetSequence of M st
( S is non-ascending & ( C is Cauchy implies ( S is pointwise_bounded & lim (diameter S) = 0 ) ) & ( for i being Nat ex U being Subset of (TopSpaceMetr M) st
( U = { (C . j) where j is Nat : j >= i } & S . i = Cl U ) ) )

defpred S1[ object , object ] means for i being Nat st i = $1 holds
ex S being Subset of (TopSpaceMetr M) st
( S = { (C . j) where j is Nat : j >= i } & $2 = Cl S );
A1: for x being object st x in NAT holds
ex y being object st
( y in bool the carrier of M & S1[x,y] )
proof
let x be object ; :: thesis: ( x in NAT implies ex y being object st
( y in bool the carrier of M & S1[x,y] ) )

assume x in NAT ; :: thesis: ex y being object st
( y in bool the carrier of M & S1[x,y] )

then reconsider x9 = x as Nat ;
set S = { (C . j) where j is Nat : j >= x9 } ;
{ (C . j) where j is Nat : j >= x9 } c= the carrier of (TopSpaceMetr M)
proof
let y be object ; :: according to TARSKI:def 3 :: thesis: ( not y in { (C . j) where j is Nat : j >= x9 } or y in the carrier of (TopSpaceMetr M) )
assume y in { (C . j) where j is Nat : j >= x9 } ; :: thesis: y in the carrier of (TopSpaceMetr M)
then ex j being Nat st
( C . j = y & j >= x9 ) ;
hence y in the carrier of (TopSpaceMetr M) ; :: thesis: verum
end;
then reconsider S = { (C . j) where j is Nat : j >= x9 } as Subset of (TopSpaceMetr M) ;
take Cl S ; :: thesis: ( Cl S in bool the carrier of M & S1[x, Cl S] )
thus ( Cl S in bool the carrier of M & S1[x, Cl S] ) ; :: thesis: verum
end;
consider S being SetSequence of M such that
A2: for x being object st x in NAT holds
S1[x,S . x] from FUNCT_2:sch 1(A1);
A3: now :: thesis: for x being object st x in dom S holds
not S . x is empty
let x be object ; :: thesis: ( x in dom S implies not S . x is empty )
assume x in dom S ; :: thesis: not S . x is empty
then reconsider i = x as Element of NAT ;
consider U being Subset of (TopSpaceMetr M) such that
A4: U = { (C . j) where j is Nat : j >= i } and
A5: S . i = Cl U by A2;
A6: U c= S . i by A5, PRE_TOPC:18;
C . i in U by A4;
hence not S . x is empty by A6; :: thesis: verum
end;
now :: thesis: for i being Nat holds S . i is closed
let i be Nat; :: thesis: S . i is closed
i in NAT by ORDINAL1:def 12;
then ex U being Subset of (TopSpaceMetr M) st
( U = { (C . j) where j is Nat : j >= i } & S . i = Cl U ) by A2;
hence S . i is closed by Th6; :: thesis: verum
end;
then reconsider S = S as non-empty closed SetSequence of M by A3, Def8, FUNCT_1:def 9;
take S ; :: thesis: ( S is non-ascending & ( C is Cauchy implies ( S is pointwise_bounded & lim (diameter S) = 0 ) ) & ( for i being Nat ex U being Subset of (TopSpaceMetr M) st
( U = { (C . j) where j is Nat : j >= i } & S . i = Cl U ) ) )

now :: thesis: for i being Nat holds S . (i + 1) c= S . i
let i be Nat; :: thesis: S . (i + 1) c= S . i
i in NAT by ORDINAL1:def 12;
then consider U being Subset of (TopSpaceMetr M) such that
A7: U = { (C . j) where j is Nat : j >= i } and
A8: S . i = Cl U by A2;
consider U1 being Subset of (TopSpaceMetr M) such that
A9: U1 = { (C . j) where j is Nat : j >= i + 1 } and
A10: S . (i + 1) = Cl U1 by A2;
U1 c= U
proof
let x be object ; :: according to TARSKI:def 3 :: thesis: ( not x in U1 or x in U )
assume x in U1 ; :: thesis: x in U
then consider j being Nat such that
A11: x = C . j and
A12: j >= i + 1 by A9;
j >= i by A12, NAT_1:13;
hence x in U by A7, A11; :: thesis: verum
end;
hence S . (i + 1) c= S . i by A8, A10, PRE_TOPC:19; :: thesis: verum
end;
hence A13: S is non-ascending by KURATO_0:def 3; :: thesis: ( ( C is Cauchy implies ( S is pointwise_bounded & lim (diameter S) = 0 ) ) & ( for i being Nat ex U being Subset of (TopSpaceMetr M) st
( U = { (C . j) where j is Nat : j >= i } & S . i = Cl U ) ) )

thus ( C is Cauchy implies ( S is pointwise_bounded & lim (diameter S) = 0 ) ) :: thesis: for i being Nat ex U being Subset of (TopSpaceMetr M) st
( U = { (C . j) where j is Nat : j >= i } & S . i = Cl U )
proof
assume A14: C is Cauchy ; :: thesis: ( S is pointwise_bounded & lim (diameter S) = 0 )
A15: now :: thesis: for i being Nat holds S . i is bounded
let i be Nat; :: thesis: S . i is bounded
i in NAT by ORDINAL1:def 12;
then consider U being Subset of (TopSpaceMetr M) such that
A16: U = { (C . j) where j is Nat : j >= i } and
A17: S . i = Cl U by A2;
reconsider U9 = U as Subset of M ;
U c= rng C
proof
let x be object ; :: according to TARSKI:def 3 :: thesis: ( not x in U or x in rng C )
assume x in U ; :: thesis: x in rng C
then consider j being Nat such that
A18: ( x = C . j & j >= i ) by A16;
A19: j in NAT by ORDINAL1:def 12;
dom C = NAT by FUNCT_2:def 1;
hence x in rng C by A18, FUNCT_1:def 3, A19; :: thesis: verum
end;
then U9 is bounded by A14, TBSP_1:14, TBSP_1:26;
hence S . i is bounded by A17, Th8; :: thesis: verum
end;
then reconsider S9 = S as non-empty pointwise_bounded closed SetSequence of M by Def1;
set d = diameter S9;
A20: for r being Real st 0 < r holds
ex n being Nat st
for m being Nat st n <= m holds
|.(((diameter S9) . m) - 0).| < r
proof
let r be Real; :: thesis: ( 0 < r implies ex n being Nat st
for m being Nat st n <= m holds
|.(((diameter S9) . m) - 0).| < r )

assume A21: 0 < r ; :: thesis: ex n being Nat st
for m being Nat st n <= m holds
|.(((diameter S9) . m) - 0).| < r

reconsider R = r as Real ;
set R2 = R / 2;
R / 2 > 0 by A21, XREAL_1:139;
then consider p being Nat such that
A22: for n, m being Nat st p <= n & p <= m holds
dist ((C . n),(C . m)) < R / 2 by A14;
take p ; :: thesis: for m being Nat st p <= m holds
|.(((diameter S9) . m) - 0).| < r

let m be Nat; :: thesis: ( p <= m implies |.(((diameter S9) . m) - 0).| < r )
assume A23: p <= m ; :: thesis: |.(((diameter S9) . m) - 0).| < r
m in NAT by ORDINAL1:def 12;
then consider U being Subset of (TopSpaceMetr M) such that
A24: U = { (C . j) where j is Nat : j >= m } and
A25: S . m = Cl U by A2;
reconsider U9 = U as Subset of M ;
A26: now :: thesis: for x, y being Point of M st x in U9 & y in U9 holds
dist (x,y) <= R / 2
let x, y be Point of M; :: thesis: ( x in U9 & y in U9 implies dist (x,y) <= R / 2 )
assume that
A27: x in U9 and
A28: y in U9 ; :: thesis: dist (x,y) <= R / 2
consider j being Nat such that
A29: y = C . j and
A30: j >= m by A24, A28;
A31: j >= p by A23, A30, XXREAL_0:2;
consider i being Nat such that
A32: x = C . i and
A33: i >= m by A24, A27;
i >= p by A23, A33, XXREAL_0:2;
hence dist (x,y) <= R / 2 by A22, A32, A29, A31; :: thesis: verum
end;
A34: U c= rng C
proof
let x be object ; :: according to TARSKI:def 3 :: thesis: ( not x in U or x in rng C )
assume x in U ; :: thesis: x in rng C
then consider j being Nat such that
A35: ( x = C . j & j >= m ) by A24;
A36: j in NAT by ORDINAL1:def 12;
dom C = NAT by FUNCT_2:def 1;
hence x in rng C by A35, FUNCT_1:def 3, A36; :: thesis: verum
end;
then A37: U9 is bounded by A14, TBSP_1:14, TBSP_1:26;
then A38: diameter U9 = diameter (S . m) by A25, Th8;
C . m in U by A24;
then A39: diameter U9 <= R / 2 by A37, A26, TBSP_1:def 8;
rng C is bounded by A14, TBSP_1:26;
then diameter (S . m) >= 0 by A34, A38, TBSP_1:14, TBSP_1:21;
then A40: |.(diameter (S . m)).| <= R / 2 by A39, A38, ABSVALUE:def 1;
R / 2 < R by A21, XREAL_1:216;
then |.(diameter (S . m)).| < R by A40, XXREAL_0:2;
hence |.(((diameter S9) . m) - 0).| < r by Def2; :: thesis: verum
end;
thus S is pointwise_bounded by A15; :: thesis: lim (diameter S) = 0
A41: diameter S9 is bounded_below by Th1;
diameter S9 is non-increasing by A13, Th2;
hence lim (diameter S) = 0 by A41, A20, SEQ_2:def 7; :: thesis: verum
end;
let i be Nat; :: thesis: ex U being Subset of (TopSpaceMetr M) st
( U = { (C . j) where j is Nat : j >= i } & S . i = Cl U )

i in NAT by ORDINAL1:def 12;
hence ex U being Subset of (TopSpaceMetr M) st
( U = { (C . j) where j is Nat : j >= i } & S . i = Cl U ) by A2; :: thesis: verum