Ltac simpl_to_nat := simpl N.to_nat; unfold Pos.to_nat; simpl Pos.iter_op.

Lemma nztail_to_hex_uint p : let (h, n) := Hexadecimal.nztail (Pos.to_hex_uint p) in Npos p = Pos.of_hex_uint h * 0x10^(N.of_nat n).