 reserve Omega, Omega2 for non empty set;
 reserve Sigma, F for SigmaField of Omega;
 reserve Sigma2, F2 for SigmaField of Omega2;

theorem Th6:
  for a,b being Real holds
  Intersection half_open_sets(a,b) = [.a,b.]
proof
  let a,b be Real;
A1: for c be set holds
  not c in [.a,b.] implies not c in Intersection half_open_sets(a,b)
  proof
    let c be set;
    assume
A2: not c in [.a,b.];
    per cases by A2;
    suppose not c in REAL;
      hence thesis;
    end;
    suppose
A3:  c in REAL & not c in [.a,b.];
      then reconsider c as Element of REAL;
A4:  not c in {q where q is Element of ExtREAL:
          a <= q & q <= b} by A3,XXREAL_1:def 1;
A5:  a > c or c > b
      proof
        reconsider q = c as Element of ExtREAL by XXREAL_0:def 1;
        not (c = q & a <= c & c <= b) by A4;
        hence thesis;
      end;
      per cases by A5;
      suppose A6: a > c;
        not for n being Element of NAT holds c in half_open_sets(a,b).n
        proof
          take n = 0;
          c in half_open_sets(a,b).0 implies
          c in halfline_fin(a,b+1) by Def1; then
          c in half_open_sets(a,b).0 implies
          c in {q where q is Element of ExtREAL:
            a <= q & q < b+1} by XXREAL_1:def 2; then
        ex q being Element of ExtREAL st c in half_open_sets(a,b).0 implies
            c = q & a <= q & q < b+1;
          hence thesis by A6;
        end;
        hence thesis by PROB_1:13;
      end;
      suppose c > b;
        then consider n being Nat such that
   A7: 1/n<(c-b) & n > 0 by FRECHET:36,XREAL_1:50;
   A8: (1/n)+b<(c-b)+b by A7,XREAL_1:6;
        c in Intersection half_open_sets(a,b) implies not b+1/n<c
        proof
          assume c in Intersection half_open_sets(a,b); then
          c in half_open_sets(a,b).(n+1) by PROB_1:13; then
          c in [.a,b+1/(n+1).[ by Def1; then
          c in {q where q is Element of ExtREAL:
          a<=q & q<b+1/(n+1)} by XXREAL_1:def 2; then
          consider q being Element of ExtREAL such that
A9: c = q & a<=q & q < b+1/(n+1);
  reconsider a=1 as Element of NAT;
  n*1<(n+1)*1 by NAT_1:13; then
A10: a/(n+1)<a/n by A7,XREAL_1:106;
  b+1/(n+1)<b+1/n by A10,XREAL_1:6;
  hence thesis by A9,XXREAL_0:2;
end;
hence thesis by A8;
end;
end;
end;
A11:for c be set holds c in [.a,b.] implies
c in Intersection half_open_sets(a,b)
proof
  let c be set;
  c in [.a,b.] implies
    for n being Nat holds c in half_open_sets(a,b).n
 proof
  assume A12: c in [.a,b.];
  let n be Nat;
A13: b<b+1 by XREAL_1:29;
  [.a,b.] c= half_open_sets(a,b).n
  proof
   per cases;
   suppose A14: n=0;
    half_open_sets(a,b).0=halfline_fin(a,b+1) by Def1;
    hence thesis by A14,A13,XXREAL_1:43;
    end;
   suppose n>0; then
     consider k being Nat such that
A15: n=k+1 by NAT_1:6;
     reconsider k as Element of NAT by ORDINAL1:def 12;
A16: half_open_sets(a,b).(k+1) = halfline_fin(a,b+1/(k+1)) by Def1;
     b<b+1/n by A15,XREAL_1:29;
    hence thesis by A16,A15,XXREAL_1:43;
    end;
  end;
  hence thesis by A12;
 end;
 hence thesis by PROB_1:13;
 end;
 for c being object holds
   c in Intersection half_open_sets(a,b) iff c in [.a,b.] by A11,A1;
 hence thesis by TARSKI:2;
end;
