Unweighted Goldbach count
DefinitionLL_Decomp1526a_gcountFor , the natural number , counting ordered pairs.
Definition code
import Mathlib
namespace LL_Decomp1526a
noncomputable section
open Finset Real
open scoped Chebyshev Classical
def gcount (N : ℕ) : ℕ := #{p ∈ range (N + 1) | p.Prime ∧ (N - p).Prime}
end
end LL_Decomp1526aRead-back
What the Lean code literally says, in plain math · claude-haiku
Read-back: gcount
For a natural number , is the number of elements of the set
Inputs and binders. The only input is , ranging over all natural numbers. The bound variable ranges over to inclusive. There are no hypotheses on .
Meaning of the terms. "Prime" has its usual meaning: is prime when and its only positive divisors are and . The difference is ordinary subtraction. Because , it is never truncated.
Counting. The count is over values of , not unordered pairs. Each decomposition into two primes is counted twice, once as and once as , unless .
Edge cases.
- and : the candidates are and , neither of which is prime, so .
- odd: and have opposite parity, so for both to be prime one of them must equal . Hence .
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.