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

theorem Th51:
  r < s & ].r,s.[ c= [.p,q.] implies p <= r & s <= q
proof
  assume that
A1: r < s and
A2: ].r,s.[ c= [.p,q.];
  now
    let t;
    assume that
A3: r < t and
A4: t < s;
    t in ].r,s.[ by A3,A4,Th4;
    hence p <= t by A2,Th1;
  end;
  hence p <= r by A1,XREAL_1:228;
  now
    let t;
    assume that
A5: r < t and
A6: t < s;
    t in ].r,s.[ by A5,A6,Th4;
    hence t <= q by A2,Th1;
  end;
  hence thesis by A1,XREAL_1:229;
end;
