reserve a, b, r, s for Real;

theorem Th17:
  for X being real-bounded interval Subset of REAL st lower_bound X in
  X & not upper_bound X in X holds X = [.lower_bound X,upper_bound X.[
proof
  let X be real-bounded interval Subset of REAL such that
A1: lower_bound X in X and
A2: not upper_bound X in X;
  thus X c= [.lower_bound X,upper_bound X.[ by A2,Th16;
  let x be object;
  assume
A3: x in [.lower_bound X,upper_bound X.[;
  then reconsider x as Real;
  x < upper_bound X by A3,XXREAL_1:3;
  then x - x < upper_bound X - x by XREAL_1:14;
  then consider r such that
A4: r in X and
A5: upper_bound X - (upper_bound X - x) < r by A1,SEQ_4:def 1;
  lower_bound X <= x by A3,XXREAL_1:3;
  then
A6: x in [.lower_bound X,r.] by A5,XXREAL_1:1;
  [.lower_bound X,r.] c= X by A1,A4,XXREAL_2:def 12;
  hence thesis by A6;
end;
