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.LegendreSymbol.AddCharacter

29 declarations. Mathlib docs · Source

Additive characters of finite rings and fields

This file collects some results on additive characters whose domain is (the additive group of) a finite ring or field.

Main definitions and results

We define an additive character ψ to be primitive if mulShift ψ a is trivial only when a = 0.

We show that when ψ is primitive, then the map a ↦ mulShift ψ a is injective (AddChar.to_mulShift_inj_of_isPrimitive) and that ψ is primitive when R is a field and ψ is nontrivial (AddChar.IsNontrivial.isPrimitive).

We also show that there are primitive additive characters on R (with suitable target R') when R is a field or R = ZMod n (AddChar.primitiveCharFiniteField and AddChar.primitiveZModChar).

Finally, we show that the sum of all character values is zero when the character is nontrivial (and the target is a domain); see AddChar.sum_eq_zero_of_isNontrivial.

Tags

additive character

Additive characters on ZMod n

Existence of a primitive additive character on a finite field

The sum of all character values

Complex-valued additive characters

theorem AddChar.PrimitiveAddChar.mk.inj E1 #

∀ {R : Type u} {inst : CommRing R} {R' : Type v} {inst_1 : Field R'} {n : ℕ+}
  {char : AddChar R (CyclotomicField (↑n) R')} {prim : char.IsPrimitive} {n_1 : ℕ+}
  {char_1 : AddChar R (CyclotomicField (↑n_1) R')} {prim_1 : char_1.IsPrimitive},
  { n := n, char := char, prim := prim } = { n := n_1, char := char_1, prim := prim_1 } → n = n_1 ∧ char ≍ char_1

theorem AddChar.PrimitiveAddChar.mk.injEq E0 #

∀ {R : Type u} [inst : CommRing R] {R' : Type v} [inst_1 : Field R'] (n : ℕ+)
  (char : AddChar R (CyclotomicField (↑n) R')) (prim : char.IsPrimitive) (n_1 : ℕ+)
  (char_1 : AddChar R (CyclotomicField (↑n_1) R')) (prim_1 : char_1.IsPrimitive),
  ({ n := n, char := char, prim := prim } = { n := n_1, char := char_1, prim := prim_1 }) = (n = n_1 ∧ char ≍ char_1)

def AddChar.PrimitiveAddChar.ctorIdx E1 #

{R : Type u} → {inst : CommRing R} → {R' : Type v} → {inst_1 : Field R'} → AddChar.PrimitiveAddChar R R' → ℕ

theorem AddChar.val_mem_rootsOfUnity E0 #

∀ {R : Type u} [inst : CommRing R] {R' : Type v} [inst_1 : CommMonoid R'] (φ : AddChar R R') (a : R),
  0 < ringChar R → ⋯.unit ∈ rootsOfUnity (↑(ringChar R).toPNat') R'

The values of an additive character on a ring of positive characteristic are roots of unity.

def AddChar.IsPrimitive E1 #

{R : Type u} → [inst : CommRing R] → {R' : Type v} → [inst_1 : CommMonoid R'] → AddChar R R' → Prop

An additive character is primitive iff all its multiplicative shifts by nonzero elements are nontrivial.

theorem AddChar.IsPrimitive.compMulHom_of_isPrimitive E1 #

∀ {R : Type u} [inst : CommRing R] {R' : Type v} [inst_1 : CommMonoid R'] {R'' : Type u_1} [inst_2 : CommMonoid R'']
  {φ : AddChar R R'} {f : R' →* R''}, φ.IsPrimitive → Function.Injective ⇑f → (f.compAddChar φ).IsPrimitive

The composition of a primitive additive character with an injective monoid homomorphism is also primitive.

theorem AddChar.to_mulShift_inj_of_isPrimitive E1 #

∀ {R : Type u} [inst : CommRing R] {R' : Type v} [inst_1 : CommMonoid R'] {ψ : AddChar R R'},
  ψ.IsPrimitive → Function.Injective ψ.mulShift

The map associating to a : R the multiplicative shift of ψ by a is injective when ψ is primitive.

theorem AddChar.IsPrimitive.of_ne_one E1 #

∀ {R' : Type v} [inst : CommMonoid R'] {F : Type u} [inst_1 : Field F] {ψ : AddChar F R'}, ψ ≠ 1 → ψ.IsPrimitive

When R is a field F, then a nontrivial additive character is primitive

theorem AddChar.not_isPrimitive_mulShift E1 #

∀ {R : Type u} [inst : CommRing R] {R' : Type v} [inst_1 : CommMonoid R'] [Finite R] (e : AddChar R R') {r : R},
  ¬IsUnit r → ¬(e.mulShift r).IsPrimitive

If r is not a unit, then e.mulShift r is not primitive.

structure AddChar.PrimitiveAddChar E1 #

(R : Type u) → [CommRing R] → (R' : Type v) → [Field R'] → Type (max u v)

Definition for a primitive additive character on a finite ring R into a cyclotomic extension of a field R'. It records which cyclotomic extension it is, the character, and the fact that the character is primitive.

ctor AddChar.PrimitiveAddChar.mk E0 #

{R : Type u} →
  [inst : CommRing R] →
    {R' : Type v} →
      [inst_1 : Field R'] →
        (n : ℕ+) → (char : AddChar R (CyclotomicField (↑n) R')) → char.IsPrimitive → AddChar.PrimitiveAddChar R R'

abbrev AddChar.PrimitiveAddChar.n E1 #

{R : Type u} → [inst : CommRing R] → {R' : Type v} → [inst_1 : Field R'] → AddChar.PrimitiveAddChar R R' → ℕ+

The first projection from PrimitiveAddChar, giving the cyclotomic field.

abbrev AddChar.PrimitiveAddChar.char E1 #

{R : Type u} →
  [inst : CommRing R] →
    {R' : Type v} →
      [inst_1 : Field R'] → (self : AddChar.PrimitiveAddChar R R') → AddChar R (CyclotomicField (↑self.n) R')

The second projection from PrimitiveAddChar, giving the character.

theorem AddChar.PrimitiveAddChar.prim E1 #

∀ {R : Type u} [inst : CommRing R] {R' : Type v} [inst_1 : Field R'] (self : AddChar.PrimitiveAddChar R R'),
  self.char.IsPrimitive

The third projection from PrimitiveAddChar, showing that χ.char is primitive.

theorem AddChar.exists_divisor_of_not_isPrimitive E1 #

∀ {N : ℕ} [NeZero N] {R : Type u_1} [inst : CommRing R] (e : AddChar (ZMod N) R),
  ¬e.IsPrimitive → ∃ d, d ∣ N ∧ d < N ∧ e.mulShift ↑d = 1

If e is not primitive, then e.mulShift d = 1 for some proper divisor d of N.

def AddChar.zmodChar E1 #

{C : Type v} → [inst : CommMonoid C] → (n : ℕ) → [NeZero n] → {ζ : C} → ζ ^ n = 1 → AddChar (ZMod n) C

We can define an additive character on ZMod n when we have an nth root of unity ζ : C.

theorem AddChar.zmodChar_apply E0 #

∀ {C : Type v} [inst : CommMonoid C] {n : ℕ} [inst_1 : NeZero n] {ζ : C} (hζ : ζ ^ n = 1) (a : ZMod n),
  (AddChar.zmodChar n hζ) a = ζ ^ a.val

The additive character on ZMod n defined using ζ sends a to ζ^a.

theorem AddChar.zmodChar_apply' E1 #

∀ {C : Type v} [inst : CommMonoid C] {n : ℕ} [inst_1 : NeZero n] {ζ : C} (hζ : ζ ^ n = 1) (a : ℕ),
  (AddChar.zmodChar n hζ) ↑a = ζ ^ a

theorem AddChar.zmod_char_ne_one_iff E0 #

∀ {C : Type v} [inst : CommMonoid C] (n : ℕ) [NeZero n] (ψ : AddChar (ZMod n) C), ψ ≠ 1 ↔ ψ 1 ≠ 1

An additive character on ZMod n is nontrivial iff it takes a value ≠ 1 on 1.

theorem AddChar.IsPrimitive.zmod_char_eq_one_iff E0 #

∀ {C : Type v} [inst : CommMonoid C] (n : ℕ) [NeZero n] {ψ : AddChar (ZMod n) C},
  ψ.IsPrimitive → ∀ (a : ZMod n), ψ a = 1 ↔ a = 0

A primitive additive character on ZMod n takes the value 1 only at 0.

theorem AddChar.zmod_char_primitive_of_eq_one_only_at_zero E1 #

∀ {C : Type v} [inst : CommMonoid C] (n : ℕ) (ψ : AddChar (ZMod n) C), (∀ (a : ZMod n), ψ a = 1 → a = 0) → ψ.IsPrimitive

The converse: if the additive character takes the value 1 only at 0, then it is primitive.

theorem AddChar.zmodChar_primitive_of_primitive_root E1 #

∀ {C : Type v} [inst : CommMonoid C] (n : ℕ) [inst_1 : NeZero n] {ζ : C} (h : IsPrimitiveRoot ζ n),
  (AddChar.zmodChar n ⋯).IsPrimitive

The additive character on ZMod n associated to a primitive nth root of unity is primitive

def AddChar.primitiveZModChar E1 #

(n : ℕ+) → (F' : Type v) → [inst : Field F'] → ↑↑n ≠ 0 → AddChar.PrimitiveAddChar (ZMod ↑n) F'

There is a primitive additive character on ZMod n if the characteristic of the target does not divide n

def AddChar.FiniteField.primitiveChar E1 #

(F : Type u_1) →
  (F' : Type u_2) →
    [inst : Field F] → [Finite F] → [inst_2 : Field F'] → ringChar F' ≠ ringChar F → AddChar.PrimitiveAddChar F F'

There is a primitive additive character on the finite field F if the characteristic of the target is different from that of F.

We obtain it as the composition of the trace from F to ZMod p with a primitive additive character on ZMod p, where p is the characteristic of F.

theorem AddChar.sum_eq_zero_of_ne_one E1 #

∀ {R : Type u_1} [inst : AddGroup R] [inst_1 : Fintype R] {R' : Type u_2} [inst_2 : CommRing R'] [IsDomain R']
  {ψ : AddChar R R'}, ψ ≠ 1 → ∑ a, ψ a = 0

The sum over the values of a nontrivial additive character vanishes if the target ring is a domain.

theorem AddChar.sum_eq_card_of_eq_one E1 #

∀ {R : Type u_1} [inst : AddGroup R] [inst_1 : Fintype R] {R' : Type u_2} [inst_2 : CommRing R'] {ψ : AddChar R R'},
  ψ = 1 → ∑ a, ψ a = ↑(Fintype.card R)

The sum over the values of the trivial additive character is the cardinality of the source.

theorem AddChar.sum_mulShift E1 #

∀ {R : Type u_1} [inst : CommRing R] [inst_1 : Fintype R] [inst_2 : DecidableEq R] {R' : Type u_2}
  [inst_3 : CommRing R'] [IsDomain R'] {ψ : AddChar R R'} (b : R),
  ψ.IsPrimitive → ∑ x, ψ (x * b) = ↑(if b = 0 then Fintype.card R else 0)

The sum over the values of mulShift ψ b for ψ primitive is zero when b ≠ 0 and #R otherwise.

theorem AddChar.starComp_eq_inv E1 #

∀ {R : Type u_1} [inst : CommRing R], 0 < ringChar R → ∀ {φ : AddChar R ℂ}, (↑(starRingEnd ℂ)).compAddChar φ = φ⁻¹

Post-composing an additive character to ℂ with complex conjugation gives the inverse character.

theorem AddChar.starComp_apply E0 #

∀ {R : Type u_1} [inst : CommRing R], 0 < ringChar R → ∀ {φ : AddChar R ℂ} (a : R), (starRingEnd ℂ) (φ a) = φ⁻¹ a