Section Zdigits2.
Fixpoint digits2_pos (n : positive) : positive :=
match n with
| xH => xH
| xO p => Pos.succ (digits2_pos p)
| xI p => Pos.succ (digits2_pos p)
end.
Definition Zdigits2 n :=
match n with
| Z0 => n
| Zpos p => Zpos (digits2_pos p)
| Zneg p => Zpos (digits2_pos p)
end.

Lemma Zdigits2_Zdigits :
forall n, Zdigits2 n = Zdigits radix2 n.