reserve X for MetrSpace,
  x,y,z for Element of X,
  A for non empty set,
  G for Function of [:A,A:],REAL,
  f for Function,
  k,n,m,m1,m2 for Nat,
  q,r for Real;
reserve X for non empty MetrSpace,
  x,y for Element of X,
  V for Subset of X,
  S,S1,T for sequence of X,
  Nseq for increasing sequence of NAT;

theorem Th28:
  S is Cauchy implies S is bounded
proof
  assume
A1: S is Cauchy;
  now
    take r = 1;
    thus 0 < r;
    consider m1 such that
A2: for n,k st m1 <= n & m1 <= k holds dist(S.n,S.k) < r by A1;
    take m = m1;
    thus for n,k st m <= n & m <= k holds dist(S.n,S.k) < r by A2;
  end;
  then consider r2 being Real, m1 such that
A3: 0 < r2 and
A4: for n,k st m1 <= n & m1 <= k holds dist(S.n,S.k) < r2;
  consider r1 being Real such that
A5: 0 < r1 and
A6: for m2 being Nat st m2 <= m1 holds |.dist_to_point(S,S.m1).m2.| < r1
        by SEQ_2:4;
A7: for m st m <= m1 holds dist(S.m,S.m1) < r1
  proof
    let m such that
A8: m <= m1;
A9: dist_to_point(S,S.m1).m = dist(S.m,S.m1) by Def6;
    then 0 <= dist_to_point(S,S.m1).m by METRIC_1:5;
    then |.dist_to_point(S,S.m1).m.| = dist(S.m,S.m1) by A9,ABSVALUE:def 1;
    hence thesis by A6,A8;
  end;
  ex r,x st 0 < r & for n holds S.n in Ball(x,r)
  proof
    reconsider r = r1 + r2 as Real;
    take r;
    take x = S.m1;
    for n holds S.n in Ball(x,r)
    proof
      let n;
      now
        per cases;
        suppose
A10:      n <= m1;
A11:      r1 < r by A3,XREAL_1:29;
          dist(S.n,S.m1) < r1 by A7,A10;
          then dist(S.n,x) < r by A11,XXREAL_0:2;
          hence thesis by METRIC_1:11;
        end;
        suppose
A12:      m1 <= n;
A13:      r2 < r by A5,XREAL_1:29;
          dist(S.n,S.m1) < r2 by A4,A12;
          then dist(S.n,x) < r by A13,XXREAL_0:2;
          hence thesis by METRIC_1:11;
        end;
      end;
      hence thesis;
    end;
    hence thesis by A3,A5;
  end;
  hence thesis by Th8;
end;
