Section congruence_2.
(* This section might notbe needed anymore *)
Variable (b : nat) (Hb : b - 2 <> 0).
Notation "〚 x 〛" := (Z2Zp Hb x).  (* congruence class modulo (b-2) *)
Hint Resolve Zle_0_nat : core.
Open Scope Z_scope.
End congruence_2.

Lemma rem_eq_diff_eq a b v : 2*a < v -> 2*b < v -> (rem a v = rem b v) \/ (rem (a+b) v = 0) -> a = b.