Section Fcore_digits.
Variable beta : radix.
Definition Zdigit n k := Z.rem (Z.quot n (Zpower beta k)) beta.
Fixpoint Zsum_digit f k :=
match k with
| O => Z0
| S k => (Zsum_digit f k + f (Z_of_nat k) * Zpower beta (Z_of_nat k))%Z
end.

Theorem Zdigit_plus :
forall u v, (0 <= u * v)%Z ->
(forall k, (0 <= k)%Z -> Zdigit u k = Z0 \/ Zdigit v k = Z0) ->
forall k,
Zdigit (u + v) k = (Zdigit u k + Zdigit v k)%Z.