
theorem Th22:
for A,B be non empty Interval, p,q,r,s be R_eal st
 A = ].p,q.] & B = ].r,s.[ & A misses B & A \/ B is Interval
  holds q = r & A \/ B = ].p,s.[
proof
    let A,B be non empty Interval, p,q,r,s be R_eal;
    assume that
A1:  A = ].p,q.] and
A2:  B = ].r,s.[ and
A3:  A misses B and
A4:  A \/ B is Interval;
A5: p < q & r < s by A1,A2,XXREAL_1:26,28; then
A6: inf A = p & sup A = q & inf B = r & sup B = s
      by A1,A2,MEASURE6:8,9,13,12;
    now assume A7: s <= p; then
     not s in A & not s in B by A1,A2,XXREAL_1:2,4; then
A8:  not s in A \/ B by XBOOLE_0:def 3;
A9: inf B < inf A & sup B < sup A by A6,A7,A1,A2,XXREAL_1:26,28,XXREAL_0:2;
     inf(A \/ B) = min(inf A,inf B) & sup(A \/ B) = max(sup A,sup B)
       by XXREAL_2:9,10; then
     inf(A \/ B) < s & s < sup(A \/ B) by A5,A6,A9,XXREAL_0:def 9,def 10;
     hence contradiction by A8,A4,XXREAL_2:83;
    end; then
A10:q <= r by A1,A2,A3,Th12;
    now assume A11: q < r; then
     consider x be R_eal such that
A12:  q < x & x < r & x in REAL by MEASURE5:2;
     not x in A & not x in B by A1,A2,A12,XXREAL_1:2,4; then
A13: not x in A \/ B by XBOOLE_0:def 3;
     min(inf A,inf B) = inf A & max(sup A,sup B) = sup B
       by A11,A6,A5,XXREAL_0:2,def 9,def 10; then
     inf(A \/ B) = inf A & sup(A \/ B) = sup B by XXREAL_2:9,10; then
     inf(A \/ B) < x & x < sup(A \/ B)
       by A6,A12,A1,A2,XXREAL_1:26,28,XXREAL_0:2;
     hence contradiction by A13,A4,XXREAL_2:83;
    end;
    hence q = r by A10,XXREAL_0:1;
    hence A \/ B = ].p,s.[ by A1,A2,A5,XXREAL_1:171;
end;
