reserve x,y,z,r,s for ExtReal;
reserve A,B for ext-real-membered set;
reserve A,B for ext-real-membered set;

theorem
  (for y,r st y in A & inf A < r & r < y holds r in A) implies A is interval
proof
  assume
A1: for y,r st y in A & inf A < r & r < y holds r in A;
  let x,y such that
A2: x in A and
A3: y in A;
  let r;
  assume r in [.x,y.];
  then r in ].x,y.[ \/ {x,y} by XXREAL_1:29,128;
  then
A4: r in ].x,y.[ or r in {x,y} by XBOOLE_0:def 3;
  per cases by A4,TARSKI:def 2;
  suppose
    r = x;
    hence thesis by A2;
  end;
  suppose
    r = y;
    hence thesis by A3;
  end;
  suppose
A5: r in ].x,y.[;
    then
A6: x < r by XXREAL_1:4;
    inf A <= x by A2,Th3;
    then
A7: inf A < r by A6,XXREAL_0:2;
    r < y by A5,XXREAL_1:4;
    hence thesis by A1,A3,A7;
  end;
end;
