reserve x,y,z,w for ExtReal,
  r for Real;
reserve f,g for ExtReal;

theorem Th51:
  x < y & x < +infty & -infty < y implies 0 < y- x
proof
  assume that
A1: x < y and
A2: x < +infty and
A3: -infty < y;
  per cases;
  suppose
    y = +infty;
    hence thesis by A2,Th13;
  end;
  suppose
A4: y <> +infty;
    per cases;
    suppose
      x = -infty;
      hence thesis by A3,Th14;
    end;
    suppose
A5:   x <> -infty;
A6:   y in REAL by A3,A4,XXREAL_0:14;
      x in REAL by A2,A5,XXREAL_0:14;
      then reconsider a = x, b = y as Real by A6;
      b - a > 0 by A1,XREAL_1:50;
      hence thesis;
    end;
  end;
end;
