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

theorem
  [.r,s.[ meets [.p,q.[ implies [.r,s.[ \/ [.p,q.[ = [.min(r,p),max(s,q).[
proof
  assume [.r,s.[ meets [.p,q.[;
  then consider u such that
A1: u in [.r,s.[ and
A2: u in [.p,q.[;
  let t;
  thus t in [.r,s.[ \/ [.p,q.[ implies t in [.min(r,p),max(s,q).[
  proof
    assume t in [.r,s.[ \/ [.p,q.[;
    then t in [.r,s.[ or t in [.p,q.[ by XBOOLE_0:def 3;
    then
A3: r <= t & t < s or p <= t & t < q by Th3;
    then
A4: min(r,p) <= t by XXREAL_0:23;
    t < max(s,q) by A3,XXREAL_0:30;
    hence thesis by A4,Th3;
  end;
A5: r <= u by A1,Th3;
A6: u < s by A1,Th3;
A7: p <= u by A2,Th3;
A8: u < q by A2,Th3;
  assume
A9: t in [.min(r,p),max(s,q).[;
  then
A10: min(r,p) <= t by Th3;
A11: t < max(s,q) by A9,Th3;
  per cases by A10,A11,XXREAL_0:21,28;
  suppose r <= t & t < s or p <= t & t < q;
    then t in [.r,s.[ or t in [.p,q.[ by Th3;
    hence thesis by XBOOLE_0:def 3;
  end;
  suppose that
A12: p <= t and
A13: t < s;
    u <= t or t <= u;
    then r <= t or t < q by A5,A8,XXREAL_0:2;
    then t in [.r,s.[ or t in [.p,q.[ by A12,A13,Th3;
    hence thesis by XBOOLE_0:def 3;
  end;
  suppose that
A14: r <= t and
A15: t < q;
    u <= t or t <= u;
    then t < s or p <= t by A6,A7,XXREAL_0:2;
    then t in [.r,s.[ or t in [.p,q.[ by A14,A15,Th3;
    hence thesis by XBOOLE_0:def 3;
  end;
end;
