The areas / V12. Number theory
Mathlib.NumberTheory.GaussSum
21 declarations. Mathlib docs · Source
Gauss sums
We define the Gauss sum associated to a multiplicative and an additive character of a finite field and prove some results about them.
Main definition
Let R be a finite commutative ring and let R' be another commutative ring.
If χ is a multiplicative character R → R' (type MulChar R R') and ψ
is an additive character R → R' (type AddChar R R', which abbreviates
(Multiplicative R) →* R'), then the Gauss sum of χ and ψ is ∑ a, χ a * ψ a.
Main results
Some important results are as follows.
gaussSum_mul_gaussSum_eq_card: The product of the Gauss sums ofχandψand that ofχ⁻¹andψ⁻¹is the cardinality of the source ringR(ifχis nontrivial,ψis primitive andRis a field).gaussSum_sq: The square of the Gauss sum isχ(-1)times the cardinality ofRif in additionχis a quadratic character.MulChar.IsQuadratic.gaussSum_frob: For a quadratic characterχ, raising the Gauss sum to thepth power (wherepis the characteristic of the target ringR') multiplies it byχ p.Char.card_pow_card: WhenFandF'are finite fields andχ : F → F'is a nontrivial quadratic character, then(χ (-1) * #F)^(#F'/2) = χ #F'.FiniteField.two_pow_card: For every finite fieldFof odd characteristic, we have2^(#F/2) = χ₈ #FinF.
This machinery can be used to derive (a generalization of) the Law of Quadratic Reciprocity.
Tags
additive character, multiplicative character, Gauss sum
Definition and first properties
Gauss sums of trivial characters
The product of two Gauss sums
Gauss sums and Frobenius
Values of quadratic characters
The quadratic character of 2
This section proves the following result.
For every finite field F of odd characteristic, we have 2^(#F/2) = χ₈#F in F.
This can be used to show that the quadratic character of F takes the value
χ₈#F at 2.
The proof uses the Gauss sum of χ₈ and a primitive additive character on ℤ/8ℤ;
in this way, the result is reduced to card_pow_char_pow.
def gaussSum E1 #
{R : Type u} →
[inst : CommRing R] → [Fintype R] → {R' : Type v} → [inst_2 : CommRing R'] → MulChar R R' → AddChar R R' → R'
Definition of the Gauss sum associated to a multiplicative and an additive character.
theorem gaussSum_mulShift E1 #
∀ {R : Type u} [inst : CommRing R] [inst_1 : Fintype R] {R' : Type v} [inst_2 : CommRing R'] (χ : MulChar R R')
(ψ : AddChar R R') (a : Rˣ), χ ↑a * gaussSum χ (ψ.mulShift ↑a) = gaussSum χ ψ
Replacing ψ by mulShift ψ a and multiplying the Gauss sum by χ a does not change it.
theorem gaussSum_mulShift_eq E0 #
∀ {R : Type u} [inst : CommRing R] [inst_1 : Fintype R] {R' : Type v} [inst_2 : CommRing R'] (χ : MulChar R R')
(ψ : AddChar R R') (a : Rˣ), gaussSum χ (ψ.mulShift ↑a) = χ⁻¹ ↑a * gaussSum χ ψ
Replacing ψ by mulShift ψ a multiplies the Gauss sum by χ⁻¹ a.
theorem star_gaussSum_eq E0 #
∀ {R : Type u} [inst : CommRing R] [inst_1 : Fintype R] (χ : MulChar R ℂ) (ψ : AddChar R ℂ),
star (gaussSum χ ψ) = gaussSum χ⁻¹ ψ⁻¹
Taking complex conjugates of a Gauss sum inverts both characters.
theorem gaussSum_inv_right E1 #
∀ {R : Type u} [inst : CommRing R] [inst_1 : Fintype R] {R' : Type v} [inst_2 : CommRing R'] (χ : MulChar R R')
(ψ : AddChar R R'), gaussSum χ ψ⁻¹ = χ (-1) * gaussSum χ ψ
theorem gaussSum_inv_eq_conj E1 #
∀ {R : Type u} [inst : CommRing R] [inst_1 : Fintype R] (χ : MulChar R ℂ) (ψ : AddChar R ℂ),
gaussSum χ⁻¹ ψ = χ (-1) * (starRingEnd ℂ) (gaussSum χ ψ)
The Gauss sum of χ⁻¹ is χ (-1) times the complex conjugate of the Gauss sum of χ.
theorem gaussSum_one_one E0 #
∀ {R : Type u_1} {R' : Type u_2} [inst : CommRing R] [inst_1 : Fintype R] [inst_2 : CommRing R'],
gaussSum 1 1 = ↑(Nat.card Rˣ)
The Gauss sum of the two trivial characters is the cardinality of the unit group of R.
theorem gaussSum_one_right E1 #
∀ {R : Type u_1} {R' : Type u_2} [inst : CommRing R] [inst_1 : Fintype R] [inst_2 : CommRing R'] [IsDomain R']
{χ : MulChar R R'}, χ ≠ 1 → gaussSum χ 1 = 0
The Gauss sum of a nontrivial multiplicative character and the trivial additive character vanishes.
theorem gaussSum_one_left E1 #
∀ {R : Type u_1} {R' : Type u_2} [inst : Field R] [inst_1 : Fintype R] [inst_2 : CommRing R'] [IsDomain R']
{ψ : AddChar R R'}, ψ ≠ 1 → gaussSum 1 ψ = -1
The Gauss sum of the trivial multiplicative character and a nontrivial additive character,
over a finite field, is -1.
theorem gaussSum_mul E1 #
∀ {R : Type u} [inst : CommRing R] [inst_1 : Fintype R] {R' : Type v} [inst_2 : CommRing R'] (χ φ : MulChar R R')
(ψ : AddChar R R'), gaussSum χ ψ * gaussSum φ ψ = ∑ t, ∑ x, χ x * φ (t - x) * ψ t
A formula for the product of two Gauss sums with the same additive character.
theorem mul_gaussSum_inv_eq_gaussSum E1 #
∀ {R : Type u} [inst : Field R] [inst_1 : Fintype R] {R' : Type v} [inst_2 : CommRing R'] (χ : MulChar R R')
(ψ : AddChar R R'), χ (-1) * gaussSum χ ψ⁻¹ = gaussSum χ ψ
theorem gaussSum_mul_gaussSum_eq_card E3 #
∀ {R : Type u} [inst : Field R] [inst_1 : Fintype R] {R' : Type v} [inst_2 : CommRing R'] [IsDomain R']
{χ : MulChar R R'}, χ ≠ 1 → ∀ {ψ : AddChar R R'}, ψ.IsPrimitive → gaussSum χ ψ * gaussSum χ⁻¹ ψ⁻¹ = ↑(Fintype.card R)
We have gaussSum χ ψ * gaussSum χ⁻¹ ψ⁻¹ = Fintype.card R
when χ is nontrivial and ψ is primitive (and R is a field).
theorem gaussSum_mul_gaussSum_pow_orderOf_sub_one E1 #
∀ {R : Type u} [inst : Field R] [inst_1 : Fintype R] {R' : Type v} [inst_2 : CommRing R'] [IsDomain R']
{χ : MulChar R R'} {ψ : AddChar R R'},
χ ≠ 1 → ψ.IsPrimitive → gaussSum χ ψ * gaussSum (χ ^ (orderOf χ - 1)) ψ = χ (-1) * ↑(Fintype.card R)
If χ is a multiplicative character of order n on a finite field F,
then g(χ) * g(χ^(n-1)) = χ(-1)*#F
theorem gaussSum_ne_zero_of_nontrivial E1 #
∀ {R : Type u} [inst : Field R] [inst_1 : Fintype R] {R' : Type v} [inst_2 : CommRing R'] [IsDomain R'],
↑(Fintype.card R) ≠ 0 → ∀ {χ : MulChar R R'}, χ ≠ 1 → ∀ {ψ : AddChar R R'}, ψ.IsPrimitive → gaussSum χ ψ ≠ 0
The Gauss sum of a nontrivial character on a finite field does not vanish.
theorem gaussSum_sq E3 #
∀ {R : Type u} [inst : Field R] [inst_1 : Fintype R] {R' : Type v} [inst_2 : CommRing R'] [IsDomain R']
{χ : MulChar R R'},
χ ≠ 1 → χ.IsQuadratic → ∀ {ψ : AddChar R R'}, ψ.IsPrimitive → gaussSum χ ψ ^ 2 = χ (-1) * ↑(Fintype.card R)
When χ is a nontrivial quadratic character, then the square of gaussSum χ ψ
is χ(-1) times the cardinality of R.
theorem gaussSum_frob E1 #
∀ {R : Type u} [inst : CommRing R] [inst_1 : Fintype R] {R' : Type v} [inst_2 : CommRing R'] (p : ℕ)
[fp : Fact (Nat.Prime p)] [hch : CharP R' p] (χ : MulChar R R') (ψ : AddChar R R'),
gaussSum χ ψ ^ p = gaussSum (χ ^ p) (ψ ^ p)
When R' has prime characteristic p, then the pth power of the Gauss sum
of χ and ψ is the Gauss sum of χ^p and ψ^p.
theorem MulChar.IsQuadratic.gaussSum_frob E3 #
∀ {R : Type u} [inst : CommRing R] [inst_1 : Fintype R] {R' : Type v} [inst_2 : CommRing R'] (p : ℕ)
[fp : Fact (Nat.Prime p)] [hch : CharP R' p],
IsUnit ↑p → ∀ {χ : MulChar R R'}, χ.IsQuadratic → ∀ (ψ : AddChar R R'), gaussSum χ ψ ^ p = χ ↑p * gaussSum χ ψ
For a quadratic character χ and when the characteristic p of the target ring
is a unit in the source ring, the pth power of the Gauss sum of χ and ψ is
χ p times the original Gauss sum.
theorem MulChar.IsQuadratic.gaussSum_frob_iter E1 #
∀ {R : Type u} [inst : CommRing R] [inst_1 : Fintype R] {R' : Type v} [inst_2 : CommRing R'] (p : ℕ)
[fp : Fact (Nat.Prime p)] [hch : CharP R' p] (n : ℕ),
IsUnit ↑p →
∀ {χ : MulChar R R'}, χ.IsQuadratic → ∀ (ψ : AddChar R R'), gaussSum χ ψ ^ p ^ n = χ (↑p ^ n) * gaussSum χ ψ
For a quadratic character χ and when the characteristic p of the target ring
is a unit in the source ring and n is a natural number, the p^nth power of the Gauss
sum of χ and ψ is χ (p^n) times the original Gauss sum.
theorem Char.card_pow_char_pow E1 #
∀ {R : Type u} [inst : CommRing R] [inst_1 : Fintype R] {R' : Type v} [inst_2 : CommRing R'] [IsDomain R']
{χ : MulChar R R'},
χ.IsQuadratic →
∀ (ψ : AddChar R R') (p n : ℕ) [fp : Fact (Nat.Prime p)] [hch : CharP R' p],
IsUnit ↑p →
p ≠ 2 → gaussSum χ ψ ^ 2 = χ (-1) * ↑(Fintype.card R) → (χ (-1) * ↑(Fintype.card R)) ^ (p ^ n / 2) = χ (↑p ^ n)
If the square of the Gauss sum of a quadratic character is χ(-1) * #R,
then we get, for all n : ℕ, the relation (χ(-1) * #R) ^ (p^n/2) = χ(p^n),
where p is the (odd) characteristic of the target ring R'.
This version can be used when R is not a field, e.g., ℤ/8ℤ.
theorem Char.card_pow_card E3 #
∀ {F : Type u_1} [inst : Field F] [inst_1 : Fintype F] {F' : Type u_2} [inst_2 : Field F'] [inst_3 : Fintype F']
{χ : MulChar F F'},
χ ≠ 1 →
χ.IsQuadratic →
ringChar F' ≠ ringChar F →
ringChar F' ≠ 2 → (χ (-1) * ↑(Fintype.card F)) ^ (Fintype.card F' / 2) = χ ↑(Fintype.card F')
When F and F' are finite fields and χ : F → F' is a nontrivial quadratic character,
then (χ(-1) * #F)^(#F'/2) = χ #F'.
theorem FiniteField.two_pow_card E3 #
∀ {F : Type u_1} [inst : Fintype F] [inst_1 : Field F],
ringChar F ≠ 2 → 2 ^ (Fintype.card F / 2) = ↑(ZMod.χ₈ ↑(Fintype.card F))
For every finite field F of odd characteristic, we have 2^(#F/2) = χ₈ #F in F.