
theorem Th21:
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 (p = s & A \/ B = ].r,q.]) or (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; then
A6: inf A = p & sup A = q & inf B = r & sup B = s by A1,A2,MEASURE6:9,13;
A7: now assume A8: q < r; then
     consider x be R_eal such that
A9:   q < x & x < r & x in REAL by MEASURE5:2;
     not x in A & not x in B by A1,A2,A9,XXREAL_1:2; then
A10:  not x in A \/ B by XBOOLE_0:def 3;
     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) = inf A & sup(A \/ B) = sup B
       by A5,A6,A8,XXREAL_0:2,def 9,def 10; then
     inf(A \/ B) < x & x < sup(A \/ B) by A6,A9,A1,A2,XXREAL_1:26,XXREAL_0:2;
     hence contradiction by A10,A4,XXREAL_2:83;
    end;

A11: now assume A12: s < p; then
     consider x be R_eal such that
A13:   s < x & x < p & x in REAL by MEASURE5:2;
     not x in A & not x in B by A1,A2,A13,XXREAL_1:2; then
A14:  not x in A \/ B by XBOOLE_0:def 3;
     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) = inf B & sup(A \/ B) = sup A
       by A5,A6,A12,XXREAL_0:2,def 9,def 10; then
     inf(A \/ B) < x & x < sup(A \/ B) by A6,A13,A1,A2,XXREAL_1:26,XXREAL_0:2;
     hence contradiction by A14,A4,XXREAL_2:83;
    end;
    q <= r or s <= p by A1,A2,A3,Th11; then
    q = r or s = p by A7,A11,XXREAL_0:1;
    hence thesis by A1,A2,A5,XXREAL_1:170;
end;
