reserve r, s, t, g for Real,

          r3, r1, r2, q3, p3 for Real;
reserve T for TopStruct,
  f for RealMap of T;
reserve p for Point of TOP-REAL 2,
  P for Subset of TOP-REAL 2,
  Z for non empty Subset of TOP-REAL 2,
  X for non empty compact Subset of TOP-REAL 2;

theorem Th58:
  S-min X in S-most X & S-max X in S-most X
proof
  set p2W = (proj1|S-most X), c = the carrier of (TOP-REAL 2)|S-most X;
A1: (SW-corner X)`2 = S-bound X & (SE-corner X)`2 = S-bound X by EUCLID:52;
  p2W.:c is with_min by MEASURE6:def 13;
  then lower_bound (p2W.:c) in p2W.:c;
  then consider p being object such that
A2: p in c and
  p in c and
A3: lower_bound (p2W.:c) = p2W.p by FUNCT_2:64;
A4: c = S-most X by PRE_TOPC:8;
  then reconsider p as Point of TOP-REAL 2 by A2;
  p in LSeg(SW-corner X, SE-corner X) by A4,A2,XBOOLE_0:def 4;
  then
A5: p`2 = S-bound X by A1,GOBOARD7:6;
A6: (SW-corner X)`2 = S-bound X & (SE-corner X)`2 = S-bound X by EUCLID:52;
  p2W.p = p`1 by A4,A2,Th22;
  hence S-min X in S-most X by A4,A2,A3,A5,EUCLID:53;
  p2W.:c is with_max by MEASURE6:def 12;
  then upper_bound (p2W.:c) in p2W.:c;
  then consider p being object such that
A7: p in c and
  p in c and
A8: upper_bound (p2W.:c) = p2W.p by FUNCT_2:64;
  reconsider p as Point of TOP-REAL 2 by A4,A7;
  p in LSeg(SW-corner X, SE-corner X) by A4,A7,XBOOLE_0:def 4;
  then
A9: p`2 = S-bound X by A6,GOBOARD7:6;
  p2W.p = p`1 by A4,A7,Th22;
  hence thesis by A4,A7,A8,A9,EUCLID:53;
end;
