Section COHERENT_VALUE.
(** We check that the functions are reciprocal on the definition interval. This uses earlier library lemmas. *)

Lemma Z_to_two_compl_to_Z :
forall (n:nat) (z:Z),
(z >= - two_power_nat n)%Z ->
(z < two_power_nat n)%Z -> two_compl_value n (Z_to_two_compl n z) = z.