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

theorem
  (for e be Real st 0 < e holds x < y + e) implies x <= y
proof
  assume
A1: for e be Real st 0 < e holds x < y + e;
  per cases;
  suppose
A2: y = +infty or y=-infty;
    per cases by A2;
    suppose
      y=+infty;
      hence thesis by XXREAL_0:4;
    end;
    suppose
A3:   y=-infty;
      x < y + 1 by A1;
      hence thesis by A3,Def2;
    end;
  end;
  suppose
A4: y <> +infty & y <>-infty;
    per cases;
    suppose
A5:   x = +infty;
      x < y+ 1 by A1;
      hence thesis by A5,XXREAL_0:4;
    end;
    suppose
A6:   x <> +infty;
      now
        assume
A7:     x <> -infty;
        then x in REAL by A6,XXREAL_0:14;
        then reconsider x1=x as Real;
        -infty <= x by XXREAL_0:5;
        then
A8:     -infty < x by A7,XXREAL_0:1;
        y in REAL by A4,XXREAL_0:14;
        then reconsider y1=y as Real;
        assume
A9:     not x <= y;
        y < +infty by A4,XXREAL_0:4;
        then 0 < x- y by A9,A8,Th51;
        then x < y + (x1-y1) by A1;
        then x < y + x-y by Th30;
        then x < x +(y-y) by A4,Th30;
        then x < x +0 by Th7;
        hence contradiction by Th4;
      end;
      hence thesis by XXREAL_0:5;
    end;
  end;
end;
