reserve n for Element of NAT,
  V for Subset of TOP-REAL n,
  s,s1,s2,t,t1,t2 for Point of TOP-REAL n,
  C for Simple_closed_curve,
  P for Subset of TOP-REAL 2,
  a,p ,p1,p2,q,q1,q2 for Point of TOP-REAL 2;

theorem Th17:
  for C being compact Subset of TOP-REAL 2 holds p in BDD C
  implies North-Bound(p,C) in C & North-Bound(p,C) in north_halfline p &
  South-Bound(p,C) in C & South-Bound(p,C) in south_halfline p
proof
  let C be compact Subset of TOP-REAL 2;
  set X = C /\ north_halfline p;
  X c= C by XBOOLE_1:17;
  then proj2.:X is real-bounded by JCT_MISC:14,RLTOPSP1:42;
  then
A1: proj2.:X is bounded_below;
  assume
A2: p in BDD C;
  then not north_halfline p c= UBD C by Th11;
  then north_halfline p meets C by JORDAN2C:129;
  then
A3: X is non empty;
  X is bounded by RLTOPSP1:42,XBOOLE_1:17;
  then proj2.:X is closed by JCT_MISC:13;
  then lower_bound (proj2.:X) in proj2.:X by A3,A1,Lm2,RCOMP_1:13,RELAT_1:119;
  then consider x being object such that
A4: x in the carrier of TOP-REAL 2 and
A5: x in X and
A6: lower_bound (proj2.:X) = proj2.x by FUNCT_2:64;
  reconsider x as Point of TOP-REAL 2 by A4;
A7: x`2 = lower_bound (proj2.:X) by A6,PSCOMP_1:def 6
    .= North-Bound(p,C)`2 by EUCLID:52;
  x in north_halfline p by A5,XBOOLE_0:def 4;
  then x`1 = p`1 by TOPREAL1:def 10
    .= North-Bound(p,C)`1 by EUCLID:52;
  then x = North-Bound(p,C) by A7,TOPREAL3:6;
  hence North-Bound(p,C) in C & North-Bound(p,C) in north_halfline p by A5,
XBOOLE_0:def 4;
  set X = C /\ south_halfline p;
  X c= C by XBOOLE_1:17;
  then proj2.:X is real-bounded by JCT_MISC:14,RLTOPSP1:42;
  then
A8: proj2.:X is bounded_above;
  not south_halfline p c= UBD C by A2,Th12;
  then south_halfline p meets C by JORDAN2C:128;
  then
A9: X is non empty;
  X is bounded by RLTOPSP1:42,XBOOLE_1:17;
  then proj2.:X is closed by JCT_MISC:13;
  then upper_bound (proj2.:X) in proj2.:X by A9,A8,Lm2,RCOMP_1:12,RELAT_1:119;
  then consider x being object such that
A10: x in the carrier of TOP-REAL 2 and
A11: x in X and
A12: upper_bound (proj2.:X) = proj2.x by FUNCT_2:64;
  reconsider x as Point of TOP-REAL 2 by A10;
  x in south_halfline p by A11,XBOOLE_0:def 4;
  then
A13: x`1 = p`1 by TOPREAL1:def 12
    .= South-Bound(p,C)`1 by EUCLID:52;
  x`2 = upper_bound (proj2.:X) by A12,PSCOMP_1:def 6
    .= South-Bound(p,C)`2 by EUCLID:52;
  then x = South-Bound(p,C) by A13,TOPREAL3:6;
  hence thesis by A11,XBOOLE_0:def 4;
end;
