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.

Theorem Zpos_digits2_pos :
forall m : positive,
Zpos (digits2_pos m) = Zdigits radix2 (Zpos m).