reserve m,n,i,i2,j for Nat,
  r,r1,r2,s,t for Real,
  x,y,z for object;
reserve p,p1,p2,p3,q,q1,q2,q3,q4 for Point of TOP-REAL n;

theorem Th18:
  for A being Subset of TOP-REAL n holds (BDD A) \/ (UBD A) = A`
proof
  let A be Subset of TOP-REAL n;
A1: A` c= (BDD A) \/ (UBD A)
  proof
    let z be object;
    assume
A2: z in A`;
    then reconsider p=z as Element of A`;
    reconsider B=A` as non empty Subset of TOP-REAL n by A2;
    reconsider q=p as Point of (TOP-REAL n) | A` by PRE_TOPC:8;
    Component_of q is Subset of [#]((TOP-REAL n) | A`);
    then Component_of q is Subset of A` by PRE_TOPC:def 5;
    then reconsider G=Component_of q as Subset of TOP-REAL n by XBOOLE_1:1;
A3: (TOP-REAL n) | B is non empty;
    then
A4: q in G by CONNSP_1:38;
    Component_of q is a_component by A3,CONNSP_1:40;
    then
A5: G is_a_component_of A` by CONNSP_1:def 6;
    per cases;
    suppose
      G is bounded;
      then G is_inside_component_of A by A5;
      then G c= BDD A by Th13;
      hence thesis by A4,XBOOLE_0:def 3;
    end;
    suppose
      not G is bounded;
      then G is_outside_component_of A by A5;
      then G c= UBD A by Th14;
      hence thesis by A4,XBOOLE_0:def 3;
    end;
  end;
  (BDD A) c= A` & (UBD A) c= A` by Th16,Th17;
  then (BDD A) \/ (UBD A) c= A` by XBOOLE_1:8;
  hence thesis by A1;
end;
