import Mathlib set_option autoImplicit false open Filter Ideal NumberField NumberField.InfinitePlace NumberField.Units Topology nonZeroDivisors open scoped Real namespace FrobeniusDensity variable (K : Type*) [Field K] [NumberField K] noncomputable section def classZetaCoeff (C : ClassGroup (๐“ž K)) (n : โ„•) : โ„• := Nat.card {I : (Ideal (๐“ž K))โฐ // absNorm (I : Ideal (๐“ž K)) = n โˆง ClassGroup.mk0 I = C} def classZeta (C : ClassGroup (๐“ž K)) (s : โ„‚) : โ„‚ := LSeries (fun n โ†ฆ classZetaCoeff K C n) s def classResidue : โ„ := (2 ^ nrRealPlaces K * (2 * ฯ€) ^ nrComplexPlaces K * regulator K) / (torsionOrder K * Real.sqrt |discr K|) def classGroupLSeries (ฯ‡ : ClassGroup (๐“ž K) โ†’* โ„‚) (s : โ„‚) : โ„‚ := โˆ‘ C : ClassGroup (๐“ž K), ฯ‡ C * classZeta K C s def LSeriesInheritsPole (ฯ‡ : ClassGroup (๐“ž K) โ†’* โ„‚) : Prop := โˆƒ c : โ„, 0 < c โˆง โˆ€แถ  s : โ„ in ๐“[>] 1, c โ‰ค โ€–(fun s : โ„ โ†ฆ (s - 1) * classGroupLSeries K ฯ‡ s) sโ€– end end FrobeniusDensity