AFTD Auto-Formalizing Theoretical Domains

op861_fourier_pair_identity

theoremverified

For complex-valued functions f and g on a finite abelian group, the sum over additive characters of the Fourier sum of f times the opposite-frequency Fourier sum of g equals the group order times the sum of the pointwise products f(x)g(x).

Statement

theorem op861_fourier_pair_identity (G : Type*) [AddCommGroup G] [Fintype G] [DecidableEq G]
    (f g : G → ℂ) :
    (∑ χ : AddChar G ℂ, (∑ x : G, f x * χ x) * (∑ y : G, g y * χ (-y))) =
      (Fintype.card G : ℂ) * ∑ x : G, f x * g x
Source
Finite character orthogonality, used for op861_ternary_crossing_pairs_dense.
Verified
18 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 2

The proof, explained

The proof expands the product of the Fourier sums of f and g into a triple sum over characters χ and group elements x, y. Interchanging the order of summation brings the character sum inside, yielding ∑_{x,y} f(x)g(y) ∑_χ χ(x - y). Character orthogonality reduces this inner sum to |G| on the diagonal x = y and 0 elsewhere, collapsing the sum over y to the single term y = x and leaving |G| ∑_x f(x)g(x).

  1. The product of the two Fourier sums expands into the triple sum ∑ χ, ∑ x, ∑ y, (f x * g y) * χ (x - y).

    For each character χ, distribute the product of the two inner sums into a double sum over x and y. Using the character property χ(x - y) = χ(x + (-y)) = χ(x) * χ(-y), the term (f(x)χ(x)) * (g(y)χ(-y)) rearranges by commutativity of multiplication in ℂ to (f(x)g(y)) * χ(x - y).

    lines 7–20

    uses Finset.sum_congr, Finset.sum_mul, Finset.mul_sum, Finset.sum_comm, sub_eq_add_neg, AddChar.map_add_eq_mul

      classical
      calc
        _ = ∑ χ : AddChar G ℂ, ∑ x : G, ∑ y : G,
            (f x * g y) * χ (x-y) := by
          apply Finset.sum_congr rfl
          intro χ hχ
          simp only [Finset.sum_mul, Finset.mul_sum]
          rw [Finset.sum_comm]
          apply Finset.sum_congr rfl
          intro x hx
          apply Finset.sum_congr rfl
          intro y hy
          rw [sub_eq_add_neg, AddChar.map_add_eq_mul]
          ring
  2. The triple sum rearranges to ∑ x, ∑ y, (f x * g y) * ∑ χ, χ (x - y).

    Interchange the order of summation so that the sum over characters χ becomes innermost, and factor the product f(x)g(y), which does not depend on χ, out of the character sum.

    lines 21–26

    uses Finset.mul_sum, Finset.sum_comm, Finset.sum_congr

        _ = ∑ x : G, ∑ y : G, (f x * g y) * ∑ χ : AddChar G ℂ, χ (x-y) := by
          simp only [Finset.mul_sum]
          rw [Finset.sum_comm]
          apply Finset.sum_congr rfl
          intro x hx
          rw [Finset.sum_comm]
  3. The sum simplifies to |G| * ∑ x, f x * g x.

    By character orthogonality (AddChar.sum_apply_eq_ite), the inner sum over characters evaluates to |G| when x - y = 0 and to 0 otherwise. Because x - y = 0 is equivalent to x = y, all terms in the sum over y with y ≠ x vanish. Applying Finset.sum_eq_single collapses the sum over y to the diagonal term y = x, leaving f(x)g(x) * |G| for each x. Factoring |G| out of the sum over x gives the final result.

    lines 27–39

    uses AddChar.sum_apply_eq_ite, Finset.mul_sum, Finset.sum_congr, sub_eq_zero, mul_ite, mul_zero, Finset.sum_eq_single, Ne.symm

        _ = _ := by
          simp_rw [AddChar.sum_apply_eq_ite]
          rw [Finset.mul_sum]
          apply Finset.sum_congr rfl
          intro x hx
          simp only [sub_eq_zero, mul_ite, mul_zero]
          rw [Finset.sum_eq_single x]
          · simp
            ring
          · intro y hy hne
            have hne' : x ≠ y := Ne.symm hne
            simp [hne']
          · simp
AddChar.map_add_eq_mul
An additive character turns group addition into target multiplication: χ(x + y) = χ(x)χ(y).
AddChar.sum_apply_eq_ite
Orthogonality of characters: the sum of all additive characters evaluated at an element a equals the group size |G| if a = 0 and 0 otherwise.
Finset.sum_comm
Commutativity of double summation: the order of two finite sums can be swapped.
Finset.sum_congr
Congruence for finite sums: two sums over the same index set are equal if their summands agree at every element.
Finset.sum_eq_single
A finite sum reduces to a single term f(a) if every term with index distinct from a is zero and a is in the index set.
Finset.mul_sum
Left-distributivity of multiplication over a finite sum: factoring a scalar into or out of a sum.
Finset.sum_mul
Right-distributivity of multiplication over a finite sum.
mul_ite
Multiplication distributes over an if-then-else condition.
mul_zero
Multiplying any element by zero yields zero.
Ne.symm
Symmetry of inequality: a ≠ b implies b ≠ a.
sub_eq_add_neg
Subtraction in an additive group is addition of the negation: a - b = a + (-b).
sub_eq_zero
In an additive group, the difference a - b is 0 if and only if a = b.

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

open scoped BigOperatorstheorem op861_fourier_pair_identity (G : Type*) [AddCommGroup G] [Fintype G] [DecidableEq G]    (f g : G → ℂ) :    (∑ χ : AddChar G ℂ, (∑ x : G, f x * χ x) * (∑ y : G, g y * χ (-y))) =      (Fintype.card G : ℂ) * ∑ x : G, f x * g x := by  classical  calc    _ = ∑ χ : AddChar G ℂ, ∑ x : G, ∑ y : G,        (f x * g y) * χ (x-y) := by      apply Finset.sum_congr rfl      intro χ hχ      simp only [Finset.sum_mul, Finset.mul_sum]      rw [Finset.sum_comm]      apply Finset.sum_congr rfl      intro x hx      apply Finset.sum_congr rfl      intro y hy      rw [sub_eq_add_neg, AddChar.map_add_eq_mul]      ring    _ = ∑ x : G, ∑ y : G, (f x * g y) * ∑ χ : AddChar G ℂ, χ (x-y) := by      simp only [Finset.mul_sum]      rw [Finset.sum_comm]      apply Finset.sum_congr rfl      intro x hx      rw [Finset.sum_comm]    _ = _ := by      simp_rw [AddChar.sum_apply_eq_ite]      rw [Finset.mul_sum]      apply Finset.sum_congr rfl      intro x hx      simp only [sub_eq_zero, mul_ite, mul_zero]      rw [Finset.sum_eq_single x]      · simp        ring      · intro y hy hne        have hne' : x ≠ y := Ne.symm hne        simp [hne']      · simp
See it in the graphDiscuss this resultChallenge it