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

theorem Th174:
  p <= s & r <= q & s <= r implies [.p,r.] \/ [.s,q.] = [.p,q.]
proof
  assume that
A1: p <= s and
A2: r <= q and
A3: s <= r;
  let t;
  thus t in [.p,r.] \/ [.s,q.] implies t in [.p,q.]
  proof
    assume t in [.p,r.] \/ [.s,q.];
    then t in [.p,r.] or t in [.s,q.] by XBOOLE_0:def 3;
    then
A4: p <= t & t <= r or s <= t & t <= q by Th1;
    then
A5: p <= t by A1,XXREAL_0:2;
    t <= q by A2,A4,XXREAL_0:2;
    hence thesis by A5,Th1;
  end;
  assume t in [.p,q.];
  then p <= t & t <= r or s <= t & t <= q by A3,Th1,XXREAL_0:2;
  then t in [.p,r.] or t in [.s,q.] by Th1;
  hence thesis by XBOOLE_0:def 3;
end;
