ErrorCorrectingCodes.Codeword.uniform_vector_dist
defimported Lean
The uniform probability mass function on $\alpha^n$, encoded as a function $\alpha^n\to\mathbb{R}$ assigning $1/|\alpha|^n$ to each vector.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in set_option linter.unusedSectionVars false in open Set Filter Asymptotics Finset in variable {α : Type*} [Fintype α] [Nonempty α] [DecidableEq α] [Field α] in variable {n k m : ℕ} in noncomputable def ErrorCorrectingCodes.Codeword.uniform_vector_dist (n : ℕ) (α : Type*) [Fintype α] [DecidableEq α] : (Codeword n α) → ℝ
- Defined in
- TCSlib, `ErrorCorrectingCodes.Codeword.uniform_vector_dist`
- Lean proof
- By Allan Li (from the file's git history), from github.com/Shilun-Allan-Li/tcslib at
c8a02591b1e5(Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.ErrorCorrectingCodes.Codeword.uniform_vector_dist← ErrorCorrectingCodes.Codeword.uniform_vector_dist (TCSlib/ErrorCorrectingCodes/LinearCodes.lean:68): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Built on 1
- ErrorCorrectingCodes.CodewordA codeword of length $n$ over alphabet $\alpha$ is a function $c : \mathrm{Fin}\,n \to \alpha$.
- Used by 2
- ErrorCorrectingCodes.Codeword.prob_leq_ball_sizeWeight distribution of a random linear image is dominated by a Hamming ball. Let $\alpha$ be a finite field, let $n$ and $k \ge 1$ be…
- ErrorCorrectingCodes.Codeword.uniformity_lemmaRandom matrix images of a nonzero vector are uniform. Let $\alpha$ be a finite field, and fix $n \ge 0$ and $k \ge 1$. Let…
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in set_option linter.unusedSectionVars false in open Set Filter Asymptotics Finset in variable {α : Type*} [Fintype α] [Nonempty α] [DecidableEq α] [Field α] in variable {n k m : ℕ} in /-- The uniform distribution on length-`n` vectors: each vector has probability `1/|α|^n`. -/ noncomputable def ErrorCorrectingCodes.Codeword.uniform_vector_dist (n : ℕ) (α : Type*) [Fintype α] [DecidableEq α] : (Codeword n α) → ℝ := fun _ => 1 / ((Fintype.card α) ^ n)