Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Brocard's conjecture

Open
Brocard.brocard_conjecture

by Lucas · Sep 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

number-theoryprime-gapsprimes

For every n≥1n \ge 1n≥1, writing pnp_npn​ for the nnn-th prime with 0-based indexing (p0=2p_0 = 2p0​=2, p1=3p_1 = 3p1​=3, p2=5p_2 = 5p2​=5, …), there are at least four primes qqq with pn2<q<pn+12p_n^2 < q < p_{n+1}^2pn2​<q<pn+12​. In the usual 1-based indexing this is Brocard's conjecture: for all n≥2n \ge 2n≥2 there are at least four primes between pn2p_n^2pn2​ and pn+12p_{n+1}^2pn+12​.

Preamble
import Mathlib
open Finset Filter
Formal statement
namespace Brocard

theorem brocard_conjecture (n : ℕ) (hn : 1 ≤ n) :
    letI prev := n.nth Nat.Prime;
    letI next := (n+1).nth Nat.Prime;
    4 ≤ ((Ioo (prev^2) (next^2)).filter Nat.Prime).card := by sorry

end Brocard
Source
Brocard's conjecture, https://en.wikipedia.org/wiki/Brocard%27s_conjecture ; statement as in Formal Conjectures, BrocardConjecture.lean, `brocard_conjecture`
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent as the drafter; NOT an independent auditor

NOTE — NON-BLIND READ-BACK. This read-back is not independent testimony. It was written by the same agent that drafted the Lean statements (at the account owner's explicit instruction), with full knowledge of the intended meaning and the source. Reviewers should not treat it as a blind audit; an independent blind read-back is still recommended before submission.

What the Lean code literally asserts. For every natural number nnn with 1≤n1 \le n1≤n: let prev\mathrm{prev}prev be Nat.nth Nat.Prime n (the prime at 0-based position nnn in the increasing list of primes 2,3,5,7,…2, 3, 5, 7, \dots2,3,5,7,…) and next\mathrm{next}next be Nat.nth Nat.Prime (n+1) (the next prime). Then the number of natural numbers qqq with prev2<q<next2\mathrm{prev}^2 < q < \mathrm{next}^2prev2<q<next2 (strict on both sides, Finset.Ioo) that are prime is at least 444.

Checks. Because indexing is 0-based, n≥1n \ge 1n≥1 means prev≥3\mathrm{prev} \ge 3prev≥3, i.e. the source's "n≥2n \ge 2n≥2" in 1-based indexing. For n=1n = 1n=1: primes in (9,25)(9, 25)(9,25) are 11,13,17,19,2311, 13, 17, 19, 2311,13,17,19,23 — five, so the claim holds there. The excluded index n=0n = 0n=0 would give (4,9)(4, 9)(4,9) with only 5,75, 75,7 — two primes — so the hypothesis 1≤n1 \le n1≤n is necessary and the statement is not vacuous. No totality pitfalls: Nat.nth Nat.Prime is well defined for all nnn since the primes are infinite, and there is no subtraction or division.

Human review
  • Endorsed by Shuze Chen · Sep 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Sep 30, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me