OAI/NumberTheory/TwoPointCorrelations/ResidueCounts.lean
13 declarations, 0 contain sorry, 0 declared as axioms
Residue counts on arbitrary finite consecutive intervals
An interval is represented by its starting residue A and its length N.
Thus this includes arbitrary translates, including intervals starting at
negative integers. We prove the exact quotient-and-remainder count, the
one-count discrepancy, and the total-variation estimate used by the finite
residue comparison in the manuscript.
- def
OAI.TwoPointCorrelations.residueCountline 22Source documentation
Number of offsets
0 ≤ j < Nwhose translated residue equalsr.Also declared: OAI/NumberTheory/TwoPoint/Bounds/ResidueCounts.lean:22 (same declaration text).
def residueCount {D : ℕ} [NeZero D] (A : ZMod D) (N : ℕ) (r : ZMod D) : ℕ := … - lemma
OAI.TwoPointCorrelations.residueCount_addline 25Also declared: OAI/NumberTheory/TwoPoint/Bounds/ResidueCounts.lean:25 (same declaration text).
- lemma
OAI.TwoPointCorrelations.residueCount_periodline 34Also declared: OAI/NumberTheory/TwoPoint/Bounds/ResidueCounts.lean:34 (same declaration text).
- lemma
OAI.TwoPointCorrelations.residueCount_multipleline 56Also declared: OAI/NumberTheory/TwoPoint/Bounds/ResidueCounts.lean:56 (same declaration text).
- lemma
OAI.TwoPointCorrelations.residueCount_shortline 63Also declared: OAI/NumberTheory/TwoPoint/Bounds/ResidueCounts.lean:63 (same declaration text).
- theorem
OAI.TwoPointCorrelations.residueCount_exactline 88Source documentation
Exact residue count on an arbitrary translated interval.
Also declared: OAI/NumberTheory/TwoPoint/Bounds/ResidueCounts.lean:88 (same declaration text).
theorem residueCount_exact {D : ℕ} [NeZero D] (A r : ZMod D) (N : ℕ) : residueCount A N r = N / D + if (r - A).val < N % D then 1 else 0 := by …Mentions: OAI.TwoPointCorrelations.residueCount
- theorem
OAI.TwoPointCorrelations.residueCount_discrepancyline 97Source documentation
The count differs from interval length divided by modulus by at most one.
Also declared: OAI/NumberTheory/TwoPoint/Bounds/ResidueCounts.lean:97 (same declaration text).
theorem residueCount_discrepancy {D : ℕ} [NeZero D] (A r : ZMod D) (N : ℕ) : |(residueCount A N r : ℝ) - (N : ℝ) / D| ≤ 1 := by …Mentions: OAI.TwoPointCorrelations.residueCount
- def
OAI.TwoPointCorrelations.residueProbabilityline 115Source documentation
The residue law of a uniformly selected origin from an interval.
Also declared: OAI/NumberTheory/TwoPoint/Bounds/ResidueCounts.lean:115 (same declaration text).
noncomputable def residueProbability {D : ℕ} [NeZero D] (A : ZMod D) (N : ℕ) (r : ZMod D) : ℝ := (residueCount A N r : ℝ) / NMentions: OAI.TwoPointCorrelations.residueCount
- lemma
OAI.TwoPointCorrelations.residueCount_sumline 118Also declared: OAI/NumberTheory/TwoPoint/Bounds/ResidueCounts.lean:118 (same declaration text).
- lemma
OAI.TwoPointCorrelations.residueProbability_sumline 124Also declared: OAI/NumberTheory/TwoPoint/Bounds/ResidueCounts.lean:124 (same declaration text).
- lemma
OAI.TwoPointCorrelations.residueProbability_discrepancyline 130Also declared: OAI/NumberTheory/TwoPoint/Bounds/ResidueCounts.lean:130 (same declaration text).
- def
OAI.TwoPointCorrelations.residueTotalVariationline 142Source documentation
Half the ℓ¹ difference from the uniform residue law.
Also declared: OAI/NumberTheory/TwoPoint/Bounds/ResidueCounts.lean:142 (same declaration text).
noncomputable def residueTotalVariation {D : ℕ} [NeZero D] (A : ZMod D) (N : ℕ) : ℝ := … - theorem
OAI.TwoPointCorrelations.residueTotalVariation_leline 146Source documentation
The stronger
D/(2N)bound implies theD/Nestimate used in the paper.Also declared: OAI/NumberTheory/TwoPoint/Bounds/ResidueCounts.lean:146 (same declaration text).
theorem residueTotalVariation_le {D : ℕ} [NeZero D] (A : ZMod D) (N : ℕ) (hN : 0 < N) : residueTotalVariation A N ≤ (D : ℝ) / (2 * N) := by …