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

theorem
  r < s & s < t implies ].r,t.[ \ {s} = ].r,s.[ \/ ].s,t.[
proof
  assume that
A1: r < s and
A2: s < t;
  let p;
  thus p in ].r,t.[ \ {s} implies p in ].r,s.[ \/ ].s,t.[
  proof
    assume
A3: p in ].r,t.[ \ {s};
    then not p in {s} by XBOOLE_0:def 5;
    then p <> s by TARSKI:def 1;
    then r < p & p < s or s < p & p < t by A3,Th4,XXREAL_0:1;
    then p in ].r,s.[ or p in ].s,t.[ by Th4;
    hence thesis by XBOOLE_0:def 3;
  end;
  assume p in ].r,s.[ \/ ].s,t.[;
  then p in ].r,s.[ or p in ].s,t.[ by XBOOLE_0:def 3;
  then
A4: r < p & p < s or s < p & p < t by Th4;
  then
A5: r < p by A1,XXREAL_0:2;
  p < t by A2,A4,XXREAL_0:2;
  then
A6: p in ].r,t.[ by A5,Th4;
  not p in {s} by A4,TARSKI:def 1;
  hence thesis by A6,XBOOLE_0:def 5;
end;
