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 Th2;
    then
A4: min(r,p) < t by XXREAL_0:22;
    t <= max(s,q) by A3,XXREAL_0:31;
    hence thesis by A4,Th2;
  end;
A5: r < u by A1,Th2;
A6: u <= s by A1,Th2;
A7: p < u by A2,Th2;
A8: u <= q by A2,Th2;
  assume
A9: t in ].min(r,p),max(s,q).];
  then
A10: min(r,p) < t by Th2;
A11: t <= max(s,q) by A9,Th2;
  per cases by A10,A11,XXREAL_0:20,29;
  suppose r < t & t <= s or p < t & t <= q;
    then t in ].r,s.] or t in ].p,q.] by Th2;
    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,Th2;
    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,Th2;
    hence thesis by XBOOLE_0:def 3;
  end;
end;
