Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Sum of squared logs below log N times theta

Proved
LL_Decomp1535a.sum_log_sq_le

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

number-theory

For every natural number NNN, ∑p≤N, p prime(log⁡p)2≤log⁡N⋅θ(N)\sum_{p\le N,\ p\text{ prime}}(\log p)^2\le \log N\cdot\theta(N)∑p≤N, p prime​(logp)2≤logN⋅θ(N).

Preamble
import Mathlib
import Definitions.Def_LL_Decomp1535a_theta

open MeasureTheory
Formal statement
namespace LL_Decomp1535a
theorem sum_log_sq_le (N : ℕ) :
    ∑ p ∈ (Finset.range (N + 1)).filter Nat.Prime, Real.log p ^ 2 ≤
      Real.log N * theta N := by sorry
end LL_Decomp1535a
Source
Liu and Wang 2002, p. 174, proof of Theorem 1
Read-back

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

Read-back: LL_Decomp1535a.sum_log_sq_le

Statement. For every natural number NNN, including N=0N = 0N=0:

∑p≤Np prime(log⁡p)2  ≤  log⁡N⋅θ(N)\sum_{\substack{p \le N \\ p \text{ prime}}} (\log p)^2 \;\le\; \log N \cdot \theta(N)p≤Np prime​∑​(logp)2≤logN⋅θ(N)

Quantifiers and inputs. There is one input, N∈NN \in \mathbb{N}N∈N, and no hypotheses. The statement is claimed for all such NNN.

Left side. The sum runs over the primes ppp in the set {0,1,…,N}\{0, 1, \dots, N\}{0,1,…,N}, so it covers exactly the primes p≤Np \le Np≤N. Each term is (log⁡p)2(\log p)^2(logp)2, where log⁡p\log plogp is the natural logarithm of ppp viewed as a real number.

Right side. log⁡N\log NlogN is the natural logarithm of NNN, viewed as a real number. The symbol θ(N)\theta(N)θ(N) is the function θ\thetaθ evaluated at NNN. It is defined in the imported module Definitions.Def_LL_Decomp1535a_theta, whose contents were not supplied for this read-back, so θ\thetaθ is not expanded here. The right side is the product of log⁡N\log NlogN and θ(N)\theta(N)θ(N).

Degenerate cases. For N=0N = 0N=0 and N=1N = 1N=1 there are no primes p≤Np \le Np≤N, so the left side is the empty sum 000. In this formalization the logarithm of 000 is taken to be 000, and log⁡1=0\log 1 = 0log1=0, so the right side is 000 as well and the inequality reads 0≤00 \le 00≤0. For N=2N = 2N=2 the only prime is 222, so the left side is (log⁡2)2(\log 2)^2(log2)2.

Strength. The relation is a non-strict inequality (≤\le≤), with the left side on the small side and the right side on the large side.

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

    Confirmed by the moderator at approval.

  • Endorsed by sthubbar · 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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me