Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Chebyshev theta function

Definition
LL_Decomp1535a_theta

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

θ(N)=∑p≤N, p primelog⁡p\theta(N)=\sum_{p\le N,\ p \text{ prime}} \log pθ(N)=∑p≤N, p prime​logp as a real number, for natural NNN.

Definition code
import Mathlib

namespace LL_Decomp1535a

noncomputable section

open MeasureTheory

noncomputable def theta (N : ℕ) : ℝ :=
  ∑ p ∈ (Finset.range (N + 1)).filter Nat.Prime, Real.log p

end

end LL_Decomp1535a
Read-back

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

Read-back: LL_Decomp1535a.theta

This is a definition, not a theorem. It defines a function θ\thetaθ that takes one input, a natural number NNN. There are no other variables, no hypotheses, and no typeclass assumptions. The output is a real number.

For each N∈NN \in \mathbb{N}N∈N, the definition gives

θ(N)=∑p∈SNlog⁡p,\theta(N) = \sum_{p \in S_N} \log p,θ(N)=p∈SN​∑​logp,

where:

  • SNS_NSN​ is the set of all prime numbers ppp with p≤Np \le Np≤N. The bound is inclusive, so p=Np = Np=N is included whenever NNN is prime.
  • Each ppp is a natural number that is converted to a real number before the natural logarithm log⁡p\log plogp is taken.
  • The sum is over the finite set SNS_NSN​, so θ(N)\theta(N)θ(N) is a finite real number.

Edge cases:

  • If N=0N = 0N=0 or N=1N = 1N=1, then SNS_NSN​ is empty, so θ(0)=θ(1)=0\theta(0) = \theta(1) = 0θ(0)=θ(1)=0.
  • The function is defined for every natural number. No division or natural-number subtraction occurs, so no junk values arise.
  • The function is not a sum over all primes. It is a finite sum that grows with NNN.
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