Primes congruent to `1` modulo `M ^ k` with logarithm in a prescribed window
Lib.Analytic.Primes.lean
Reading
Upstream documentation written by Claude
Let
4 ∣ Mand letAbe fixed. For largeWthere is a primep ≡ 1moduloM ^ kwithlog pin[U, U + W], uniformly for1 < k,M ^ k ≤ W ^ AandW ≤ U ≤ W ^ A(New.exists_prime_modEq_one_log_mem).The characters modulo
M ^ kwith trivial square come from the fixed modulusM ^ 2, so the zero-free region gives a disc about1without zeros, uniformly ink. Newman's contour argument on its boundary yields the prime.
Copyright 2026 Anthropic, PBC. Apache License 2.0 · Upstream notice.
Rest of upstream introduction
Independently, the first section proves n ≤ φ n * (2 * log n + 1) (New.le_totient_mul_log).
Notions from other files:
entireL χisL(s, χ), timess - 1ifχis principal;regularL χisL(s, χ), times(s - 1) / sifχis principal.
Relation to the literature
Known result: primes congruent to 1 modulo M ^ k with logarithm in a prescribed window. It is a
consequence of the Siegel–Walfisz theorem. Only one prime is found, in a long window, and only for
moduli that are powers of a fixed multiple of 4. Source: Montgomery and Vaughan, Multiplicative
Number Theory I, 2007, Cor. 11.19.
Declarations
theorem New.exists_prime_modEq_one_log_mem (M A : ℕ) [NeZero M] (hM : 4 ∣ M) : ∀ᶠ W : ℝ in atTop, ∀ k : ℕ, 1 < k → (M : ℝ) ^ k ≤ W ^ A → ∀ U : ℝ, U ∈ Set.Icc W (W ^ A) → ∃ p : ℕ, p.Prime ∧ p ≡ 1 [MOD M ^ k] ∧ Real.log p ∈ Set.Icc U (U + W)
Import route to Main
Lib.Analytic.Primes → New.Reduction.Data.Existence (pinned import) → New.Reduction.OneSidedBound (pinned import) → New.Main (pinned import) → Main (pinned import)