Documentation

CslibFrontier.Probability.Uniform.AffineLine

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 #

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) :
PMF.map (fun (v : V) => x + c • v) (uniformOfFintype V) = uniformOfFintype V

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) :
((fun (v : V) => x + c • v) <$> uniform V).eval = Probability.PMF.uniformOfFintype V

Sampling v uniformly from V and returning x + c • v for c ≠ 0 has the uniform law on V.