reserve i, i1, i2, j, k for Nat,
  r, s for Real;

theorem Th2:
  for i,j being Nat holds j<=i & i<j+j implies i mod j=i-j & i mod j=i-'j
proof
  let i,j be Nat;
  assume that
A1: j<=i and
A2: i<j+j;
A3: i-j<j+j-j by A2,XREAL_1:9;
  i=i-j+j;
  then
A4: i mod j=(i-'j+j) mod j by A1,XREAL_1:233
    .=((i-'j)+(j mod j))mod j by NAT_D:23
    .=((i-'j)+0)mod j by NAT_D:25
    .=(i-'j)mod j;
  i-j=i-'j by A1,XREAL_1:233;
  hence thesis by A4,A3,NAT_D:24;
end;
