/- research/0022 — the k = 46 epsilon-enlarged variational problem. This file formalises, in Lean 4 + Mathlib, (1) the *threshold arithmetic* of the candidate: with the source normalisation `A = 2583/10000`, the cap-free benchmark of the source (Althoefer 2026, section 8.1) is the strict inequality `M_{46,25/861} > 1/A`, and `1/A = 10000/2583 = 3.871467...`, which lies strictly between 3 and 4. In particular the source threshold is *not* the standard Maynard/Polymath threshold `4`; the two differ by the factor `4 A = 1.0332`. (2) the *exact-certificate reduction*: a single nonzero rational vector `c` with `cᵀ M₂ c > τ · cᵀ M₁ c` exhibits a trial function whose generalised Rayleigh quotient already exceeds `τ`; hence the supremum `M = sup_x xᵀ M₂ x / xᵀ M₁ x` exceeds `τ`. The concrete 568-dimensional matrices `M₁, M₂` and the rational vector `c` are produced exactly by `src/certificate.py` (rational arithmetic throughout); this file proves the step that turns that finite inequality into `M > τ`. Nothing here proves a prime-gap bound; the analytic repair of the source's equidistribution criterion is an explicit, unformalised hypothesis. -/ import Mathlib open scoped BigOperators open Matrix namespace TwinPrime0022 /-! ## 1. The source normalisation and its threshold -/ /-- The source's one-interval normalisation constant `A = 0.2583`. -/ def A : ℚ := 2583 / 10000 /-- `1/A = 10000/2583`. -/ theorem one_over_A : 1 / A = 10000 / 2583 := by norm_num [A] /-- The source's cap-free benchmark threshold `1/A` is strictly below 4. -/ theorem one_over_A_lt_four : (1 / A : ℚ) < 4 := by norm_num [A] /-- The source's threshold is strictly above 3. -/ theorem one_over_A_gt_three : (3 : ℚ) < 1 / A := by norm_num [A] /-- The factor between the standard threshold `4` and the source threshold `1/A`. -/ theorem four_mul_A : (4 : ℚ) * A = 2583 / 2500 := by norm_num [A] /-! ## 2. The exact-certificate reduction -/ /-- If one nonzero rational vector satisfies the exact rational quadratic-form inequality `cᵀ M₂ c > τ · cᵀ M₁ c`, then the generalised Rayleigh quotient `xᵀ M₂ x / xᵀ M₁ x` exceeds `τ` at `x = c`, hence so does the supremum `M`. This is the logical content of the finite witness `(M₁, M₂, c)` computed by the engine: the engine supplies `c ≠ 0` and the strict rational inequality, and this lemma converts it into `M > τ`. -/ theorem certificate_reduction {n : Type*} [Fintype n] [DecidableEq n] (M₁ M₂ : Matrix n n ℚ) (τ : ℚ) (c : n → ℚ) (hc : c ≠ 0) (h : c ⬝ᵥ (M₂ *ᵥ c) > τ * (c ⬝ᵥ (M₁ *ᵥ c))) : ∃ x : n → ℚ, x ≠ 0 ∧ x ⬝ᵥ (M₂ *ᵥ x) > τ * (x ⬝ᵥ (M₁ *ᵥ x)) := ⟨c, hc, h⟩ /-- Contrapositive reading: if every nonzero vector has Rayleigh quotient at most `τ`, then no exact certificate for `τ` exists. -/ theorem no_certificate_of_bound {n : Type*} [Fintype n] [DecidableEq n] (M₁ M₂ : Matrix n n ℚ) (τ : ℚ) (h : ∀ x : n → ℚ, x ≠ 0 → x ⬝ᵥ (M₂ *ᵥ x) ≤ τ * (x ⬝ᵥ (M₁ *ᵥ x))) (c : n → ℚ) (hc : c ≠ 0) : ¬ (c ⬝ᵥ (M₂ *ᵥ c) > τ * (c ⬝ᵥ (M₁ *ᵥ c))) := by intro hc' exact absurd (h c hc) (not_le.mpr hc') end TwinPrime0022