
theorem
  the set of all I where I is Interval
    is semialgebra_of_sets of REAL
proof
   set S = the set of all I where I is Interval;
   now let A be object;
    assume A in S; then
    consider I be Interval such that
A2:  A = I;
    thus A in bool REAL by A2;
   end; then
   S c= bool REAL; then
   reconsider S as Subset-Family of REAL;
   {} c= REAL; then
   reconsider E = {} as Subset of REAL;
A3:E in S; then
A4:S is with_empty_element;
   now let A,B be set;
    assume A5: A in S & B in S; then
    consider I be Interval such that
A6:  A = I;
    consider J be Interval such that
A7:  B = J by A5;
    per cases;
    suppose A8: I misses J;
     set F = <*A*>;
A9:  rng F = {A} by FINSEQ_1:38; then
     reconsider F as FinSequence of S by A5,ZFMISC_1:31,FINSEQ_1:def 4;
     reconsider F as disjoint_valued FinSequence of S by TTT1;
     take F;
     thus Union F = A \ B by A6,A8,A7,XBOOLE_1:83,A9;
    end;
    suppose A10: I meets J;
     (I is open_interval or I is closed_interval or
     I is right_open_interval or I is left_open_interval) &
     (J is open_interval or J is closed_interval or
     J is right_open_interval or J is left_open_interval) by MEASURE5:1; then
     consider K,L be Interval such that
A11:  K misses L & I \ J = K \/ L by A10,OOdif,OCdif,ORdif,OLdif,
          COdif,CCdif,CRdif,CLdif,ROdif,RCdif,RRdif,RLdif,
          LOdif,LCdif,LRdif,LLdif;
     set F = <*K,L*>;
     K in S & L in S; then
     {K,L} c= S by ZFMISC_1:32; then
     rng F c= S by FINSEQ_2:127; then
     reconsider F as FinSequence of S by FINSEQ_1:def 4;
     reconsider F as disjoint_valued FinSequence of S by A11,Disjoint2;
     take F;
     rng F = {K,L} by FINSEQ_2:127;
     hence Union F = A \ B by A6,A7,A11,ZFMISC_1:75;
    end;
   end; then
P2:S is semi-diff-closed;
   now let A,B be set;
    assume A12: A in S & B in S; then
    consider I be Interval such that
A13: A = I;
    consider J be Interval such that
A14: B = J by A12;
    per cases;
    suppose I misses J;
     hence A /\ B in S by A3,A13,A14;
    end;
    suppose A15: I meets J;
     (I is open_interval or I is closed_interval or
     I is right_open_interval or I is left_open_interval) &
     (J is open_interval or J is closed_interval or
     J is right_open_interval or J is left_open_interval) by MEASURE5:1; then
     I /\ J is Interval by A15,OOmeet,OCmeet,ORmeet,OLmeet,CCmeet,
       CRmeet,CLmeet,RRmeet,RLmeet,LLmeet;
     hence A /\ B in S by A13,A14;
    end;
   end; then
P3:S is cap-closed;
   reconsider R = ].-infty,+infty.[ as Subset of REAL;
   R is open_interval; then
   REAL in S by XXREAL_1:224;
   hence thesis by A4,P2,P3,Def1;
end;
