let X be non empty interval Subset of REAL; ( not X is bounded_below & X is bounded_above & not upper_bound X in X implies X = left_open_halfline (upper_bound X) )
assume that
A1:
not X is bounded_below
and
A2:
X is bounded_above
and
A3:
not upper_bound X in X
; X = left_open_halfline (upper_bound X)
thus
X c= left_open_halfline (upper_bound X)
by A2, A3, Th34; XBOOLE_0:def 10 left_open_halfline (upper_bound X) c= X
let x be set ; TARSKI:def 3 ( not x in left_open_halfline (upper_bound X) or x in X )
assume A4:
x in left_open_halfline (upper_bound X)
; x in X
then reconsider x = x as Real ;
x is not LowerBound of X
by A1, XXREAL_2:def 9;
then consider r being ext-real number such that
A5:
( r in X & x > r )
by XXREAL_2:def 2;
reconsider r = r as real number by A5;
x < upper_bound X
by A4, XXREAL_1:233;
then
x - x < (upper_bound X) - x
by XREAL_1:16;
then consider s being real number such that
A6:
( s in X & (upper_bound X) - ((upper_bound X) - x) < s )
by A2, SEQ_4:def 4;
( [.r,s.] c= X & x in [.r,s.] )
by A5, A6, XXREAL_2:def 12, XXREAL_1:1;
hence
x in X
; verum