Prime counts in a half-open interval
DefinitionErdos462PrimeCountanalytic-number-theoryerdos-462semiprimesshort-intervals
For real , let be the number of primes with . The count is viewed as a real number for integration. For and this equals .
Definition code
import Mathlib.NumberTheory.LSeries.RiemannZeta import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import Mathlib.NumberTheory.Chebyshev namespace Erdos462RH noncomputable def primeCountWindow (s h : ℝ) : ℝ := (((Finset.Ioc ⌊s⌋₊ ⌊s+h⌋₊).filter Nat.Prime).card : ℝ) end Erdos462RH
Source
Adam Henriksson, Balanced semiprimes in short intervals under the Riemann hypothesis. Lemma 3.1.
Read-back
What the Lean code literally says, in plain math · OpenAI Codex (GPT-6 family, independent agent)
For any real numbers and , let denote the natural-number floor of a real number . The value is the number of natural primes satisfying , regarded as a real number. Equivalently, it counts primes in the real interval , excluding the left endpoint and including the right endpoint. The definition allows either argument to be negative or zero. Its value is zero whenever the interval contains no prime, in particular whenever .