
theorem Th12:
  for a, b being Real, X being Subset of REAL, V being Subset of
  Closed-Interval-MSpace(a,b) st V = X holds X is open implies V in
  Family_open_set Closed-Interval-MSpace(a,b)
proof
  let a, b be Real;
  let X be Subset of REAL, V be Subset of Closed-Interval-MSpace(a,b);
  assume
A1: V = X;
  assume
A2: X is open;
  for x be Element of Closed-Interval-MSpace(a,b) st x in V holds ex r be
  Real st r>0 & Ball(x,r) c= V
  proof
    let x be Element of Closed-Interval-MSpace(a,b);
    assume
A3: x in V;
    then reconsider r = x as Element of REAL by A1;
    consider N be Neighbourhood of r such that
A4: N c= X by A1,A2,A3,RCOMP_1:18;
    consider g be Real such that
A5: 0<g and
A6: N = ].r-g,r+g.[ by RCOMP_1:def 6;
    reconsider g as Element of REAL by XREAL_0:def 1;
A7: Ball(x,g) c= N
    proof
      let aa be object;
      assume aa in Ball(x,g);
      then
      aa in {q where q is Element of Closed-Interval-MSpace(a,b): dist(x,
      q)<g} by METRIC_1:17;
      then consider q be Element of Closed-Interval-MSpace(a,b) such that
A8:   q = aa and
A9:   dist(x,q) < g;
A10:  q in the carrier of Closed-Interval-MSpace(a,b) & the carrier of
      Closed-Interval-MSpace(a,b) c= the carrier of RealSpace by TOPMETR:def 1;
      then reconsider a9 = aa as Real by A8;
      reconsider x1 = x, q1 = q as Element of REAL by A10,METRIC_1:def 13;
      dist(x,q) = (the distance of Closed-Interval-MSpace(a,b)).(x,q) by
METRIC_1:def 1
        .= real_dist.(x,q) by METRIC_1:def 13,TOPMETR:def 1;
      then real_dist.(q1,x1) < g by A9,METRIC_1:9;
      then |.a9-r.| < g by A8,METRIC_1:def 12;
      hence thesis by A6,RCOMP_1:1;
    end;
    N c= Ball(x,g)
    proof
      let aa be object;
      assume
A11:  aa in N;
      then reconsider a9 = aa as Element of REAL;
      |.a9-r.| < g by A6,A11,RCOMP_1:1;
      then
A12:  real_dist.(a9,r) < g by METRIC_1:def 12;
      aa in X by A4,A11;
      then reconsider
      a99 = aa, r9 = r as Element of Closed-Interval-MSpace(a,b) by A1;
      dist(r9,a99) = (the distance of Closed-Interval-MSpace(a,b)).(r9,
      a99) by METRIC_1:def 1
        .= real_dist.(r9,a99) by METRIC_1:def 13,TOPMETR:def 1;
      then dist(r9,a99) < g by A12,METRIC_1:9;
      hence thesis by METRIC_1:11;
    end;
    then N = Ball(x,g) by A7;
    hence thesis by A1,A4,A5;
  end;
  hence thesis by PCOMPS_1:def 4;
end;
