Index of theproofnetwork/open-problems@860a535/Prove2Me/Definitions/Def_QED_E227.lean

qedmarket’s copy of theproofnetwork/open-problems@860a535, 3 Dec 2026original source ↗

35 lines · 1.9 kBraw
/-From Prove2Me, definition `QED_E227` (https://prove2.me/definitions/1a45df7c-5441-44fe-a9c5-848c77ca4ba9). Apache-2.0 per Prove2Me's terms.-/import Mathlib /-! QED-E227: The prime-sum graph is Hamiltonian-laceableLine up the numbers 1 to 2n so that neighbours always sum to a prime, starting at any chosen oddnumber and ending at any chosen even number.Informal statement: Let Γ_n be the graph on [2n] = {1, …, 2n} with xy an edge iff x ≠ y and x + y isprime (it is bipartite: odd vs. even). Prove that for all sufficiently large n, for every odd a and evenb in [2n], Γ_n has a Hamiltonian path from a to b. (Conjecturally this holds for all n ≥ 4.)Formalization notes: A Hamiltonian path of Γ_n from a to b is a list `l` that is a permutation of[1, …, 2n] (`List.Perm l (List.range' 1 (2 * n))`, so every vertex appears exactly once), whose firstentry is a and last entry is b, and whose consecutive entries sum to a prime (distinctness ofneighbours is automatic). Consecutive entries are accessed with `getD` (the default is never used sinceindices are in range). `Claim` is the "sufficiently large n" version; the conjectural n ≥ 4 version isnot stated. Proving `Claim` = eventual Hamiltonian-laceability; `¬Claim` = infinitely many n with someodd a, even b admitting no such path.-/namespace OpenProblems.QEDE227 noncomputable section /-- `l` is a Hamiltonian path of the prime-sum graph on `{1, …, 2n}` from `a` to `b`. -/def IsPrimeSumHamPath (n a b : ℕ) (l : List ℕ) : Prop :=  List.Perm l (List.range' 1 (2 * n)) ∧ l.head? = some a ∧ l.getLast? = some b ∧    ∀ i : ℕ, i + 1 < l.length → (l.getD i 0 + l.getD (i + 1) 0).Prime def Claim : Prop :=  ∃ N : ℕ, ∀ n : ℕ, N ≤ n → ∀ a b : ℕ, 1 ≤ a → a ≤ 2 * n → 1 ≤ b → b ≤ 2 * n →    a % 2 = 1 → b % 2 = 0 → ∃ l : List ℕ, IsPrimeSumHamPath n a b l end end OpenProblems.QEDE227

download (.tar)