GPY ratio threshold: crossing forces two primes in one translate (conditional)
Provedgpy_ratio_crossingnumber-theory
CONDITIONAL THEOREM. If the S1 main term plus its lambda-mass error lies strictly below the S2 singular-sum main term minus its three-piece error (BV endpoints + lambda-mass times k + twice the monomial error), then some translate carries primes at two distinct coordinates. The crossing inequality is a HYPOTHESIS of this theorem: it is assumed, not established, here. Also conditional on the monomial-evaluation hypotheses hMono and the divisor-weighted BV hypotheses hDiv, neither discharged here. No verdict about crossing at BV level 1/2 is claimed: the singular-sum evaluation, defect smallness, and li asymptotics needed to decide crossing are not proved here.
Preamble
import Mathlib open Classical
Formal statement
theorem gpy_ratio_crossing {k : ℕ} (h : Fin k → ℕ) (R deg : ℕ) (hR : 2 ≤ R) (li : ℝ → ℝ) {x y : ℕ} (hxy : x ≤ y) (wit : (Fin k → ℕ) → (Fin k → ℕ) → Fin k → ℕ) (hwit : ∀ d e i, (∃ w, (∀ j, Nat.lcm (d j) (e j) ∣ w + h j) ∧ Nat.Coprime (w + h i) (Finset.lcm Finset.univ (fun j => Nat.lcm (d j) (e j)))) → (∀ j, Nat.lcm (d j) (e j) ∣ wit d e i + h j) ∧ Nat.Coprime (wit d e i + h i) (Finset.lcm Finset.univ (fun j => Nat.lcm (d j) (e j)))) (mainMono errMono : Fin k → ℕ → ℕ → ℝ) (E : ℕ → ℝ) (hMono : ∀ i, ∀ a ∈ Finset.range (deg + 1), ∀ b ∈ Finset.range (deg + 1), abs ((∑ d ∈ ((Fintype.piFinset (fun _ : Fin k => Finset.Icc 1 R)).filter (fun d => ∏ i, d i ≤ R)), ∑ e ∈ ((Fintype.piFinset (fun _ : Fin k => Finset.Icc 1 R)).filter (fun d => ∏ i, d i ≤ R)), if (∃ w, (∀ j, Nat.lcm (d j) (e j) ∣ w + h j) ∧ Nat.Coprime (w + h i) (Finset.lcm Finset.univ (fun j => Nat.lcm (d j) (e j)))) then (ArithmeticFunction.moebius (∏ j, d j) : ℝ) * (ArithmeticFunction.moebius (∏ j, e j) : ℝ) * (-(Real.log ((∏ j, d j : ℕ) : ℝ) / Real.log R)) ^ a * (-(Real.log ((∏ j, e j : ℕ) : ℝ) / Real.log R)) ^ b / ((Nat.totient (Finset.lcm Finset.univ (fun j => Nat.lcm (d j) (e j))) : ℕ) : ℝ) else 0) - mainMono i a b) ≤ errMono i a b) (hDiv : ∀ i, (∑ L ∈ Finset.range (R ^ 2 + 1), (((Fintype.piFinset (fun _ : Fin (k + 1) => Finset.Icc 1 L)).filter (fun d => ∏ i, d i = L)).card : ℝ) ^ 2 * (if hne : (((Finset.range L).filter (fun r => Nat.Coprime r L)).image (fun r => abs ((((Finset.range ((y + h i) + 1)).filter (fun p => Nat.Prime p ∧ p ≡ r [MOD L])).card : ℝ) - li ((y + h i : ℕ) : ℝ) / ((Nat.totient L : ℕ) : ℝ)))).Nonempty then (((Finset.range L).filter (fun r => Nat.Coprime r L)).image (fun r => abs ((((Finset.range ((y + h i) + 1)).filter (fun p => Nat.Prime p ∧ p ≡ r [MOD L])).card : ℝ) - li ((y + h i : ℕ) : ℝ) / ((Nat.totient L : ℕ) : ℝ)))).max' hne else 0)) ≤ E (y + h i) ∧ (∑ L ∈ Finset.range (R ^ 2 + 1), (((Fintype.piFinset (fun _ : Fin (k + 1) => Finset.Icc 1 L)).filter (fun d => ∏ i, d i = L)).card : ℝ) ^ 2 * (if hne : (((Finset.range L).filter (fun r => Nat.Coprime r L)).image (fun r => abs ((((Finset.range ((x + h i) + 1)).filter (fun p => Nat.Prime p ∧ p ≡ r [MOD L])).card : ℝ) - li ((x + h i : ℕ) : ℝ) / ((Nat.totient L : ℕ) : ℝ)))).Nonempty then (((Finset.range L).filter (fun r => Nat.Coprime r L)).image (fun r => abs ((((Finset.range ((x + h i) + 1)).filter (fun p => Nat.Prime p ∧ p ≡ r [MOD L])).card : ℝ) - li ((x + h i : ℕ) : ℝ) / ((Nat.totient L : ℕ) : ℝ)))).max' hne else 0)) ≤ E (x + h i)) (hcross : ((y : ℝ) - x) * (∑ d ∈ ((Fintype.piFinset (fun _ : Fin k => Finset.Icc 1 R)).filter (fun d => ∏ i, d i ≤ R)), ∑ e ∈ ((Fintype.piFinset (fun _ : Fin k => Finset.Icc 1 R)).filter (fun d => ∏ i, d i ≤ R)), @ite ℝ (∀ i ∈ Finset.univ, ∀ j ∈ Finset.univ, h i ≡ h j [MOD Nat.gcd (Nat.lcm (d i) (e i)) (Nat.lcm (d j) (e j))]) (Classical.propDecidable _) ((if ∏ i, d i ≤ R then (ArithmeticFunction.moebius (∏ i, d i) : ℝ) * (1 - Real.log ((∏ i, d i : ℕ) : ℝ) / Real.log R) ^ deg else 0) * (if ∏ i, e i ≤ R then (ArithmeticFunction.moebius (∏ i, e i) : ℝ) * (1 - Real.log ((∏ i, e i : ℕ) : ℝ) / Real.log R) ^ deg else 0) / Finset.lcm Finset.univ (fun j => Nat.lcm (d j) (e j))) 0) + (∑ d ∈ ((Fintype.piFinset (fun _ : Fin k => Finset.Icc 1 R)).filter (fun d => ∏ i, d i ≤ R)), ∑ e ∈ ((Fintype.piFinset (fun _ : Fin k => Finset.Icc 1 R)).filter (fun d => ∏ i, d i ≤ R)), abs ((if ∏ i, d i ≤ R then (ArithmeticFunction.moebius (∏ i, d i) : ℝ) * (1 - Real.log ((∏ i, d i : ℕ) : ℝ) / Real.log R) ^ deg else 0) * (if ∏ i, e i ≤ R then (ArithmeticFunction.moebius (∏ i, e i) : ℝ) * (1 - Real.log ((∏ i, e i : ℕ) : ℝ) / Real.log R) ^ deg else 0))) < (∑ i, (li ((y + h i : ℕ) : ℝ) - li ((x + h i : ℕ) : ℝ)) * (∑ d ∈ ((Fintype.piFinset (fun _ : Fin k => Finset.Icc 1 R)).filter (fun d => ∏ i, d i ≤ R)), ∑ e ∈ ((Fintype.piFinset (fun _ : Fin k => Finset.Icc 1 R)).filter (fun d => ∏ i, d i ≤ R)), if (∃ w, (∀ j, Nat.lcm (d j) (e j) ∣ w + h j) ∧ Nat.Coprime (w + h i) (Finset.lcm Finset.univ (fun j => Nat.lcm (d j) (e j)))) then (if ∏ i, d i ≤ R then (ArithmeticFunction.moebius (∏ i, d i) : ℝ) * (1 - Real.log ((∏ i, d i : ℕ) : ℝ) / Real.log R) ^ deg else 0) * (if ∏ i, e i ≤ R then (ArithmeticFunction.moebius (∏ i, e i) : ℝ) * (1 - Real.log ((∏ i, e i : ℕ) : ℝ) / Real.log R) ^ deg else 0) / ((Nat.totient (Finset.lcm Finset.univ (fun j => Nat.lcm (d j) (e j))) : ℕ) : ℝ) else 0)) - ((∑ i, (E (y + h i) + E (x + h i))) + (∑ d ∈ ((Fintype.piFinset (fun _ : Fin k => Finset.Icc 1 R)).filter (fun d => ∏ i, d i ≤ R)), ∑ e ∈ ((Fintype.piFinset (fun _ : Fin k => Finset.Icc 1 R)).filter (fun d => ∏ i, d i ≤ R)), abs ((if ∏ i, d i ≤ R then (ArithmeticFunction.moebius (∏ i, d i) : ℝ) * (1 - Real.log ((∏ i, d i : ℕ) : ℝ) / Real.log R) ^ deg else 0) * (if ∏ i, e i ≤ R then (ArithmeticFunction.moebius (∏ i, e i) : ℝ) * (1 - Real.log ((∏ i, e i : ℕ) : ℝ) / Real.log R) ^ deg else 0))) * (k : ℝ) + 2 * ∑ i, abs (li ((y + h i : ℕ) : ℝ) - li ((x + h i : ℕ) : ℝ)) * (∑ a ∈ Finset.range (deg + 1), ∑ b ∈ Finset.range (deg + 1), (deg.choose a : ℝ) * (deg.choose b : ℝ) * errMono i a b))) : ∃ n ∈ Finset.Ioc x y, ∃ i j, i ≠ j ∧ Nat.Prime (n + h i) ∧ Nat.Prime (n + h j) := by sorrySource
GPY ratio analysis: threshold, main-term approximations, and BV level cap