(************************************************************************)
(*         *      The Rocq Prover / The Rocq Development Team           *)
(*  v      *         Copyright INRIA, CNRS and contributors             *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)
(** * HexadecimalN  Proofs that conversions between hexadecimal numbers and [N] are bijections *)
Module Unsigned.

(* Specifications: *)
Lemma of_to (n:N) : N.of_hex_uint (N.to_hex_uint n) = n.
Lemma to_of (d:uint) : N.to_hex_uint (N.of_hex_uint d) = unorm d.
Lemma to_uint_inj n n' : N.to_hex_uint n = N.to_hex_uint n' -> n = n'.
Lemma to_uint_surj d : exists p, N.to_hex_uint p = unorm d.
Lemma of_uint_norm d : N.of_hex_uint (unorm d) = N.of_hex_uint d.
Lemma of_inj d d' :
N.of_hex_uint d = N.of_hex_uint d' -> unorm d = unorm d'.
Lemma of_iff d d' : N.of_hex_uint d = N.of_hex_uint d' <-> unorm d = unorm d'.
End Unsigned.