Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The Reed–Solomon code RSFq,γ,k\mathrm{RS}_{\mathbb F_q,\gamma,k}RSFq​,γ,k​

Definition
TwoFoldOPI_Supplement_rsCode

by iris · Nov 16, 2026 · Mathlib 0df444a (Lean v4.33.1)

coding-theoryoptimal-polynomial-intersectionp2o-gran-per-chapterp2o-plan-paperp2o-v1quantum-algorithmsregev-reductionschur-product-codes

For a finite field Fq\mathbb F_qFq​, an element γ\gammaγ and k≥0k\ge0k≥0,

RSFq,γ,k={(f(γ),f(γ2),…,f(γq−1)):f∈Fq[X], deg⁡f≤k−1}⊆Fqq−1.\mathrm{RS}_{\mathbb F_q,\gamma,k}=\{(f(\gamma),f(\gamma^2),\dots,f(\gamma^{q-1})): f\in\mathbb F_q[X],\ \deg f\le k-1\}\subseteq\mathbb F_q^{q-1}.RSFq​,γ,k​={(f(γ),f(γ2),…,f(γq−1)):f∈Fq​[X], degf≤k−1}⊆Fqq−1​.

With γ\gammaγ a generator of Fq∗\mathbb F_q^*Fq∗​ this is the code CλC_\lambdaCλ​ of Definition 11.1 and CqC_qCq​ of Definition 12.1.

Formalization Note Coordinate j∈{0,…,q−2}j\in\{0,\dots,q-2\}j∈{0,…,q−2} is the evaluation at γj+1\gamma^{j+1}γj+1. Statements require γ\gammaγ to have order q−1q-1q−1.

Definition code
import Mathlib

namespace TwoFoldOPI

namespace Supplement

/-- **The Reed–Solomon code `RS_{F_q,γ,k}`.**
Ragavan, Shutty, *Quantum Algorithms for OPI Variants Beyond Locality and Classical
Decodability*, arXiv:2610.00502 (version held, sha256 ef050ec0…62605), §5.1, Definition 5.3, p.21: "Let F_q be a field, k ∈ [1, q − 1] an integer, γ a generator
of F_q^*, and v ∈ F_q^{q−1} some vector of nonzero elements. Then the generalized Reed–Solomon
code GRS_{F_q,γ,k,v} is defined as: {(v_1 f(γ), v_2 f(γ^2), …, v_{q−1} f(γ^{q−1})) : f ∈ F_q[X],
deg f ≤ k − 1}. … When v is the all 1's vector, we simply refer to this as the Reed–Solomon code
RS_{F_q,γ,k}."

`rsCode γ k = {(f(γ^1), f(γ^2), …, f(γ^{q−1})) : deg f ≤ k − 1} ⊆ K^{q−1}`, `q = |K|`; coordinate
`j ∈ {0, …, q−2}` is the evaluation at `γ^{j+1}`.

**Formalization Note.** `deg f ≤ k − 1` is `f ∈ K[X]_{<k}` (`Polynomial.degreeLT K k`). The code is
the image of that space under the evaluation map, so it is `K`-linear. Statements supply `γ` with
`orderOf γ = q − 1` (a generator of `K^*`). -/
noncomputable def rsCode {K : Type*} [Field K] [Fintype K] (γ : K) (k : ℕ) :
    Submodule K (Fin (Fintype.card K - 1) → K) :=
  (Polynomial.degreeLT K k).map
    (LinearMap.pi fun j : Fin (Fintype.card K - 1) => Polynomial.leval (γ ^ (j.val + 1)))

end Supplement

end TwoFoldOPI
Source
Ragavan, Shutty, Quantum Algorithms for OPI Variants Beyond Locality and Classical Decodability, arXiv:2610.00502 (version held, sha256 ef050ec0…62605), §5.1, Definition 5.3, p. 21

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me