Bateman--Horn data: Bunyakovsky and Schinzel conditions, , the partial Euler product and the counting function
DefinitionFCP_BatemanHornThis file fixes the data entering the Bateman--Horn conjecture for a finite family of integer polynomials.
A single polynomial satisfies the Bunyakovsky condition when its leading coefficient is positive, its degree is at least , and it is irreducible in .
A finite family satisfies the Schinzel condition when for every prime there is an integer with ; this rules out families whose product is divisible by a fixed prime at every integer.
For a prime , is the number of residue classes at which at least one vanishes, , and the truncated Euler product is
whose limit as is the Bateman--Horn constant (the product is only conditionally convergent, so the order of the factors matters).
Finally counts the natural numbers at which every takes a value of prime absolute value.
import Mathlib
namespace FCP.BatemanHorn
open Polynomial
/-- The Bunyakovsky condition on a single integer polynomial `f`: its leading coefficient is
positive, its degree is at least one, and it is irreducible over `ℤ`. -/
def BunyakovskyCondition (f : ℤ[X]) : Prop :=
0 < f.leadingCoeff ∧ 1 ≤ f.natDegree ∧ Irreducible f
/-- The Schinzel condition on a finite family of integer polynomials: for every prime `p` there
is an integer `n` with `p ∤ ∏ f ∈ polys, f(n)`. -/
def SchinzelCondition (polys : Finset ℤ[X]) : Prop :=
∀ p : ℕ, p.Prime → ∃ n : ℤ, ¬ ((p : ℤ) ∣ ∏ f ∈ polys, f.eval n)
/-- `omegaP polys p` is the number of residue classes modulo `p` at which at least one of the
polynomials in `polys` vanishes. -/
noncomputable def omegaP (polys : Finset ℤ[X]) (p : ℕ) : ℕ :=
{n : ZMod p | ∃ f ∈ polys, (f.map (Int.castRingHom (ZMod p))).eval n = 0}.ncard
/-- The product of the degrees of the polynomials in `polys`. -/
def degreesProduct (polys : Finset ℤ[X]) : ℕ := ∏ f ∈ polys, f.natDegree
/-- The partial Euler product defining the Bateman-Horn constant, truncated at the primes `p < N`:
`∏_{p < N} (1 - 1/p)^(-k) (1 - ω_p/p)`, where `k` is the number of polynomials. -/
noncomputable def partialProduct (polys : Finset ℤ[X]) (N : ℕ) : ℝ :=
∏ p ∈ Nat.primesBelow N,
(1 - (1 : ℝ) / p) ^ (-polys.card : ℤ) * (1 - (omegaP polys p : ℝ) / p)
/-- `countSimultaneousPrimes polys x` is the number of natural numbers `n ≤ x` such that every
polynomial in `polys` takes a value of prime absolute value at `n`. -/
noncomputable def countSimultaneousPrimes (polys : Finset ℤ[X]) (x : ℝ) : ℕ :=
((Finset.range (⌊x⌋₊ + 1)).filter
(fun n : ℕ => ∀ f ∈ polys, (f.eval (n : ℤ)).natAbs.Prime)).card
end FCP.BatemanHornRead-back
What the Lean code literally says, in plain math · Aristotle by Harmonic (non-blind: same agent that drafted the statements)
Non-blind read-back. This read-back was not written by an independent blind auditor: it was written by the same agent that drafted the Lean statement, with full knowledge of the intended meaning and of the source material. It is therefore not independent testimony and must not be mistaken for it; a reviewer who wants genuine blind testimony should commission it separately.
This bundle introduces six notions about a finite set of polynomials with integer coefficients.
-
Bunyakovsky condition on a single : the conjunction of three assertions — the leading coefficient of is strictly positive, the degree of (the natural-number degree, which is for the zero polynomial) is at least , and is irreducible as an element of the ring (so in particular is neither zero nor a unit, and any factorization has a unit factor).
-
Schinzel condition on the finite set : for every natural number that is prime there exists an integer such that does not divide , the product of the values at of all members of . For the empty set this product is , so the condition holds vacuously.
-
: the cardinality (as a set-cardinal, when infinite) of the set of elements of for which some , reduced modulo coefficientwise, evaluates to at . Here ranges over all natural numbers, not just primes; for the ring is and for it is the zero ring.
-
, the product of the natural-number degrees, equal to for empty.
-
, a finite real product over the primes strictly below the natural number ; the exponent is an integer exponent, and real division by uses the real coercion of .
-
for a real : the number of natural numbers with such that for every the absolute value of the integer is a prime number. For the floor is , so only is tested.
Confirmed by the mission captain (proposal self-audit).