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

theorem Th31:
  x < y implies sup [.x,y.[ = y
proof
  assume
A1: x < y;
A2: for z being UpperBound of [.x,y.[ holds y <= z
  proof
    let z be UpperBound of [.x,y.[;
    for r st x < r & r < y holds r <= z
    proof
      let r;
      assume that
A3:   x < r and
A4:   r < y;
      r in [.x,y.[ by A3,A4,XXREAL_1:3;
      hence thesis by Def1;
    end;
    hence thesis by A1,XREAL_1:229;
  end;
  y is UpperBound of [.x,y.[ by Th23;
  hence thesis by A2,Def3;
end;
