reserve a, b, r, s for Real;

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