Documentation

CslibFrontier.Foundations.Analysis.Fourier.ZModMultiples

Character sums over a subgroup of ZMod N #

For d ∣ N, the standard additive character ZMod.stdAddChar summed over the subgroup of multiples of d is the indicator of its annihilator, the multiples of N / d, scaled by the subgroup's size N / d. This is the orthogonality relation behind exact quantum period finding.

Main results #

theorem ZMod.stdAddChar_natCast_mul_eq_one_iff {N : ℕ} [NeZero N] {d : ℕ} (hd : d ∣ N) (y : ZMod N) :
stdAddChar (↑d * y) = 1 ↔ N / d ∣ y.val

For d ∣ N, stdAddChar (d * y) = 1 exactly when N / d divides y.val.

theorem ZMod.sum_dvd_val_stdAddChar_mul {N : ℕ} [NeZero N] {d : ℕ} (hd : d ∣ N) (y : ZMod N) :
(∑ h : ZMod N, if d ∣ h.val then stdAddChar (h * y) else 0) = if N / d ∣ y.val then ↑(N / d) else 0

Orthogonality over a subgroup. For d ∣ N, the sum of stdAddChar (h * y) over the residues h with d ∣ h.val (the subgroup generated by d) is N / d when N / d ∣ y.val (that is, y annihilates the subgroup) and 0 otherwise.