
theorem Th2:
for I be Interval holds
 ].inf I,sup I.[ is open Subset of REAL & ].inf I,sup I.[ c= I
proof
    let I be Interval;
    now per cases;
    suppose inf I in REAL & sup I in REAL; then
     reconsider a = inf I, b = sup I as Real;
     ].inf I,sup I.[ = ].a,b.[;
     hence ].inf I,sup I.[ is open Subset of REAL;
    end;

    suppose A1: not inf I in REAL;
     per cases by A1,XXREAL_0:14;
     suppose A2: inf I = +infty;
      ].inf I,sup I.[ = {} by A2,XXREAL_0:3,XXREAL_1:28;
      hence ].inf I,sup I.[ is open Subset of REAL;
     end;
     suppose A3: inf I = -infty;
      per cases;
      suppose sup I in REAL; then
       reconsider b = sup I as Real;
       ].inf I,sup I.[ = halfline b by A3,PROB_1:def 10;
       hence ].inf I,sup I.[ is open Subset of REAL;
      end;
      suppose A4: not sup I in REAL;
       per cases by A4,XXREAL_0:14;
       suppose sup I = +infty; then
        ].inf I,sup I.[ = [#]REAL by A3,XXREAL_1:224,SUBSET_1:def 3;
        hence ].inf I,sup I.[ is open Subset of REAL;
       end;
       suppose sup I = -infty; then
        ].inf I,sup I.[ = {} by A3,XXREAL_1:20;
        hence ].inf I,sup I.[ is open Subset of REAL;
       end;
      end;
     end;
    end;
    suppose not sup I in REAL; then
     per cases by XXREAL_0:14;
     suppose A6: sup I = -infty;
      ].inf I,sup I.[ = {} by A6,XXREAL_0:5,XXREAL_1:28;
      hence ].inf I,sup I.[ is open Subset of REAL;
     end;
     suppose A7: sup I = +infty;
      per cases;
      suppose inf I in REAL; then
       reconsider a = inf I as Real;
       ].inf I,sup I.[ = right_open_halfline a by A7,LIMFUNC1:def 3;
       hence ].inf I,sup I.[ is open Subset of REAL;
      end;
      suppose A8: not inf I in REAL;
       per cases by A8,XXREAL_0:14;
       suppose inf I = -infty; then
        ].inf I,sup I.[ = [#]REAL by A7,XXREAL_1:224,SUBSET_1:def 3;
        hence ].inf I,sup I.[ is open Subset of REAL;
       end;
       suppose inf I = +infty; then
        ].inf I,sup I.[ = {} by A7,XXREAL_1:20;
        hence ].inf I,sup I.[ is open Subset of REAL;
       end;
      end;
     end;
    end;
    end;
    hence ].inf I,sup I.[ is open Subset of REAL;

    now let a be set;
     assume A9:a in ].inf I,sup I.[; then
     reconsider a1=a as Real;
     inf I < a1 < sup I by A9,XXREAL_1:4;
     hence a in I by XXREAL_2:83;
    end;
    hence ].inf I,sup I.[ c= I;
end;
