Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Finite rational spectra of the ordinary and centered Möbius weights

Definition
GRH_AdditiveMoebiusSpectrum

by scuba8684 · Nov 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

analytic-number-theorylarge-sievemobius-function

For a cutoff N, the unsigned weight is μ(n). The signed weight changes sign for n above the integer square root of N. Define the residues, reciprocal correction, rational Fourier transforms, finite Farey sets, exceptional frequencies and residue-row variance.

Definition code
import Definitions.Def_GRH_OneSidedMoebius
import Mathlib.Analysis.Fourier.ZMod
import Mathlib.Algebra.Order.Round

namespace GRH.AdditiveMoebiusSpectrum

open Finset
noncomputable section

/-- The signed version changes the sign of the ordinary Möbius weights after the square root. -/
def weight (signed : Bool) (N n : ℕ) : ℝ :=
  if signed = true ∧ N.sqrt < n then -(ArithmeticFunction.moebius n : ℝ)
  else (ArithmeticFunction.moebius n : ℝ)

def fiber {q : ℕ} (a : ZMod q) (N : ℕ) (w : ℕ → ℝ) : ℝ :=
  ∑ n ∈ range (N+1), if (n : ZMod q) = a then w n else 0

def correction (q : ℕ) [NeZero q] (N : ℕ) : ℝ :=
  (N : ℝ) / q * (GRH.reducedMoebiusHarmonic q N.sqrt)^2

def angle {q : ℕ} (h : ZMod q) : ℚ := (h.val : ℚ) / q

def transform (signed : Bool) (N : ℕ) (x : ℚ) : ℂ :=
  ∑ n ∈ range (N+1), (weight signed N n : ℂ) *
    Complex.exp (2 * Real.pi * Complex.I * ((n : ℝ) * (x : ℝ)))

def exceptional (signed : Bool) (N : ℕ) (A : Finset ℚ) (T : ℝ) : Finset ℚ :=
  A.filter fun x => T < ‖transform signed N x‖

/-- All reduced rational frequencies in the half-open unit interval with denominator at most Q. -/
def fareySet (Q : ℕ) : Finset ℚ :=
  (((range Q) ×ˢ (Icc 1 Q)).image (fun p : ℕ × ℕ => (p.1 : ℚ)/p.2)).filter
    fun x => 0 ≤ x ∧ x < 1 ∧ x.den ≤ Q

def rowVariance (q N : ℕ) [NeZero q] : ℝ :=
  let B := fun a : ZMod q => GRH.centeredMoebiusBilinear q a N
  ∑ a : ZMod q, (B a - (∑ b : ZMod q, B b)/(q : ℝ))^2

def primeVariance (p : Nat.Primes) (N : ℕ) : ℝ :=
  haveI : NeZero p.val := ⟨p.property.ne_zero⟩
  rowVariance p.val N

def escapes : Prop :=
  ∀ x : ℚ, 0 ≤ x → x < 1 → ∀ θ : ℝ, 1/2 < θ → θ < 1 →
    ∃ U : ℕ, ∀ u : ℕ, U ≤ u →
      ‖transform false (u^2) x‖ ≤ ((u : ℝ)^2+1)^θ

end
end GRH.AdditiveMoebiusSpectrum
Source
Möbius bilinear progression problem on Prove2Me. The finite sums and all normalizations use the original GRH_MoebiusBilinear definition. The Fourier character is Mathlib’s ZMod.stdAddChar.

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