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

Lemma two_compl_to_Z_to_two_compl :
forall (n:nat) (bv:Bvector n) (b:bool),
Z_to_two_compl n (two_compl_value n (Bcons b n bv)) = Bcons b n bv.