Fact rem_equiv p x r : r = rem x p <-> (p = 0 /\ x = r)
                                      \/ (p <> 0 /\ r < p /\ exists n, x = n*p + r).

(* Specifications: *)
Lemma dio_rel_remainder p x r : 𝔻P p -> 𝔻P x -> 𝔻P r -> 𝔻R (fun ν => r ν = rem (x ν) (p ν)).