Section format_REM_aux.
Variable beta : radix.
Notation bpow e := (bpow beta e).
Variable fexp : Z -> Z.
Context { valid_exp : Valid_exp fexp }.
Context { monotone_exp : Monotone_exp fexp }.
Variable rnd : R -> Z.
Context { valid_rnd : Valid_rnd rnd }.
Notation format := (generic_format beta fexp).

Lemma format_REM_aux:
forall x y : R,
format x -> format y -> (0 <= x)%R -> (0 < y)%R ->
((0 < x/y < /2)%R -> rnd (x/y) = 0%Z) ->
format (x - IZR (rnd (x/y))*y).