feat(BKLNW): formalize Lemma 10 - #1768
Open
lsmeng wants to merge 1 commit into
Open
Conversation
BKLNW Lemma 10, equations (3.27)-(3.29) of arXiv:2002.11068: if
D_k(a,b) < (k+1)^(k+1) then theta(x) >= x - D_k(a,b) x / (log x)^k on [a,b].
The file imports only Mathlib and no project file, so it can be read and
checked on its own. #print axioms on bklnw_lemma_10, bklnw_lemma_10',
bklnw_lemma_10_paper_form and Dterm_eq_paper each gives
[propext, Classical.choice, Quot.sound]: no sorry, no native_decide.
D_k is formalized pointwise as Dterm k x = (log p)^k (p - theta x)/p with
p = nextPrime x. Dterm_eq_paper proves this equals the paper's printed form
(log p_n)^k (p_n - theta(p_{n-1}))/p_n, and bklnw_lemma_10_paper_form restates
the whole lemma quantified over consecutive prime pairs, so the bridge between
the two shapes is proved rather than assumed.
The (k+1)^(k+1) threshold comes from the tangent-line inequality
(k+1)^(k+1) (t-k) <= t^(k+1), proved by interval_cases over the paper's own
range k = 1..5 with an explicit factorisation for each; this is the only place
k <= 5 is used.
The paper's hypothesis a < b is kept but unused (marked _hab): the argument is
pointwise on [a,b], which is empty when b < a, so the formal statement is very
slightly stronger than the printed one. Keeping it makes the hypotheses match
the paper one-for-one.
No blueprint annotation: @[blueprint ...] needs LeanArchitect, and importing it
would give up the Mathlib-only property. Happy to add it if preferred.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR formalizes Lemma 10 (equations (3.27)–(3.29)) from the BKLNW paper.
#print axiomsonbklnw_lemma_10,bklnw_lemma_10',bklnw_lemma_10_paper_form, andDterm_eq_papereach gives[propext, Classical.choice, Quot.sound].Dterm k x.Dterm_eq_paperproves this equals the paper's printed form, andbklnw_lemma_10_paper_formrestates the lemma over consecutive prime pairs — so the bridge between the two shapes is proved, not assumed.a < bis kept but unused (_hab): the argument is pointwise on[a, b], which is empty whenb < a. The hypotheses match the paper one-for-one.@[blueprint ...]needsLeanArchitectand importing it would give up the Mathlib-only property. Happy to add it if you'd rather have the blueprint entry.This will be used to supply the Case 4 bounds needed for Table 15.
All Lean code and documentation in this PR were produced with substantial AI assistance (Claude, directed by Lingsen Meng), disclosed per PrimeNumberTheoremAnd's PULL_REQUEST_STYLE.md §13.
Co-Authored-By: Claude