(************************************************************************)
(*         *      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)         *)
(************************************************************************)
(** * HexadecimalQ  Proofs that conversions between hexadecimal numbers and [Q] are bijections. *)

Lemma dnorm_spec_e d :
match d, dnorm d with
| Hexadecimal _ _, Hexadecimal _ _ => True
| HexadecimalExp _ _ e, Hexadecimal _ _ =>
Decimal.norm e = Decimal.Pos Decimal.zero
| HexadecimalExp _ _ e, HexadecimalExp _ _ e' =>
e' = Decimal.norm e /\ e' <> Decimal.Pos Decimal.zero
| Hexadecimal _ _, HexadecimalExp _ _ _ => False
end.