Contents
Dirichlet.lean
Statement index · Original Lean file
1
import Thesis.Prelude23/-!4# Dirichlet characters (Section 2.1)56Mathlib's `DirichletCharacter`, `changeLevel`, `conductor`, `IsPrimitive`, and7`primitiveCharacter` already implement Definitions 2.1, 2.4, and 2.5. This file8packages the canonical bijection from Lemma 2.7.9-/1011namespace Thesis1213noncomputable section1415open DirichletCharacter1617/-- `ψ` is induced from `χ` by changing level along `h : N ∣ M`. -/18def InducedBy {N M : ℕ} (h : N ∣ M) (χ : DirichletCharacter ℂ N)19 (ψ : DirichletCharacter ℂ M) : Prop :=20 ψ = changeLevel h χ2122/-- The type `𝒳(N)`: primitive characters whose conductor divides `N`. -/23abbrev PrimitiveCharacterDividing (N : ℕ) :=24 Σ d : {d : ℕ // d ∣ N}, {χ : DirichletCharacter ℂ d // IsPrimitive χ}2526/-- The primitive associate, regarded as an element of `𝒳(N)`. -/27def primitiveAssociate {N : ℕ} (χ : DirichletCharacter ℂ N) :28 PrimitiveCharacterDividing N :=29 ⟨⟨χ.conductor, χ.conductor_dvd_level⟩,30 ⟨χ.primitiveCharacter, χ.primitiveCharacter_isPrimitive⟩⟩3132/-- Change a member of `𝒳(N)` back to level `N`. -/33def changeLevelPrimitive {N : ℕ} (χ : PrimitiveCharacterDividing N) :34 DirichletCharacter ℂ N :=35 changeLevel χ.1.2 χ.2.13637lemma changeLevel_primitiveAssociate {N : ℕ} (χ : DirichletCharacter ℂ N) :38 changeLevelPrimitive (primitiveAssociate χ) = χ := by39 exact changeLevel_primitiveCharacter χ4041lemma primitiveCharacter_apply_int_of_isPrimitive {N : ℕ} [NeZero N]42 (χ : DirichletCharacter ℂ N) (hχ : IsPrimitive χ) (a : ℤ) :43 χ.primitiveCharacter a = χ a := by44 by_cases ha : IsCoprime a (N : ℤ)45 · exact primitiveCharacter_apply_of_isCoprime χ ha46 · have hprim : χ.primitiveCharacter a = 0 := by47 apply (apply_eq_zero_iff χ.primitiveCharacter a).mpr48 rw [(isPrimitive_def χ).mp hχ]49 exact ha50 have hraw : χ a = 0 := (apply_eq_zero_iff χ a).mpr ha51 rw [hprim, hraw]5253lemma primitiveCharacter_subtype_heq_of_eval {N M : ℕ} [NeZero N] (hN : N = M)54 {χ : {χ : DirichletCharacter ℂ N // IsPrimitive χ}}55 {ψ : {ψ : DirichletCharacter ℂ M // IsPrimitive ψ}}56 (h : ∀ a : ℤ, χ.1 a = ψ.1 a) : HEq χ ψ := by57 subst M58 apply heq_of_eq59 apply Subtype.ext60 apply MulChar.ext61 intro u62 simpa only [Int.cast_natCast, ZMod.natCast_zmod_val] using h (u.val.val : ℤ)6364lemma primitiveAssociate_changeLevel {N : ℕ} [NeZero N]65 (χ : PrimitiveCharacterDividing N) :66 primitiveAssociate (changeLevelPrimitive χ) = χ := by67 rcases χ with ⟨⟨d, hd⟩, ⟨χ, hχ⟩⟩68 dsimp [primitiveAssociate, changeLevelPrimitive]69 have hc : (changeLevel hd χ).conductor = d := by70 rw [conductor_changeLevel, (isPrimitive_def _).mp hχ]71 letI : NeZero ((changeLevel hd χ).conductor) := ⟨(changeLevel hd χ).conductor_ne_zero⟩72 letI : NeZero d := ⟨fun hd0 => (changeLevel hd χ).conductor_ne_zero (hc.trans hd0)⟩73 apply Sigma.ext (Subtype.ext hc)74 apply primitiveCharacter_subtype_heq_of_eval hc75 intro a76 exact (primitiveCharacter_changeLevel_apply hd χ a).trans77 (primitiveCharacter_apply_int_of_isPrimitive χ hχ a)7879/-- **Lemma 2.7.** Primitive associates give a canonical bijection with `𝒳(N)`. -/80def primitiveCharacterEquiv (N : ℕ) [NeZero N] :81 DirichletCharacter ℂ N ≃ PrimitiveCharacterDividing N :=82 Equiv.ofBijective primitiveAssociate <|83 ⟨(show Function.LeftInverse changeLevelPrimitive primitiveAssociate from84 changeLevel_primitiveAssociate).injective,85 (show Function.RightInverse changeLevelPrimitive primitiveAssociate from86 primitiveAssociate_changeLevel).surjective⟩8788/-- Fact 1 after Definition 2.5. -/89theorem conductor_dvd_and_primitive_induces {N : ℕ} (χ : DirichletCharacter ℂ N) :90 χ.conductor ∣ N ∧ InducedBy χ.conductor_dvd_level χ.primitiveCharacter χ := by91 exact ⟨χ.conductor_dvd_level, (changeLevel_primitiveCharacter χ).symm⟩9293/-- Example 2.6 and Remark 2.8 use Mathlib's primitive product directly. -/94abbrev primitiveProduct {N M : ℕ} (χ : DirichletCharacter ℂ N)95 (ψ : DirichletCharacter ℂ M) := DirichletCharacter.primitive_mul χ ψ9697end9899end Thesis