Skip to content

feat(BKLNW): formalize Lemma 10 - #1768

Open
lsmeng wants to merge 1 commit into
AlexKontorovich:mainfrom
lsmeng:lemma10
Open

feat(BKLNW): formalize Lemma 10#1768
lsmeng wants to merge 1 commit into
AlexKontorovich:mainfrom
lsmeng:lemma10

Conversation

@lsmeng

@lsmeng lsmeng commented Aug 27, 2026

Copy link
Copy Markdown

This PR formalizes Lemma 10 (equations (3.27)–(3.29)) from the BKLNW paper.

  • Standalone: the file imports only Mathlib and no project files, so it can be read and checked on its own.
  • No sorry, no native_decide. #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].
  • D_k is formalized pointwise as Dterm k x. Dterm_eq_paper proves this equals the paper's printed form, and bklnw_lemma_10_paper_form restates the lemma over consecutive prime pairs — so the bridge between the two shapes is proved, not assumed.
  • The paper's a < b is kept but unused (_hab): the argument is pointwise on [a, b], which is empty when b < a. The hypotheses match the paper one-for-one.
  • No blueprint annotation for now, since @[blueprint ...] needs LeanArchitect and 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

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>
@github-actions github-actions Bot added ai Formalised using AI. claude Formalised using Claude models by Anthropic. labels Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai Formalised using AI. claude Formalised using Claude models by Anthropic.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant