
theorem Th20:
  for M being non empty MetrSpace, P being non empty Subset of
TopSpaceMetr M, x, y being Point of M st y in P & P is compact holds (dist_max
  P) . x >= dist (x, y)
proof
  let M be non empty MetrSpace, P be non empty Subset of TopSpaceMetr M, x, y
  be Point of M;
  assume that
A1: y in P and
A2: P is compact;
  consider X being non empty Subset of REAL such that
A3: X = (dist x) .: P and
A4: upper_bound ((dist x).:P) = upper_bound X by Th11;
A5: (dist_max P) . x = upper_bound X by A4,WEIERSTR:def 5;
  dom dist x = the carrier of TopSpaceMetr M & dist (x, y) = (dist x).y by
FUNCT_2:def 1,WEIERSTR:def 4;
  then
A6: dist (x, y) in X by A1,A3,FUNCT_1:def 6;
  X is bounded_above by A2,A3,Lm1;
  hence thesis by A5,A6,SEQ_4:def 1;
end;
