reserve a, b, r, s for Real;

theorem Th19:
  for X being non empty real-bounded interval Subset of REAL st not
  lower_bound X in X & not upper_bound X in X holds X = ].lower_bound X,
  upper_bound X.[
proof
  let X be non empty real-bounded interval Subset of REAL;
  assume ( not lower_bound X in X)& not upper_bound X in X;
  hence X c= ].lower_bound X,upper_bound X.[ by Th18;
  let x be object;
  assume
A1: x in ].lower_bound X,upper_bound X.[;
  then reconsider x as Real;
  lower_bound X < x by A1,XXREAL_1:4;
  then lower_bound X - lower_bound X < x - lower_bound X by XREAL_1:14;
  then consider s such that
A2: s in X & s < lower_bound X + (x - lower_bound X) by SEQ_4:def 2;
  x < upper_bound X by A1,XXREAL_1:4;
  then x - x < upper_bound X - x by XREAL_1:14;
  then consider r such that
A3: r in X & upper_bound X - (upper_bound X - x) < r by SEQ_4:def 1;
  [.s,r.] c= X & x in [.s,r.] by A2,A3,XXREAL_1:1,XXREAL_2:def 12;
  hence thesis;
end;
