A Lean 4 Framework for Bounded Prime Gaps via Finite-Window Providers
Authors/Creators
Description
This repository contains Version 3.0 of a self-contained Lean 4 framework formalising the finite combinatorial core of bounded prime-gap arguments. The development isolates a single abstract analytic hypothesis, expressed as a finite-window average inequality for the prime indicator, and formally verifies the purely finite reasoning that converts such an inequality into the existence of a bounded-gap prime pair.
All results in this repository are conditional. No analytic number theory is implemented or assumed beyond the explicit hypotheses supplied by the user. In particular, the framework does not attempt to prove the existence of such average inequalities. Instead, it treats them as externally provided certificates and focuses exclusively on verifying their finite combinatorial consequences.
Every theorem is fully checked by the Lean 4 kernel and relies only on the standard classical axioms:
propext, Classical.choice, Quot.sound
The analytic input is intentionally minimal. A finite-window provider asserts that for some finite set
H ⊆ [0, 600] and some integer shift n ∈ ℤ, the empirical average of the prime indicator over the shifted window is at least 2 divided by the size of H.
From this single assumption, the framework carries out three finite steps:
-
An average lower bound yields a lower bound on the sum of a 0/1-valued indicator.
-
A sum of at least 2 forces the existence of at least two distinct “hits”.
-
Two hits in a window of diameter at most 600 yield a bounded-gap prime pair.
All remaining reasoning is finite, explicit, and purely combinatorial.
Version 3.0 does not introduce new mathematical results relative to earlier internal revisions. Its purpose is to present a corrected, tightened, and fully aligned account of the framework, with all documentation, theorem statements, and naming conventions matching exactly what is formally verified in Lean. Overstated or misleading claims present in earlier drafts have been removed, and the scope of the project is now described precisely as architectural and verificational rather than analytic.
Included in this artifact
The repository contains:
-
a pinned Lean 4 / mathlib toolchain ensuring reproducible builds;
-
the complete Lean source code for the finite-window combinatorial pipeline;
-
a fully audited axiom report;
-
a companion PDF explaining the provider interface, combinatorial lemmas, final theorems, and their limitations.
Purpose and scope
This artifact is intended as a reference implementation demonstrating how finite combinatorial reasoning commonly used in bounded prime-gap arguments can be isolated, modularised, and formally verified in Lean. It is designed to support future work on alternative analytic providers, richer finite-window certificates, and extensions to related finite-combinatorial problems, while keeping all analytic assumptions explicit and external.
Files
bounded_gaps_finite_windows.zip
Files
(497.3 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:2401e9ba5724df5dd01b753b6910506f
|
497.3 kB | Preview Download |
Additional details
Dates
- Submitted
-
2026-01-04