
theorem Th9:
  for r, gg, a, b being Real, x being Element of
  Closed-Interval-MSpace (a, b) st a <= b & x = r & ].r-gg, r+gg.[ c= [.a,b.]
  holds ].r-gg, r+gg.[ = Ball (x, gg)
proof
  let r, gg, a, b be Real, x be Element of Closed-Interval-MSpace(a,b);
  assume that
A1: a <= b and
A2: x=r and
A3: ].r-gg, r+gg.[ c= [.a,b.];
  reconsider g = gg as Element of REAL by XREAL_0:def 1;
  reconsider r as Element of REAL by XREAL_0:def 1;
  set CM = Closed-Interval-MSpace(a,b);
  set N1 = Ball (x, g);
A4: the carrier of CM c= the carrier of RealSpace by TOPMETR:def 1;
A5: N1 c= ].r-g,r+g.[
  proof
    let i be object;
    assume i in N1;
    then i in {q where q is Element of CM : dist(x,q)<g} by METRIC_1:17;
    then consider q be Element of CM such that
A6: q = i and
A7: dist(x,q) < g;
    reconsider a9 = i as Element of REAL by A4,A6,METRIC_1:def 13;
    reconsider x2 = x, q2 = q as Element of CM;
    reconsider x1 = x, q1 = q as Element of REAL by A4,METRIC_1:def 13;
    dist(x2,q2) = (the distance of CM).(x2,q2) by METRIC_1:def 1
      .= real_dist.(x2,q2) by METRIC_1:def 13,TOPMETR:def 1;
    then real_dist.(q1,x1) < g by A7,METRIC_1:9;
    then |.a9-r.| < g by A2,A6,METRIC_1:def 12;
    hence thesis by RCOMP_1:1;
  end;
  ].r-g,r+g.[ c= N1
  proof
    let i be object;
    assume
A8: i in ].r-g,r+g.[;
    then reconsider a9 = i as Element of REAL;
    reconsider a99 = i as Element of CM by A1,A3,A8,TOPMETR:10;
    |.a9-r.| < g by A8,RCOMP_1:1;
    then
A9: real_dist.(a9,r) < g by METRIC_1:def 12;
    dist(x,a99) = (the distance of CM).(x,a99) by METRIC_1:def 1
      .= real_dist.(x,a99) by METRIC_1:def 13,TOPMETR:def 1;
    then dist(x,a99) < g by A2,A9,METRIC_1:9;
    hence thesis by METRIC_1:11;
  end;
  hence thesis by A5;
end;
