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 Th42:
  P = Ball(e,r) & p = e implies proj2.:P = ].p`2-r,p`2+r.[
proof
  assume that
A1: P = Ball(e,r) and
A2: p = e;
  hereby
    let a be object;
    assume a in proj2.:P;
    then consider x being object such that
A3: x in the carrier of TOP-REAL 2 and
A4: x in P and
A5: a = proj2.x by FUNCT_2:64;
    reconsider b = a as Real by A5;
    reconsider x as Point of TOP-REAL 2 by A3;
A6: a = x`2 by A5,PSCOMP_1:def 6;
    then
A7: b < p`2+r by A1,A2,A4,Th38;
    p`2-r < b by A1,A2,A4,A6,Th38;
    hence a in ].p`2-r,p`2+r.[ by A7,XXREAL_1:4;
  end;
  let a be object;
  assume
A8: a in ].p`2-r,p`2+r.[;
  then reconsider b = a as Real;
  reconsider f = |[p`1,b]| as Point of Euclid 2 by TOPREAL3:8;
A9: dist(f,e) = (Pitag_dist 2).(f,e) by METRIC_1:def 1
    .= sqrt ((|[p`1,b]|`1 - p`1)^2 + (|[p`1,b]|`2 - p`2)^2 ) by A2,TOPREAL3:7
    .= sqrt ((p`1 - p`1)^2 + (|[p`1,b]|`2 - p`2)^2)
    .= sqrt (0 + (b - p`2)^2);
  b < p`2+r by A8,XXREAL_1:4;
  then
A10: b - p`2 < p`2+r - p`2 by XREAL_1:9;
  now
    per cases;
    case
      0 <= b - p`2;
      hence dist(f,e) < r by A10,A9,SQUARE_1:22;
    end;
    case
A11:  0 > b - p`2;
      p`2 - r < b by A8,XXREAL_1:4;
      then p`2 - r + r < b + r by XREAL_1:6;
      then
A12:  p`2 - b < r + b - b by XREAL_1:9;
      sqrt ((b - p`2)^2) = sqrt ((-(b - p`2))^2)
        .= -(b - p`2) by A11,SQUARE_1:22;
      hence dist(f,e) < r by A9,A12;
    end;
  end;
  then
A13: |[p`1,b]| in P by A1,METRIC_1:11;
  a = |[p`1,b]|`2
    .= proj2.(|[p`1,b]|) by PSCOMP_1:def 6;
  hence thesis by A13,FUNCT_2:35;
end;
