Uniformity along an affine line in a finite vector space #
Over a finite vector space V over a field F, the affine map v ↦ x + c • v (c ≠ 0) is a
bijection (Cslib.Code.affineLineEquiv), so pushing the uniform distribution on V forward along
v ↦ x + c • v preserves uniformity. This is kept in a leaf module so algebraic self-correction
modules (CslibFrontier.Foundations.Data.Code.SelfCorrection) do not depend on PMF or ProbComp.
Main results #
Cslib.Probability.PMF.map_add_smul_uniformOfFintype:(PMF.uniformOfFintype V).map (fun v => x + c • v) = PMF.uniformOfFintype Vforc ≠ 0.Cslib.ProbComp.eval_map_add_smul_uniform: samplingvuniformly fromVand returningx + c • v(c ≠ 0) has the uniform law onV.
theorem Cslib.Probability.PMF.map_add_smul_uniformOfFintype {F : Type u_1} {V : Type u_2} [Field F] [AddCommGroup V] [Module F V] [Fintype V] [Nonempty V] (x : V) {c : F} (hc : c ≠ 0) :
If v is uniformly distributed on a finite vector space V over F and c ≠ 0, then
x + c • v is uniformly distributed on V.
theorem Cslib.ProbComp.eval_map_add_smul_uniform {F V : Type} [Field F] [AddCommGroup V] [Module F V] [Fintype V] [Nonempty V] (x : V) {c : F} (hc : c ≠ 0) :
Sampling v uniformly from V and returning x + c • v for c ≠ 0 has the uniform law on
V.