reserve x for object,
  a,b for Real,
  k,k1,i1,j1,w for Nat,
  m,m1,n,n1 for Integer;
reserve p,q for Rational;

theorem
  a < b implies ex p st a < p & p < b
proof
  set d=b-a;
  set m=[\d"/]+1;
  set l=[\m*a/]+1;
  set p=l/m;
  assume a<b;
  then
A1: a-a<b-a by XREAL_1:9;
  then
A2: 0<m by INT_1:29;
  d"-1<[\d"/] by INT_1:def 6;
  then d"<[\d"/]+1 by XREAL_1:19;
  then d"*d<m*d by A1,XREAL_1:68;
  then
A3: 1<m*d by A1,XCMPLX_0:def 7;
  take p;
A4: 0<>m by A1,INT_1:29;
  m*a-1<[\m*a/] by INT_1:def 6;
  then m*a<[\m*a/]+1 by XREAL_1:19;
  then m"*(m*a)<m"*l by A2,XREAL_1:68;
  then (m"*m)*a<m"*l;
  then 1*a<m"*l by A4,XCMPLX_0:def 7;
  hence a<p;
  [\m*a/]<=m*a by INT_1:def 6;
  then [\m*a/]+1<m*a+m*d by A3,XREAL_1:8;
  then m"*l<m"*(m*b) by A2,XREAL_1:68;
  then m"*l<(m"*m)*b;
  then m"*l<1*b by A4,XCMPLX_0:def 7;
  hence p<b;
end;
