Zeta and L-valuesBlueprintDependency graphThesis
Contents

Teichmuller.lean

Statement index · Original Lean file

1/-2Copyright: none. Swarm member m5, direction (e).34# The Teichmüller character `ω` and the `Δ`/`Γ` decomposition (thesis (3.9))56The `ℂ_[p]`-valued statements of the thesis refer to the Teichmüller character7`ω` modulo `p`; `Thesis.IsTeichmullerCharacter` in `Thesis/Congruences.lean`8records its defining properties as a hypothesis. This file *constructs* `ω`9(so that hypothesis is provably non-vacuous) and proves the standard10consequences used in Chapters 3 and 4, including the decomposition11`ℤ_p^× ≅ (ℤ/p)^× × (1+pℤ_p)` of (3.9).1213The Teichmüller lift is built by Hensel's lemma applied to `X^(p-1) - 1`14(`Mathlib.NumberTheory.Padics.Hensel`), whose unique root congruent to a given15unit modulo `p` is the lift. No custom axioms are used.16-/17import Thesis.Congruences1819namespace Thesis20namespace Teich2122noncomputable section2324open scoped BigOperators25open Polynomial2627variable {p : ℕ} [hp : Fact p.Prime]2829/-! ## §1 The Teichmüller lift in `ℤ_p` -/3031/-- A natural number not divisible by `p` is a unit of `ℤ_p`. -/32theorem padicInt_isUnit_natCast {m : ℕ} (hm : ¬ p ∣ m) : IsUnit (m : ℤ_[p]) := by33 rw [PadicInt.isUnit_iff, PadicInt.norm_natCast_eq_one_iff]34 exact (Nat.Prime.coprime_iff_not_dvd hp.out).mpr hm3536/-- A sum of elements of `ℤ_p` of norm `< 1` again has norm `< 1`. -/37theorem norm_lt_one_finset_sum {ι : Type*} (s : Finset ι) (f : ι → ℤ_[p])38 (h : ∀ i ∈ s, ‖f i‖ < 1) : ‖∑ i ∈ s, f i‖ < 1 := by39 classical40 induction s using Finset.induction_on with41 | empty => simp42 | insert a s ha ih =>43 rw [Finset.sum_insert ha]44 exact PadicInt.norm_lt_one_add (h a (Finset.mem_insert_self a s))45 (ih fun i hi => h i (Finset.mem_insert_of_mem hi))4647/-- If `z ≡ 1` modulo `p` then every power of `z` is `≡ 1` modulo `p`. -/48theorem norm_lt_one_pow_sub_one {z : ℤ_[p]} (h : ‖z - 1‖ < 1) (i : ℕ) :49 ‖z ^ i - 1‖ < 1 := by50 induction i with51 | zero => simp52 | succ i ih =>53 have hz : z ^ (i + 1) - 1 = z ^ i * (z - 1) + (z ^ i - 1) := by ring54 rw [hz]55 exact PadicInt.norm_lt_one_add (PadicInt.norm_lt_one_mul h) ih5657/-- **The group `1 + pℤ_p` has no non-trivial `(p-1)`-st root of unity.**58This is the uniqueness half of the Teichmüller lifting property. -/59theorem eq_one_of_pow_eq_one_of_norm_sub_one_lt_one {z : ℤ_[p]}60 (hz : z ^ (p - 1) = 1) (h : ‖z - 1‖ < 1) : z = 1 := by61 classical62 set S : ℤ_[p] := ∑ i ∈ Finset.range (p - 1), z ^ i with hSdef63 have hS : ‖S - ((p - 1 : ℕ) : ℤ_[p])‖ < 1 := by64 have hsplit : S - ((p - 1 : ℕ) : ℤ_[p])65 = ∑ i ∈ Finset.range (p - 1), (z ^ i - 1) := by66 rw [hSdef, Finset.sum_sub_distrib]67 simp68 rw [hsplit]69 exact norm_lt_one_finset_sum _ _ fun i _ => norm_lt_one_pow_sub_one h i70 have hp1 : ‖((p - 1 : ℕ) : ℤ_[p])‖ = 1 := PadicInt.norm_natCast_p_sub_one71 have hSun : IsUnit S := by72 rw [PadicInt.isUnit_iff]73 have hlt : ‖S - ((p - 1 : ℕ) : ℤ_[p])‖ < ‖((p - 1 : ℕ) : ℤ_[p])‖ := by74 rw [hp1]; exact hS75 have hne : ‖((p - 1 : ℕ) : ℤ_[p])‖ ≠ ‖S - ((p - 1 : ℕ) : ℤ_[p])‖ :=76 (ne_of_lt hlt).symm77 rw [show S = ((p - 1 : ℕ) : ℤ_[p]) + (S - ((p - 1 : ℕ) : ℤ_[p])) by ring,78 PadicInt.norm_add_eq_max_of_ne hne, hp1]79 exact max_eq_left hS.le80 have hgeom : S * (z - 1) = 0 := by81 rw [hSdef, geom_sum_mul, hz, sub_self]82 rcases mul_eq_zero.mp hgeom with h' | h'83 · exact absurd h' hSun.ne_zero84 · exact sub_eq_zero.mp h'8586/-- **Existence of the Teichmüller lift of an integer** (Hensel's lemma applied87to `X^(p-1) - 1`): for `p ∤ m` there is a `(p-1)`-st root of unity in `ℤ_p`88congruent to `m` modulo `p`. -/89theorem exists_teichmuller_root (m : ℕ) (hm : ¬ p ∣ m) :90 ∃ z : ℤ_[p], z ^ (p - 1) = 1 ∧ ‖z - (m : ℤ_[p])‖ < 1 := by91 classical92 have h2 : 2 ≤ p := hp.out.two_le93 have hm0 : (m : ZMod p) ≠ 0 := by94 rw [Ne, ZMod.natCast_eq_zero_iff]95 exact hm96 have hdvd : (p : ℤ) ∣ ((m : ℤ) ^ (p - 1) - 1) := by97 have h1 : (m : ZMod p) ^ (p - 1) = 1 := ZMod.pow_card_sub_one_eq_one hm098 have h2 : (((m : ℤ) ^ (p - 1) - 1 : ℤ) : ZMod p) = 0 := by99 push_cast100 rw [h1]101 ring102 exact (ZMod.intCast_zmod_eq_zero_iff_dvd _ p).mp h2103 have hF : (aeval ((m : ℤ) : ℤ_[p])) (X ^ (p - 1) - 1 : Polynomial ℤ_[p])104 = (((m : ℤ) ^ (p - 1) - 1 : ℤ) : ℤ_[p]) := by105 rw [map_sub, aeval_X_pow, map_one]106 push_cast107 ring108 have hD : (aeval ((m : ℤ) : ℤ_[p])) (derivative (X ^ (p - 1) - 1 : Polynomial ℤ_[p]))109 = ((p - 1 : ℕ) : ℤ_[p]) * (m : ℤ_[p]) ^ (p - 2) := by110 have h : derivative (X ^ (p - 1) - 1 : Polynomial ℤ_[p])111 = C ((p - 1 : ℕ) : ℤ_[p]) * X ^ (p - 2) := by112 rw [derivative_sub, derivative_X_pow, derivative_one, sub_zero,113 show p - 1 - 1 = p - 2 by omega]114 rw [h]115 simp116 have hmnorm : ‖(m : ℤ_[p])‖ = 1 := by117 rw [PadicInt.norm_natCast_eq_one_iff]118 exact (Nat.Prime.coprime_iff_not_dvd hp.out).mpr hm119 have hDnorm : ‖(aeval ((m : ℤ) : ℤ_[p]))120 (derivative (X ^ (p - 1) - 1 : Polynomial ℤ_[p]))‖ = 1 := by121 rw [hD, norm_mul, PadicInt.norm_natCast_p_sub_one, one_mul, norm_pow, hmnorm,122 one_pow]123 have hnorm : ‖(aeval ((m : ℤ) : ℤ_[p])) (X ^ (p - 1) - 1 : Polynomial ℤ_[p])‖ <124 ‖(aeval ((m : ℤ) : ℤ_[p]))125 (derivative (X ^ (p - 1) - 1 : Polynomial ℤ_[p]))‖ ^ 2 := by126 rw [hDnorm, one_pow, hF, PadicInt.norm_intCast_lt_one_iff]127 exact hdvd128 obtain ⟨z, hz0, hz1, -, -⟩ :=129 hensels_lemma (p := p) (R := ℤ_[p]) (F := (X ^ (p - 1) - 1 : Polynomial ℤ_[p]))130 (a := ((m : ℤ) : ℤ_[p])) hnorm131 have hz0' : z ^ (p - 1) = 1 := by132 have h : z ^ (p - 1) - 1 = 0 := by simpa using hz0133 exact sub_eq_zero.mp h134 refine ⟨z, hz0', ?_⟩135 rw [hDnorm] at hz1136 simpa using hz1137138/-- **Uniqueness of the Teichmüller lift**: two `(p-1)`-st roots of unity in139`ℤ_p` which are congruent modulo `p` coincide. -/140theorem teichmuller_root_unique {z w : ℤ_[p]}141 (hz : z ^ (p - 1) = 1) (hw : w ^ (p - 1) = 1) (h : ‖z - w‖ < 1) : z = w := by142 classical143 have h2 : 2 ≤ p := hp.out.two_le144 have hwle : ‖w ^ (p - 2)‖ ≤ 1 := by145 rw [norm_pow]146 exact pow_le_one₀ (norm_nonneg _) (PadicInt.norm_le_one w)147 have hw1 : w * w ^ (p - 2) = 1 := by148 rw [← pow_succ', show p - 2 + 1 = p - 1 by omega]149 exact hw150 have htnorm : ‖z * w ^ (p - 2) - 1‖ < 1 := by151 have hfeq : z * w ^ (p - 2) - 1 = (z - w) * w ^ (p - 2) := by152 rw [sub_mul, hw1]153 rw [hfeq, norm_mul]154 calc ‖z - w‖ * ‖w ^ (p - 2)‖ ≤ ‖z - w‖ * 1 := by155 exact mul_le_mul_of_nonneg_left hwle (norm_nonneg _)156 _ = ‖z - w‖ := mul_one _157 _ < 1 := h158 have htpow : (z * w ^ (p - 2)) ^ (p - 1) = 1 := by159 rw [mul_pow, hz, one_mul]160 rw [← pow_mul, show (p - 2) * (p - 1) = (p - 1) * (p - 2) by ring, pow_mul, hw,161 one_pow]162 have ht1 : z * w ^ (p - 2) = 1 :=163 eq_one_of_pow_eq_one_of_norm_sub_one_lt_one htpow htnorm164 have hw1' : w ^ (p - 2) * w = 1 := by165 rw [← pow_succ, show p - 2 + 1 = p - 1 by omega]166 exact hw167 calc z = z * w ^ (p - 2) * w := by rw [mul_assoc, hw1', mul_one]168 _ = 1 * w := by rw [ht1]169 _ = w := one_mul w170171/-! ## §2 The Teichmüller lift as a character -/172173/-- Reduction modulo `p` detects the maximal ideal of `ℤ_p`. -/174theorem norm_lt_one_iff_toZMod_eq_zero (x : ℤ_[p]) : ‖x‖ < 1 ↔ PadicInt.toZMod x = 0 := by175 constructor176 · intro h177 have hmem : x ∈ RingHom.ker (PadicInt.toZMod) := by178 rw [PadicInt.ker_toZMod, PadicInt.maximalIdeal_eq_span_p, Ideal.mem_span_singleton]179 rwa [PadicInt.norm_lt_one_iff_dvd] at h180 exact hmem181 · intro h182 rw [PadicInt.norm_lt_one_iff_dvd]183 have hmem : x ∈ RingHom.ker (PadicInt.toZMod) := h184 rwa [PadicInt.ker_toZMod, PadicInt.maximalIdeal_eq_span_p, Ideal.mem_span_singleton] at hmem185186/-- Two `p`-adic integers are congruent modulo `p` iff they have the same residue. -/187theorem toZMod_eq_iff_norm_sub_lt_one (x y : ℤ_[p]) :188 PadicInt.toZMod x = PadicInt.toZMod y ↔ ‖x - y‖ < 1 := by189 rw [norm_lt_one_iff_toZMod_eq_zero (x - y), map_sub, sub_eq_zero]190191/-- If `z ≡ y` and `y ≡ y'` modulo `p` then `z ≡ y'` modulo `p`. -/192theorem norm_lt_one_trans {x y z : ℤ_[p]} (h1 : ‖x - y‖ < 1) (h2 : ‖y - z‖ < 1) :193 ‖x - z‖ < 1 := by194 have h : x - z = (x - y) + (y - z) := by ring195 rw [h]196 exact PadicInt.norm_lt_one_add h1 h2197198/-- The value of a unit of `ZMod p` is not divisible by `p`. -/199theorem not_dvd_val_of_unit (u : (ZMod p)ˣ) : ¬ p ∣ ((u : ZMod p)).val := by200 intro hd201 have h0 : ((((u : ZMod p)).val : ℕ) : ZMod p) = 0 := (ZMod.natCast_eq_zero_iff _ p).mpr hd202 rw [ZMod.natCast_zmod_val] at h0203 exact Units.ne_zero u h0204205/-- **Existence of the Teichmüller lift of a unit modulo `p`**, characterized by206its residue alone. -/207theorem exists_teichLift (u : (ZMod p)ˣ) :208 ∃ z : ℤ_[p], z ^ (p - 1) = 1 ∧ PadicInt.toZMod z = (u : ZMod p) := by209 obtain ⟨z, hz, hzn⟩ := exists_teichmuller_root ((u : ZMod p)).val (not_dvd_val_of_unit u)210 refine ⟨z, hz, ?_⟩211 have h := (toZMod_eq_iff_norm_sub_lt_one z (((((u : ZMod p)).val : ℕ) : ℤ_[p]))).mpr hzn212 rwa [map_natCast, ZMod.natCast_zmod_val] at h213214/-- The Teichmüller lift of a unit of `ZMod p`: the unique `(p-1)`-st root of215unity in `ℤ_p` reducing to `u`. -/216noncomputable def teichLift (u : (ZMod p)ˣ) : ℤ_[p] := (exists_teichLift u).choose217218theorem teichLift_pow (u : (ZMod p)ˣ) : teichLift u ^ (p - 1) = 1 :=219 (exists_teichLift u).choose_spec.1220221theorem teichLift_toZMod (u : (ZMod p)ˣ) : PadicInt.toZMod (teichLift u) = (u : ZMod p) :=222 (exists_teichLift u).choose_spec.2223224/-- The defining universal property of the Teichmüller lift. -/225theorem eq_teichLift_of_pow_eq_one_of_toZMod_eq {u : (ZMod p)ˣ} {z : ℤ_[p]}226 (hz : z ^ (p - 1) = 1) (hz' : PadicInt.toZMod z = (u : ZMod p)) : z = teichLift u := by227 refine teichmuller_root_unique hz (teichLift_pow u) ?_228 exact (toZMod_eq_iff_norm_sub_lt_one z (teichLift u)).mp (by rw [hz', teichLift_toZMod])229230theorem teichLift_one : teichLift (1 : (ZMod p)ˣ) = 1 := by231 have h : PadicInt.toZMod (1 : ℤ_[p]) = ((1 : (ZMod p)ˣ) : ZMod p) := by232 simp233 exact (eq_teichLift_of_pow_eq_one_of_toZMod_eq (one_pow (p - 1)) h).symm234235theorem teichLift_mul (u v : (ZMod p)ˣ) :236 teichLift (u * v) = teichLift u * teichLift v := by237 refine (eq_teichLift_of_pow_eq_one_of_toZMod_eq (u := u * v) (z := teichLift u * teichLift v)238 ?_ ?_).symm239 · rw [mul_pow, teichLift_pow, teichLift_pow, one_mul]240 · rw [map_mul, teichLift_toZMod, teichLift_toZMod, Units.val_mul]241242theorem isUnit_teichLift (u : (ZMod p)ˣ) : IsUnit (teichLift u) := by243 have h2 : 2 ≤ p := hp.out.two_le244 refine ⟨⟨teichLift u, teichLift u ^ (p - 2), ?_, ?_⟩, rfl⟩245 · rw [← pow_succ']; rw [show p - 2 + 1 = p - 1 by omega]; exact teichLift_pow u246 · rw [← pow_succ]; rw [show p - 2 + 1 = p - 1 by omega]; exact teichLift_pow u247248/-- The Teichmüller lift as a monoid homomorphism `(ℤ/p)^× → ℤ_p^×`. -/249noncomputable def teichLiftHom : (ZMod p)ˣ →* ℤ_[p]ˣ where250 toFun u := (isUnit_teichLift u).unit251 map_one' := by252 ext253 rw [IsUnit.unit_spec, Units.val_one, teichLift_one]254 map_mul' u v := by255 ext256 rw [Units.val_mul, IsUnit.unit_spec, IsUnit.unit_spec, IsUnit.unit_spec, teichLift_mul]257258theorem teichLiftHom_apply (u : (ZMod p)ˣ) : ((teichLiftHom u : ℤ_[p]ˣ) : ℤ_[p]) = teichLift u :=259 IsUnit.unit_spec (isUnit_teichLift u)260261theorem teichLiftHom_pow_card (u : (ZMod p)ˣ) : teichLiftHom u ^ (p - 1) = 1 := by262 ext263 rw [Units.val_pow_eq_pow_val, teichLiftHom_apply, teichLift_pow, Units.val_one]264265/-! ## §3 The Teichmüller character as a `ℂ_[p]`-valued Dirichlet character -/266267/-- The inclusion `ℤ_p → ℂ_[p]`. (The project writes this map as268`Thesis.padicIntToCp`; the definition is repeated here so that this file only269depends on `Thesis.Congruences`.) -/270noncomputable def padicIntToComplex (x : ℤ_[p]) : ℂ_[p] :=271 (algebraMap ℚ_[p] ℂ_[p]) (x : ℚ_[p])272273@[simp] theorem padicIntToComplex_zero : padicIntToComplex (p := p) 0 = 0 := by274 simp [padicIntToComplex]275276@[simp] theorem padicIntToComplex_one : padicIntToComplex (p := p) 1 = 1 := by277 simp [padicIntToComplex]278279theorem padicIntToComplex_add (x y : ℤ_[p]) :280 padicIntToComplex (p := p) (x + y) = padicIntToComplex x + padicIntToComplex y := by281 rw [padicIntToComplex, padicIntToComplex, padicIntToComplex,282 show ((x + y : ℤ_[p]) : ℚ_[p]) = (x : ℚ_[p]) + (y : ℚ_[p]) from rfl, map_add]283284theorem padicIntToComplex_mul (x y : ℤ_[p]) :285 padicIntToComplex (p := p) (x * y) = padicIntToComplex x * padicIntToComplex y := by286 rw [padicIntToComplex, padicIntToComplex, padicIntToComplex,287 show ((x * y : ℤ_[p]) : ℚ_[p]) = (x : ℚ_[p]) * (y : ℚ_[p]) from rfl, map_mul]288289theorem padicIntToComplex_sub (x y : ℤ_[p]) :290 padicIntToComplex (p := p) (x - y) = padicIntToComplex x - padicIntToComplex y := by291 rw [padicIntToComplex, padicIntToComplex, padicIntToComplex,292 show ((x - y : ℤ_[p]) : ℚ_[p]) = (x : ℚ_[p]) - (y : ℚ_[p]) from rfl, map_sub]293294theorem padicIntToComplex_pow (x : ℤ_[p]) (k : ℕ) :295 padicIntToComplex (p := p) (x ^ k) = padicIntToComplex x ^ k := by296 rw [padicIntToComplex, padicIntToComplex,297 show ((x ^ k : ℤ_[p]) : ℚ_[p]) = (x : ℚ_[p]) ^ k from rfl, map_pow]298299theorem padicIntToComplex_natCast (n : ℕ) :300 padicIntToComplex (p := p) (n : ℤ_[p]) = (n : ℂ_[p]) := by301 rw [padicIntToComplex, show ((n : ℤ_[p]) : ℚ_[p]) = (n : ℚ_[p]) from rfl, map_natCast]302303theorem norm_padicIntToComplex (x : ℤ_[p]) :304 ‖padicIntToComplex (p := p) x‖ = ‖x‖ := by305 rw [padicIntToComplex,306 IsScalarTower.algebraMap_apply ℚ_[p] (PadicAlgCl p) ℂ_[p] (x : ℚ_[p]),307 ← PadicComplex.coe_eq, PadicComplex.norm_extends', PadicInt.norm_def]308309theorem norm_padicIntToComplex_lt_one {x : ℤ_[p]} (h : ‖x‖ < 1) :310 ‖padicIntToComplex (p := p) x‖ < 1 := by311 rwa [norm_padicIntToComplex]312313theorem padicIntToComplex_injective : Function.Injective (padicIntToComplex (p := p)) := by314 intro x y h315 by_contra hxy316 have hne : x - y ≠ 0 := sub_ne_zero.mpr hxy317 have hnorm : 0 < ‖x - y‖ := norm_pos_iff.mpr hne318 have hz : padicIntToComplex (p := p) (x - y) = 0 := by319 rw [padicIntToComplex_sub, h, sub_self]320 rw [← norm_padicIntToComplex (x - y), hz, norm_zero] at hnorm321 exact lt_irrefl _ hnorm322323/-- The Teichmüller lift, viewed in `ℂ_[p]^×`. -/324noncomputable def teichInComplex : (ZMod p)ˣ →* ℂ_[p]ˣ where325 toFun u := Units.mk0 (padicIntToComplex (teichLift u)) (by326 intro h0327 have hz : teichLift u = 0 :=328 padicIntToComplex_injective (by rw [h0, padicIntToComplex_zero])329 exact IsUnit.ne_zero (isUnit_teichLift u) hz)330 map_one' := by331 ext332 simp [teichLift_one]333 map_mul' u v := by334 ext335 simp [teichLift_mul, padicIntToComplex_mul]336337theorem teichInComplex_val (u : (ZMod p)ˣ) :338 ((teichInComplex (p := p) u : ℂ_[p]ˣ) : ℂ_[p]) = padicIntToComplex (teichLift u) := rfl339340/-- **The Teichmüller character `ω` modulo `p`.** -/341noncomputable def teichmullerCharacter : DirichletCharacter ℂ_[p] p :=342 MulChar.ofUnitHom teichInComplex343344theorem teichmullerCharacter_toUnitHom :345 (teichmullerCharacter (p := p)).toUnitHom = teichInComplex := by346 rw [teichmullerCharacter, MulChar.ofUnitHom_eq, MulChar.toUnitHom_eq]347 exact Equiv.apply_symm_apply _ _348349theorem teichmullerCharacter_apply_unit (u : (ZMod p)ˣ) :350 teichmullerCharacter (p := p) (u : ZMod p) = padicIntToComplex (teichLift u) := by351 rw [← MulChar.coe_toUnitHom, teichmullerCharacter_toUnitHom]352 exact teichInComplex_val u353354/-- The lift of a unit is congruent to the unit modulo `p`. -/355theorem teichLift_norm_sub_val (u : (ZMod p)ˣ) :356 ‖teichLift u - ((((u : ZMod p)).val : ℕ) : ℤ_[p])‖ < 1 := by357 refine (toZMod_eq_iff_norm_sub_lt_one _ _).mp ?_358 rw [teichLift_toZMod, map_natCast, ZMod.natCast_zmod_val]359360/-- The defining congruence `ω(a) ≡ a (mod p)`. -/361theorem teichmullerCharacter_residue (a : ZMod p) :362 ResidueModEq p (teichmullerCharacter (p := p) a) (ZMod.cast a) := by363 suffices H : ∀ u : (ZMod p)ˣ,364 ResidueModEq p (teichmullerCharacter (p := p) (u : ZMod p)) (ZMod.cast ((u : ZMod p))) by365 rcases eq_or_ne a 0 with ha | ha366 · subst ha367 rw [MulChar.map_nonunit _ not_isUnit_zero]368 simp [ResidueModEq]369 · exact H (Units.mk0 a ha)370 intro u371 have : NeZero p := ⟨(Fact.out : Nat.Prime p).ne_zero⟩372 rw [teichmullerCharacter_apply_unit, ResidueModEq,373 ZMod.cast_eq_val (R := ℂ_[p]) (u : ZMod p),374 ← padicIntToComplex_natCast, ← padicIntToComplex_sub, norm_padicIntToComplex]375 exact teichLift_norm_sub_val u376377theorem teichmullerCharacter_pow_card :378 teichmullerCharacter (p := p) ^ (p - 1) = 1 := by379 have hp1 : p - 1 ≠ 0 := by have h2 := hp.out.two_le; omega380 refine MulChar.ext fun u => ?_381 rw [MulChar.pow_apply' _ hp1, teichmullerCharacter_apply_unit, ← padicIntToComplex_pow,382 teichLift_pow, padicIntToComplex_one, MulChar.one_apply u.isUnit]383384/-- A generator of `(ℤ/p)^×`. -/385noncomputable def unitGen : (ZMod p)ˣ :=386 Classical.choose (IsCyclic.exists_generator (α := (ZMod p)ˣ))387388theorem unitGen_spec (x : (ZMod p)ˣ) : x ∈ Subgroup.zpowers (unitGen (p := p)) :=389 Classical.choose_spec (IsCyclic.exists_generator (α := (ZMod p)ˣ)) x390391theorem orderOf_unitGen : orderOf (unitGen (p := p)) = p - 1 := by392 rw [orderOf_eq_card_of_forall_mem_zpowers (unitGen_spec (p := p)), Nat.card_eq_fintype_card,393 ZMod.card_units]394395theorem orderOf_teichLift_unitGen : orderOf (teichLift (unitGen (p := p))) = p - 1 := by396 refine Nat.dvd_antisymm (orderOf_dvd_of_pow_eq_one (teichLift_pow _)) ?_397 rw [← orderOf_unitGen (p := p), orderOf_dvd_iff_pow_eq_one]398 have h : PadicInt.toZMod399 ((teichLift (unitGen (p := p))) ^ orderOf (teichLift (unitGen (p := p)))) = 1 := by400 rw [pow_orderOf_eq_one, map_one]401 rw [map_pow, teichLift_toZMod] at h402 ext403 rw [Units.val_pow_eq_pow_val, Units.val_one]404 exact h405406theorem pow_teichInComplex_unitGen_eq_one_iff (k : ℕ) :407 (teichInComplex (p := p) (unitGen (p := p))) ^ k = 1 ↔408 (teichLift (unitGen (p := p))) ^ k = 1 := by409 have key : ((teichInComplex (p := p) (unitGen (p := p)) : ℂ_[p]ˣ) : ℂ_[p]) ^ k410 = padicIntToComplex ((teichLift (unitGen (p := p))) ^ k) := by411 rw [teichInComplex_val, padicIntToComplex_pow]412 constructor413 · intro h414 have h2 : ((teichInComplex (p := p) (unitGen (p := p)) : ℂ_[p]ˣ) : ℂ_[p]) ^ k = 1 := by415 rw [← Units.val_pow_eq_pow_val, congrArg (fun u : ℂ_[p]ˣ => (u : ℂ_[p])) h,416 Units.val_one]417 rw [key] at h2418 exact padicIntToComplex_injective (by rw [h2, padicIntToComplex_one])419 · intro h420 ext421 rw [Units.val_pow_eq_pow_val, teichInComplex_val, ← padicIntToComplex_pow, h,422 Units.val_one, padicIntToComplex_one]423424theorem orderOf_teichInComplex_unitGen :425 orderOf (teichInComplex (p := p) (unitGen (p := p))) = p - 1 := by426 refine Nat.dvd_antisymm ?_ ?_427 · refine orderOf_dvd_of_pow_eq_one ?_428 rw [pow_teichInComplex_unitGen_eq_one_iff (p := p), teichLift_pow]429 · rw [← orderOf_teichLift_unitGen (p := p), orderOf_dvd_iff_pow_eq_one]430 exact (pow_teichInComplex_unitGen_eq_one_iff (p := p) _).mp (pow_orderOf_eq_one _)431432theorem orderOf_teichmullerCharacter :433 orderOf (teichmullerCharacter (p := p)) = p - 1 := by434 have hp1 : p - 1 ≠ 0 := by have h2 := hp.out.two_le; omega435 have hK : orderOf (teichmullerCharacter (p := p)) ≠ 0 := by436 intro h0437 have hd := orderOf_dvd_of_pow_eq_one (teichmullerCharacter_pow_card (p := p))438 rw [h0] at hd439 exact hp1 (Nat.zero_dvd.mp hd)440 refine Nat.dvd_antisymm (orderOf_dvd_of_pow_eq_one teichmullerCharacter_pow_card) ?_441 rw [← orderOf_teichInComplex_unitGen (p := p), orderOf_dvd_iff_pow_eq_one]442 have h : (teichmullerCharacter (p := p)) ^ orderOf (teichmullerCharacter (p := p)) = 1 :=443 pow_orderOf_eq_one _444 have h' := congrArg (fun χ : DirichletCharacter ℂ_[p] p => χ ((unitGen (p := p)) : ZMod p)) h445 rw [MulChar.pow_apply' _ hK, teichmullerCharacter_apply_unit,446 MulChar.one_apply (unitGen (p := p)).isUnit] at h'447 ext448 rw [Units.val_pow_eq_pow_val, teichInComplex_val]449 exact h'450451/-- **The Teichmüller character satisfies the thesis's axiom452`IsTeichmullerCharacter`.** This is the non-vacuity statement for the453hypothesis `hω` used in `Thesis.dirichlet_congruence` and in454`Thesis.iwasawa_constant_term_congruence`. -/455theorem isTeichmullerCharacter_teichmullerCharacter :456 IsTeichmullerCharacter (teichmullerCharacter (p := p)) :=457 ⟨orderOf_teichmullerCharacter (p := p), teichmullerCharacter_residue⟩458459/-- There exists a Teichmüller character modulo `p`. -/460theorem exists_isTeichmullerCharacter :461 ∃ ω : DirichletCharacter ℂ_[p] p, IsTeichmullerCharacter (p := p) ω :=462 ⟨teichmullerCharacter, isTeichmullerCharacter_teichmullerCharacter⟩463464/-! ## §4 Consequences of the Teichmüller axioms (thesis Lemma 3.3(2) and §3.2) -/465466/-- A sum of two elements of `ℂ_[p]` of norm `< 1` has norm `< 1`. -/467theorem norm_lt_one_add_complex {x y : ℂ_[p]} (hx : ‖x‖ < 1) (hy : ‖y‖ < 1) :468 ‖x + y‖ < 1 :=469 (PadicComplex.isNonarchimedean p x y).trans_lt (max_lt hx hy)470471/-- Powers of a multiplicative character are computed pointwise on units. -/472theorem mulChar_pow_apply_unit (χ : DirichletCharacter ℂ_[p] p) (k : ℕ) (u : (ZMod p)ˣ) :473 (χ ^ k) (u : ZMod p) = χ (u : ZMod p) ^ k := by474 induction k with475 | zero => rw [pow_zero, pow_zero, MulChar.one_apply u.isUnit]476 | succ k ih => rw [pow_succ, pow_succ, MulChar.mul_apply, ih]477478/-- `ω(-1) = -1` for the actual Teichmüller character. -/479theorem cast_neg_one_norm (_hp2 : 2 < p) :480 ‖ZMod.cast (-1 : ZMod p) - (-1 : ℂ_[p])‖ < 1 := by481 have hcast : ZMod.cast (-1 : ZMod p) = ((p : ℂ_[p]) - 1) := ZMod.cast_neg_one p482 rw [hcast]483 have heq : ((p : ℂ_[p]) - 1) - (-1 : ℂ_[p]) = padicIntToComplex (p := p) (p : ℤ_[p]) := by484 rw [padicIntToComplex, show ((p : ℤ_[p]) : ℚ_[p]) = (p : ℚ_[p]) from rfl]485 push_cast486 ring487 rw [heq, norm_padicIntToComplex, PadicInt.norm_p]488 exact inv_lt_one_of_one_lt₀ (by exact_mod_cast hp.out.one_lt)489490section IsTeichmuller491492variable (ω : DirichletCharacter ℂ_[p] p) (hω : IsTeichmullerCharacter (p := p) ω)493include hω494495theorem isTeichmuller_pow_card : ω ^ (p - 1) = 1 := by496 rw [← hω.1]497 exact pow_orderOf_eq_one ω498499theorem isTeichmuller_pow_eq_one_iff {k : ℕ} : ω ^ k = 1 ↔ (p - 1) ∣ k := by500 rw [← hω.1, ← orderOf_dvd_iff_pow_eq_one]501502/-- The value of `ω` at a generator of `(ℤ/p)^×` has exact order `p - 1`. -/503theorem orderOf_isTeichmuller_unitGen :504 orderOf (ω ((unitGen (p := p)) : ZMod p)) = p - 1 := by505 have hp1 : 0 < p - 1 := by have h2 := hp.out.two_le; omega506 refine Nat.dvd_antisymm ?_ ?_507 · rw [orderOf_dvd_iff_pow_eq_one, ← mulChar_pow_apply_unit, isTeichmuller_pow_card ω hω]508 exact MulChar.one_apply (unitGen (p := p)).isUnit509 · have hk : (ω ((unitGen (p := p)) : ZMod p)) ^510 orderOf (ω ((unitGen (p := p)) : ZMod p)) = 1 := pow_orderOf_eq_one _511 have h1 : (ω ^ orderOf (ω ((unitGen (p := p)) : ZMod p)))512 ((unitGen (p := p)) : ZMod p) = 1 := by513 rw [mulChar_pow_apply_unit]514 exact hk515 have h2 : ω ^ orderOf (ω ((unitGen (p := p)) : ZMod p)) = 1 := by516 rw [MulChar.eq_iff (unitGen_spec (p := p))]517 rw [h1, MulChar.one_apply (unitGen (p := p)).isUnit]518 exact (isTeichmuller_pow_eq_one_iff ω hω).mp h2519520/-- Powers of `ω` are equal exactly when the exponents are congruent mod `p - 1`. -/521theorem isTeichmuller_pow_eq_pow_iff (i j : ℕ) :522 ω ^ i = ω ^ j ↔ i % (p - 1) = j % (p - 1) := by523 have hp1 : 0 < p - 1 := by have h2 := hp.out.two_le; omega524 have hfin : IsOfFinOrder (ω ((unitGen (p := p)) : ZMod p)) := by525 rw [isOfFinOrder_iff_pow_eq_one]526 exact ⟨p - 1, hp1, by527 rw [← mulChar_pow_apply_unit, isTeichmuller_pow_card ω hω]528 exact MulChar.one_apply (unitGen (p := p)).isUnit⟩529 rw [MulChar.eq_iff (unitGen_spec (p := p))]530 simp only [mulChar_pow_apply_unit]531 rw [hfin.pow_inj_mod, orderOf_isTeichmuller_unitGen ω hω]532533theorem isTeichmuller_pow_inj {i j : ℕ} (hi : i < p - 1) (hj : j < p - 1)534 (h : ω ^ i = ω ^ j) : i = j := by535 have hmod := (isTeichmuller_pow_eq_pow_iff ω hω i j).mp h536 rwa [Nat.mod_eq_of_lt hi, Nat.mod_eq_of_lt hj] at hmod537538theorem isTeichmuller_eq_one_iff : ω = 1 ↔ p - 1 = 1 := by539 rw [← orderOf_eq_one_iff, hω.1]540541theorem isTeichmuller_ne_one (hp2 : 2 < p) : ω ≠ 1 := by542 intro h543 rw [isTeichmuller_eq_one_iff ω hω] at h544 omega545546/-- **Lemma 3.3(2) for an actual Teichmüller character**: `ω` is odd. -/547theorem isTeichmuller_neg_one (hp2 : 2 < p) : ω (-1) = -1 := by548 have h2norm : ‖(2 : ℂ_[p])‖ = 1 := by549 have h3 : (2 : ℂ_[p]) = padicIntToComplex (p := p) (2 : ℤ_[p]) :=550 (padicIntToComplex_natCast (p := p) 2).symm551 rw [h3, norm_padicIntToComplex]552 have h4 : ((2 : ℕ) : ℤ_[p]) = (2 : ℤ_[p]) := rfl553 rw [← h4, PadicInt.norm_natCast_eq_one_iff]554 exact (Nat.Prime.coprime_iff_not_dvd hp.out).mpr (by555 intro hd556 have := Nat.le_of_dvd (by norm_num : 0 < 2) hd557 omega)558 have hsq : ω (-1) ^ 2 = 1 := by559 rw [pow_two, ← map_mul, show ((-1 : ZMod p) * (-1)) = 1 by norm_num, map_one]560 rcases sq_eq_one_iff.mp hsq with h | h561 · exfalso562 have hres : ‖(1 : ℂ_[p]) - ZMod.cast (-1 : ZMod p)‖ < 1 := by563 have := hω.2 (-1)564 rwa [ResidueModEq, h] at this565 have hsum : ‖(1 : ℂ_[p]) - (-1)‖ < 1 := by566 have heq : (1 : ℂ_[p]) - (-1)567 = (1 - ZMod.cast (-1 : ZMod p)) + (ZMod.cast (-1 : ZMod p) - (-1)) := by ring568 rw [heq]569 exact norm_lt_one_add_complex hres (cast_neg_one_norm hp2)570 rw [show (1 : ℂ_[p]) - (-1) = (2 : ℂ_[p]) by ring, h2norm] at hsum571 exact lt_irrefl _ hsum572 · exact h573574end IsTeichmuller575576/-! ## §5 The decomposition `ℤ_p^× ≅ (ℤ/p)^× × (1 + pℤ_p)` (thesis (3.9)) -/577578/-- The reduction map `ℤ_p^× → (ℤ/p)^×` on units. -/579noncomputable def unitReduction : ℤ_[p]ˣ →* (ZMod p)ˣ :=580 Units.map (PadicInt.toZMod (p := p)).toMonoidHom581582theorem unitReduction_apply (u : ℤ_[p]ˣ) :583 (unitReduction (p := p) u : ZMod p) = PadicInt.toZMod (u : ℤ_[p]) := rfl584585/-- The Teichmüller part `ω(u)` of a `p`-adic unit (thesis (3.9)). -/586noncomputable def teichPart (u : ℤ_[p]ˣ) : ℤ_[p]ˣ := teichLiftHom (unitReduction u)587588theorem teichPart_apply (u : ℤ_[p]ˣ) : ((teichPart u : ℤ_[p]ˣ) : ℤ_[p]) = teichLift (unitReduction u) :=589 teichLiftHom_apply _590591theorem teichPart_pow_card (u : ℤ_[p]ˣ) : teichPart (p := p) u ^ (p - 1) = 1 :=592 teichLiftHom_pow_card _593594theorem teichPart_toZMod (u : ℤ_[p]ˣ) :595 PadicInt.toZMod ((teichPart (p := p) u : ℤ_[p]ˣ) : ℤ_[p]) = (unitReduction u : ZMod p) := by596 rw [teichPart_apply, teichLift_toZMod]597598/-- The principal part `⟨u⟩ = u·ω(u)⁻¹ ∈ 1 + pℤ_p` of a `p`-adic unit (3.9). -/599noncomputable def principalPart (u : ℤ_[p]ˣ) : ℤ_[p]ˣ := (teichPart u)⁻¹ * u600601theorem teichPart_mul_principalPart (u : ℤ_[p]ˣ) :602 teichPart (p := p) u * principalPart u = u := by603 rw [principalPart]604 group605606theorem principalPart_toZMod (u : ℤ_[p]ˣ) :607 PadicInt.toZMod ((principalPart (p := p) u : ℤ_[p]ˣ) : ℤ_[p]) = 1 := by608 have h : principalPart (p := p) u = (teichPart u)⁻¹ * u := rfl609 rw [h, ← unitReduction_apply, map_mul, map_inv]610 have h1 : unitReduction (p := p) (teichPart u) = unitReduction u := by611 ext612 rw [unitReduction_apply, teichPart_toZMod]613 rw [h1, inv_mul_cancel]614 simp615616/-- **Uniqueness of the Teichmüller decomposition** (thesis (3.9)). -/617theorem teichPart_principalPart_unique {u μ v : ℤ_[p]ˣ} (hμ : μ ^ (p - 1) = 1)618 (hv : PadicInt.toZMod (v : ℤ_[p]) = 1) (hu : u = μ * v) :619 μ = teichPart u ∧ v = principalPart u := by620 have hres : PadicInt.toZMod (μ : ℤ_[p]) = (unitReduction u : ZMod p) := by621 rw [hu, unitReduction_apply, Units.val_mul, map_mul, hv, mul_one]622 have hμ' : ((μ : ℤ_[p])) ^ (p - 1) = 1 := by623 rw [← Units.val_pow_eq_pow_val, hμ, Units.val_one]624 have hmu : μ = teichLiftHom (unitReduction u) := by625 refine Units.ext ?_626 rw [teichLiftHom_apply]627 exact eq_teichLift_of_pow_eq_one_of_toZMod_eq hμ' hres628 refine ⟨hmu, ?_⟩629 have hv' : v = μ⁻¹ * u := by630 rw [hu]631 group632 rw [hv', hmu, principalPart]633 rfl634635/-- The subgroup `1 + pℤ_p` of `ℤ_p^×`. -/636def onePlusP : Subgroup ℤ_[p]ˣ where637 carrier := {v | PadicInt.toZMod (v : ℤ_[p]) = 1}638 mul_mem' {a b} ha hb := by639 show PadicInt.toZMod ((a * b : ℤ_[p]ˣ) : ℤ_[p]) = 1640 rw [Units.val_mul, map_mul, ha, hb, one_mul]641 one_mem' := by642 show PadicInt.toZMod ((1 : ℤ_[p]ˣ) : ℤ_[p]) = 1643 rw [Units.val_one, map_one]644 inv_mem' {a} ha := by645 show PadicInt.toZMod (((a⁻¹ : ℤ_[p]ˣ)) : ℤ_[p]) = 1646 rw [← unitReduction_apply, map_inv]647 have h1 : unitReduction (p := p) a = 1 := by648 ext649 rw [unitReduction_apply, ha, Units.val_one]650 rw [h1]651 simp652653theorem mem_onePlusP_iff (v : ℤ_[p]ˣ) :654 v ∈ onePlusP (p := p) ↔ PadicInt.toZMod (v : ℤ_[p]) = 1 := Iff.rfl655656/-- **(3.9)**: `ℤ_p^× ≃* (ℤ/p)^× × (1 + pℤ_p)`, `u ↦ (u mod p, u·ω(u)⁻¹)`. -/657noncomputable def padicUnitsMulEquiv : ℤ_[p]ˣ ≃* (ZMod p)ˣ × onePlusP (p := p) where658 toFun u := (unitReduction u, ⟨principalPart u,659 (mem_onePlusP_iff (principalPart u)).mpr (principalPart_toZMod u)⟩)660 invFun x := teichLiftHom x.1 * (x.2 : ℤ_[p]ˣ)661 left_inv u := teichPart_mul_principalPart u662 right_inv y := by663 obtain ⟨ā, v, hv⟩ := y664 have hv' : PadicInt.toZMod ((v : ℤ_[p]ˣ) : ℤ_[p]) = 1 := hv665 refine Prod.ext ?_ ?_666 · show unitReduction (teichLiftHom ā * (v : ℤ_[p]ˣ)) = ā667 refine Units.ext ?_668 rw [unitReduction_apply, Units.val_mul, map_mul, teichLiftHom_apply, teichLift_toZMod,669 hv', mul_one]670 · refine Subtype.ext ?_671 show principalPart (teichLiftHom ā * (v : ℤ_[p]ˣ)) = v672 show (teichPart (teichLiftHom ā * (v : ℤ_[p]ˣ)))⁻¹673 * (teichLiftHom ā * (v : ℤ_[p]ˣ)) = v674 have hteich : teichPart (p := p) (teichLiftHom ā * (v : ℤ_[p]ˣ)) = teichLiftHom ā := by675 show teichLiftHom (unitReduction (teichLiftHom ā * (v : ℤ_[p]ˣ))) = teichLiftHom ā676 congr 1677 refine Units.ext ?_678 rw [unitReduction_apply, Units.val_mul, map_mul, teichLiftHom_apply, teichLift_toZMod,679 hv', mul_one]680 rw [hteich]681 group682 map_mul' u w := by683 have hμ : (teichPart (p := p) u * teichPart w) ^ (p - 1) = 1 := by684 rw [mul_pow, teichPart_pow_card, teichPart_pow_card, one_mul]685 have hv : PadicInt.toZMod686 (((principalPart (p := p) u * principalPart w : ℤ_[p]ˣ)) : ℤ_[p]) = 1 := by687 rw [Units.val_mul, map_mul, principalPart_toZMod, principalPart_toZMod, one_mul]688 have hu : u * w = (teichPart u * teichPart w) * (principalPart u * principalPart w) := by689 calc u * w = (teichPart u * principalPart u) * (teichPart w * principalPart w) := by690 rw [teichPart_mul_principalPart u, teichPart_mul_principalPart w]691 _ = (teichPart u * teichPart w) * (principalPart u * principalPart w) := by ac_rfl692 obtain ⟨h1, h2⟩ := teichPart_principalPart_unique hμ hv hu693 refine Prod.ext ?_ ?_694 · show unitReduction (u * w) = unitReduction u * unitReduction w695 exact map_mul _ _ _696 · refine Subtype.ext ?_697 show principalPart (u * w) = principalPart u * principalPart w698 exact h2.symm699700701/-! ## §6 The concrete Teichmüller character `thesisTeichmullerCharacter` -/702703/-- The Teichmüller character is odd (Lemma 3.3(2)). -/704theorem teichmullerCharacter_neg_one (hp2 : 2 < p) :705 teichmullerCharacter (p := p) (-1) = -1 :=706 isTeichmuller_neg_one teichmullerCharacter isTeichmullerCharacter_teichmullerCharacter hp2707708/-- The Teichmüller character is nontrivial for odd `p`. -/709theorem teichmullerCharacter_ne_one (hp2 : 2 < p) :710 teichmullerCharacter (p := p) ≠ 1 :=711 isTeichmuller_ne_one teichmullerCharacter isTeichmullerCharacter_teichmullerCharacter hp2712713/-- The order of the Teichmüller character is `p - 1`. -/714theorem teichmullerCharacter_pow_eq_one_iff {k : ℕ} :715 teichmullerCharacter (p := p) ^ k = 1 ↔ (p - 1) ∣ k :=716 isTeichmuller_pow_eq_one_iff _ isTeichmullerCharacter_teichmullerCharacter717718/-- Equal powers of the Teichmüller character have congruent exponents. -/719theorem teichmullerCharacter_pow_eq_pow_iff (i j : ℕ) :720 teichmullerCharacter (p := p) ^ i = teichmullerCharacter ^ j ↔ i % (p - 1) = j % (p - 1) :=721 isTeichmuller_pow_eq_pow_iff _ isTeichmullerCharacter_teichmullerCharacter i j722723/-- `ω` takes values in the `(p-1)`-st roots of unity on units. -/724theorem teichmullerCharacter_pow_card_apply (u : (ZMod p)ˣ) :725 teichmullerCharacter (p := p) (u : ZMod p) ^ (p - 1) = 1 := by726 rw [teichmullerCharacter_apply_unit, ← padicIntToComplex_pow, teichLift_pow,727 padicIntToComplex_one]728729/-- `ω` is a unit of the character monoid (it has finite order `p - 1`), so the730thesis's notation `ω ^ (-n)` (`zpow`) is legitimate. -/731theorem teichmullerCharacter_isUnit : IsUnit (teichmullerCharacter (p := p)) := by732 have h2 : 2 ≤ p := hp.out.two_le733 have h1 : p - 2 + 1 = p - 1 := by omega734 refine ⟨⟨teichmullerCharacter, teichmullerCharacter ^ (p - 2), ?_, ?_⟩, rfl⟩735 · rw [← pow_succ', h1, teichmullerCharacter_pow_card]736 · rw [← pow_succ, h1, teichmullerCharacter_pow_card]737738/-- The values of `ω` on units are the Teichmüller lifts. -/739theorem teichmullerCharacter_apply_unit_eq (u : (ZMod p)ˣ) :740 teichmullerCharacter (p := p) (u : ZMod p) = padicIntToComplex (teichLift u) :=741 teichmullerCharacter_apply_unit u742743/-- The pair `(3.9)` decomposed: every `p`-adic unit is `ω(u)·⟨u⟩`. -/744theorem padicUnitsMulEquiv_apply (u : ℤ_[p]ˣ) :745 padicUnitsMulEquiv (p := p) u746 = (unitReduction u, ⟨principalPart u,747 (mem_onePlusP_iff (principalPart u)).mpr (principalPart_toZMod u)⟩) := rfl748749/-! ## §7 `Δ̂ = ⟨ω⟩`: the character group of level `p` is generated by `ω` -/750751theorem natCard_dirichletCharacter_le :752 Nat.card (DirichletCharacter ℂ_[p] p) ≤ p - 1 := by753 classical754 have : NeZero p := ⟨(Fact.out : Nat.Prime p).ne_zero⟩755 have h1 : Nat.card (DirichletCharacter ℂ_[p] p)756 = Nat.card (rootsOfUnity (Fintype.card (ZMod p)ˣ) ℂ_[p]) :=757 Nat.card_congr (MulChar.equiv_rootsOfUnity (ZMod p) ℂ_[p]).toEquiv758 rw [h1, ZMod.card_units]759 have : NeZero (p - 1) := ⟨by have h2 := hp.out.two_le; omega⟩760 exact card_rootsOfUnity ℂ_[p] (p - 1)761762theorem natCard_dirichletCharacter_eq (ω : DirichletCharacter ℂ_[p] p)763 (hω : IsTeichmullerCharacter (p := p) ω) :764 Nat.card (DirichletCharacter ℂ_[p] p) = p - 1 := by765 refine le_antisymm (natCard_dirichletCharacter_le) ?_766 calc p - 1 = Nat.card (Subgroup.zpowers ω) := by rw [Nat.card_zpowers, hω.1]767 _ ≤ Nat.card (DirichletCharacter ℂ_[p] p) :=768 Nat.card_le_card_of_injective769 (fun x : Subgroup.zpowers ω => (x : DirichletCharacter ℂ_[p] p)) Subtype.coe_injective770771/-- Every character of level `p` is a power of any Teichmüller character. -/772theorem exists_zpow_eq_of_isTeichmuller (ω : DirichletCharacter ℂ_[p] p)773 (hω : IsTeichmullerCharacter (p := p) ω) (χ : DirichletCharacter ℂ_[p] p) :774 ∃ k : ℤ, ω ^ k = χ := by775 have htop : Subgroup.zpowers ω = ⊤ := by776 refine Subgroup.eq_top_of_card_eq _ ?_777 rw [Nat.card_zpowers, hω.1, natCard_dirichletCharacter_eq ω hω]778 have h : χ ∈ Subgroup.zpowers ω := by779 rw [htop]780 exact Subgroup.mem_top χ781 exact Subgroup.mem_zpowers_iff.mp h782783/-- The thesis's hypothesis `θ ≠ ω ^ (-n)` is equivalent to `θ·ω^n ≠ 1`. -/784theorem mul_pow_eq_one_iff_eq_zpow_neg (θ ω : DirichletCharacter ℂ_[p] p) (n : ℕ) :785 θ * ω ^ n = 1 ↔ θ = ω ^ (-(n : ℤ)) := by786 rw [mul_eq_one_iff_eq_inv, ← zpow_natCast, ← zpow_neg]787788/-- **`Δ̂ = ⟨ω⟩`** for the concrete Teichmüller character. -/789theorem exists_zpow_eq_teichmullerCharacter (χ : DirichletCharacter ℂ_[p] p) :790 ∃ k : ℤ, teichmullerCharacter (p := p) ^ k = χ :=791 exists_zpow_eq_of_isTeichmuller _ isTeichmullerCharacter_teichmullerCharacter χ792793794/-! ## §8 Uniqueness of the Teichmüller character -/795796theorem norm_lt_one_mul_complex {x y : ℂ_[p]} (hx : ‖x‖ ≤ 1) (hy : ‖y‖ < 1) :797 ‖x * y‖ < 1 := by798 rw [norm_mul]799 calc ‖x‖ * ‖y‖ ≤ 1 * ‖y‖ := mul_le_mul_of_nonneg_right hx (norm_nonneg _)800 _ = ‖y‖ := one_mul _801 _ < 1 := hy802803theorem norm_mul_le_one_complex {x y : ℂ_[p]} (hx : ‖x‖ ≤ 1) (hy : ‖y‖ ≤ 1) :804 ‖x * y‖ ≤ 1 := by805 rw [norm_mul]806 exact mul_le_one₀ hx (norm_nonneg _) hy807808theorem norm_lt_one_finset_sum_complex {ι : Type*} (s : Finset ι) (f : ι → ℂ_[p])809 (h : ∀ i ∈ s, ‖f i‖ < 1) : ‖(∑ i ∈ s, f i)‖ < 1 := by810 classical811 induction s using Finset.induction_on with812 | empty => simp813 | insert a s ha ih =>814 rw [Finset.sum_insert ha]815 exact norm_lt_one_add_complex (h a (Finset.mem_insert_self a s))816 (ih fun i hi => h i (Finset.mem_insert_of_mem hi))817818theorem norm_pow_lt_one_and_le_one {ζ : ℂ_[p]} (h : ‖ζ - 1‖ < 1) (i : ℕ) :819 ‖ζ ^ i - 1‖ < 1 ∧ ‖ζ ^ i‖ ≤ 1 := by820 have hζ : ‖ζ‖ ≤ 1 := by821 have h1 : ζ = (ζ - 1) + 1 := by ring822 rw [h1]823 exact (PadicComplex.isNonarchimedean p (ζ - 1) 1).trans (max_le h.le (by simp))824 induction i with825 | zero => simp826 | succ i ih =>827 obtain ⟨h1, h2⟩ := ih828 constructor829 · have hz : ζ ^ (i + 1) - 1 = ζ ^ i * (ζ - 1) + (ζ ^ i - 1) := by ring830 rw [hz]831 exact norm_lt_one_add_complex (norm_lt_one_mul_complex h2 h) h1832 · rw [pow_succ]833 exact norm_mul_le_one_complex h2 hζ834835/-- The group `1 + pℤ_p` contains no non-trivial `(p-1)`-st root of unity, in `ℂ_[p]`. -/836theorem eq_one_of_pow_eq_one_of_norm_sub_one_lt_one_complex {ζ : ℂ_[p]}837 (hζ : ζ ^ (p - 1) = 1) (h : ‖ζ - 1‖ < 1) : ζ = 1 := by838 classical839 have hpne : p - 1 ≠ 0 := by have h2 := hp.out.two_le; omega840 set S : ℂ_[p] := ∑ i ∈ Finset.range (p - 1), ζ ^ i with hSdef841 have hp1 : ‖((p - 1 : ℕ) : ℂ_[p])‖ = 1 := by842 rw [← padicIntToComplex_natCast (p := p) (p - 1), norm_padicIntToComplex,843 PadicInt.norm_natCast_eq_one_iff]844 exact (Nat.Prime.coprime_iff_not_dvd hp.out).mpr (by845 intro hd846 have := Nat.le_of_dvd (by omega) hd847 omega)848 have hS : ‖S - ((p - 1 : ℕ) : ℂ_[p])‖ < 1 := by849 have hsplit : S - ((p - 1 : ℕ) : ℂ_[p])850 = ∑ i ∈ Finset.range (p - 1), (ζ ^ i - 1) := by851 rw [hSdef, Finset.sum_sub_distrib]852 simp853 rw [hsplit]854 exact norm_lt_one_finset_sum_complex _ _ fun i _ => (norm_pow_lt_one_and_le_one h i).1855 have hSne : S ≠ 0 := by856 intro h0857 have hlt := hS858 rw [h0, zero_sub, norm_neg, hp1] at hlt859 exact lt_irrefl _ hlt860 have hgeom : S * (ζ - 1) = 0 := by861 rw [hSdef, geom_sum_mul, hζ, sub_self]862 rcases mul_eq_zero.mp hgeom with h' | h'863 · exact absurd h' hSne864 · exact sub_eq_zero.mp h'865866/-- A `(p-1)`-st root of unity in `ℂ_[p]` congruent to `1` modulo `p` is `1`. -/867theorem norm_eq_one_of_pow_eq_one {τ : ℂ_[p]} (hτ : τ ^ (p - 1) = 1)868 (hint : ‖τ‖ ≤ 1) : ‖τ‖ = 1 := by869 have h2 : 2 ≤ p := hp.out.two_le870 have hne : τ ≠ 0 := by871 intro h0872 have h1 : (0 : ℂ_[p]) ^ (p - 1) = 1 := by rw [← h0]; exact hτ873 rw [zero_pow (n := p - 1) (by omega)] at h1874 exact zero_ne_one h1875 have hmul : τ * τ ^ (p - 2) = 1 := by876 rw [← pow_succ', show p - 2 + 1 = p - 1 by omega, hτ]877 have h3 : ‖τ‖ * ‖τ ^ (p - 2)‖ = 1 := by878 rw [← norm_mul, hmul, norm_one]879 have h4 : ‖τ ^ (p - 2)‖ ≤ 1 := by880 rw [norm_pow]881 exact pow_le_one₀ (norm_nonneg _) hint882 nlinarith [norm_nonneg τ]883884/-- **The Teichmüller character is unique**: any character satisfying the885project's axioms `IsTeichmullerCharacter` is `thesis.teichmullerCharacter`. -/886theorem eq_teichmullerCharacter_of_isTeichmuller (τ : DirichletCharacter ℂ_[p] p)887 (hτ : IsTeichmullerCharacter (p := p) τ) : τ = teichmullerCharacter := by888 have h2 : 2 ≤ p := hp.out.two_le889 refine MulChar.ext fun u => ?_890 set a : ZMod p := (u : ZMod p) with ha891 have hpow : ∀ χ : DirichletCharacter ℂ_[p] p, IsTeichmullerCharacter (p := p) χ →892 χ a ^ (p - 1) = 1 := by893 intro χ hχ894 rw [← mulChar_pow_apply_unit χ (p - 1) u, isTeichmuller_pow_card χ hχ]895 exact MulChar.one_apply u.isUnit896 have hτu : τ a ^ (p - 1) = 1 := hpow τ hτ897 have hωu : teichmullerCharacter (p := p) a ^ (p - 1) = 1 :=898 hpow _ isTeichmullerCharacter_teichmullerCharacter899 -- integrality of the residue of `a`900 have hcast : ‖(ZMod.cast a : ℂ_[p])‖ ≤ 1 := by901 have : NeZero p := ⟨(Nat.Prime.ne_zero hp.out)⟩902 have h1 : (ZMod.cast a : ℂ_[p]) = ((a.val : ℕ) : ℂ_[p]) := ZMod.cast_eq_val a903 rw [h1, ← padicIntToComplex_natCast, norm_padicIntToComplex]904 exact PadicInt.norm_le_one _905 -- τ a is a unit of norm 1906 have hτnorm : ‖τ a‖ = 1 := by907 refine norm_eq_one_of_pow_eq_one hτu ?_908 have hint : ‖τ a - ZMod.cast a‖ < 1 := hτ.2 a909 have hsplit : τ a = (τ a - ZMod.cast a) + ZMod.cast a := by ring910 rw [hsplit]911 exact (PadicComplex.isNonarchimedean p _ _).trans (max_le hint.le hcast)912 -- both are congruent to `a`913 have hcong : ‖teichmullerCharacter (p := p) a - τ a‖ < 1 := by914 have h1 : ‖teichmullerCharacter (p := p) a - ZMod.cast a‖ < 1 :=915 teichmullerCharacter_residue a916 have h2 : ‖τ a - ZMod.cast a‖ < 1 := hτ.2 a917 have heq : teichmullerCharacter (p := p) a - τ a918 = (teichmullerCharacter (p := p) a - ZMod.cast a) + (ZMod.cast a - τ a) := by ring919 rw [heq]920 exact norm_lt_one_add_complex h1 (by rwa [← norm_neg, neg_sub] at h2)921 have hτane : τ a ≠ 0 := by922 intro h0923 have h1 : (0 : ℂ_[p]) ^ (p - 1) = 1 := by rw [← h0]; exact hτu924 rw [zero_pow (n := p - 1) (by omega)] at h1925 exact zero_ne_one h1926 -- divide: the quotient is a root of unity congruent to 1927 have hζpow : (teichmullerCharacter (p := p) a * (τ a)⁻¹) ^ (p - 1) = 1 := by928 rw [mul_pow, hωu, inv_pow, hτu, inv_one, mul_one]929 have hζnorm : ‖teichmullerCharacter (p := p) a * (τ a)⁻¹ - 1‖ < 1 := by930 have heq : teichmullerCharacter (p := p) a * (τ a)⁻¹ - 1931 = (teichmullerCharacter (p := p) a - τ a) * (τ a)⁻¹ := by932 rw [sub_mul, mul_inv_cancel₀ hτane]933 rw [heq, norm_mul, norm_inv, hτnorm, inv_one, mul_one]934 exact hcong935 have hζ1 : teichmullerCharacter (p := p) a * (τ a)⁻¹ = 1 :=936 eq_one_of_pow_eq_one_of_norm_sub_one_lt_one_complex hζpow hζnorm937 have hfin : teichmullerCharacter (p := p) a = τ a := by938 calc teichmullerCharacter (p := p) a939 = (teichmullerCharacter (p := p) a * (τ a)⁻¹) * τ a := by940 rw [mul_assoc, inv_mul_cancel₀ hτane, mul_one]941 _ = 1 * τ a := by rw [hζ1]942 _ = τ a := one_mul _943 exact hfin.symm944945/-- Any character satisfying `IsTeichmullerCharacter` is the Teichmüller character;946in particular `hω : IsTeichmullerCharacter ω` may be eliminated by947`ω := teichmullerCharacter`. -/948theorem eq_teichmullerCharacter_of_exists :949 ∀ τ : DirichletCharacter ℂ_[p] p, IsTeichmullerCharacter (p := p) τ →950 τ = teichmullerCharacter := eq_teichmullerCharacter_of_isTeichmuller951952end953954end Teich955956/-- The canonical Hensel/Teichmüller character modulo `p`. -/957noncomputable def teichmullerCharacter (p : ℕ) [Fact p.Prime] : DirichletCharacter ℂ_[p] p :=958 Teich.teichmullerCharacter959960/-- The constructed character satisfies the project's exact order and residue predicates. -/961theorem isTeichmullerCharacter_teichmullerCharacter (p : ℕ) [Fact p.Prime] :962 IsTeichmullerCharacter (teichmullerCharacter p) :=963 Teich.isTeichmullerCharacter_teichmullerCharacter964965/-- The previously parameterised Teichmüller hypothesis is non-vacuous. -/966theorem exists_isTeichmullerCharacter (p : ℕ) [Fact p.Prime] :967 ∃ ω : DirichletCharacter ℂ_[p] p, IsTeichmullerCharacter (p := p) ω :=968 Teich.exists_isTeichmullerCharacter969970/-- Uniqueness of a character satisfying the project's Teichmüller predicate. -/971theorem eq_teichmullerCharacter_of_isTeichmuller {p : ℕ} [Fact p.Prime]972 (τ : DirichletCharacter ℂ_[p] p) (hτ : IsTeichmullerCharacter τ) :973 τ = teichmullerCharacter p :=974 Teich.eq_teichmullerCharacter_of_isTeichmuller τ hτ975976end Thesis