Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Weighted count of prime pairs

Definition
LL_Decomp1525c_PsiV

by sthubbar · Oct 28, 2026 · Mathlib 0df444a (Lean v4.33.1)

For real xxx, Ψ(x)\Psi(x)Ψ(x) sums log⁡p1\log p_1logp1​ over prime pairs satisfying 3≤p1≤⌊x−3⌋+3\le p_1\le\lfloor x-3\rfloor_+3≤p1​≤⌊x−3⌋+​, 1≤p2≤⌊2x−p1⌋+1\le p_2\le\lfloor 2x-p_1\rfloor_+1≤p2​≤⌊2x−p1​⌋+​, and x−p1<p2x-p_1<p_2x−p1​<p2​.

Definition code
import Mathlib
open Finset Real MeasureTheory intervalIntegral
open scoped Classical
noncomputable section
namespace LL_Decomp1525c
def PsiV (x : ℝ) : ℝ :=
  ∑ p₁ ∈ (Icc 3 ⌊x - 3⌋₊).filter Nat.Prime,
    ∑ _p₂ ∈ (Icc 1 ⌊2 * x - p₁⌋₊).filter (fun p : ℕ => p.Prime ∧ x - p₁ < (p : ℝ)), Real.log p₁
end LL_Decomp1525c
Read-back

What the Lean code literally says, in plain math · claude-haiku

For x∈Rx\in\mathbb{R}x∈R, no hypotheses, PsiV(x)=∑p1∈S1(x)∑p2∈S2(x,p1)log⁡p1\mathrm{PsiV}(x)=\sum_{p_1\in S_1(x)}\sum_{p_2\in S_2(x,p_1)}\log p_1PsiV(x)=∑p1​∈S1​(x)​∑p2​∈S2​(x,p1​)​logp1​ with S1(x)={p1 prime:3≤p1≤⌊x−3⌋+}S_1(x)=\{p_1 \text{ prime} : 3\le p_1\le\lfloor x-3\rfloor_+\}S1​(x)={p1​ prime:3≤p1​≤⌊x−3⌋+​} and S2(x,p1)={p2 prime:1≤p2≤⌊2x−p1⌋+, x−p1<p2}S_2(x,p_1)=\{p_2 \text{ prime} : 1\le p_2\le\lfloor 2x-p_1\rfloor_+,\ x-p_1<p_2\}S2​(x,p1​)={p2​ prime:1≤p2​≤⌊2x−p1​⌋+​, x−p1​<p2​}, ⌊⋅⌋+\lfloor\cdot\rfloor_+⌊⋅⌋+​ the Nat.floor. Since the summand does not depend on p2p_2p2​, this equals ∑p1 prime, 3≤p1≤x−3log⁡p1⋅#{p2 prime:x−p1<p2≤2x−p1}\sum_{p_1 \text{ prime},\,3\le p_1\le x-3}\log p_1\cdot\#\{p_2 \text{ prime} : x-p_1<p_2\le 2x-p_1\}∑p1​ prime,3≤p1​≤x−3​logp1​⋅#{p2​ prime:x−p1​<p2​≤2x−p1​}. For natural nnn, n≤⌊y⌋+n\le\lfloor y\rfloor_+n≤⌊y⌋+​ matches n≤yn\le yn≤y, so the bounds are the real inequalities, strict below and non-strict above. For x<6x<6x<6 the outer range is empty and PsiV(x)=0\mathrm{PsiV}(x)=0PsiV(x)=0; log⁡\loglog is only evaluated at primes ≥3\ge 3≥3, so no junk values arise. Classical only affects decidability.

Human review
  • Endorsed by Shuze Chen · Oct 28, 2026

    Confirmed by the moderator at approval.

  • Endorsed by sthubbar · Oct 28, 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