math / data /lean /OAI /NumberTheory /TwoPoint /Basic.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
4.1 kB
import Mathlib.NumberTheory.ArithmeticFunction.Liouville
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Analysis.Complex.Basic
namespace OAI
/-!
# Ordinary two-point correlations: concrete sums and affine transfer
Definitions follow the introduction of the supplied manuscript
*Ordinary two-point correlations of multiplicative functions* (September 24, 2026).
The exact Liouville identities below are the algebraic part of Β§8.
No cancellation estimate is assumed or asserted here.
-/
open scoped BigOperators
namespace TwoPointCorrelations
/-- The standard Liouville function, viewed as complex valued. Its value at zero
is zero, as in mathlib; only positive arguments occur in the main statements. -/
noncomputable def liouville (n : β„•) : β„‚ := ArithmeticFunction.liouville n
/-- An ordinary sum, with weight one on each positive integer at most `N`. -/
def correlationSum (f g : β„• β†’ β„‚) (h₁ hβ‚‚ N : β„•) : β„‚ :=
βˆ‘ n ∈ Finset.Icc 1 N, f (n + h₁) * g (n + hβ‚‚)
/-- The ordinary affine correlation, allowing nonunit coefficients. -/
def affineSum (f g : β„• β†’ β„‚) (a₁ aβ‚‚ b₁ bβ‚‚ N : β„•) : β„‚ :=
βˆ‘ n ∈ Finset.Icc 1 N, f (a₁ * n + b₁) * g (aβ‚‚ * n + bβ‚‚)
/-- The progression sum includes every residue class, including zero. -/
def progressionSum (f g : β„• β†’ β„‚) (h l b N : β„•) : β„‚ :=
βˆ‘ n ∈ (Finset.Icc 1 N).filter (fun n => n % l = b % l), f n * g (n + h)
/-- Ordinary multiplicativity is required only for coprime positive arguments;
this also permits the identically zero function, as does the manuscript. -/
def Multiplicative (f : β„• β†’ β„‚) : Prop :=
βˆ€ m n : β„•, 0 < m β†’ 0 < n β†’ m.Coprime n β†’ f (m * n) = f m * f n
def OneBounded (f : β„• β†’ β„‚) : Prop := βˆ€ n : β„•, 0 < n β†’ β€–f nβ€– ≀ 1
@[simp] theorem liouville_mul (m n : β„•) :
liouville (m * n) = liouville m * liouville n := by
simp [liouville, ArithmeticFunction.liouville_apply_mul]
@[simp] theorem liouville_sq {n : β„•} (hn : n β‰  0) : liouville n ^ 2 = 1 := by
have h : (ArithmeticFunction.liouville n) ^ 2 = (1 : β„€) := by
rw [ArithmeticFunction.liouville_apply hn, ← pow_mul, Nat.mul_comm _ 2, pow_mul]
norm_num
unfold liouville
exact_mod_cast h
/-- Multiplying the two affine arguments by the opposite slopes gives an exact
identity. There is no coprimality restriction on any coefficient. -/
theorem liouville_affine_dilation (a₁ aβ‚‚ b₁ bβ‚‚ n : β„•)
(ha₁ : a₁ β‰  0) (haβ‚‚ : aβ‚‚ β‰  0) :
liouville (a₁ * n + b₁) * liouville (aβ‚‚ * n + bβ‚‚) =
liouville (a₁ * aβ‚‚) * liouville (aβ‚‚ * (a₁ * n + b₁)) *
liouville (a₁ * (aβ‚‚ * n + bβ‚‚)) := by
have hs := liouville_sq (Nat.mul_ne_zero ha₁ haβ‚‚)
calc
_ = liouville (a₁ * aβ‚‚) ^ 2 *
(liouville (a₁ * n + b₁) * liouville (aβ‚‚ * n + bβ‚‚)) := by rw [hs, one_mul]
_ = _ := by simp only [liouville_mul]; ring
/-- The orientation with `aβ‚‚ b₁ ≀ a₁ bβ‚‚`; the opposite orientation is obtained
by swapping the two factors. This is manuscript equation (q:quant-affine-identity). -/
theorem liouville_affine_ordered (a₁ aβ‚‚ b₁ bβ‚‚ n : β„•)
(ha₁ : a₁ β‰  0) (haβ‚‚ : aβ‚‚ β‰  0) (horder : aβ‚‚ * b₁ ≀ a₁ * bβ‚‚) :
liouville (a₁ * n + b₁) * liouville (aβ‚‚ * n + bβ‚‚) =
liouville (a₁ * aβ‚‚) * liouville (a₁ * aβ‚‚ * n + aβ‚‚ * b₁) *
liouville (a₁ * aβ‚‚ * n + aβ‚‚ * b₁ + (a₁ * bβ‚‚ - aβ‚‚ * b₁)) := by
rw [liouville_affine_dilation a₁ aβ‚‚ b₁ bβ‚‚ n ha₁ haβ‚‚]
congr 2
Β· congr 1; ring
Β· calc
a₁ * (aβ‚‚ * n + bβ‚‚) = a₁ * aβ‚‚ * n + a₁ * bβ‚‚ := by ring
_ = a₁ * aβ‚‚ * n + aβ‚‚ * b₁ + (a₁ * bβ‚‚ - aβ‚‚ * b₁) := by omega
theorem liouville_multiplicative : Multiplicative liouville := by
intro m n _ _ _
exact liouville_mul m n
theorem liouville_oneBounded : OneBounded liouville := by
intro n hn
have hs : β€–liouville nβ€– ^ 2 = 1 := by
rw [← norm_pow, liouville_sq hn.ne', norm_one]
nlinarith [norm_nonneg (liouville n)]
end TwoPointCorrelations
end OAI