reserve a, b for Real,
  r for Real,
  rr for Real,
  i, j, n for Nat,
  M for non empty MetrSpace,
  p, q, s for Point of TOP-REAL 2,
  e for Point of Euclid 2,
  w for Point of Euclid n,
  z for Point of M,
  A, B for Subset of TOP-REAL n,
  P for Subset of TOP-REAL 2,
  D for non empty Subset of TOP-REAL 2;
reserve a, b for Real;
reserve a, b for Real;
reserve r for Real;

theorem Th37:
  e = q & p in Ball(e,r) implies q`1-r < p`1 & p`1 < q`1+r
proof
  assume that
A1: e = q and
A2: p in Ball(e,r);
  reconsider f = p as Point of Euclid 2 by TOPREAL3:8;
A3: dist(e,f) < r by A2,METRIC_1:11;
A4: dist(e,f) = (Pitag_dist 2).(e,f) by METRIC_1:def 1
    .= sqrt ((q`1 - p`1)^2 + (q`2 - p`2)^2) by A1,TOPREAL3:7;
A5: r > 0 by A2,TBSP_1:12;
  assume
A6: not thesis;
  per cases by A6;
  suppose
A7: q`1-r >= p`1;
    (q`2-p`2)^2 >= 0 by XREAL_1:63;
    then
A8: (q`1-p`1)^2 + (q`2-p`2)^2 >= (q`1-p`1)^2 + 0 by XREAL_1:6;
    q`1-p`1 >= r by A7,XREAL_1:11;
    then (q`1-p`1)^2 >= r^2 by A5,SQUARE_1:15;
    then (q`1-p`1)^2 + (q`2-p`2)^2 >= r^2 by A8,XXREAL_0:2;
    then sqrt((q`1-p`1)^2 + (q`2-p`2)^2) >= sqrt(r^2) by A5,SQUARE_1:26;
    hence contradiction by A3,A4,A5,SQUARE_1:22;
  end;
  suppose
A9: p`1 >= q`1+r;
    (q`2-p`2)^2 >= 0 by XREAL_1:63;
    then
A10: (q`1-p`1)^2 + (q`2-p`2)^2 >= (q`1-p`1)^2 + 0 by XREAL_1:6;
    p`1-q`1 >= r by A9,XREAL_1:19;
    then (-(q`1-p`1))^2 >= r^2 by A5,SQUARE_1:15;
    then (q`1-p`1)^2 + (q`2-p`2)^2 >= r^2 by A10,XXREAL_0:2;
    then sqrt((q`1-p`1)^2 + (q`2-p`2)^2) >= sqrt(r^2) by A5,SQUARE_1:26;
    hence contradiction by A3,A4,A5,SQUARE_1:22;
  end;
end;
