Waring's problem: representation counts, the main term, and the Farey dissection
DefinitionCircleMethod_asymptoticThe objects in which the Hardy--Littlewood asymptotic formula for Waring's problem is stated, together with the Farey dissection it is proved by.
The representation count. , the quantity the whole method exists to estimate. It is finite because forces , and boxCount is the corresponding count over the explicit box .
The main term.
the product of the archimedean density (the Gamma factor) and the arithmetic density (the singular series). The asymptotic asserts : the number of representations equals the product of all local densities, archimedean and -adic.
The dissection. With the natural box side and the Farey order, the major arcs are the union of intervals of radius about the reduced fractions with , and the minor arcs are the rest of the circle. On the major arcs the generating function is large and computable; on the minor arcs Weyl's inequality and Hua's inequality make it small. singIntTrunc is the archimedean factor truncated to the width of an arc.
Formalization Note. repCount uses Nat.card of a subtype, which is well formed before finiteness is established; it agrees with boxCount at side k n. The exponent is a real power (Real.rpow) and is genuinely non-integral in general. The dissection lives on rather than so that the arc about is not split; the integrand is -periodic, so this is harmless.
import Definitions.Def_CircleMethod_waring
import Definitions.Def_CircleMethod_weylsum
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Analysis.SpecialFunctions.Gamma.Basic
import Mathlib.Analysis.SpecialFunctions.Integrals.Basic
import Mathlib.Data.Fintype.Pi
namespace CircleMethod
open Finset
noncomputable def repCount (k s n : ℕ) : ℕ :=
Nat.card {v : Fin s → ℕ // ∑ i, (v i) ^ k = n}
noncomputable def boxCount (k s N : ℕ) (n : ℤ) : ℕ :=
((Fintype.piFinset (fun _ : Fin s => Finset.range N)).filter
(fun v => ∑ i, ((v i : ℤ) ^ k) = n)).card
noncomputable def singSeries (k s : ℕ) (n : ℤ) : ℂ := ∑' q : ℕ, locDens k s q n
noncomputable def gammaFactor (k s : ℕ) : ℝ :=
Real.Gamma (1 + 1 / (k : ℝ)) ^ s / Real.Gamma ((s : ℝ) / (k : ℝ))
noncomputable def mainTerm (k s n : ℕ) : ℂ :=
((gammaFactor k s : ℝ) : ℂ) * singSeries k s n *
(((n : ℝ) ^ ((s : ℝ) / (k : ℝ) - 1) : ℝ) : ℂ)
noncomputable def side (k n : ℕ) : ℕ := ⌊(n : ℝ) ^ ((k : ℝ)⁻¹)⌋₊ + 1
noncomputable def arcParam (k : ℕ) (δ : ℝ) (n : ℕ) : ℕ := ⌊(side k n : ℝ) ^ δ⌋₊ + 1
noncomputable def rad (k : ℕ) (δ : ℝ) (n : ℕ) : ℝ :=
(arcParam k δ n : ℝ) / (side k n : ℝ) ^ k
def fareyPairs (P : ℕ) : Finset (ℕ × ℕ) :=
(Finset.Icc 1 P).biUnion fun q =>
((Finset.Icc 1 q).filter fun a => Nat.Coprime a q).image fun a => (q, a)
noncomputable def major (k : ℕ) (δ : ℝ) (n : ℕ) : Set ℝ :=
⋃ p ∈ fareyPairs (arcParam k δ n),
Set.Icc ((p.2 : ℝ) / (p.1 : ℝ) - rad k δ n) ((p.2 : ℝ) / (p.1 : ℝ) + rad k δ n)
noncomputable def minor (k : ℕ) (δ : ℝ) (n : ℕ) : Set ℝ :=
Set.Ico (rad k δ n) (1 + rad k δ n) \ major k δ n
noncomputable def integrand (k s N : ℕ) (n : ℤ) (α : ℝ) : ℂ :=
(weylSum k α N) ^ s * e (-(n : ℝ) * α)
noncomputable def singIntTrunc (k s N : ℕ) (n : ℤ) (ρ : ℝ) : ℂ :=
∫ β in (-ρ)..ρ, (∫ γ in (0 : ℝ)..(N : ℝ), e (β * γ ^ k)) ^ s * e (-(n : ℝ) * β)
end CircleMethod