Skip to content

Commit 22d87e7

Browse files
Fix: Bateman-Horn Conjecture (google-deepmind#161)
Thanks to Will Sawin for pointing out that both Claude and I missed division by the product of degrees in the constant! --------- Co-authored-by: Paul Lezeau <[email protected]>
1 parent 4b5796d commit 22d87e7

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

FormalConjectures/Wikipedia/BatemanHornConjecture.lean

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,30 @@ https://claude.ai/share/a02c2bba-7f5f-435c-ab0e-58eb5ddc0545
2929

3030
open Polynomial Asymptotics Filter Topology
3131

32-
/-- Definition of irreducible polynomial with positive leading coefficient -/
32+
/-- Definition of irreducible, non-constant polynomial with positive leading coefficient -/
3333
def IsIrreducibleWithPosLeading (f : ℤ[X]) : Prop :=
34-
Irreducible f ∧ 0 < f.leadingCoeff
34+
Irreducible f ∧ 0 < f.leadingCoeff0 < f.natDegree
3535

36-
/-- The compatibility condition for a finite set `S` of polynomials in the Bateman-Horn conjecture.
36+
/-- The compatibility condition for a finite set `S` of polynomials in the Bateman-Horn conjecture.
3737
This states that for all primes `p`, there exists an `n` such that `∏ f ∈ S, f.eval n` is non-zero modulo `p`. -/
3838
def SatisfiesCompatibilityCondition (polys : Finset ℤ[X]) : Prop :=
3939
∀ p : ℕ, Nat.Prime p → ∃ n : ℤ, ¬↑p ∣ (polys.prod id).eval n
4040

4141
/-- `OmegaP S p` counts the number of residue classes mod `p` where at least one polynomial in `S` vanishes. -/
4242
noncomputable def OmegaP (polys : Finset ℤ[X]) (p : ℕ) : ℕ :=
43-
{n : ZMod p | ∃ f ∈ polys, (f.map (Int.castRingHom (ZMod p))).eval n = 0}.ncard
43+
{n : ZMod p | ∃ f ∈ polys, (f.map (Int.castRingHom (ZMod p))).eval n = 0}.ncard
4444

45-
/-- The Bateman-Horn constant of a set of polynomials `S`. This is defined as the infinite product over all primes:
46-
$$\prod_p (1 - \frac{1}{p}) ^ {|S|} (1 - \frac{\omega_p(S)}{p}$$ where $\omega_p(S)}{p}$ is the number of residue classes mod $p$ where at least one polynomial in $S$ vanishes. -/
45+
/-- The product of degrees of polynomials in a finite set. -/
46+
def DegreesProduct (polys : Finset ℤ[X]) : ℕ :=
47+
polys.prod (fun f => f.natDegree)
48+
49+
/-- The Bateman-Horn constant of a set of polynomials `S`. This is defined as the infinite product over all primes:
50+
51+
$$\frac{1}{D} \prod_p (1 - \frac{1}{p})^{-|S|} (1 - \frac{\omega_p(S)}{p})$$
52+
53+
where $D = \prod_{f \in S} \deg(f)$ is the product of degrees and $\omega_p(S)$ is the number of residue classes mod $p$ where at least one polynomial in $S$ vanishes. -/
4754
noncomputable def BatemanHornConstant (polys : Finset ℤ[X]) : ℝ :=
55+
(1 : ℝ) / (DegreesProduct polys) *
4856
∏' p : {p : ℕ // Nat.Prime p},
4957
(1 - (1 : ℝ) / p.val) ^ (-polys.card : ℤ) *
5058
(1 - (OmegaP polys p.val : ℝ) / p.val)
@@ -57,21 +65,22 @@ noncomputable def CountSimultaneousPrimes (polys : Finset ℤ[X]) (x : ℝ) :
5765

5866
/-- **The Bateman-Horn Conjecture**
5967
60-
Given a finite collection of distinct irreducible polynomials f₁, f₂, ..., fₖ ∈ ℤ[X]
61-
with positive leading coefficients that satisfy the compatibility condition, the number
62-
of positive integers n ≤ x for which all polynomials f₁(n), f₂(n), ..., fₖ(n) are
68+
Given a finite collection of distinct, irreducible, non-constant polynomials f₁, f₂, ..., fₖ ∈ ℤ[X]
69+
with positive leading coefficients that satisfy the compatibility condition, the number
70+
of positive integers n ≤ x for which all polynomials f₁(n), f₂(n), ..., fₖ(n) are
6371
simultaneously prime is asymptotic to:
6472
6573
C(f₁, f₂, ..., fₖ) · x / (log x)^k
6674
67-
where C(f₁, f₂, ..., fₖ) is the Bateman-Horn constant given by the convergent infinite product:
75+
where C(f₁, f₂, ..., fₖ) is the Bateman-Horn constant given by:
6876
69-
C = ∏ₚ (1 - 1/p)^(-k) · (1 - ωₚ/p)
77+
C = (1/D) · ∏ₚ (1 - 1/p)^(-k) · (1 - ωₚ/p)
7078
71-
Here ωₚ is the number of residue classes modulo p for which at least one polynomial vanishes.
79+
Here D = ∏ᵢ deg(fᵢ) is the product of the degrees of the polynomials, and ωₚ is the
80+
number of residue classes modulo p for which at least one polynomial vanishes.
7281
73-
The compatibility condition ensures that for each prime p, there exists some integer n
74-
such that p does not divide the product f₁(n)·f₂(n)·...·fₖ(n), which guarantees the
82+
The compatibility condition ensures that for each prime p, there exists some integer n
83+
such that p does not divide the product f₁(n)·f₂(n)·...·fₖ(n), which guarantees the
7584
infinite product converges to a positive value. -/
7685
@[category research open, AMS 11 12]
7786
theorem bateman_horn_conjecture

0 commit comments

Comments
 (0)