reserve x for set,
  p,q,r,s,t,u for ExtReal,
  g for Real,
  a for Element of ExtREAL;

theorem
  [.p,q.[ meets [.r,s.[ implies [.p,q.[ \ [.r,s.[ = [.p,r.[ \/ [.s,q.[
proof
  assume [.p,q.[ meets [.r,s.[;
  then consider u such that
A1: u in [.r,s.[ and
A2: u in [.p,q.[;
A3: r <= u by A1,Th3;
A4: u <= s by A1,Th3;
A5: p <= u by A2,Th3;
  u <= q by A2,Th3;
  then
A6: r <= q by A3,XXREAL_0:2;
A7: p <= s by A4,A5,XXREAL_0:2;
  let t;
  thus t in [.p,q.[ \ [.r,s.[ implies t in [.p,r.[ \/ [.s,q.[
  proof
    assume
A8: t in [.p,q.[ \ [.r,s.[;
    then
A9: not t in [.r,s.[ by XBOOLE_0:def 5;
A10: p <= t by A8,Th3;
A11: t < q by A8,Th3;
    t < r or s <= t by A9,Th3;
    then t in [.p,r.[ or t in [.s,q.[ by A10,A11,Th3;
    hence thesis by XBOOLE_0:def 3;
  end;
  assume t in [.p,r.[ \/ [.s,q.[;
  then t in [.p,r.[ or t in [.s,q.[ by XBOOLE_0:def 3;
  then
A12: p <= t & t < r or s <= t & t < q by Th3;
  then
A13: p <= t by A7,XXREAL_0:2;
  t < q by A6,A12,XXREAL_0:2;
  then
A14: t in [.p,q.[ by A13,Th3;
  not t in [.r,s.[ by A12,Th3;
  hence thesis by A14,XBOOLE_0:def 5;
end;
