module public import TauCeti.NumberTheory.DirichletCharacter.GeneralizedBernoulli import Mathlib.Algebra.Order.Star.Rat import Mathlib.NumberTheory.BernoulliPolynomials import Mathlib.NumberTheory.Multiplicity import TauCeti.Algebra.BigOperators.Finset.Range import TauCeti.NumberTheory.Bernoulli.Polynomials import TauCeti.NumberTheory.DirichletCharacter.BernoulliBounds public import TauCeti.NumberTheory.DirichletCharacter.GroupDeterminant import TauCeti.NumberTheory.MulChar.Basic public import Lib.Speed /-! # A small nonzero integer in all Stickelberger ideals via Voronoi's congruence The analytic input to the bound for the odd part of Ш: one nonzero integer X of controlled size that, times c ^ (e + 1) - 1, lies in all the Stickelberger ideals for N and e. * `New.OddPart.IsStickelbergerBound`: the two properties required of X, as a structure. * `New.OddPart.exists_isStickelbergerBound`: such an X exists with X ≤ 2 ^ (N + e + 3) ^ 6, for e ≥ 1. The idea: Tau Ceti's Bernoulli group determinant `TauCeti.bernoulliGroupDet N (e + 1)` is a nonzero integer (`TauCeti.bernoulliGroupDet_ne_zero`), bounded in size (`TauCeti.abs_bernoulliGroupDet_le`), and divisible in `ℤ[ψ]` by `primorial (e + 2) * N * B_{e+1,ψ}` for every character `ψ` of parity `-(-1) ^ e` (`TauCeti.exists_mem_adjoin_bernoulliGroupDet_eq`). Voronoi's congruence (`New.OddPart.voronoi_congruence_bernoulli`) links the generalized Bernoulli numbers to the Stickelberger sums; it rests on a congruence for power sums along an arithmetic progression (`New.OddPart.sq_dvd_primorial_mul_sum_pow_sub`) proved using Tau Ceti's primorial-scaled Bernoulli values `TauCeti.primorialBernoulli` and homogenized Bernoulli polynomial expansion `TauCeti.pow_mul_bernoulli_eval_div`. ## Relation to the literature Known result: Voronoi's congruence for twisted power sums and the trivial zeros of Dirichlet L-functions. Here the congruence is twisted by a possibly imprimitive character and stated for power sums. One non-zero integer with an explicit size bound has the following property. For c ≡ 1 mod N, (c ^ (e + 1) - 1) X is congruent, modulo every m prime to c, to 2 w times the twisted Stickelberger sum, where w does not depend on m. This holds for every character ψ with ψ(-1) = -(-1) ^ e and values in a domain of characteristic 0. In addition, for every prime l, some c ≡ 1 mod N prime to l has (c ^ e - 1) (c ^ (e + 1) - 1) ∣ X. Source: K. Ireland, M. Rosen, A Classical Introduction to Modern Number Theory, 2nd ed. 1990; for the untwisted statement also M. Eberl, Kummer's congruence, Archive of Formal Proofs 2024. -/ @[expose] public section open Finset DirichletCharacter Nat Polynomial NeZero ZMod lemma Nat.ModEq.coprime_of_modEq_one {a b : ℕ} (h : a ≡ 1 [MOD b]) : a.Coprime b := by simpa using h.gcd_eq namespace New.OddPart variable (N e : ℕ) [NeZero N] /-- For `N ≥ 1` and `e : ℕ`, the scaled Bernoulli polynomial `primorial (e + 2) * N ^ (e + 2) * (B_{e+2}(X / N) - B_{e+2}(0))` has integer coefficients. -/ private lemma exists_map_eq_primorial_mul_bernoulli_sub_comp : ∃ p : ℤ[X], p.map (Int.castRingHom ℚ) = C ((primorial (e + 2) : ℚ) * N ^ (e + 2)) * (Polynomial.bernoulli (e + 2) - C (_root_.bernoulli (e + 2))).comp (C (N : ℚ)⁻¹ * X) := by have hN : (N : ℚ) ≠ 0 := Nat.cast_ne_zero.mpr (ne N) choose! c hc using fun i (hi : i < e + 2) ↦ TauCeti.exists_intCast_eq_primorial_mul_bernoulli (k := e + 1) (Nat.lt_succ_iff.1 hi) refine ⟨∑ i ∈ range (e + 2), C (((e + 2).choose i : ℤ) * c i * (N : ℤ) ^ i) * X ^ (e + 2 - i), Polynomial.funext fun t ↦ ?_⟩ have h_div := TauCeti.pow_mul_bernoulli_eval_div hN (e + 2) t rw [sum_range_succ, choose_self, Nat.sub_self, pow_zero, Nat.cast_one, one_mul, mul_one] at h_div have h_sub : (primorial (e + 2) : ℚ) * N ^ (e + 2) * ((Polynomial.bernoulli (e + 2)).eval (t / N) - _root_.bernoulli (e + 2)) = (primorial (e + 2) : ℚ) * ∑ i ∈ range (e + 2), ((e + 2).choose i : ℚ) * _root_.bernoulli i * t ^ (e + 2 - i) * N ^ i := by linear_combination (primorial (e + 2) : ℚ) * h_div simp only [Polynomial.map_sum, Polynomial.map_mul, Polynomial.map_pow, map_C, map_X, eval_finsetSum, eval_mul, eval_C, eval_pow, eval_X, eval_comp, eval_sub, div_eq_inv_mul] at h_sub ⊢ rw [h_sub, mul_sum] refine sum_congr rfl fun i hi ↦ ?_ simp only [map_mul, map_natCast, map_pow, eq_intCast, hc i (mem_range.1 hi)] ring /-- Power sums along an arithmetic progression, scaled by `P_{e+2} * (e + 2)`, where `P_{e+2} = primorial (e + 2)`. For `a : ZMod N`, let `β = TauCeti.primorialBernoulli N (e + 1) a = P_{e+2} N ^ (e + 1) B_{e+1}(a / N)`. Then for every `u`, `P_{e+2} (e + 2) ∑_{i simp | succ u ih => rw [Nat.cast_succ, _root_.add_one_mul, ← add_assoc, h_step, ih, sum_range_succ] ring have hp_deriv : p.derivative.eval (a.val : ℤ) = (e + 2) * TauCeti.primorialBernoulli N (e + 1) a := by apply Int.cast_injective (α := ℚ) rw [h_eval, ← derivative_map, hp_map, derivative_C_mul] push_cast [TauCeti.intCast_primorialBernoulli] simp [derivative_comp, derivative_bernoulli_add_one, div_eq_inv_mul] field obtain ⟨k, hk⟩ := p.exists_mul_sq_add_linear_part_eq_eval_add a.val (u * N) rw [hp_deriv] at hk refine ⟨k * N, mul_left_cancel₀ (Nat.cast_ne_zero.mpr (ne N) : (N : ℤ) ≠ 0) ?_⟩ linear_combination -h_sum - hk /-- The Stickelberger property of `X` for `N` and `e`: a divisibility for each prime, and a congruence for the Stickelberger sums. -/ structure IsStickelbergerBound (X : ℕ) : Prop where /-- For every prime `l`, some `c ≡ 1 mod N` prime to `l` has `(c ^ e - 1) (c ^ (e + 1) - 1) ∣ X`. -/ exists_modEq_one_coprime_dvd {l : ℕ} (hl : l.Prime) : ∃ c : ℕ, c ≡ 1 [MOD N] ∧ l.Coprime c ∧ (c ^ e - 1) * (c ^ (e + 1) - 1) ∣ X /-- Let `c ≡ 1 mod N`, and let `ψ` be a character mod `N` with values in a domain `O` of characteristic `0` and `ψ(-1) = -(-1) ^ e`. Then some `w` in `O`, the same for every `m`, has `(c ^ (e + 1) - 1) X ≡ 2 w ∑ ⌊c a / (N m)⌋ a ^ e ψ(a)` modulo `m` for all `m ≥ 1` prime to `c`, the sum over `0 ≤ a < N m`. -/ exists_natCast_dvd_sub_mul_sum {c : ℕ} (hc : c ≡ 1 [MOD N]) (O : Type) [CommRing O] [IsDomain O] [CharZero O] (ψ : DirichletCharacter O N) (hψ : ψ (-1) = -(-1) ^ e) : ∃ w : O, ∀ (m : ℕ) [NeZero m], m.Coprime c → (m : O) ∣ (c ^ (e + 1) - 1) * X - 2 * w * ∑ a ∈ range (N * m), ↑(c * a / (N * m)) * (a ^ e * ψ a) omit [NeZero N] in /-- Voronoi's congruence, twisted by a Dirichlet character χ mod N. For f = N m and c ≡ 1 mod N prime to m, (c ^ (e + 1) - 1) ∑ χ(t) t ^ (e + 1) ≡ (e + 1) c ^ e f ∑ ⌊c t / f⌋ t ^ e χ(t) modulo f², both sums over 0 ≤ t < f. -/ lemma voronoi_congruence {O : Type*} [CommRing O] (χ : DirichletCharacter O N) {f m c : ℕ} [NeZero f] (hf : f = N * m) (hcm : m.Coprime c) (hcN : c ≡ 1 [MOD N]) : (f : O) ^ 2 ∣ (c ^ (e + 1) - 1) * ∑ t : ZMod f, χ t.val * t.val ^ (e + 1) - (e + 1) * c ^ e * f * ∑ t : ZMod f, ↑(c * t.val / f) * (χ t.val * t.val ^ e) := by -- Substitute `t ↦ c t` in the copy of the sum `∑ χ(t) t^(e+1)` without the factor `c^(e+1)`, -- and compare term by term. have h_c_coprime : c.Coprime f := by simpa [hf] using hcN.coprime_of_modEq_one.mul_right hcm.symm have h_c_eq_one : (c : ZMod N) = 1 := mod_cast (natCast_eq_natCast_iff c 1 N).mpr hcN rw [sub_one_mul, mul_sum, sub_sub, dvd_sub_comm, ← Equiv.sum_comp (unitOfCoprime c h_c_coprime).mulLeft, mul_sum, ← sum_add_distrib, ← sum_sub_distrib] refine dvd_sum fun t _ ↦ ?_ -- The representative of `c t` is `c t - f k`, with `k = ⌊c t / f⌋`. Expand its power to first -- order in `f k`. set k : ℕ := c * t.val / f with hk have h_binomial : ((f : O) * -k) ^ 2 ∣ (c * t.val + f * -k) ^ (e + 1) - (c * t.val) ^ e * (f * -k) * (e + 1) - (c * t.val) ^ (e + 1) := by simpa using sq_dvd_add_pow_sub_sub ((f : O) * -k) (c * t.val) (e + 1) refine .trans ⟨(k : O) ^ 2, by ring⟩ (h_binomial.trans ⟨χ t.val, ?_⟩) -- `χ` has the same value at `c t - f k` and at `t`, as `N ∣ f` and `c ≡ 1`; the rest is `ring`. simp [val_mul, (c * _).mod_def, mul_div_le, k, hf, h_c_eq_one, natCast_self] ring omit [NeZero N] in /-- A sum over `0 ≤ t < N K` equals the double sum over `t = a + i N` with `0 ≤ a < N` and `0 ≤ i < K`. -/ lemma sum_range_mul_eq_sum_sum {α : Type*} [AddCommMonoid α] (F : ℕ → α) (K : ℕ) : ∑ t ∈ range (N * K), F t = ∑ a ∈ range N, ∑ i ∈ range K, F (a + i * N) := by rw [Finset.sum_range_mul_eq_sum_sum, Finset.sum_comm] simp only [Nat.add_comm, Nat.mul_comm] /-- Voronoi's congruence for the Stickelberger sums, scaled by `P_{e+2} * (e + 2)`, where `P_{e+2} = primorial (e + 2)`. Let `χ` be a character mod `N` with values in a commutative ring without additive torsion and let `c ≡ 1 mod N` be prime to `m ≥ 1`. Then `P_{e+2} (e + 2) (e + 1) N c ^ e ∑ ⌊c a / (N m)⌋ a ^ e χ(a) ≡ (c ^ (e + 1) - 1) (e + 2) ∑ χ(a) β a` modulo `m`, where `β a = TauCeti.primorialBernoulli N (e + 1) a`. -/ theorem voronoi_congruence_bernoulli {O : Type*} [CommRing O] [HasUniqueDiv O] (χ : DirichletCharacter O N) {m c : ℕ} [NeZero m] (hcm : m.Coprime c) (hcN : c ≡ 1 [MOD N]) : (m : O) ∣ primorial (e + 2) * (e + 2) * (e + 1) * N * c ^ e * ∑ a ∈ range (N * m), ↑(c * a / (N * m)) * (a ^ e * χ a) - (c ^ (e + 1) - 1) * ((e + 2) * ∑ a : ZMod N, χ a * TauCeti.primorialBernoulli N (e + 1) a) := by -- Multiply the congruence for power sums modulo `(N m)²` by `P_{e+2} (e + 2)`, replace -- `P_{e+2} (e + 2) ∑ χ(t) t ^ (e + 1)` by `m (e + 2) ∑ χ(a) β a` modulo `m²`, and divide by `m`. have h_range : ∀ (f : ℕ) [NeZero f] (F : ℕ → O), (range f).sum F = ∑ a : ZMod f, F a.val | _ + 1, _ => sum_range have h_class (a : ZMod N) : (m : O) ^ 2 ∣ χ a * (primorial (e + 2) * (e + 2) * ∑ i ∈ range m, ((a.val : O) + i * N) ^ (e + 1) - (e + 2) * TauCeti.primorialBernoulli N (e + 1) a * m) := by have h := _root_.map_dvd (Int.castRingHom O) (sq_dvd_primorial_mul_sum_pow_sub N e a m) exact .mul_left (by simpa using h) _ have h_split : primorial (e + 2) * (e + 2) * ∑ t ∈ range (N * m), χ t * (t : O) ^ (e + 1) - m * ((e + 2) * ∑ a : ZMod N, χ a * TauCeti.primorialBernoulli N (e + 1) a) = ∑ a : ZMod N, χ a * (primorial (e + 2) * (e + 2) * ∑ i ∈ range m, ((a.val : O) + i * N) ^ (e + 1) - (e + 2) * TauCeti.primorialBernoulli N (e + 1) a * m) := by rw [sum_range_mul_eq_sum_sum, h_range N, mul_sum, mul_sum, mul_sum, ← sum_sub_distrib] refine sum_congr rfl fun a _ ↦ ?_ simp only [Nat.cast_add, Nat.cast_mul, natCast_self, mul_zero, add_zero, natCast_zmod_val, ← mul_sum] ring obtain ⟨w, hw⟩ : (m : O) ^ 2 ∣ primorial (e + 2) * (e + 2) * ∑ t ∈ range (N * m), χ t * (t : O) ^ (e + 1) - m * ((e + 2) * ∑ a : ZMod N, χ a * TauCeti.primorialBernoulli N (e + 1) a) := by simpa only [h_split] using dvd_sum fun a _ ↦ h_class a obtain ⟨v, hv⟩ : ((N * m : ℕ) : O) ^ 2 ∣ (c ^ (e + 1) - 1) * ∑ t : ZMod (N * m), χ t.val * t.val ^ (e + 1) - (e + 1) * c ^ e * (N * m : ℕ) * ∑ t : ZMod (N * m), ↑(c * t.val / (N * m)) * (χ t.val * t.val ^ e) := voronoi_congruence N e χ (f := N * m) rfl hcm hcN refine ⟨(c ^ (e + 1) - 1) * w - primorial (e + 2) * (e + 2) * N ^ 2 * v, nsmul_right_injective (ne m) ?_⟩ simp only [h_range, nsmul_eq_mul, Nat.cast_mul, mul_comm _ (χ _)] at hw hv ⊢ linear_combination (c ^ (e + 1) - 1) * hw - (primorial (e + 2) * (e + 2)) * hv omit [NeZero N] in /-- For a prime `l`, one of `c = 1 + N` and `c = 1 + 2 N` is prime to `l`. This `c` is `≡ 1 mod N`, and `(c ^ e - 1) (c ^ (e + 1) - 1)` divides, for every `Y`, `((1 + N) ^ e - 1) ((1 + N) ^ (e + 1) - 1) ((1 + 2 N) ^ e - 1) ((1 + 2 N) ^ (e + 1) - 1) Y`. -/ lemma exists_modEq_one_coprime_dvd_of_prime {l : ℕ} (hl : l.Prime) (Y : ℕ) : ∃ c : ℕ, c ≡ 1 [MOD N] ∧ l.Coprime c ∧ (c ^ e - 1) * (c ^ (e + 1) - 1) ∣ ((1 + N) ^ e - 1) * ((1 + N) ^ (e + 1) - 1) * (((1 + N + N) ^ e - 1) * ((1 + N + N) ^ (e + 1) - 1) * Y) := by -- `l` does not divide both `1 + N` and `1 + 2 N`. obtain hl_cop | hl_dvd := coprime_or_dvd_of_prime hl (1 + N) · exact ⟨1 + N, add_modEq_right, hl_cop, dvd_mul_right _ _⟩ · have h_cop : l.Coprime (1 + N + N) := .of_dvd_left hl_dvd (by simp) exact ⟨1 + N + N, by simp, h_cop, .mul_left (dvd_mul_right _ _) _⟩ /-- Tau Ceti's bound on the Bernoulli group determinant, phrased as a bound on its absolute value as a natural number: `(TauCeti.bernoulliGroupDet N (e + 1)).natAbs ≤ (2 ^ 5 * N ^ (e + 2) * (e + 1)!) ^ φ N`. -/ private lemma natAbs_bernoulliGroupDet_le (N : ℕ) [NeZero N] (e : ℕ) (he : e ≠ 0) : (TauCeti.bernoulliGroupDet N (e + 1)).natAbs ≤ (2 ^ 5 * N ^ (e + 2) * (e + 1)!) ^ φ N := by -- `TauCeti.abs_bernoulliGroupDet_le` bounds the norm, which on `ℤ` is the absolute value. have h := TauCeti.abs_bernoulliGroupDet_le (M := N) (k := e + 1) (by omega) exact_mod_cast (show (TauCeti.bernoulliGroupDet N (e + 1)).natAbs = |TauCeti.bernoulliGroupDet N (e + 1)| from Int.natCast_natAbs _).symm ▸ h /-- The core factor `2 * (e + 2) * (TauCeti.bernoulliGroupDet N (e + 1)).natAbs` of the Stickelberger witness for `N` and `e`. -/ private noncomputable def stickelbergerCore : ℕ := 2 * (e + 2) * (TauCeti.bernoulliGroupDet N (e + 1)).natAbs omit [NeZero N] in /-- The Stickelberger witness `((1 + N) ^ e - 1) ((1 + N) ^ (e + 1) - 1) ((1 + 2 N) ^ e - 1) ((1 + 2 N) ^ (e + 1) - 1) Y` built from a natural number `Y`. -/ private def stickelbergerWitness (Y : ℕ) : ℕ := ((1 + N) ^ e - 1) * ((1 + N) ^ (e + 1) - 1) * (((1 + N + N) ^ e - 1) * ((1 + N + N) ^ (e + 1) - 1) * Y) /-- For `N, e ≥ 1`, the Stickelberger witness `stickelbergerWitness N e (stickelbergerCore N e)` is at most `2 ^ (N + e + 3) ^ 6`. -/ private lemma stickelbergerWitness_le (he : e ≠ 0) : stickelbergerWitness N e (stickelbergerCore N e) ≤ 2 ^ (N + e + 3) ^ 6 := by -- Bound `e + 2 ≤ (e + 2)!` and the determinant via `TauCeti.abs_bernoulliGroupDet_le`. have h_le : e + 2 ≤ (e + 2)! := Nat.self_le_factorial (e + 2) have hdet_le := natAbs_bernoulliGroupDet_le N e he have hY : stickelbergerCore N e ≤ 2 * (e + 2)! * (2 ^ 5 * N ^ (e + 2) * (e + 1)!) ^ φ N := by dsimp only [stickelbergerCore] gcongr dsimp only [stickelbergerWitness] grw [hY] trans · apply_rules only [(sub_le ..).trans, (factorial_le_pow _).trans, pow_le_pow_left', mul_le_mul', Nat.lt_two_pow_self.le] · simp only [← pow_mul, ← pow_add] refine Nat.pow_le_pow_right two_pos ?_ grw [totient_le] lia /-- For `N, e ≥ 1` and a Dirichlet character `χ` mod `N` with `χ (-1) = -(-1) ^ e` valued in an integral domain `O` of characteristic `0`, the twisted primorial Bernoulli sum `∑ a : ZMod N, χ a * TauCeti.primorialBernoulli N (e + 1) a` divides `TauCeti.bernoulliGroupDet N (e + 1)` in `O`. -/ private lemma sum_mul_primorialBernoulli_dvd_bernoulliGroupDet (he : e ≠ 0) {O : Type*} [CommRing O] [IsDomain O] [CharZero O] (χ : DirichletCharacter O N) (hχ : χ (-1) = -(-1) ^ e) : ∑ a : ZMod N, χ a * (TauCeti.primorialBernoulli N (e + 1) a : O) ∣ (TauCeti.bernoulliGroupDet N (e + 1) : O) := by -- In `K = FractionRing O`, `bernoulliGroupDet N (e + 1) = P_{e+2} * N * B_{e+1, χ} * x` -- for some `x ∈ ℤ[χ]`, hence `x = algebraMap O K u₀` for some `u₀ : O`. let K := FractionRing O let ι : O →+* K := algebraMap O K have hι_inj : Function.Injective ι := IsFractionRing.injective O K have hχ_K : (χ.ringHomComp ι) (-1) = (-1) ^ (e + 1) := by rw [MulChar.ringHomComp_apply, hχ, map_neg, map_pow, map_neg, map_one, pow_succ] ring obtain ⟨x, hx_mem, hx_eq⟩ := TauCeti.exists_mem_adjoin_bernoulliGroupDet_eq (M := N) (k := e + 1) (by omega) (χ.ringHomComp ι) hχ_K have hx_range : x ∈ ι.range := by let : Algebra ℤ K := Ring.toIntAlgebra K refine Algebra.adjoin_le (S := ι.toIntAlgHom.range) ?_ hx_mem rintro _ ⟨a, rfl⟩ exact ⟨χ a, rfl⟩ obtain ⟨u₀, hu₀⟩ := hx_range refine ⟨u₀, hι_inj ?_⟩ let χ_K : DirichletCharacter K N := χ.ringHomComp ι have hsum : ∑ a : ZMod N, χ_K a * (TauCeti.primorialBernoulli N (e + 1) a : K) = primorial (e + 2) * N * χ_K.generalizedBernoulli (e + 1) := by rw [MulChar.sum_mul_eq_sum_units] exact TauCeti.sum_units_mul_primorialBernoulli (R := K) (k := e + 1) (by omega) χ_K simp only [χ_K, map_mul, map_sum, map_intCast, MulChar.ringHomComp_apply] at hsum ⊢ rw [hsum, hx_eq, ← hu₀] /-- In any commutative ring `O`, `2 * ((e + 2) * TauCeti.bernoulliGroupDet N (e + 1))` divides `stickelbergerWitness N e (stickelbergerCore N e)`. -/ private lemma two_mul_bernoulliGroupDet_dvd_stickelbergerWitness {O : Type*} [CommRing O] : 2 * (((e + 2 : ℕ) : O) * (TauCeti.bernoulliGroupDet N (e + 1) : O)) ∣ (stickelbergerWitness N e (stickelbergerCore N e) : O) := by have h_abs : (TauCeti.bernoulliGroupDet N (e + 1) : O) ∣ ((TauCeti.bernoulliGroupDet N (e + 1)).natAbs : O) := by simpa only [eq_intCast, Int.cast_natCast] using _root_.map_dvd (Int.castRingHom O) (Int.dvd_natAbs.2 dvd_rfl) have h_Y : 2 * (((e + 2 : ℕ) : O) * (TauCeti.bernoulliGroupDet N (e + 1) : O)) ∣ (stickelbergerCore N e : O) := by dsimp only [stickelbergerCore] push_cast rw [mul_assoc] exact mul_dvd_mul_left 2 (mul_dvd_mul_left _ h_abs) -- The core is the last factor of the witness. simpa only [stickelbergerWitness, Nat.cast_mul] using (h_Y.mul_left _).mul_left _ /-- For `N, e ≥ 1`, `c ≡ 1 [MOD N]`, and a Dirichlet character `χ` mod `N` with `χ (-1) = -(-1) ^ e` valued in an integral domain `O` of characteristic `0`, there is `w` in `O` such that `(c ^ (e + 1) - 1) * X ≡ 2 * w * ∑ a ∈ range (N * m), ⌊c * a / (N * m)⌋ * (a ^ e * χ a)` modulo `m` for every `m ≥ 1` coprime to `c`, where `X = stickelbergerWitness N e (stickelbergerCore N e)`. -/ private lemma exists_natCast_dvd_stickelbergerWitness_sub_mul_sum (he : e ≠ 0) {c : ℕ} (hc_mod : c ≡ 1 [MOD N]) {O : Type*} [CommRing O] [IsDomain O] [CharZero O] (χ : DirichletCharacter O N) (hχ : χ (-1) = -(-1) ^ e) : ∃ w : O, ∀ (m : ℕ) [NeZero m], m.Coprime c → (m : O) ∣ (c ^ (e + 1) - 1) * (stickelbergerWitness N e (stickelbergerCore N e) : O) - 2 * w * ∑ a ∈ range (N * m), ↑(c * a / (N * m)) * (a ^ e * χ a) := by have h_sum_dvd : ((e + 2 : ℕ) : O) * ∑ a : ZMod N, χ a * (TauCeti.primorialBernoulli N (e + 1) a : O) ∣ (((e + 2 : ℕ) : O) * TauCeti.bernoulliGroupDet N (e + 1)) := mul_dvd_mul_left _ (sum_mul_primorialBernoulli_dvd_bernoulliGroupDet N e he χ hχ) have h_dvd_X : 2 * (((e + 2 : ℕ) : O) * ∑ a : ZMod N, χ a * (TauCeti.primorialBernoulli N (e + 1) a : O)) ∣ (stickelbergerWitness N e (stickelbergerCore N e) : O) := (mul_dvd_mul_left 2 h_sum_dvd).trans (two_mul_bernoulliGroupDet_dvd_stickelbergerWitness N e) obtain ⟨u, hu⟩ := h_dvd_X refine ⟨u * (primorial (e + 2) * (e + 2) * (e + 1) * N * c ^ e), fun m _ hm ↦ ?_⟩ obtain ⟨v, hv⟩ : (m : O) ∣ primorial (e + 2) * (e + 2) * (e + 1) * N * c ^ e * ∑ a ∈ range (N * m), ↑(c * a / (N * m)) * (a ^ e * χ a) - (c ^ (e + 1) - 1) * ((e + 2) * ∑ a : ZMod N, χ a * TauCeti.primorialBernoulli N (e + 1) a) := voronoi_congruence_bernoulli N e χ hm hc_mod refine ⟨-2 * u * v, ?_⟩ rw [hu] push_cast at hv ⊢ linear_combination -2 * u * hv /-- For `N, e ≥ 1` there is an integer `1 ≤ X ≤ 2^{(N+e+3)^6}` with the Stickelberger property `New.OddPart.IsStickelbergerBound N e X`, namely a divisibility condition for each prime together with a congruence for the Stickelberger sums. It comes from Tau Ceti's Bernoulli group determinant `TauCeti.bernoulliGroupDet N (e + 1)`, whose nonvanishing, size bound, and divisibility by generalized Bernoulli numbers link to the Stickelberger sums through Voronoi's congruence. This is a finite-level analogue of the interpolation property of Kubota–Leopoldt ℓ-adic L-functions at negative integers; no ℓ-adic L-function appears, and the interpolation formula itself is not asserted. -/ lemma exists_isStickelbergerBound (he : e ≠ 0) : ∃ X ≠ (0 : ℕ), X ≤ 2 ^ (N + e + 3) ^ 6 ∧ IsStickelbergerBound N e X := by have hN : N ≠ 0 := ne N have hdet_ne : TauCeti.bernoulliGroupDet N (e + 1) ≠ 0 := TauCeti.bernoulliGroupDet_ne_zero N (by omega) let Y : ℕ := stickelbergerCore N e let X : ℕ := stickelbergerWitness N e Y refine ⟨X, ?_, stickelbergerWitness_le N e he, fun {l} hl ↦ exists_modEq_one_coprime_dvd_of_prime N e hl Y, fun hc_mod _ _ _ _ χ hχ ↦ exists_natCast_dvd_stickelbergerWitness_sub_mul_sum N e he hc_mod χ hχ⟩ simpa [X, Y, stickelbergerWitness, stickelbergerCore, tsub_eq_zero_iff_le, add_assoc, hN, he] using hdet_ne end New.OddPart