Zeta and L-valuesBlueprintDependency graphThesis
Contents

FiniteDeltaGamma.lean

Statement index · Original Lean file

1import Thesis.Congruences2import Thesis.Teichmuller34/-!5# Finite-level `Δ`/`Γ` splitting and the two-kind character decomposition67Swarm `smwl46mfx`, member `m8`, direction (C).89The thesis (Definition 3.2, equation (3.9)) decomposes the units modulo `p^(m+1)` into a tame10(Teichmüller) part and a principal part, and correspondingly decomposes every Dirichlet11character of level `p^(m+1)` as a product `χ = θ · ψ` of a character `θ` of level `p` and a12character `ψ` of `p`-power order. `Thesis.Teich` proves the *infinite-level* statement13`ℤ_p^× ≃ (ℤ/p)^× × (1+pℤ_p)` (`Teich.padicUnitsMulEquiv`); here we prove the *finite-level*14statement together with the resulting character splitting, exactly as needed by15`Thesis.combineFirstSecondKind` / `Thesis.IsSecondKind`.1617Main results (all in namespace `Thesis.FiniteDG`):1819* `existsUnique_tame_principal` — every unit modulo `p^(m+1)` is *uniquely* a `(p-1)`-torsion20 unit times a principal unit (finite-level (3.9)).21* `pow_pow_eq_one_of_isPrincipal` — the principal units have exponent `p^m` (finite LTE).22* `existsUnique_combineFirstSecondKind` — every character of level `p^(m+1)` is *uniquely*23 `combineFirstSecondKind m θ ψ` with `IsSecondKind p m ψ` (existence, uniqueness,24 non-vacuity/surjectivity of the product map).25* `isSecondKind_iff_kills_torsion` — `IsSecondKind p m ψ` iff `ψ` is trivial on the26 `(p-1)`-torsion of `(ℤ/p^(m+1))^×`, i.e. iff `ψ ∈ Γ̂_m`.27* `exists_zpow_teichmuller_combine` — the first-kind part may be taken to be `ω^k`28 (thesis `Δ̂ = ⟨ω⟩`), using `Thesis.Teich.exists_zpow_eq_teichmullerCharacter`.29* `finite_delta_gamma` — the assembled statement of all of the above.3031Build (from this directory, with `PROJ` the path of `thesis-formalization`):3233```bash34LEAN_PATH=$PROJ/.lake/build/lib/lean:$LEAN_PATH lean FiniteDeltaGamma.lean35```3637The file has no `sorry`, no `axiom`, no `opaque`; `#print axioms` on every declaration lists38only `propext`, `Classical.choice`, `Quot.sound`.39-/4041namespace Thesis42namespace FiniteDG4344set_option linter.style.haveILetI false4546open _root_.DirichletCharacter47open scoped BigOperators4849variable {p : ℕ} [hp : Fact p.Prime]5051/-! ## §1 Number-theoretic input -/5253/-- `p` and `p - 1` are coprime. -/54theorem prime_coprime_sub_one : Nat.Coprime p (p - 1) := by55 rw [Nat.Prime.coprime_iff_not_dvd hp.out]56 intro hdiv57 have h2 : 2 ≤ p := hp.out.two_le58 have hpos : 0 < p - 1 := by omega59 have hle := Nat.le_of_dvd hpos hdiv60 omega6162/-- `p ^ m` and `p - 1` are coprime. -/63theorem coprime_pow_sub_one (m : ℕ) : Nat.Coprime (p ^ m) (p - 1) :=64 prime_coprime_sub_one (p := p).pow_left m6566/-- **Bezout input.** There are natural numbers `v, k` with `(p-1) * v = 1 + p^m * k`,67so that `v` inverts `p-1` modulo `p^m`. -/68theorem exists_bezout (m : ℕ) : ∃ v k : ℕ, (p - 1) * v = 1 + p ^ m * k := by69 rcases Nat.eq_zero_or_pos m with hm | hm70 · subst hm71 refine ⟨1, p - 2, ?_⟩72 have h2 : 2 ≤ p := hp.out.two_le73 simp only [pow_zero, mul_one]74 omega75 · haveI : NeZero (p ^ m) := ⟨pow_ne_zero _ hp.out.ne_zero⟩76 have hunit : IsUnit (((p - 1 : ℕ) : ZMod (p ^ m))) := by77 rw [ZMod.isUnit_iff_coprime]78 exact (coprime_pow_sub_one m).symm79 refine ⟨(((hunit.unit)⁻¹ : (ZMod (p ^ m))ˣ) : ZMod (p ^ m)).val, ?_⟩80 set v : ℕ := (((hunit.unit)⁻¹ : (ZMod (p ^ m))ˣ) : ZMod (p ^ m)).val with hv81 have hcoe : ((v : ℕ) : ZMod (p ^ m)) = ((hunit.unit)⁻¹ : (ZMod (p ^ m))ˣ) :=82 ZMod.natCast_zmod_val _83 have hprod : (((p - 1) * v : ℕ) : ZMod (p ^ m)) = 1 := by84 have hcast : (((p - 1) * v : ℕ) : ZMod (p ^ m))85 = (((p - 1 : ℕ) : ZMod (p ^ m))) * ((v : ℕ) : ZMod (p ^ m)) := by86 push_cast87 ring88 have hval : ((hunit.unit : (ZMod (p ^ m))ˣ) : ZMod (p ^ m)) = ((p - 1 : ℕ) : ZMod (p ^ m)) :=89 IsUnit.unit_spec hunit90 have h2 : (((p - 1 : ℕ) : ZMod (p ^ m))) *91 (((hunit.unit)⁻¹ : (ZMod (p ^ m))ˣ) : ZMod (p ^ m)) = 1 := by92 have h := Units.mul_inv hunit.unit93 rwa [hval] at h94 rw [hcast, hcoe, h2]95 have hmod : (p - 1) * v ≡ 1 [MOD p ^ m] := by96 rw [← ZMod.natCast_eq_natCast_iff]97 simpa using hprod98 have hpos : 1 ≤ (p - 1) * v := by99 rcases Nat.eq_zero_or_pos ((p - 1) * v) with h0 | h0100 · rw [h0] at hmod101 have hdvd : p ^ m ∣ 1 := by102 have := (Nat.modEq_iff_dvd' (Nat.zero_le 1)).mp hmod103 simpa using this104 have h2 : 2 ≤ p := hp.out.two_le105 have hle : 2 ≤ p ^ m := le_trans h2 (Nat.le_self_pow (by omega : m ≠ 0) p)106 have := Nat.le_of_dvd (by norm_num) hdvd107 omega108 · exact h0109 obtain ⟨k, hk⟩ := (Nat.modEq_iff_dvd' hpos).mp hmod.symm110 exact ⟨k, by omega⟩111112/-- A chosen Bezout coefficient: `(p-1) * bezoutV v = 1 + p^m * k`. -/113noncomputable def bezoutV (m : ℕ) : ℕ := (exists_bezout (p := p) m).choose114115theorem bezoutV_spec (m : ℕ) : ∃ k : ℕ, (p - 1) * bezoutV (p := p) m = 1 + p ^ m * k :=116 (exists_bezout (p := p) m).choose_spec117118/-! ## §2 The finite-level LTE step -/119120/-- The geometric sum `∑_{i<p} u^i` is divisible by `p` as soon as `u ≡ 1 (mod p)`. -/121theorem dvd_geom_sum_of_dvd_sub_one {u : ℤ} (hu : (p : ℤ) ∣ u - 1) :122 (p : ℤ) ∣ ∑ i ∈ Finset.range p, u ^ i := by123 have hterm : ∀ i : ℕ, (p : ℤ) ∣ u ^ i - 1 := fun i =>124 dvd_trans hu (by simpa using sub_dvd_pow_sub_pow u 1 i)125 have hsum : (p : ℤ) ∣ ∑ i ∈ Finset.range p, (u ^ i - 1) := Finset.dvd_sum fun i _ => hterm i126 have hsplit : (∑ i ∈ Finset.range p, u ^ i) - (p : ℤ)127 = ∑ i ∈ Finset.range p, (u ^ i - 1) := by128 rw [Finset.sum_sub_distrib]129 simp130 have heq : (∑ i ∈ Finset.range p, (u ^ i - 1)) + (p : ℤ) = ∑ i ∈ Finset.range p, u ^ i := by131 rw [← hsplit]; ring132 rw [← heq]133 exact dvd_add hsum (dvd_refl (p : ℤ))134135/-- **Finite-level LTE.** If `a ≡ 1 (mod p)` then `a ^ (p^m) ≡ 1 (mod p^(m+1))`. -/136theorem pow_pow_sub_one_dvd (m : ℕ) (a : ℤ) (ha : (p : ℤ) ∣ a - 1) :137 (p : ℤ) ^ (m + 1) ∣ a ^ (p ^ m) - 1 := by138 induction m with139 | zero => simpa using ha140 | succ m ih =>141 obtain ⟨z, hz⟩ := ih142 have haz : a ^ (p ^ m) = 1 + (p : ℤ) ^ (m + 1) * z := by linarith143 have hPp : (p : ℤ) ∣ (p : ℤ) ^ (m + 1) := dvd_pow_self (p : ℤ) (by omega)144 have hS : (p : ℤ) ∣ ∑ i ∈ Finset.range p, (1 + (p : ℤ) ^ (m + 1) * z) ^ i := by145 refine dvd_geom_sum_of_dvd_sub_one ?_146 rw [show (1 + (p : ℤ) ^ (m + 1) * z) - 1 = (p : ℤ) ^ (m + 1) * z by ring]147 exact dvd_mul_of_dvd_left hPp z148 have hgoal : a ^ (p ^ (m + 1)) - 1149 = (p : ℤ) ^ (m + 1) * z * ∑ i ∈ Finset.range p, (1 + (p : ℤ) ^ (m + 1) * z) ^ i := by150 rw [Nat.pow_succ, pow_mul, haz]151 have hg := mul_geom_sum (1 + (p : ℤ) ^ (m + 1) * z) p152 rw [show (1 + (p : ℤ) ^ (m + 1) * z) - 1 = (p : ℤ) ^ (m + 1) * z by ring] at hg153 rw [← hg]154 rw [hgoal]155 obtain ⟨w, hw⟩ := hS156 rw [hw]157 exact ⟨z * w, by ring⟩158159/-- The residue of a unit modulo `p` is `1` exactly for the principal units. -/160theorem isPrincipal_iff {m : ℕ} (x : (ZMod (p ^ (m + 1)))ˣ) :161 ZMod.unitsMap (dvd_pow_self p (Nat.succ_ne_zero m)) x = 1162 ↔ ((x : ZMod (p ^ (m + 1))).cast : ZMod p) = 1 := by163 constructor164 · intro h165 have := congrArg (fun u : (ZMod p)ˣ => (u : ZMod p)) h166 simpa [ZMod.unitsMap_val] using this167 · intro h168 refine Units.ext ?_169 rw [ZMod.unitsMap_val, Units.val_one]170 exact h171172/-- **The principal units are killed by the `p^m`-th power.** This is the finite-level173statement that `1 + pℤ/p^(m+1)ℤ` has exponent dividing `p^m`. -/174theorem pow_pow_eq_one_of_isPrincipal {m : ℕ} (x : (ZMod (p ^ (m + 1)))ˣ)175 (hx : ZMod.unitsMap (dvd_pow_self p (Nat.succ_ne_zero m)) x = 1) : x ^ (p ^ m) = 1 := by176 haveI : NeZero (p ^ (m + 1)) := ⟨pow_ne_zero _ hp.out.ne_zero⟩177 have hcast : ((x : ZMod (p ^ (m + 1))).cast : ZMod p) = 1 := (isPrincipal_iff x).mp hx178 set a : ℕ := (x : ZMod (p ^ (m + 1))).val with ha179 have hax : ((a : ℕ) : ZMod (p ^ (m + 1))) = (x : ZMod (p ^ (m + 1))) := ZMod.natCast_zmod_val _180 have ha1 : ((a : ℕ) : ZMod p) = 1 := by181 rw [← ZMod.cast_natCast (dvd_pow_self p (Nat.succ_ne_zero m)) a, hax]182 exact hcast183 have hdvd : (p : ℤ) ∣ (a : ℤ) - 1 := by184 have h0 : (((a : ℤ) - 1 : ℤ) : ZMod p) = 0 := by185 push_cast186 rw [ha1]; ring187 exact (ZMod.intCast_zmod_eq_zero_iff_dvd _ p).mp h0188 have hlte := pow_pow_sub_one_dvd (p := p) m (a : ℤ) hdvd189 have hzero : ((((a : ℤ) ^ (p ^ m) - 1) : ℤ) : ZMod (p ^ (m + 1))) = 0 := by190 rw [ZMod.intCast_zmod_eq_zero_iff_dvd]191 have hcastN : ((p ^ (m + 1) : ℕ) : ℤ) = (p : ℤ) ^ (m + 1) := by push_cast; ring192 rwa [hcastN]193 refine Units.ext ?_194 rw [Units.val_pow_eq_pow_val, Units.val_one, ← hax]195 have hval : (((a : ℤ) ^ (p ^ m) : ℤ) : ZMod (p ^ (m + 1))) = 1 := by196 have h := hzero197 push_cast at h ⊢198 linear_combination h199 calc (((a : ℕ) : ZMod (p ^ (m + 1)))) ^ (p ^ m)200 = (((a : ℤ) ^ (p ^ m) : ℤ) : ZMod (p ^ (m + 1))) := by push_cast; ring201 _ = 1 := hval202203204/-! ## §3 The finite-level `Δ`/`Γ` splitting of the unit group -/205206/-- Every unit modulo `p^(m+1)` has order dividing `p^m * (p-1)`. -/207theorem pow_card_units_prime_pow (m : ℕ) (x : (ZMod (p ^ (m + 1)))ˣ) :208 x ^ (p ^ m * (p - 1)) = 1 := by209 haveI : NeZero (p ^ (m + 1)) := ⟨pow_ne_zero _ hp.out.ne_zero⟩210 have hcard : Fintype.card (ZMod (p ^ (m + 1)))ˣ = p ^ m * (p - 1) := by211 rw [ZMod.card_units_eq_totient, Nat.totient_prime_pow hp.out (Nat.succ_pos m)]212 norm_num213 have h := pow_card_eq_one (x := x)214 rwa [hcard] at h215216/-- A unit that is killed by both `p^m` and `p-1` is trivial (coprimality). -/217theorem eq_one_of_pow_primePow_of_pow_sub_one {m : ℕ} {ρ : (ZMod (p ^ (m + 1)))ˣ}218 (he : ρ ^ (p ^ m) = 1) (hf : ρ ^ (p - 1) = 1) : ρ = 1 := by219 have h1 : orderOf ρ ∣ p ^ m := orderOf_dvd_iff_pow_eq_one.mpr he220 have h2 : orderOf ρ ∣ p - 1 := orderOf_dvd_iff_pow_eq_one.mpr hf221 have h3 : orderOf ρ ∣ 1 := by222 have hg : Nat.gcd (p ^ m) (p - 1) = 1 := (coprime_pow_sub_one (p := p) m).gcd_eq_one223 have h4 : orderOf ρ ∣ Nat.gcd (p ^ m) (p - 1) := Nat.dvd_gcd h1 h2224 rwa [hg] at h4225 exact orderOf_eq_one_iff.mp (Nat.dvd_one.mp h3)226227/-- The reduction map `(ℤ/p^(m+1))^× → (ℤ/p)^×`. -/228def reduction (m : ℕ) : (ZMod (p ^ (m + 1)))ˣ →* (ZMod p)ˣ :=229 ZMod.unitsMap (dvd_pow_self p (Nat.succ_ne_zero m))230231theorem reduction_def (m : ℕ) : reduction (p := p) m =232 ZMod.unitsMap (dvd_pow_self p (Nat.succ_ne_zero m)) := rfl233234/-- The principal part `⟨x⟩ = x^(p-1)v` of a unit modulo `p^(m+1)`; it is `≡ 1 mod p`. -/235noncomputable def principalPartFinite (m : ℕ) (x : (ZMod (p ^ (m + 1)))ˣ) :236 (ZMod (p ^ (m + 1)))ˣ :=237 x ^ ((p - 1) * bezoutV (p := p) m)238239/-- The tame part `ω(x) = x·⟨x⟩⁻¹` of a unit modulo `p^(m+1)`; it is `(p-1)`-torsion. -/240noncomputable def tamePartFinite (m : ℕ) (x : (ZMod (p ^ (m + 1)))ˣ) :241 (ZMod (p ^ (m + 1)))ˣ :=242 x * (principalPartFinite m x)⁻¹243244/-- Every level-`p` unit has order dividing `p-1`. -/245theorem reduction_pow_sub_one (a : (ZMod p)ˣ) : a ^ (p - 1) = 1 := by246 have h := pow_card_eq_one (x := a)247 rwa [ZMod.card_units] at h248249theorem principalPartFinite_mem (m : ℕ) (x : (ZMod (p ^ (m + 1)))ˣ) :250 reduction m (principalPartFinite m x) = 1 := by251 rw [principalPartFinite, map_pow, pow_mul, reduction_pow_sub_one, one_pow]252253theorem tamePartFinite_pow_sub_one (m : ℕ) (x : (ZMod (p ^ (m + 1)))ˣ) :254 tamePartFinite m x ^ (p - 1) = 1 := by255 obtain ⟨k, hk⟩ := bezoutV_spec (p := p) m256 have hexp : (p - 1) * ((p - 1) * bezoutV (p := p) m) = (p - 1) + (p ^ m * (p - 1)) * k := by257 calc (p - 1) * ((p - 1) * bezoutV (p := p) m)258 = (p - 1) * (1 + p ^ m * k) := by rw [hk]259 _ = (p - 1) + (p ^ m * (p - 1)) * k := by ring260 have hx1 : x ^ ((p - 1) * ((p - 1) * bezoutV (p := p) m)) = x ^ (p - 1) := by261 calc x ^ ((p - 1) * ((p - 1) * bezoutV (p := p) m))262 = x ^ ((p - 1) + (p ^ m * (p - 1)) * k) := congrArg (fun t => x ^ t) hexp263 _ = x ^ (p - 1) * x ^ ((p ^ m * (p - 1)) * k) := pow_add x _ _264 _ = x ^ (p - 1) * (x ^ (p ^ m * (p - 1))) ^ k := by rw [pow_mul]265 _ = x ^ (p - 1) * 1 ^ k := by rw [pow_card_units_prime_pow]266 _ = x ^ (p - 1) := by rw [one_pow, mul_one]267 have hσ : principalPartFinite m x ^ (p - 1) = x ^ (p - 1) := by268 calc principalPartFinite m x ^ (p - 1)269 = (x ^ ((p - 1) * bezoutV (p := p) m)) ^ (p - 1) := rfl270 _ = x ^ (((p - 1) * bezoutV (p := p) m) * (p - 1)) := (pow_mul x _ _).symm271 _ = x ^ ((p - 1) * ((p - 1) * bezoutV (p := p) m)) := congrArg (fun t => x ^ t) (by ring)272 _ = x ^ (p - 1) := hx1273 calc tamePartFinite m x ^ (p - 1)274 = x ^ (p - 1) * ((principalPartFinite m x) ^ (p - 1))⁻¹ := by275 rw [tamePartFinite, mul_pow, inv_pow]276 _ = x ^ (p - 1) * (x ^ (p - 1))⁻¹ := by rw [hσ]277 _ = 1 := mul_inv_cancel _278279theorem tamePartFinite_principal (m : ℕ) (x : (ZMod (p ^ (m + 1)))ˣ) :280 reduction m ((tamePartFinite m x)⁻¹ * x) = 1 := by281 have h : (tamePartFinite m x)⁻¹ * x = principalPartFinite m x := by282 rw [tamePartFinite]; group283 rw [h]284 exact principalPartFinite_mem m x285286/-- **Finite-level `Δ`/`Γ` splitting.** Every unit modulo `p^(m+1)` is uniquely the product287of a `(p-1)`-torsion unit and a principal unit: the finite-level form of thesis (3.9). -/288theorem existsUnique_tame_principal (m : ℕ) (x : (ZMod (p ^ (m + 1)))ˣ) :289 ∃! μ : (ZMod (p ^ (m + 1)))ˣ, μ ^ (p - 1) = 1 ∧ reduction m (μ⁻¹ * x) = 1 := by290 refine ⟨tamePartFinite m x, ⟨tamePartFinite_pow_sub_one m x, tamePartFinite_principal m x⟩, ?_⟩291 intro ν hν292 obtain ⟨hνp, hνred⟩ := hν293 set μ := tamePartFinite m x with hμ294 have hred : reduction m (ν * μ⁻¹) = 1 := by295 have h1 : reduction m ν = reduction m x := by296 have h := hνred297 rw [map_mul, map_inv] at h298 calc reduction m ν = (reduction m ν) * ((reduction m ν)⁻¹ * reduction m x) := by rw [h, mul_one]299 _ = reduction m x := by group300 have h2 : reduction m μ = reduction m x := by301 have h := tamePartFinite_principal m x302 rw [map_mul, map_inv] at h303 calc reduction m μ = (reduction m μ) * ((reduction m μ)⁻¹ * reduction m x) := by rw [h, mul_one]304 _ = reduction m x := by group305 rw [map_mul, map_inv, h1, h2, mul_inv_cancel]306 have hpow : (ν * μ⁻¹) ^ (p ^ m) = 1 := pow_pow_eq_one_of_isPrincipal _ hred307 have hpow' : (ν * μ⁻¹) ^ (p - 1) = 1 := by308 rw [mul_pow, inv_pow, hνp, tamePartFinite_pow_sub_one, one_mul, inv_one]309 have hone : ν * μ⁻¹ = 1 := eq_one_of_pow_primePow_of_pow_sub_one hpow hpow'310 rwa [mul_inv_eq_one] at hone311312313/-! ## §4 The two-kind decomposition of Dirichlet characters -/314315/-- A group element killed by coprime exponents is trivial. -/316theorem eq_one_of_pow_coprime {G : Type*} [CommGroup G] {g : G} {e f : ℕ}317 (hcop : Nat.Coprime e f) (he : g ^ e = 1) (hf : g ^ f = 1) : g = 1 := by318 have h1 : orderOf g ∣ e := orderOf_dvd_iff_pow_eq_one.mpr he319 have h2 : orderOf g ∣ f := orderOf_dvd_iff_pow_eq_one.mpr hf320 have h4 : orderOf g ∣ Nat.gcd e f := Nat.dvd_gcd h1 h2321 rw [hcop.gcd_eq_one] at h4322 exact orderOf_eq_one_iff.mp (Nat.dvd_one.mp h4)323324/-- Every level-`p` character has `(p-1)`-st power `1`. -/325theorem level_character_pow_sub_one (θ : DirichletCharacter ℂ_[p] p) : θ ^ (p - 1) = 1 := by326 refine MulChar.ext fun a => ?_327 rw [MulChar.pow_apply_coe, MulChar.one_apply_coe, ← map_pow,328 ← Units.val_pow_eq_pow_val, reduction_pow_sub_one, Units.val_one, map_one]329330/-- `ofUnitHom` and `toUnitHom` are inverse. -/331theorem toUnitHom_ofUnitHom {M : Type*} [CommMonoid M] (f : Mˣ →* ℂ_[p]ˣ) :332 (MulChar.ofUnitHom f).toUnitHom = f :=333 (MulChar.equivToUnitHom).apply_symm_apply f334335/-- The principal-unit (second kind) part `ψ` of a character `χ` of level `p^(m+1)`. -/336noncomputable def secondKindPart (m : ℕ) (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1))) :337 DirichletCharacter ℂ_[p] (p ^ (m + 1)) :=338 MulChar.ofUnitHom (χ.toUnitHom.comp (powMonoidHom ((p - 1) * bezoutV (p := p) m)))339340/-- The first-kind part `θ` of a character `χ` of level `p^(m+1)`. -/341noncomputable def firstKindPart (m : ℕ) (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1))) :342 DirichletCharacter ℂ_[p] (p ^ (m + 1)) :=343 MulChar.ofUnitHom (χ.toUnitHom *344 (χ.toUnitHom.comp (powMonoidHom ((p - 1) * bezoutV (p := p) m)))⁻¹)345346theorem secondKindPart_toUnitHom (m : ℕ) (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1))) :347 (secondKindPart m χ).toUnitHom348 = χ.toUnitHom.comp (powMonoidHom ((p - 1) * bezoutV (p := p) m)) :=349 toUnitHom_ofUnitHom _350351theorem firstKindPart_toUnitHom (m : ℕ) (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1))) :352 (firstKindPart m χ).toUnitHom = χ.toUnitHom *353 (χ.toUnitHom.comp (powMonoidHom ((p - 1) * bezoutV (p := p) m)))⁻¹ :=354 toUnitHom_ofUnitHom _355356theorem secondKindPart_apply_unit (m : ℕ) (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1)))357 (a : (ZMod (p ^ (m + 1)))ˣ) :358 (secondKindPart m χ).toUnitHom a = χ.toUnitHom (a ^ ((p - 1) * bezoutV (p := p) m)) := by359 rw [secondKindPart_toUnitHom, MonoidHom.comp_apply, powMonoidHom_apply]360361theorem firstKindPart_apply_unit (m : ℕ) (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1)))362 (a : (ZMod (p ^ (m + 1)))ˣ) :363 (firstKindPart m χ).toUnitHom a364 = χ.toUnitHom a * ((secondKindPart m χ).toUnitHom a)⁻¹ := by365 rw [firstKindPart_toUnitHom, MonoidHom.mul_apply, MonoidHom.inv_apply, MonoidHom.comp_apply,366 powMonoidHom_apply, secondKindPart_toUnitHom, MonoidHom.comp_apply, powMonoidHom_apply]367368/-- **The second-kind part has `p`-power order.** -/369theorem secondKindPart_pow_eq_one (m : ℕ) (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1))) :370 secondKindPart m χ ^ (p ^ m) = 1 := by371 refine MulChar.ext fun a => ?_372 rw [MulChar.pow_apply_coe, MulChar.one_apply_coe,373 ← MulChar.coe_toUnitHom (secondKindPart m χ) a, secondKindPart_apply_unit,374 ← Units.val_pow_eq_pow_val, ← map_pow,375 show a ^ ((p - 1) * bezoutV (p := p) m) = principalPartFinite m a from rfl,376 pow_pow_eq_one_of_isPrincipal _ (principalPartFinite_mem m a), map_one, Units.val_one]377378/-- **The two-kind product is the character.** -/379theorem firstKindPart_mul_secondKindPart (m : ℕ) (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1))) :380 firstKindPart m χ * secondKindPart m χ = χ := by381 refine MulChar.ext fun a => ?_382 rw [MulChar.mul_apply, ← MulChar.coe_toUnitHom (firstKindPart m χ) a,383 ← MulChar.coe_toUnitHom (secondKindPart m χ) a, ← MulChar.coe_toUnitHom χ a,384 ← Units.val_mul, firstKindPart_apply_unit]385 congr 1386 group387388/-- **The first-kind part kills the principal units.** -/389theorem firstKindPart_kills_principal (m : ℕ) (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1)))390 {a : (ZMod (p ^ (m + 1)))ˣ} (ha : reduction m a = 1) :391 firstKindPart m χ (a : ZMod (p ^ (m + 1))) = 1 := by392 have hpow : a ^ ((p - 1) * bezoutV (p := p) m) = a := by393 obtain ⟨k, hk⟩ := bezoutV_spec (p := p) m394 have he : a ^ (p ^ m) = 1 := pow_pow_eq_one_of_isPrincipal a ha395 calc a ^ ((p - 1) * bezoutV (p := p) m)396 = a ^ (1 + p ^ m * k) := congrArg (fun t => a ^ t) hk397 _ = a ^ 1 * a ^ (p ^ m * k) := pow_add a 1 _398 _ = a * (a ^ (p ^ m)) ^ k := by rw [pow_one, pow_mul]399 _ = a := by rw [he, one_pow, mul_one]400 have hunit : (firstKindPart m χ).toUnitHom a = 1 := by401 rw [firstKindPart_apply_unit, secondKindPart_apply_unit, hpow, mul_inv_cancel]402 rw [← MulChar.coe_toUnitHom (firstKindPart m χ) a, hunit, Units.val_one]403404/-- **The first-kind part is a level-`p` character.** A character of level `p^(m+1)` that405kills the principal units factors through level `p`. -/406theorem exists_firstKind_level (m : ℕ) (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1))) :407 ∃ θ : DirichletCharacter ℂ_[p] p,408 changeLevel (dvd_pow_self p (Nat.succ_ne_zero m)) θ = firstKindPart m χ := by409 classical410 haveI : NeZero (p ^ (m + 1)) := ⟨pow_ne_zero _ hp.out.ne_zero⟩411 set θu : (ZMod (p ^ (m + 1)))ˣ →* ℂ_[p]ˣ := (firstKindPart m χ).toUnitHom with hθu412 have hker : ∀ a : (ZMod (p ^ (m + 1)))ˣ, reduction m a = 1 → θu a = 1 := by413 intro a ha414 have h := firstKindPart_kills_principal m χ ha415 rw [hθu]416 refine Units.ext ?_417 rw [MulChar.coe_toUnitHom, h, Units.val_one]418 have hcong : ∀ a b : (ZMod (p ^ (m + 1)))ˣ, reduction m a = reduction m b → θu a = θu b := by419 intro a b hab420 have h1 : reduction m (a * b⁻¹) = 1 := by rw [map_mul, map_inv, hab, mul_inv_cancel]421 have h2 : θu (a * b⁻¹) = 1 := hker _ h1422 rw [map_mul, map_inv] at h2423 calc θu a = θu a * ((θu b)⁻¹ * θu b) := by group424 _ = θu b := by rw [← mul_assoc, h2, one_mul]425 have hsurj : Function.Surjective (ZMod.unitsMap (dvd_pow_self p (Nat.succ_ne_zero m))) :=426 ZMod.unitsMap_surjective _427 let θ₀ : (ZMod p)ˣ →* ℂ_[p]ˣ :=428 { toFun := fun u => θu ((hsurj u).choose)429 map_one' := hker _ ((hsurj 1).choose_spec)430 map_mul' := fun u v => by431 show θu ((hsurj (u * v)).choose) = θu ((hsurj u).choose) * θu ((hsurj v).choose)432 rw [← map_mul]433 refine hcong _ _ ?_434 show ZMod.unitsMap (dvd_pow_self p (Nat.succ_ne_zero m)) ((hsurj (u * v)).choose)435 = ZMod.unitsMap (dvd_pow_self p (Nat.succ_ne_zero m))436 ((hsurj u).choose * (hsurj v).choose)437 rw [map_mul, (hsurj (u * v)).choose_spec, (hsurj u).choose_spec,438 (hsurj v).choose_spec] }439 have hθ₀app : ∀ u : (ZMod p)ˣ, θ₀ u = θu ((hsurj u).choose) := fun u => rfl440 refine ⟨MulChar.ofUnitHom θ₀, ?_⟩441 refine (DirichletCharacter.toUnitHom_inj _ _).mp ?_442 rw [DirichletCharacter.changeLevel_toUnitHom, toUnitHom_ofUnitHom]443 refine MonoidHom.ext fun a => ?_444 rw [MonoidHom.comp_apply]445 show θu ((hsurj (reduction m a)).choose) = θu a446 exact hcong _ _ ((hsurj (reduction m a)).choose_spec)447448/-- The first-kind part has order dividing `p-1`. -/449theorem firstKindPart_pow_eq_one (m : ℕ) (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1))) :450 firstKindPart m χ ^ (p - 1) = 1 := by451 obtain ⟨θ, hθ⟩ := exists_firstKind_level m χ452 rw [← hθ, ← map_pow, level_character_pow_sub_one, map_one]453454/-- **Existence of the two-kind decomposition** (thesis Definition 3.2). Every Dirichlet455character of level `p^(m+1)` is a first-kind character of level `p` times a second-kind456character of `p`-power order. -/457theorem exists_combineFirstSecondKind (m : ℕ) (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1))) :458 ∃ θ : DirichletCharacter ℂ_[p] p, ∃ ψ : DirichletCharacter ℂ_[p] (p ^ (m + 1)),459 IsSecondKind p m ψ ∧ χ = combineFirstSecondKind m θ ψ := by460 obtain ⟨θ, hθ⟩ := exists_firstKind_level m χ461 refine ⟨θ, secondKindPart m χ, secondKindPart_pow_eq_one m χ, ?_⟩462 refine (firstKindPart_mul_secondKindPart m χ).symm.trans ?_463 rw [combineFirstSecondKind, liftFirstKind, ← hθ]464465/-- **Uniqueness of the two-kind decomposition.** -/466theorem combineFirstSecondKind_unique {m : ℕ} {θ₁ θ₂ : DirichletCharacter ℂ_[p] p}467 {ψ₁ ψ₂ : DirichletCharacter ℂ_[p] (p ^ (m + 1))}468 (h₁ : IsSecondKind p m ψ₁) (h₂ : IsSecondKind p m ψ₂)469 (h : combineFirstSecondKind m θ₁ ψ₁ = combineFirstSecondKind m θ₂ ψ₂) :470 θ₁ = θ₂ ∧ ψ₁ = ψ₂ := by471 haveI : NeZero (p ^ (m + 1)) := ⟨pow_ne_zero _ hp.out.ne_zero⟩472 have hρe : (ψ₂ * ψ₁⁻¹) ^ (p ^ m) = 1 := by473 rw [mul_pow, inv_pow, h₂, h₁]474 simp475 have hρf : (ψ₂ * ψ₁⁻¹) ^ (p - 1) = 1 := by476 have heq : ψ₂ * ψ₁⁻¹477 = changeLevel (dvd_pow_self p (Nat.succ_ne_zero m)) (θ₁ * θ₂⁻¹) := by478 have hh := h479 rw [combineFirstSecondKind, combineFirstSecondKind, liftFirstKind, liftFirstKind] at hh480 rw [map_mul, map_inv]481 have step : ψ₂ = (changeLevel (dvd_pow_self p (Nat.succ_ne_zero m)) θ₂)⁻¹ *482 (changeLevel (dvd_pow_self p (Nat.succ_ne_zero m)) θ₁ * ψ₁) := by483 rw [hh, inv_mul_cancel_left]484 rw [step, mul_assoc, mul_assoc, mul_inv_cancel, mul_one, mul_comm]485 rw [heq, ← map_pow, level_character_pow_sub_one, map_one]486 have hone : ψ₂ * ψ₁⁻¹ = 1 := eq_one_of_pow_coprime (coprime_pow_sub_one m) hρe hρf487 have hψ : ψ₁ = ψ₂ := by488 rw [mul_inv_eq_one] at hone489 exact hone.symm490 have hθ : θ₁ = θ₂ := by491 have hh := h492 rw [combineFirstSecondKind, combineFirstSecondKind, liftFirstKind, liftFirstKind, hψ] at hh493 exact DirichletCharacter.changeLevel_injective _ (mul_right_cancel hh)494 exact ⟨hθ, hψ⟩495496/-- **The two-kind product map is injective.** -/497theorem combineFirstSecondKind_inj {m : ℕ} {θ₁ θ₂ : DirichletCharacter ℂ_[p] p}498 {ψ₁ ψ₂ : DirichletCharacter ℂ_[p] (p ^ (m + 1))}499 (h₁ : IsSecondKind p m ψ₁) (h₂ : IsSecondKind p m ψ₂)500 (h : combineFirstSecondKind m θ₁ ψ₁ = combineFirstSecondKind m θ₂ ψ₂) :501 θ₁ = θ₂ ∧ ψ₁ = ψ₂ :=502 combineFirstSecondKind_unique h₁ h₂ h503504/-- **The two-kind decomposition is bijective** (non-vacuity and surjectivity of505`combineFirstSecondKind`). -/506theorem existsUnique_combineFirstSecondKind (m : ℕ) (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1))) :507 ∃! θψ : DirichletCharacter ℂ_[p] p × DirichletCharacter ℂ_[p] (p ^ (m + 1)),508 IsSecondKind p m θψ.2 ∧ χ = combineFirstSecondKind m θψ.1 θψ.2 := by509 obtain ⟨θ, ψ, hψ, hχ⟩ := exists_combineFirstSecondKind m χ510 refine ⟨⟨θ, ψ⟩, ⟨hψ, hχ⟩, ?_⟩511 rintro ⟨θ', ψ'⟩ ⟨hψ', hχ'⟩512 obtain ⟨h1, h2⟩ := combineFirstSecondKind_unique hψ' hψ (hχ'.symm.trans hχ)513 exact Prod.ext h1 h2514515/-- **The `Δ`-part is a power of the Teichmüller character** (thesis `Δ̂ = ⟨ω⟩`): the516first-kind part can be taken to be `ω^k`. -/517theorem exists_zpow_teichmuller_combine (m : ℕ) (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1))) :518 ∃ k : ℤ, ∃ ψ : DirichletCharacter ℂ_[p] (p ^ (m + 1)),519 IsSecondKind p m ψ ∧520 χ = combineFirstSecondKind m (Teich.teichmullerCharacter (p := p) ^ k) ψ := by521 obtain ⟨θ, ψ, hψ, hχ⟩ := exists_combineFirstSecondKind m χ522 obtain ⟨k, hk⟩ := Teich.exists_zpow_eq_teichmullerCharacter (p := p) θ523 exact ⟨k, ψ, hψ, by rw [hχ, ← hk]⟩524525526/-- A second-kind character of level `p^(m+1)` is trivial on the `(p-1)`-torsion. -/527theorem secondKindPart_eq_one_of_pow_sub_one (m : ℕ)528 (χ : DirichletCharacter ℂ_[p] (p ^ (m + 1)))529 {a : (ZMod (p ^ (m + 1)))ˣ} (ha : a ^ (p - 1) = 1) :530 secondKindPart m χ (a : ZMod (p ^ (m + 1))) = 1 := by531 rw [← MulChar.coe_toUnitHom (secondKindPart m χ) a, secondKindPart_apply_unit,532 show a ^ ((p - 1) * bezoutV (p := p) m) = 1 by rw [pow_mul, ha, one_pow],533 map_one, Units.val_one]534535/-- A field element killed by coprime exponents is `1`. -/536theorem field_eq_one_of_pow_coprime {K : Type*} [Field K] {x : K} {e f : ℕ}537 (he : x ^ e = 1) (hf : x ^ f = 1) (hcop : Nat.Coprime e f) : x = 1 := by538 rcases Nat.eq_zero_or_pos e with he0 | hepos539 · have hf1 : f = 1 := by540 have h : Nat.gcd e f = 1 := hcop541 rw [he0] at h542 simpa using h543 rw [hf1, pow_one] at hf544 exact hf545 · have hx : x ≠ 0 := by546 rintro rfl547 rw [zero_pow (by omega : e ≠ 0)] at he548 exact zero_ne_one he549 let u : Kˣ := Units.mk0 x hx550 have hu : ((u : Kˣ) : K) = x := Units.val_mk0 hx551 have he' : u ^ e = 1 := by552 refine Units.ext ?_553 show ((u ^ e : Kˣ) : K) = ((1 : Kˣ) : K)554 rw [Units.val_pow_eq_pow_val, Units.val_one, hu]555 exact he556 have hf' : u ^ f = 1 := by557 refine Units.ext ?_558 show ((u ^ f : Kˣ) : K) = ((1 : Kˣ) : K)559 rw [Units.val_pow_eq_pow_val, Units.val_one, hu]560 exact hf561 have hone : u = 1 := eq_one_of_pow_coprime hcop he' hf'562 calc x = ((u : Kˣ) : K) := hu.symm563 _ = ((1 : Kˣ) : K) := by rw [hone]564 _ = 1 := Units.val_one565566/-- **Characterisation of `IsSecondKind`.** A character of level `p^(m+1)` has `p`-power567order exactly when it is trivial on the `(p-1)`-torsion (`= μ_(p-1)`) of the unit group. -/568theorem isSecondKind_iff_kills_torsion (m : ℕ)569 (ψ : DirichletCharacter ℂ_[p] (p ^ (m + 1))) :570 IsSecondKind p m ψ ↔571 ∀ a : (ZMod (p ^ (m + 1)))ˣ, a ^ (p - 1) = 1 → ψ (a : ZMod (p ^ (m + 1))) = 1 := by572 constructor573 · intro hψ a ha574 have he : ψ (a : ZMod (p ^ (m + 1))) ^ (p ^ m) = 1 := by575 have h := congrArg576 (fun η : DirichletCharacter ℂ_[p] (p ^ (m + 1)) => η (a : ZMod (p ^ (m + 1)))) hψ577 simpa [MulChar.pow_apply_coe] using h578 have hf : ψ (a : ZMod (p ^ (m + 1))) ^ (p - 1) = 1 := by579 rw [← map_pow, ← Units.val_pow_eq_pow_val, ha, Units.val_one, map_one]580 exact field_eq_one_of_pow_coprime he hf (coprime_pow_sub_one m)581 · intro hT582 refine MulChar.ext fun a => ?_583 rw [MulChar.pow_apply_coe, MulChar.one_apply_coe]584 have hτ : ψ ((tamePartFinite m a : (ZMod (p ^ (m + 1)))ˣ) :585 ZMod (p ^ (m + 1))) = 1 := hT _ (tamePartFinite_pow_sub_one m a)586 have hsplit_units : a = tamePartFinite m a * principalPartFinite m a := by587 rw [tamePartFinite, mul_assoc, inv_mul_cancel, mul_one]588 rw [hsplit_units, Units.val_mul, map_mul, hτ, one_mul, ← map_pow,589 ← Units.val_pow_eq_pow_val,590 pow_pow_eq_one_of_isPrincipal _ (principalPartFinite_mem m a), Units.val_one, map_one]591592593/-! ## §5 The decomposition as a splitting594595The two maps `firstKindPart` and `secondKindPart` are the projections onto the two factors of596the decomposition; on the image of `combineFirstSecondKind` they act as the identity, so that597`combineFirstSecondKind` is a section of the product map. -/598599/-- The second-kind part of a lifted level-`p` character is trivial. -/600theorem secondKindPart_liftFirstKind (m : ℕ) (θ : DirichletCharacter ℂ_[p] p) :601 secondKindPart m (liftFirstKind m θ) = 1 := by602 have hunit : ∀ a : (ZMod (p ^ (m + 1)))ˣ,603 (secondKindPart m (liftFirstKind m θ)).toUnitHom a = 1 := by604 intro a605 rw [secondKindPart_apply_unit, liftFirstKind,606 DirichletCharacter.changeLevel_toUnitHom, MonoidHom.comp_apply,607 show ZMod.unitsMap (dvd_pow_self p (Nat.add_one_ne_zero m))608 (a ^ ((p - 1) * bezoutV (p := p) m)) = 1 by609 rw [map_pow, pow_mul, reduction_pow_sub_one, one_pow],610 map_one]611 refine MulChar.ext fun a => ?_612 rw [MulChar.one_apply_coe, ← MulChar.coe_toUnitHom (secondKindPart m (liftFirstKind m θ)) a,613 hunit a, Units.val_one]614615/-- The first-kind part of a lifted level-`p` character is that character. -/616theorem firstKindPart_liftFirstKind (m : ℕ) (θ : DirichletCharacter ℂ_[p] p) :617 firstKindPart m (liftFirstKind m θ) = liftFirstKind m θ := by618 have h : firstKindPart m (liftFirstKind m θ) * secondKindPart m (liftFirstKind m θ)619 = liftFirstKind m θ := firstKindPart_mul_secondKindPart m _620 rw [secondKindPart_liftFirstKind, mul_one] at h621 exact h622623/-- A second-kind character has trivial first-kind part. -/624theorem firstKindPart_eq_one_of_isSecondKind (m : ℕ)625 {ψ : DirichletCharacter ℂ_[p] (p ^ (m + 1))} (hψ : IsSecondKind p m ψ) :626 firstKindPart m ψ = 1 := by627 have hsplit := firstKindPart_mul_secondKindPart m ψ628 have hmem : firstKindPart m ψ = ψ * (secondKindPart m ψ)⁻¹ := by629 calc firstKindPart m ψ630 = (firstKindPart m ψ * secondKindPart m ψ) * (secondKindPart m ψ)⁻¹ :=631 (mul_inv_cancel_right _ _).symm632 _ = ψ * (secondKindPart m ψ)⁻¹ := by rw [hsplit]633 have hsecond : (ψ * (secondKindPart m ψ)⁻¹) ^ (p ^ m) = 1 := by634 rw [mul_pow, inv_pow, hψ, secondKindPart_pow_eq_one]635 simp636 have hfirst : (ψ * (secondKindPart m ψ)⁻¹) ^ (p - 1) = 1 := by637 rw [← hmem]638 exact firstKindPart_pow_eq_one m ψ639 rw [hmem]640 exact eq_one_of_pow_coprime (coprime_pow_sub_one m) hsecond hfirst641642/-- The second-kind part of a second-kind character is itself. -/643theorem secondKindPart_eq_self_of_isSecondKind (m : ℕ)644 {ψ : DirichletCharacter ℂ_[p] (p ^ (m + 1))} (hψ : IsSecondKind p m ψ) :645 secondKindPart m ψ = ψ := by646 have hsplit := firstKindPart_mul_secondKindPart m ψ647 rw [firstKindPart_eq_one_of_isSecondKind m hψ, one_mul] at hsplit648 exact hsplit649650651/-! ## §6 Comparison with the `p`-adic Teichmüller lift of `Thesis.Teich`652653The finite-level `Δ`-part `tamePartFinite` is constructed as a power of the unit; here it is654identified with the reduction modulo `p^(m+1)` of the `p`-adic Teichmüller lift655`Teich.teichLift`, i.e. with the `Δ`-part used in `Teich.padicUnitsMulEquiv`. This is the656finite/infinite compatibility of (3.9). -/657658theorem toZModPow_cast_eq_toZMod (m : ℕ) (x : ℤ_[p]) :659 ((PadicInt.toZModPow (m+1) x : ZMod (p ^ (m+1))).cast : ZMod p) = PadicInt.toZMod x := by660 haveI : NeZero (p ^ (m+1)) := ⟨pow_ne_zero _ hp.out.ne_zero⟩661 rw [ZMod.cast_eq_val]662 have hrepr : (PadicInt.toZModPow (m+1) x)663 = ((x.appr (m+1) : ℕ) : ZMod (p ^ (m+1))) := rfl664 have hval : (PadicInt.toZModPow (m+1) x).val = x.appr (m+1) := by665 rw [hrepr, ZMod.val_natCast, Nat.mod_eq_of_lt (PadicInt.appr_lt x (m+1))]666 rw [hval, ← ZMod.natCast_zmod_val (PadicInt.toZMod x), PadicInt.val_toZMod_eq_zmodRepr]667 refine PadicInt.zmod_congr_of_sub_mem_max_ideal x (x.appr (m+1)) (x.zmodRepr) ?_ ?_668 · rw [PadicInt.maximalIdeal_eq_span_p, Ideal.mem_span_singleton]669 have h := PadicInt.appr_spec (m+1) x670 rw [Ideal.mem_span_singleton] at h671 exact dvd_trans (dvd_pow_self (p : ℤ_[p]) (by omega)) h672 · exact PadicInt.sub_zmodRepr_mem (p := p) x673674/-- The reduction modulo `p^(m+1)` of the `p`-adic Teichmüller lift: the finite-level675`Δ`-part coming from `Thesis.Teich`. -/676noncomputable def teichUnitFinite (m : ℕ) (u : (ZMod p)ˣ) : (ZMod (p ^ (m+1)))ˣ :=677 Units.map (PadicInt.toZModPow (m+1)).toMonoidHom (Teich.teichLiftHom u)678679theorem teichUnitFinite_val (m : ℕ) (u : (ZMod p)ˣ) :680 ((teichUnitFinite m u : (ZMod (p ^ (m+1)))ˣ) : ZMod (p ^ (m+1)))681 = PadicInt.toZModPow (m+1) (Teich.teichLift u) := by682 rw [teichUnitFinite, Units.coe_map, Teich.teichLiftHom_apply]683 rfl684685theorem teichUnitFinite_pow_sub_one (m : ℕ) (u : (ZMod p)ˣ) :686 teichUnitFinite m u ^ (p - 1) = 1 := by687 rw [teichUnitFinite, ← map_pow, Teich.teichLiftHom_pow_card, map_one]688689theorem reduction_teichUnitFinite (m : ℕ) (u : (ZMod p)ˣ) :690 reduction m (teichUnitFinite m u) = u := by691 refine Units.ext ?_692 change ((ZMod.unitsMap (dvd_pow_self p (Nat.succ_ne_zero m)) (teichUnitFinite m u)) : ZMod p)693 = ((u : (ZMod p)ˣ) : ZMod p)694 rw [ZMod.unitsMap_val, teichUnitFinite_val, toZModPow_cast_eq_toZMod, Teich.teichLift_toZMod]695696/-- **The finite-level `Δ`-part is the reduction of the `p`-adic Teichmüller part** (3.9):697the tame part of a unit modulo `p^(m+1)` is the reduction of `Teich.teichLift` of its698residue modulo `p`. -/699theorem teichUnitFinite_eq_tamePartFinite (m : ℕ) (x : (ZMod (p ^ (m+1)))ˣ) :700 teichUnitFinite m (reduction m x) = tamePartFinite m x := by701 refine (existsUnique_tame_principal m x).unique ?_702 ⟨tamePartFinite_pow_sub_one m x, tamePartFinite_principal m x⟩703 exact ⟨teichUnitFinite_pow_sub_one m _,704 by rw [map_mul, map_inv, reduction_teichUnitFinite, inv_mul_cancel]⟩705706707/-! ## §7 The node-closing statement -/708709/-- **Thesis Definition 3.2 / equation (3.9) at finite level**, assembled.710711For an odd prime `p` and every `m`, the following hold at cyclotomic level `p^(m+1)`:7127131. every unit is uniquely a `(p-1)`-torsion unit times a principal unit (`Δ`/`Γ` splitting);7142. every Dirichlet character decomposes uniquely as `combineFirstSecondKind m θ ψ` with715 `IsSecondKind p m ψ`, and the product map is injective;7163. `IsSecondKind p m ψ` holds exactly for the characters trivial on the `(p-1)`-torsion;7174. the first-kind part can always be taken to be a power of the Teichmüller character;7185. the two projections are a retraction of `combineFirstSecondKind`. -/719theorem finite_delta_gamma (m : ℕ) :720 (∀ x : (ZMod (p ^ (m + 1)))ˣ,721 ∃! μ : (ZMod (p ^ (m + 1)))ˣ, μ ^ (p - 1) = 1 ∧ reduction m (μ⁻¹ * x) = 1) ∧722 (∀ χ : DirichletCharacter ℂ_[p] (p ^ (m + 1)),723 ∃! θψ : DirichletCharacter ℂ_[p] p × DirichletCharacter ℂ_[p] (p ^ (m + 1)),724 IsSecondKind p m θψ.2 ∧ χ = combineFirstSecondKind m θψ.1 θψ.2) ∧725 (∀ ψ : DirichletCharacter ℂ_[p] (p ^ (m + 1)),726 (IsSecondKind p m ψ ↔727 ∀ a : (ZMod (p ^ (m + 1)))ˣ, a ^ (p - 1) = 1 →728 ψ (a : ZMod (p ^ (m + 1))) = 1)) ∧729 (∀ χ : DirichletCharacter ℂ_[p] (p ^ (m + 1)),730 ∃ k : ℤ, ∃ ψ : DirichletCharacter ℂ_[p] (p ^ (m + 1)),731 IsSecondKind p m ψ ∧732 χ = combineFirstSecondKind m (Teich.teichmullerCharacter (p := p) ^ k) ψ) ∧733 (∀ θ : DirichletCharacter ℂ_[p] p,734 firstKindPart m (liftFirstKind m θ) = liftFirstKind m θ ∧735 secondKindPart m (liftFirstKind m θ) = 1) ∧736 (∀ x : (ZMod (p ^ (m + 1)))ˣ,737 teichUnitFinite m (reduction m x) = tamePartFinite m x) :=738 ⟨existsUnique_tame_principal m, existsUnique_combineFirstSecondKind m,739 isSecondKind_iff_kills_torsion m, exists_zpow_teichmuller_combine m,740 fun θ => ⟨firstKindPart_liftFirstKind m θ, secondKindPart_liftFirstKind m θ⟩,741 teichUnitFinite_eq_tamePartFinite m⟩742743744end FiniteDG745end Thesis