Documentation

LeanPool.KloostermanWeil.Weil.ChineseRemainderAndCompletion

Adapted from Charlie Dorsey’s Apache-2.0 Weil Bounds Toolkit for Lean Pool’s module system, Mathlib version, quality requirements and compilation performance.

CRT factorization and Fourier completion #

Exact Bézout/CRT factorization, reduced-modulus bounds, sharp centered Fourier completion and weighted partial summation. The underlying techniques are standard; see Iwaniec–Kowalski (2004), Ch. 12 §12.2, for completion methods. The declared hypotheses govern each estimate.

CRT region: exact unit-sum splitting via the chosen Bézout coefficients; standard CRT, locally proved. No additional analytic hypothesis is hidden here.

The Bezout coefficient of n in the identity for the coprime pair m, n.

Equations
Instances For

    The Bezout coefficient of m in the identity for the coprime pair m, n.

    Equations
    Instances For
      theorem KloostermanWeil.crt_bezout {m n : ℕ} (hcop : m.Coprime n) :
      ↑n * crtLeftCoeff m n + ↑m * crtRightCoeff m n = 1
      noncomputable def KloostermanWeil.kloostermanUnitSum (N : ℕ) [NeZero N] (a b : ZMod N) :

      The standard additive character of b*x + a/x, summed over residue-class units.

      Equations
      Instances For
        noncomputable def KloostermanWeil.crtUnitsEquiv {m n : ℕ} (hcop : m.Coprime n) :
        (ZMod (m * n))ˣ ≃* (ZMod m)ˣ × (ZMod n)ˣ

        The Chinese remainder equivalence on unit groups of coprime residue rings.

        Equations
        Instances For
          theorem KloostermanWeil.kloostermanUnitSum_crt {m n : ℕ} [NeZero m] [NeZero n] [NeZero (m * n)] (hcop : m.Coprime n) (a b : ZMod (m * n)) :
          theorem KloostermanWeil.crt_local_left_isUnit {m n : ℕ} [NeZero m] (hcop : m.Coprime n) {a : ZMod (m * n)} (ha : IsUnit a) :
          IsUnit (↑(crtLeftCoeff m n) * ((ZMod.chineseRemainder hcop) a).1)
          theorem KloostermanWeil.crt_local_right_isUnit {m n : ℕ} [NeZero n] (hcop : m.Coprime n) {a : ZMod (m * n)} (ha : IsUnit a) :
          theorem KloostermanWeil.kloostermanUnitSum_prod_primes_le (hWeil : PrimeNondegenerateWeil) (s : Finset ℕ) (Q : ℕ) :
          Q = ∏ p ∈ s, p → ∀ (hQ0 : Q ≠ 0), (∀ p ∈ s, Nat.Prime p) → ∀ (a b : ZMod Q), IsUnit a → ‖kloostermanUnitSum Q a b‖ ≤ 2 ^ s.card * √↑Q

          Reduction region: bound for a source-defined reduced modulus/sum. No theorem here identifies that reduced sum with a full-modulus sum.

          The common divisor removed from the numerator and modulus.

          Equations
          Instances For

            The modulus after division by gcd(A, q).

            Equations
            Instances For

              The numerator after division by gcd(A, q).

              Equations
              Instances For

                Completion region: character orthogonality, full finite DFT and sharp interval Fourier completion; method context [IwaniecKowalski2004].

                The smaller distance of a residue's representative to zero or to the modulus.

                Equations
                Instances For
                  noncomputable def KloostermanWeil.unitsEquivIsUnitSubtype (M : Type u_1) [Monoid M] :
                  Mˣ ≃ { x : M // IsUnit x }

                  Identify units with the subtype of elements satisfying IsUnit.

                  Equations
                  Instances For
                    noncomputable def KloostermanWeil.reciprocalPhase (N : ℕ) [NeZero N] (a x : ZMod N) :

                    The reciprocal additive phase on units, extended by zero on nonunits.

                    Equations
                    Instances For
                      noncomputable def KloostermanWeil.reciprocalMean (N : ℕ) [NeZero N] (a : ZMod N) :

                      The average of the reciprocal phase over all residue classes.

                      Equations
                      Instances For
                        noncomputable def KloostermanWeil.centeredReciprocalPhase (N : ℕ) [NeZero N] (a x : ZMod N) :

                        Subtract the full residue-class average from the reciprocal phase.

                        Equations
                        Instances For
                          theorem KloostermanWeil.stdAddChar_crt_bezout {m n : ℕ} [NeZero m] [NeZero n] [NeZero (m * n)] (hcop : m.Coprime n) (y : ℤ) :

                          Bézout/CRT factorization of the standard additive character on a coprime product modulus. The local shifts are units modulo the opposite factors.

                          theorem KloostermanWeil.geometricKernel_norm_le {N : ℕ} [NeZero N] {h : ZMod N} (hh : h ≠ 0) (L : ℕ) :

                          Geometric kernel bound for a nonzero Fourier frequency. This is the finite-completion denominator estimate used after centering.

                          theorem KloostermanWeil.sum_Ico_reflected_inv_eq (N : ℕ) :
                          ∑ i ∈ Finset.Ico 1 N, (↑(N - i))⁻¹ = ∑ i ∈ Finset.Ico 1 N, (↑i)⁻¹
                          theorem KloostermanWeil.zmod_finEquiv_val {N : ℕ} [NeZero N] (i : Fin N) :
                          ((ZMod.finEquiv N) i).val = ↑i
                          theorem KloostermanWeil.fin_sum_inv_val_eq_Ico (N : ℕ) :
                          (∑ i : Fin N, if ↑i = 0 then 0 else (↑↑i)⁻¹) = ∑ i ∈ Finset.Ico 1 N, (↑i)⁻¹
                          theorem KloostermanWeil.fin_sum_inv_complement_eq_Ico_reflected (N : ℕ) :
                          (∑ i : Fin N, if ↑i = 0 then 0 else (↑(N - ↑i))⁻¹) = ∑ i ∈ Finset.Ico 1 N, (↑(N - i))⁻¹

                          Harmonic mass of all nonzero Fourier frequencies, in the symmetric distance normalization used by the geometric kernel.

                          noncomputable def KloostermanWeil.intervalCharacterKernel (N : ℕ) [NeZero N] (h x : ZMod N) (L : ℕ) :

                          The additive-character sum over L consecutive residue classes starting at x.

                          Equations
                          Instances For
                            noncomputable def KloostermanWeil.centeredIntervalSum (N : ℕ) [NeZero N] (a x : ZMod N) (L : ℕ) :

                            Sum the mean-centered reciprocal phase along a consecutive interval.

                            Equations
                            Instances For
                              theorem KloostermanWeil.finiteFourier_inversion {N : ℕ} [NeZero N] (f : ZMod N → ℂ) (y : ZMod N) :
                              f y = (↑N)⁻¹ * ∑ h : ZMod N, ZMod.stdAddChar (h * y) * ZMod.dft f h
                              theorem KloostermanWeil.intervalSum_fourier {N : ℕ} [NeZero N] (f : ZMod N → ℂ) (x : ZMod N) (L : ℕ) :
                              ∑ j ∈ Finset.range L, f (x + ↑j) = (↑N)⁻¹ * ∑ h : ZMod N, ZMod.dft f h * intervalCharacterKernel N h x L
                              theorem KloostermanWeil.intervalSum_norm_le_of_dft_bound {N : ℕ} [NeZero N] (f : ZMod N → ℂ) (hmean : ∑ y : ZMod N, f y = 0) (x : ZMod N) (L : ℕ) {B : ℝ} (hB0 : 0 ≤ B) (hB : ∀ (h : ZMod N), h ≠ 0 → ‖ZMod.dft f h‖ ≤ B) :
                              ‖∑ j ∈ Finset.range L, f (x + ↑j)‖ ≤ B * (1 + Real.log ↑N)

                              Finite Fourier completion for any mean-zero function, using only a uniform bound on its nonzero Fourier coefficients.

                              theorem KloostermanWeil.centeredIntervalSum_norm_le_of_dft_bound {N : ℕ} [NeZero N] (a x : ZMod N) (L : ℕ) {B : ℝ} (hB0 : 0 ≤ B) (hB : ∀ (h : ZMod N), h ≠ 0 → ‖ZMod.dft (centeredReciprocalPhase N a) h‖ ≤ B) :

                              Centered reciprocal-phase completion as an instance of mean-zero Fourier completion.

                              Centered incomplete reciprocal-phase completion at the reduced squarefree modulus. The interval length is unrestricted. The PrimeNondegenerateWeil premise is proved in LeanPool.KloostermanWeil.Weil.PrimeKloosterman.

                              Weighted region: discrete partial summation with reciprocal weights, an explicit consequence of the preceding centered interval bound.

                              noncomputable def KloostermanWeil.reciprocalNatWeight (Y i : ℕ) :

                              The reciprocal weight 1 / (Y + i), viewed as a complex number.

                              Equations
                              Instances For
                                theorem KloostermanWeil.partialSummation_reciprocal_weight_le (Y L : ℕ) (hY : 0 < Y) (c : ℕ → ℂ) {C : ℝ} (hC0 : 0 ≤ C) (hprefix : ∀ k ≤ L, ‖∑ j ∈ Finset.range k, c j‖ ≤ C) :
                                ‖∑ j ∈ Finset.range L, c j * reciprocalNatWeight Y j‖ ≤ 2 * C / ↑Y

                                Discrete partial summation for reciprocal weights. A uniform bound C on all initial partial sums over a consecutive interval starting at Y>0 gives an explicit 2C/Y weighted bound.

                                noncomputable def KloostermanWeil.weightedCenteredIntervalSum (N : ℕ) [NeZero N] (a x : ZMod N) (Y L : ℕ) :

                                The centered reciprocal-phase interval sum with weights 1 / (Y + j).

                                Equations
                                Instances For

                                  Partial summation applied to the centered reduced-modulus completion. The interval length remains unrestricted.