op861_fourier_indicator_norm_identity
For a finite abelian group and a finite subset, the sum over additive characters of the squared norm of the character sum over the subset equals the group order times the size of the subset.
Statement
theorem op861_fourier_indicator_norm_identity (G : Type*) [AddCommGroup G] [Fintype G] [DecidableEq G] (S : Finset G) : (∑ χ : AddChar G ℂ, ‖∑ x ∈ S, χ x‖^2) = (Fintype.card G : ℝ) * S.card
- Source
- Finite Fourier orthogonality, used for op861_ternary_crossing_pairs_dense.
- Verified
- 18 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- op861_fourier_pair_identityFor complex-valued functions f and g on a finite abelian group, the sum over additive characters of the Fourier sum of f times the…
- Used by 1
- op861_order_three_zero_sum_upperIn a finite abelian group where three times every element is zero, for every finite subset S, three times the group order times the number…
The proof, explained
The proof represents the character sum over S as the Fourier transform of the indicator function f = 𝟭_S. Using the character identity χ(-x) = conj(χ(x)) and the relation |z|^2 = z * conj(z), the squared norm ‖∑ x ∈ S, χ x‖^2 is factored into a product of two Fourier sums. Summing over all characters and applying the general Fourier pair identity op861_fourier_pair_identity with g = f evaluates the total sum to |G| * ∑ x, f(x)^2, which equals |G| * |S|.
The indicator function f = 𝟭_S allows expressing the character sum over S and its complex conjugate as sums over all of G.
We define f : G → ℂ as the indicator function of S (taking 1 on S and 0 elsewhere). Multiplying by f restricts the domain of summation from G to S, establishing ∑ x, f x * χ x = ∑ x ∈ S, χ x (hF). Because characters into ℂ satisfy χ(-x) = conj(χ(x)) by AddChar.map_neg_eq_conj, evaluating at -x yields the conjugate sum ∑ x, f x * χ (-x) = star (∑ x ∈ S, χ x) (hG).
uses
AddChar.map_neg_eq_conjclassical let f : G → ℂ := fun x => if x ∈ S then 1 else 0 have hF (χ : AddChar G ℂ) : (∑ x : G, f x * χ x) = ∑ x ∈ S, χ x := by simp [f] have hG (χ : AddChar G ℂ) : (∑ x : G, f x * χ (-x)) = star (∑ x ∈ S, χ x) := by simp [f, AddChar.map_neg_eq_conj]
For each character χ, the squared norm ‖∑ x ∈ S, χ x‖^2 (viewed in ℂ) factors into (∑ x : G, f x * χ x) * (∑ x : G, f x * χ (-x)).
For any complex number z, the squared norm equals z * conj(z) by Complex.normSq_eq_conj_mul_self, Complex.normSq_eq_norm_sq, Complex.star_def, and mul_comm. Applying this to z = ∑ x ∈ S, χ x and substituting hF and hG produces the desired product of two sums over G.
uses
Complex.star_def,Complex.normSq_eq_norm_sq,mul_comm,Complex.normSq_eq_conj_mul_selfhave hsquared (χ : AddChar G ℂ) : ((‖∑ x ∈ S, χ x‖^2 : ℝ) : ℂ) = (∑ x : G, f x * χ x) * (∑ x : G, f x * χ (-x)) := by rw [hF, hG] simpa [Complex.star_def, Complex.normSq_eq_norm_sq, mul_comm] using (Complex.normSq_eq_conj_mul_self (z := ∑ x ∈ S, χ x))
The diagonal sum ∑ x : G, f x * f x equals the cardinality |S| (cast to ℂ).
Since f is an indicator function, f(x)^2 = f(x) for all x ∈ G, so the sum over G counts the elements in S, yielding S.card.
have hdiag : (∑ x : G, f x * f x) = (S.card : ℂ) := by simp [f]
The sum over characters of the squared norms equals |G| * |S|.
Since the inclusion ℝ ↪ ℂ is injective (Complex.ofReal_injective), it suffices to establish the equality in ℂ. We push the coercion through the sum, product, and casts using Complex.ofReal_sum, Complex.ofReal_mul, and Complex.ofReal_natCast. Rewriting the squared norms via hsquared transforms the sum over characters into the bilinear form handled by op861_fourier_pair_identity with g = f. This identity evaluates the sum to |G| * ∑ x, f x * f x, which simplifies to |G| * |S| by hdiag.
uses
Complex.ofReal_injective,Complex.ofReal_sum,Complex.ofReal_mul,Complex.ofReal_natCast,op861_fourier_pair_identityapply Complex.ofReal_injective simp only [Complex.ofReal_sum, Complex.ofReal_mul, Complex.ofReal_natCast] simp_rw [hsquared] rw [op861_fourier_pair_identity G f f, hdiag]
AddChar.map_neg_eq_conj- For an additive character ψ on a finite abelian group taking values in an RCLike field such as ℂ, evaluating at -x yields the complex conjugate of evaluating at x: ψ(-x) = conj(ψ(x)).
Complex.star_def- The star involution on ℂ is defined as complex conjugation (starRingEnd ℂ).
Complex.normSq_eq_norm_sq- The algebraic squared norm Complex.normSq z equals the square of the analytic norm ‖z‖^2.
mul_comm- Multiplication in a commutative magma is commutative: a * b = b * a.
Complex.normSq_eq_conj_mul_self- The squared norm of a complex number z, viewed in ℂ, equals its complex conjugate times itself: normSq(z) = conj(z) * z.
Complex.ofReal_injective- The canonical inclusion of ℝ into ℂ is injective.
Complex.ofReal_sum- The real-to-complex coercion distributes over finite sums: ↑(∑ i ∈ s, f i) = ∑ i ∈ s, ↑(f i).
Complex.ofReal_mul- The real-to-complex coercion distributes over multiplication: ↑(r * s) = ↑r * ↑s.
Complex.ofReal_natCast- Coercing a natural number to ℂ through ℝ agrees with coercing it directly to ℂ.
op861_fourier_pair_identity- For functions f, g : G → ℂ on a finite abelian group G, the sum over all characters χ of (∑ x, f x * χ x) * (∑ y, g y * χ (-y)) equals |G| * ∑ x, f x * g x.
- Although the original theorem is an equality of real numbers, the proof proceeds by embedding both sides into ℂ via Complex.ofReal_injective so that Fourier orthogonality and character relations formulated over ℂ can be applied directly.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
open scoped BigOperatorsset_option maxHeartbeats 1000000theorem op861_fourier_indicator_norm_identity (G : Type*) [AddCommGroup G] [Fintype G] [DecidableEq G] (S : Finset G) : (∑ χ : AddChar G ℂ, ‖∑ x ∈ S, χ x‖^2) = (Fintype.card G : ℝ) * S.card := by classical let f : G → ℂ := fun x => if x ∈ S then 1 else 0 have hF (χ : AddChar G ℂ) : (∑ x : G, f x * χ x) = ∑ x ∈ S, χ x := by simp [f] have hG (χ : AddChar G ℂ) : (∑ x : G, f x * χ (-x)) = star (∑ x ∈ S, χ x) := by simp [f, AddChar.map_neg_eq_conj] have hsquared (χ : AddChar G ℂ) : ((‖∑ x ∈ S, χ x‖^2 : ℝ) : ℂ) = (∑ x : G, f x * χ x) * (∑ x : G, f x * χ (-x)) := by rw [hF, hG] simpa [Complex.star_def, Complex.normSq_eq_norm_sq, mul_comm] using (Complex.normSq_eq_conj_mul_self (z := ∑ x ∈ S, χ x)) have hdiag : (∑ x : G, f x * f x) = (S.card : ℂ) := by simp [f] apply Complex.ofReal_injective simp only [Complex.ofReal_sum, Complex.ofReal_mul, Complex.ofReal_natCast] simp_rw [hsquared] rw [op861_fourier_pair_identity G f f, hdiag]