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

theorem Th8:
  for M be Reflexive symmetric triangle non empty MetrStruct for S,
CL be Subset of M st S is bounded for S9 be Subset of TopSpaceMetr M st S = S9
  & CL = Cl S9 holds CL is bounded & diameter S = diameter CL
proof
  let M be Reflexive symmetric triangle non empty MetrStruct;
  let S,CL be Subset of M such that
A1: S is bounded;
  set d=diameter S;
  set T=TopSpaceMetr M;
  let S9 be Subset of T such that
A2: S = S9 and
A3: CL = Cl S9;
  per cases;
  suppose
A4: S<>{};
A5: now
      let x,y be Point of M such that
A6:   x in CL and
A7:   y in CL;
      reconsider X=x,Y=y as Point of T;
      set dxy=dist(x,y);
      set dd=dxy-d;
      set dd2=dd/2;
      set Bx=Ball(x,dd2);
      set By=Ball(y,dd2);
      reconsider BX=Bx,BY=By as Subset of T;
      assume dist(x,y) > d;
      then dd > d-d by XREAL_1:14;
      then
A8:   dd2>0/2 by XREAL_1:74;
      By in Family_open_set M by PCOMPS_1:29;
      then
A9:   BY is open by PRE_TOPC:def 2;
      Bx in Family_open_set M by PCOMPS_1:29;
      then
A10:  BX is open by PRE_TOPC:def 2;
      dist(y,y)=0 by METRIC_1:1;
      then Y in BY by A8,METRIC_1:11;
      then BY meets S9 by A3,A7,A9,TOPS_1:12;
      then consider y1 be object such that
A11:  y1 in BY and
A12:  y1 in S9 by XBOOLE_0:3;
      dist(x,x)=0 by METRIC_1:1;
      then X in BX by A8,METRIC_1:11;
      then BX meets S9 by A3,A6,A10,TOPS_1:12;
      then consider x1 be object such that
A13:  x1 in BX and
A14:  x1 in S9 by XBOOLE_0:3;
      reconsider x1,y1 as Point of M by A13,A11;
A15:  dist(x,x1)<dd2 by A13,METRIC_1:11;
      dist(x1,y1)<=d by A1,A2,A14,A12,TBSP_1:def 8;
      then
A16:  dist(x,x1)+dist(x1,y1)<dd2+ d by A15,XREAL_1:8;
A17:  dist(y,y1)<dd2 by A11,METRIC_1:11;
      dist(x,y1)<=dist(x,x1)+dist(x1,y1) by METRIC_1:4;
      then dist(x,y1)<dd2+d by A16,XXREAL_0:2;
      then dist(x,y1)+dist(y1,y)< dd2+d+ dd2 by A17,XREAL_1:8;
      hence contradiction by METRIC_1:4;
    end;
A18: now
A19:  d+0<d+1 by XREAL_1:8;
      let x,y be Point of M such that
A20:  x in CL and
A21:  y in CL;
      dist(x,y)<=d by A5,A20,A21;
      hence dist(x,y) <= d+1 by A19,XXREAL_0:2;
    end;
A22: now
      let s such that
A23:  for x,y be Point of M st x in CL & y in CL holds dist(x,y)<=s;
      now
        let x,y be Point of M such that
A24:    x in S and
A25:    y in S;
        S c= CL by A2,A3,PRE_TOPC:18;
        hence dist(x,y)<=s by A23,A24,A25;
      end;
      hence d <= s by A1,A4,TBSP_1:def 8;
    end;
A26: CL<>{} by A2,A3,A4,PCOMPS_1:2;
    d+1>0+0 by A1,TBSP_1:21,XREAL_1:8;
    then CL is bounded by A18;
    hence thesis by A26,A5,A22,TBSP_1:def 8;
  end;
  suppose
    S={};
    hence thesis by A2,A3,PCOMPS_1:2;
  end;
end;
