Documentation

CslibFrontier.Foundations.Data.Nat.Radix.Unique

Uniqueness of radix expansions with digits at distinct positions #

A sum ∑ i ∈ s, d i * B ^ e i with digits d i < B at distinct positions e i determines its digits. This is the uniqueness of base-B expansions, stated for digits indexed by an arbitrary finite set; for digits 0 and 1 it is Finset.geomSum_injective.

Main results #

theorem Nat.eq_of_sum_mul_pow_eq {ι : Type u_1} {B : ℕ} {s : Finset ι} {e : ι → ℕ} (he : Set.InjOn e ↑s) {d d' : ι → ℕ} (hd : ∀ i ∈ s, d i < B) (hd' : ∀ i ∈ s, d' i < B) (h : ∑ i ∈ s, d i * B ^ e i = ∑ i ∈ s, d' i * B ^ e i) (i : ι) :
i ∈ s → d i = d' i

A sum of digits d i < B weighted by powers B ^ e i at distinct positions e i determines the digits.