The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V12. Number theory

Mathlib.NumberTheory.JacobiSum.Basic

15 declarations. Mathlib docs · Source

Jacobi Sums

This file defines the Jacobi sum of two multiplicative characters χ and ψ on a finite commutative ring R with values in another commutative ring R':

jacobiSum χ ψ = ∑ x : R, χ x * ψ (1 - x)

(see jacobiSum) and provides some basic results and API lemmas on Jacobi sums.

References

We essentially follow

  • [K. Ireland, M. Rosen, A classical introduction to modern number theory (Section 8.3)][IrelandRosen1990]

but generalize where appropriate.

This is based on Lean code written as part of the bachelor's thesis of Alexander Spahl.

Jacobi sums: definition and first properties

Jacobi sums over finite fields

def jacobiSum E1 #

{R : Type u_1} →
  {R' : Type u_2} → [inst : CommRing R] → [Fintype R] → [inst_2 : CommRing R'] → MulChar R R' → MulChar R R' → R'

The Jacobi sum of two multiplicative characters on a finite commutative ring.

theorem jacobiSum_comm E1 #

∀ {R : Type u_1} {R' : Type u_2} [inst : CommRing R] [inst_1 : Fintype R] [inst_2 : CommRing R'] (χ ψ : MulChar R R'),
  jacobiSum χ ψ = jacobiSum ψ χ

theorem jacobiSum_ringHomComp E1 #

∀ {R : Type u_1} {R' : Type u_2} [inst : CommRing R] [inst_1 : Fintype R] [inst_2 : CommRing R'] {R'' : Type u_3}
  [inst_3 : CommRing R''] (χ ψ : MulChar R R') (f : R' →+* R''),
  jacobiSum (χ.ringHomComp f) (ψ.ringHomComp f) = f (jacobiSum χ ψ)

The Jacobi sum is compatible with ring homomorphisms.

theorem jacobiSum_eq_sum_sdiff E1 #

∀ {F : Type u_1} {R : Type u_2} [inst : CommRing F] [Nontrivial F] [inst_2 : Fintype F] [inst_3 : DecidableEq F]
  [inst_4 : CommRing R] (χ ψ : MulChar F R), jacobiSum χ ψ = ∑ x ∈ Finset.univ \ {0, 1}, χ x * ψ (1 - x)

The Jacobi sum of two multiplicative characters on a nontrivial finite commutative ring F can be written as a sum over F \ {0,1}.

theorem jacobiSum_trivial_trivial E1 #

∀ {F : Type u_1} {R : Type u_2} [inst : Field F] [inst_1 : Fintype F] [inst_2 : CommRing R],
  jacobiSum (MulChar.trivial F R) (MulChar.trivial F R) = ↑(Fintype.card F) - 2

The Jacobi sum of twice the trivial multiplicative character on a finite field F equals #F-2.

theorem jacobiSum_one_one E1 #

∀ {F : Type u_1} {R : Type u_2} [inst : Field F] [inst_1 : Fintype F] [inst_2 : CommRing R],
  jacobiSum 1 1 = ↑(Fintype.card F) - 2

If 1 is the trivial multiplicative character on a finite field F, then J(1,1) = #F-2.

theorem jacobiSum_one_nontrivial E1 #

∀ {F : Type u_1} {R : Type u_2} [inst : Field F] [inst_1 : Fintype F] [inst_2 : CommRing R] [IsDomain R]
  {χ : MulChar F R}, χ ≠ 1 → jacobiSum 1 χ = -1

If χ is a nontrivial multiplicative character on a finite field F, then J(1,χ) = -1.

theorem jacobiSum_nontrivial_inv E1 #

∀ {F : Type u_1} {R : Type u_2} [inst : Field F] [inst_1 : Fintype F] [inst_2 : CommRing R] [IsDomain R]
  {χ : MulChar F R}, χ ≠ 1 → jacobiSum χ χ⁻¹ = -χ (-1)

If χ is a nontrivial multiplicative character on a finite field F, then J(χ,χ⁻¹) = -χ(-1).

theorem jacobiSum_mul_nontrivial E1 #

∀ {F : Type u_1} {R : Type u_2} [inst : Field F] [inst_1 : Fintype F] [inst_2 : CommRing R] [IsDomain R]
  {χ φ : MulChar F R}, χ * φ ≠ 1 → ∀ (ψ : AddChar F R), gaussSum (χ * φ) ψ * jacobiSum χ φ = gaussSum χ ψ * gaussSum φ ψ

If χ and φ are multiplicative characters on a finite field F such that χφ is nontrivial, then g(χφ) * J(χ,φ) = g(χ) * g(φ).

theorem jacobiSum_eq_gaussSum_mul_gaussSum_div_gaussSum E1 #

∀ {F : Type u_1} {F' : Type u_2} [inst : Fintype F] [inst_1 : Field F] [inst_2 : Field F'],
  ↑(Fintype.card F) ≠ 0 →
    ∀ {χ φ : MulChar F F'},
      χ * φ ≠ 1 → ∀ {ψ : AddChar F F'}, ψ.IsPrimitive → jacobiSum χ φ = gaussSum χ ψ * gaussSum φ ψ / gaussSum (χ * φ) ψ

If χ and φ are multiplicative characters on a finite field F with values in another field F' and such that χφ is nontrivial, then J(χ,φ) = g(χ) * g(φ) / g(χφ).

theorem jacobiSum_mul_jacobiSum_inv E1 #

∀ {F : Type u_1} {F' : Type u_2} [inst : Fintype F] [inst_1 : Field F] [inst_2 : Field F'],
  ringChar F' ≠ ringChar F →
    ∀ {χ φ : MulChar F F'}, χ ≠ 1 → φ ≠ 1 → χ * φ ≠ 1 → jacobiSum χ φ * jacobiSum χ⁻¹ φ⁻¹ = ↑(Fintype.card F)

If χ and φ are multiplicative characters on a finite field F with values in another field F' such that χ, φ and χφ are all nontrivial and char F' ≠ char F, then J(χ,φ) * J(χ⁻¹,φ⁻¹) = #F (in F').

theorem jacobiSum_mem_algebraAdjoin_of_pow_eq_one E1 #

∀ {F : Type u_1} {R : Type u_2} [inst : Field F] [inst_1 : CommRing R] [IsDomain R] [inst_3 : Fintype F] {n : ℕ}
  [NeZero n] {χ φ : MulChar F R}, χ ^ n = 1 → φ ^ n = 1 → ∀ {μ : R}, IsPrimitiveRoot μ n → jacobiSum χ φ ∈ ℤ[μ]

If χ and φ are multiplicative characters on a finite field F satisfying χ^n = φ^n = 1 and with values in an integral domain R, and μ is a primitive nth root of unity in R, then the Jacobi sum J(χ,φ) is in ℤ[μ] ⊆ R.

theorem exists_jacobiSum_eq_neg_one_add E1 #

∀ {F : Type u_1} {R : Type u_2} [inst : Field F] [inst_1 : CommRing R] [IsDomain R] [inst_3 : Fintype F] {n : ℕ},
  2 < n →
    ∀ {χ ψ : MulChar F R} {μ : R},
      χ ^ n = 1 →
        ψ ^ n = 1 → n ∣ Fintype.card F - 1 → IsPrimitiveRoot μ n → ∃ z ∈ ℤ[μ], jacobiSum χ ψ = -1 + z * (μ - 1) ^ 2

If χ and ψ are multiplicative characters of order dividing n on a finite field F with values in an integral domain R and μ is a primitive nth root of unity in R, then J(χ,ψ) = -1 + z*(μ - 1)^2 for some z ∈ ℤ[μ] ⊆ R. (We assume that #F ≡ 1 mod n.) Note that we do not state this as a divisibility in R, as this would give a weaker statement.

theorem gaussSum_pow_eq_prod_jacobiSum_aux E0 #

∀ {F : Type u_1} {R : Type u_2} [inst : Fintype F] [inst_1 : Field F] [inst_2 : CommRing R] [IsDomain R]
  (χ : MulChar F R) (ψ : AddChar F R) {n : ℕ},
  0 < n → n < orderOf χ → gaussSum χ ψ ^ n = gaussSum (χ ^ n) ψ * ∏ j ∈ Finset.Ico 1 n, jacobiSum χ (χ ^ j)

theorem gaussSum_pow_eq_prod_jacobiSum E1 #

∀ {F : Type u_1} {R : Type u_2} [inst : Fintype F] [inst_1 : Field F] [inst_2 : CommRing R] [IsDomain R]
  {χ : MulChar F R} {ψ : AddChar F R},
  2 ≤ orderOf χ →
    ψ.IsPrimitive →
      gaussSum χ ψ ^ orderOf χ = χ (-1) * ↑(Fintype.card F) * ∏ i ∈ Finset.Ico 1 (orderOf χ - 1), jacobiSum χ (χ ^ i)

If χ is a multiplicative character of order n ≥ 2 on a finite field F, then g(χ)^n = χ(-1) * #F * J(χ,χ) * J(χ,χ²) * ... * J(χ,χⁿ⁻²).