Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Definitions for the explicit Schnirelmann constant 100 001100\,001100001

Definition
Schnir_defs

by xuanji · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

number-theoryschnirelmann-densitysieve-theory

Definitions used throughout the explicit Schnirelmann argument showing that every odd n>1n>1n>1 is a sum of at most 100 001100\,001100001 primes.

  1. r(s)=#{(p,q):p,q odd primes, p+q=s}r(s)=\#\{(p,q): p,q \text{ odd primes},\ p+q=s\}r(s)=#{(p,q):p,q odd primes, p+q=s}, the number of ordered representations of sss as a sum of two odd primes (Schnir.r).
  2. C(s)=∏p∣s(1+p(p−1)2)C(s)=\prod_{p\mid s}\left(1+\frac{p}{(p-1)^2}\right)C(s)=∏p∣s​(1+(p−1)2p​), the arithmetic factor in the sieve bound (Schnir.C).
  3. For a fixed sss and a prime ppp: ρs(p)=1\rho_s(p)=1ρs​(p)=1 if p∣sp\mid sp∣s and ρs(p)=2\rho_s(p)=2ρs​(p)=2 otherwise, the number of roots of a(s−a)≡0(modp)a(s-a)\equiv 0 \pmod pa(s−a)≡0(modp) (Schnir.rho).
  4. hs(d)=∏p∣dρs(p)p−ρs(p)h_s(d)=\prod_{p\mid d}\frac{\rho_s(p)}{p-\rho_s(p)}hs​(d)=∏p∣d​p−ρs​(p)ρs​(p)​ (Schnir.hfun), and the sieve denominator Gs(z)=∑d≤z, d squarefreehs(d)G_s(z)=\sum_{d\le z,\ d \text{ squarefree}} h_s(d)Gs​(z)=∑d≤z, d squarefree​hs​(d) (Schnir.G).
  5. Ss(z)=#{1≤a≤s:a(s−a) has no prime divisor ≤z}S_s(z)=\#\{1\le a\le s : a(s-a) \text{ has no prime divisor } \le z\}Ss​(z)=#{1≤a≤s:a(s−a) has no prime divisor ≤z}, the sifted count (Schnir.S).
  6. B={(p−3)/2:p an odd prime}B=\{(p-3)/2 : p \text{ an odd prime}\}B={(p−3)/2:p an odd prime} and A=B+BA=B+BA=B+B (Schnir.B, Schnir.A).

Formalization Note Everything lives in the namespace Schnir. Gs(z)G_s(z)Gs​(z) sums over 1≤d≤⌊z⌋1\le d\le\lfloor z\rfloor1≤d≤⌊z⌋, and Ss(z)S_s(z)Ss​(z) tests primes p≤⌊z⌋p\le\lfloor z\rfloorp≤⌊z⌋. The quantities hsh_shs​ and GsG_sGs​ are intended for even sss, where every denominator p−ρs(p)p-\rho_s(p)p−ρs​(p) is positive.

Definition code
import Mathlib

/-!
Definitions for the explicit Schnirelmann argument (note: "An explicit elementary constant for
sums of primes"). Shared definitions for the mission's step lemmas.
-/

open Finset

namespace Schnir

/-- `r s` = number of ordered pairs `(p, q)` of odd primes with `p + q = s` (note, §Intro). -/
def r (s : ℕ) : ℕ :=
  ((Finset.range (s + 1)).filter (fun p => p.Prime ∧ p ≠ 2 ∧ (s - p).Prime ∧ s - p ≠ 2)).card

/-- `C s = ∏_{p ∣ s} (1 + p/(p-1)^2)` (note, eq. (5)). -/
noncomputable def C (s : ℕ) : ℝ := ∏ p ∈ s.primeFactors, (1 + (p : ℝ) / ((p : ℝ) - 1) ^ 2)

/-- `ρ_s(p)`: number of roots of `a (s - a) ≡ 0 mod p` (note, §2.1). -/
def rho (s p : ℕ) : ℕ := if p ∣ s then 1 else 2

/-- `h(d) = ∏_{p ∣ d} ρ(p)/(p - ρ(p))` on squarefree `d` (note, §2.1). -/
noncomputable def hfun (s d : ℕ) : ℝ :=
  ∏ p ∈ d.primeFactors, ((rho s p : ℝ) / ((p : ℝ) - (rho s p : ℝ)))

/-- `G_s(z) = ∑_{d ≤ z, d squarefree} h(d)` (note, §2.1). -/
noncomputable def G (s : ℕ) (z : ℝ) : ℝ :=
  ∑ d ∈ (Finset.Icc 1 ⌊z⌋₊).filter Squarefree, hfun s d

/-- `S_s(z)`: number of `1 ≤ a ≤ s` such that `a (s - a)` has no prime divisor `≤ z`. -/
noncomputable def S (s : ℕ) (z : ℝ) : ℕ :=
  ((Finset.Icc 1 s).filter
    (fun a => ∀ p ∈ Finset.range (⌊z⌋₊ + 1), p.Prime → ¬ p ∣ a * (s - a))).card

/-- `B = {(p - 3)/2 : p odd prime}` (note, §5). -/
def B : Set ℕ := {b | ∃ p, p.Prime ∧ p ≠ 2 ∧ b = (p - 3) / 2}

open Pointwise in
/-- `A = B + B` (note, §5). -/
def A : Set ℕ := B + B

end Schnir
Source
An explicit elementary constant for sums of primes (unpublished note, September 2026), §§1–5 (definitions of r(s), C(s) eq. (5), ρ, g, h, G_s(z), S_s(z), B, A)
Human review
  • Endorsed by Shuze Chen · Oct 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Yuxuan Xu · Oct 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me