|
| 1 | +/- |
| 2 | +Copyright (c) 2023 Ashvni Narayanan. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Ashvni Narayanan, Moritz Firsching |
| 5 | +-/ |
| 6 | +import Mathlib.Algebra.Periodic |
| 7 | +import Mathlib.NumberTheory.LegendreSymbol.MulCharacter |
| 8 | +import Mathlib.Data.ZMod.Algebra |
| 9 | + |
| 10 | +/-! |
| 11 | +# Dirichlet Characters |
| 12 | +
|
| 13 | +Let `R` be a commutative monoid with zero. A Dirichlet character `χ` of level `n` over `R` is a |
| 14 | +multiplicative character from `ZMod n` to `R` sending non-units to 0. We then obtain some properties |
| 15 | +of `toUnitHom χ`, the restriction of `χ` to a group homomorphism `(ZMod n)ˣ →* Rˣ`. |
| 16 | +
|
| 17 | +Main definitions: |
| 18 | +
|
| 19 | +- `DirichletCharacter`: The type representing a Dirichlet character. |
| 20 | +
|
| 21 | +## TODO |
| 22 | +
|
| 23 | +- `change_level`: Extend the Dirichlet character χ of level `n` to level `m`, where `n` divides `m`. |
| 24 | +- definition of conductor |
| 25 | +
|
| 26 | +## Tags |
| 27 | +
|
| 28 | +dirichlet character, multiplicative character |
| 29 | +-/ |
| 30 | + |
| 31 | +/-- The type of Dirichlet characters of level `n`. -/ |
| 32 | +abbrev DirichletCharacter (R : Type) [CommMonoidWithZero R] (n : ℕ) := MulChar (ZMod n) R |
| 33 | + |
| 34 | +open MulChar |
| 35 | +variable {R : Type} [CommMonoidWithZero R] {n : ℕ} (χ : DirichletCharacter R n) |
| 36 | + |
| 37 | +namespace DirichletCharacter |
| 38 | +lemma toUnitHom_eq_char' {a : ZMod n} (ha : IsUnit a) : |
| 39 | + χ a = χ.toUnitHom ha.unit := by simp |
| 40 | + |
| 41 | +lemma toUnitHom_eq_iff (ψ : DirichletCharacter R n) : |
| 42 | + toUnitHom χ = toUnitHom ψ ↔ χ = ψ := by simp |
| 43 | + |
| 44 | +lemma eval_modulus_sub (x : ZMod n) : |
| 45 | + χ (n - x) = χ (-x) := by simp |
| 46 | + |
| 47 | +lemma periodic {m : ℕ} (hm : n ∣ m) : Function.Periodic χ m := by |
| 48 | + intro a |
| 49 | + rw [← ZMod.nat_cast_zmod_eq_zero_iff_dvd] at hm |
| 50 | + simp only [hm, add_zero] |
| 51 | + |
| 52 | +end DirichletCharacter |
0 commit comments