Weighted representation function
DefinitionLL_Decomp1526a_repFor , , a real number, summing over ordered pairs and using natural subtraction, with the term when is not prime.
import Mathlib
namespace LL_Decomp1526a
noncomputable section
open Finset Real
open scoped Chebyshev Classical
def rep (N : ℕ) : ℝ :=
∑ p ∈ (range (N + 1)).filter Nat.Prime,
if (N - p).Prime then Real.log p * Real.log ((N - p : ℕ) : ℝ) else 0
end
end LL_Decomp1526aRead-back
What the Lean code literally says, in plain math · claude-haiku
The file defines one function from the natural numbers to the real numbers. Its only argument is . It has no hypotheses, no further binders and no typeclass assumptions beyond the standard real-number and classical instances used to make the definition work.
For a natural number , is the real number
Here ranges over the primes in , so . The subtraction is natural-number subtraction, but since it is ordinary subtraction, and . The logarithms are the real natural logarithms of the natural numbers and .
Edge cases:
- For and there are no primes in , so .
- The term , which occurs when is prime, has . Zero is not prime, so this term is . A term contributes a nonzero value only when and both and are prime.
- Each nonzero term is a product of two logarithms of primes, each at least , so each nonzero term is strictly positive.
- The sum is finite and the definition involves no division, so it is total and has no junk values.
The definition asserts nothing beyond the value of for each . It contains no theorem.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.