Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Polynomial reduction modulo fff on coefficient lists has a polynomial realizer

Proved
OPI.W6.IsPR.reduceL_pr

by sragavan · Nov 11, 2026 · Mathlib 0df444a (Lean v4.33.1)

lean-formalizationquantum-algorithmstwo-fold-opi-construction

Polynomials over Fp\mathbb{F}_pFp​ are represented by lists of natural numbers, constant coefficient first. For a list fl\mathrm{fl}fl (the coefficients of a monic fff) and a list ggg, one division step redStepp(fl,g)\mathrm{redStep}_p(\mathrm{fl}, g)redStepp​(fl,g) subtracts lc(g)⋅x∣g∣−∣fl∣⋅f\mathrm{lc}(g)\cdot x^{|g|-|\mathrm{fl}|}\cdot flc(g)⋅x∣g∣−∣fl∣⋅f (coefficientwise modulo ppp) and drops the last entry. reduceLp(fl,g)\mathrm{reduceL}_p(\mathrm{fl}, g)reduceLp​(fl,g) iterates this step ∣g∣−(∣fl∣−1)|g| - (|\mathrm{fl}| - 1)∣g∣−(∣fl∣−1) times; for monic fff it returns the remainder of ggg modulo fff as a list of deg⁡f\deg fdegf coefficients.

IsPR(h)\mathrm{IsPR}(h)IsPR(h) means that hhh has a polynomial realizer: a program of the underlying machine model whose running charge and output size are bounded by a monotone polynomial in the input size (natural numbers coded in unary, list sizes adding up).

Statement. The map (p,fl,g)↦reduceLmax⁡(p,2)(fl,g)(p, \mathrm{fl}, g) \mapsto \mathrm{reduceL}_{\max(p,2)}(\mathrm{fl}, g)(p,fl,g)↦reduceLmax(p,2)​(fl,g) has a polynomial realizer.

(The modulus is clamped to at least 222 so that all intermediate coefficients stay reduced on every input; for p≥2p \ge 2p≥2 this is the actual reduction.) Together with polynomial multiplication, this gives a polynomial realizer for multiplication in F=Fp[x]/(f)F = \mathbb{F}_p[x]/(f)F=Fp​[x]/(f) on coordinates, which the generator uses for all field computations (tables, row reduction).

Preamble
import Definitions.Def_TwoFoldOPI_CL_Part03
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Circuit
import Definitions.Def_QAlgorithms_Defs_GradientMethods
import Definitions.Def_QAlgorithms_Defs_OPIOraclePrograms
import Definitions.Def_QAlgorithms_Defs_OPIUniformity
import Definitions.Def_QAlgorithms_Defs_Fourier
import Definitions.Def_TwoFoldOPI_elemBits
import Definitions.Def_TwoFoldOPI_schurSquare
import Definitions.Def_TwoFoldOPI_schurFailureSum
import Definitions.Def_CodingTheory
import Definitions.Def_OAIThreeMachineSched01
import Definitions.Def_CookLevin_Cost
import Definitions.Def_TwoFoldOPI_codeOf
import Definitions.Def_TwoFoldOPI_solves
import Definitions.Def_TwoFoldOPI_Input
import Definitions.Def_TwoFoldOPI_CLSerializableF
open OPI.W6.IsPR
open OAI.ThreeMachine.StackCompiler OPI.FM
variable {α : Type} [Coding α]
Formal statement
theorem OPI.W6.IsPR.reduceL_pr : IsPR (fun x : ℕ × List ℕ × List ℕ => reduceL (max x.1 2) x.2.1 x.2.2) := by sorry
Source
Formalization of Theorem 7.4 (algorithmic part), repository https://github.com/sragavan99/lean-prove2me-fills/blob/f7224a159e790347c1a83c5ac23c63e5094a6a2c/WorkInProgress/QuantumOPIVariants/OPI/PRField.lean#L223-L269

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