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 A being non left_end right_end interval ext-real-membered set
  holds A = ].inf A, max A.]
proof
  let A be non left_end right_end interval ext-real-membered set;
  let x;
  defpred P[ExtReal] means $1 in A & $1 < x;
  thus x in A implies x in ].inf A, max A.]
  proof
A1: not inf A in A by Def5;
    assume
A2: x in A;
    then
A3: x <= max A by Th4;
    inf A <= x by A2,Th3;
    then inf A < x by A2,A1,XXREAL_0:1;
    hence thesis by A3,XXREAL_1:2;
  end;
  assume
A4: x in ].inf A, max A.];
  per cases;
  suppose
    not ex r st P[r];
    then x is LowerBound of A by Def2;
    then x <= inf A by Def4;
    hence thesis by A4,XXREAL_1:2;
  end;
  suppose
    ex r st P[r];
    then consider r such that
A5: r in A and
A6: r < x;
    x <= max A by A4,XXREAL_1:2;
    then
A7: x in [.r,max A.] by A6,XXREAL_1:1;
    max A in A by Def6;
    then [.r,max A.] c= A by A5,Def12;
    hence thesis by A7;
  end;
end;
