Digits of a natural number #
This provides lemma about the digits of natural numbers.
theorem
Nat.ofDigits_eq_sum_mapIdx_aux
(b : ℕ)
(l : List ℕ)
:
(List.zipWith (fun (a i : ℕ) => a * b ^ (i + 1)) l (List.range l.length)).sum = b * (List.zipWith (fun (a i : ℕ) => a * b ^ i) l (List.range l.length)).sum
Properties #
This section contains various lemmas of properties relating to digits
and ofDigits
.