OAI/NumberTheory/TwoPoint/Bounds/CRTComparison.lean
20 declarations, 0 contain sorry, 0 declared as axioms
Finite CRT marginals and contraction under independent randomization
A selected finite set of pairwise coprime residue coordinates has the law
of one residue modulo their product. The exact interval count from
ResidueCounts gives total variation at most D / (2N). Applying any
finite stochastic kernel preserves this bound; in particular one may add
independent finite randomness and project to any selected encoded bits.
These are the finite arithmetic and data-processing steps in q:crt-bits.
- def
OAI.TwoPointCorrelations.finiteTotalVariationline 23Source documentation
Total variation between two finite real mass functions.
Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:23 (same declaration text).
noncomputable def finiteTotalVariation {α : Type*} [Fintype α] (f g : α → ℝ) : ℝ := … - def
OAI.TwoPointCorrelations.kernelTransportline 27Source documentation
Application of a finite transition kernel.
Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:27 (same declaration text).
noncomputable def kernelTransport {α β : Type*} [Fintype α] (K : α → β → ℝ) (f : α → ℝ) (y : β) : ℝ := … - lemma
OAI.TwoPointCorrelations.kernelTransport_nonnegline 31Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:31 (same declaration text).
- lemma
OAI.TwoPointCorrelations.kernelTransport_sumline 36Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:36 (same declaration text).
- theorem
OAI.TwoPointCorrelations.finiteTotalVariation_kernelline 45Source documentation
Adding independent randomness and then forgetting information cannot increase total variation.
Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:45 (same declaration text).
theorem finiteTotalVariation_kernel {α β : Type*} [Fintype α] [Fintype β] (K : α → β → ℝ) (f g : α → ℝ) (hK : ∀ x y, 0 ≤ K x y) (hKsum : ∀ x, ∑ y, K x y = 1) : finiteTotalVariation (kernelTransport K f) (kernelTransport K g) ≤ finiteTotalVariation f g := by …Mentions: OAI.TwoPointCorrelations.finiteTotalVariation, OAI.TwoPointCorrelations.kernelTransport
- lemma
OAI.TwoPointCorrelations.finite_observable_differenceline 68Source documentation
A bounded observable has expectation difference at most twice TV.
Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:68 (same declaration text).
lemma finite_observable_difference {α : Type*} [Fintype α] (f g u : α → ℝ) (hu : ∀ x, |u x| ≤ 1) : |(∑ x, f x * u x) - ∑ x, g x * u x| ≤ 2 * finiteTotalVariation f g := by … - def
OAI.TwoPointCorrelations.finiteRandomKernelline 87Source documentation
A deterministic map with independent uniform finite auxiliary randomness.
Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:87 (same declaration text).
noncomputable def finiteRandomKernel {α β J : Type*} [DecidableEq β] [Fintype J] (F : α → J → β) (x : α) (y : β) : ℝ := … - lemma
OAI.TwoPointCorrelations.finiteRandomKernel_nonnegline 91Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:91 (same declaration text).
- lemma
OAI.TwoPointCorrelations.finiteRandomKernel_sumline 96Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:96 (same declaration text).
- instance
OAI.TwoPointCorrelations.modulusProduct_neZeroline 103Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:103 (same declaration text).
- def
OAI.TwoPointCorrelations.crtJointProbabilityline 108Source documentation
The actual joint residue law of an interval under the CRT equivalence.
Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:108 (same declaration text).
noncomputable def crtJointProbability {ι : Type*} [Fintype ι] [DecidableEq ι] (s : ι → ℕ) [∀ i, NeZero (s i)] (hcop : Pairwise (fun i j => (s i).Coprime (s j))) (A : ZMod (∏ i, s i)) (N : ℕ) (r : ∀ i, ZMod (s i)) : ℝ := … - def
OAI.TwoPointCorrelations.crtUniformline 114Source documentation
Uniform independent residue coordinates.
Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:114 (same declaration text).
noncomputable def crtUniform {ι : Type*} [Fintype ι] [DecidableEq ι] (s : ι → ℕ) (_r : ∀ i, ZMod (s i)) : ℝ := 1 / (∏ i, s i : ℕ) - lemma
OAI.TwoPointCorrelations.crtUniform_productline 117Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:117 (same declaration text).
- lemma
OAI.TwoPointCorrelations.crtJointProbability_eq_countline 122Source documentation
This CRT-transported mass is the actual empirical joint residue law.
Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:122 (same declaration text).
lemma crtJointProbability_eq_count {ι : Type*} [Fintype ι] [DecidableEq ι] (s : ι → ℕ) [∀ i, NeZero (s i)] (hcop : Pairwise (fun i j => (s i).Coprime (s j))) (A : ZMod (∏ i, s i)) (N : ℕ) (r : ∀ i, ZMod (s i)) : crtJointProbability s hcop A N r = (∑ j ∈ Finset.range N, if ZMod.prodEquivPi s hcop (A + (j : ZMod (∏ i, s i))) = r then (1 : ℝ) else 0) / N := by … - lemma
OAI.TwoPointCorrelations.crt_coordinates_add_natline 140Source documentation
The CRT equivalence is the expected coordinatewise residue map.
Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:140 (same declaration text).
lemma crt_coordinates_add_nat {ι : Type*} [Fintype ι] [DecidableEq ι] (s : ι → ℕ) [∀ i, NeZero (s i)] (hcop : Pairwise (fun i j => (s i).Coprime (s j))) (A : ZMod (∏ i, s i)) (j : ℕ) (i : ι) : ZMod.prodEquivPi s hcop (A + (j : ZMod (∏ i, s i))) i = ZMod.castHom (Finset.dvd_prod_of_mem s (Finset.mem_univ i)) (ZMod (s i)) A + (j : ZMod (s i)) := by … - lemma
OAI.TwoPointCorrelations.crtJointProbability_nonnegline 148Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:148 (same declaration text).
- lemma
OAI.TwoPointCorrelations.crtJointProbability_sumline 155Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:155 (same declaration text).
- lemma
OAI.TwoPointCorrelations.crtJointProbability_totalVariationline 165Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:165 (same declaration text).
- theorem
OAI.TwoPointCorrelations.crt_kernel_totalVariationline 177Source documentation
Selected CRT coordinates followed by any finite random encoding or projection satisfy the interval discrepancy bound.
Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:177 (same declaration text).
theorem crt_kernel_totalVariation {ι β : Type*} [Fintype ι] [DecidableEq ι] [Fintype β] (s : ι → ℕ) [∀ i, NeZero (s i)] (hcop : Pairwise (fun i j => (s i).Coprime (s j))) (A : ZMod (∏ i, s i)) (N : ℕ) (hN : 0 < N) (K : (∀ i, ZMod (s i)) → β → ℝ) (hK : ∀ r y, 0 ≤ K r y) (hKsum : ∀ r, ∑ y, K r y = 1) : finiteTotalVariation (kernelTransport K (crtJointProbability s hcop A N)) (kernelTransport K (crtUniform s)) ≤ (∏ i, s i : ℕ) / (2 * (N : ℝ)) := by …Mentions: OAI.TwoPointCorrelations.finiteTotalVariation, OAI.TwoPointCorrelations.kernelTransport, OAI.TwoPointCorrelations.crtJointProbability, OAI.TwoPointCorrelations.crtUniform
- theorem
OAI.TwoPointCorrelations.crt_random_projection_totalVariationline 191Source documentation
Independent finite auxiliary variables and a projection are a special case, so in particular selecting encoded bit marginals cannot increase TV.
Also declared: OAI/NumberTheory/TwoPointCorrelations/CRTComparison.lean:191 (same declaration text).
theorem crt_random_projection_totalVariation {ι β J : Type*} [Fintype ι] [DecidableEq ι] [Fintype β] [DecidableEq β] [Fintype J] [Nonempty J] (s : ι → ℕ) [∀ i, NeZero (s i)] (hcop : Pairwise (fun i j => (s i).Coprime (s j))) (A : ZMod (∏ i, s i)) (N : ℕ) (hN : 0 < N) (F : (∀ i, ZMod (s i)) → J → β) : finiteTotalVariation (kernelTransport (finiteRandomKernel F) (crtJointProbability s hcop A N)) (kernelTransport (finiteRandomKernel F) (crtUniform s)) ≤ (∏ i, s i : ℕ) / (2 * (N : ℝ)) := …Mentions: OAI.TwoPointCorrelations.finiteTotalVariation, OAI.TwoPointCorrelations.kernelTransport, OAI.TwoPointCorrelations.finiteRandomKernel, OAI.TwoPointCorrelations.crtJointProbability, OAI.TwoPointCorrelations.crtUniform