
theorem Th7:
  for M being non empty MetrSpace, P being non empty Subset of
  TopSpaceMetr M, x being Point of M holds (dist_min P) . x = 0 iff for r being
  Real st r > 0 ex p being Point of M st p in P & dist (x, p) < r
proof
  let M be non empty MetrSpace, P be non empty Subset of TopSpaceMetr M, x be
  Point of M;
  reconsider X = (dist(x)).:P as non empty Subset of REAL by TOPMETR:17;
  hereby
    assume
A1: (dist_min P) . x = 0;
    let r be Real;
    assume
A2: r > 0;
    assume
A3: for p being Point of M st p in P holds dist (x, p) >= r;
    for p being Real st p in X holds p >= r
    proof
      let p be Real;
      assume p in X;
      then consider y being object such that
A4:   y in dom dist x and
A5:   y in P and
A6:   p = (dist x).y by FUNCT_1:def 6;
      reconsider z = y as Point of M by A4,TOPMETR:12;
      dist (x, z) >= r by A3,A5;
      hence thesis by A6,WEIERSTR:def 4;
    end;
    then
A7: lower_bound X >= r by SEQ_4:43;
    lower_bound ((dist x) .: P) = lower_bound [#] ((dist x) .: P) by
WEIERSTR:def 3
      .= lower_bound X by WEIERSTR:def 1;
    hence contradiction by A1,A2,A7,WEIERSTR:def 6;
  end;
A8: for p being Real st p in X holds p >= 0
  proof
    let p be Real;
    assume p in X;
    then consider y being object such that
A9: y in dom dist x and
    y in P and
A10: p = (dist x).y by FUNCT_1:def 6;
    reconsider z = y as Point of M by A9,TOPMETR:12;
    dist (x, z) >= 0 by METRIC_1:5;
    hence thesis by A10,WEIERSTR:def 4;
  end;
  assume
A11: for r being Real st r > 0 ex p being Point of M st p in P &
  dist (x, p) < r;
A12: for q being Real st for p being Real st p in X holds p >=
  q holds 0 >= q
  proof
    let q be Real;
    assume
A13: for z being Real st z in X holds z >= q;
    assume 0 < q;
    then consider p being Point of M such that
A14: p in P and
A15: dist (x, p) < q by A11;
    set z = (dist x).p;
    p in the carrier of TopSpaceMetr M by A14;
    then p in dom dist x by FUNCT_2:def 1;
    then
A16: z in X by A14,FUNCT_1:def 6;
    (dist x).p < q by A15,WEIERSTR:def 4;
    hence thesis by A13,A16;
  end;
  lower_bound ((dist x) .: P) = lower_bound [#] ((dist x) .: P) by
WEIERSTR:def 3
    .= lower_bound X by WEIERSTR:def 1;
  then lower_bound((dist(x)).:P) = 0 by A8,A12,SEQ_4:44;
  hence thesis by WEIERSTR:def 6;
end;
