Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The Theorem 7.4 construction is Cook–Levin serializable on raw prefixes

Proved
OPI.Gen.constructQ_CL

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

lean-formalizationquantum-algorithmstwo-fold-opi-construction

Setting. An instance xxx of the two-fold OPI problem of Theorem 7.4 consists of a finite field FFF with qqq elements, a length mmm, an r×mr\times mr×m matrix HHH over FFF with a flag gen\mathrm{gen}gen defining a code CCC, forbidden values β∈Fm\beta\in F^mβ∈Fm and a precision ttt. It has a public bit encoding encode(x)\mathrm{encode}(x)encode(x) and size parameter scale(x)=m+r+q+t\mathrm{scale}(x)=m+r+q+tscale(x)=m+r+q+t. The construction constructQ(x)\mathrm{constructQ}(x)constructQ(x) is the packed program of the theorem: a trivial classical program if C⊥=0C^\perp=0C⊥=0, and otherwise the quantum Regev-style program (phase-gradient preparation followed by repeated trials of state preparation, decoding of C⊥C^\perpC⊥ by Schur-square relinearization, and measurement).

A family of programs x↦P(x)x\mapsto P(x)x↦P(x) is Cook–Levin serializable on raw prefixes (CLSerializableF\mathrm{CLSerializableF}CLSerializableF) if there are two Turing machines running in polynomial time in the Cook–Levin cost model, a decider computing vvv and a generator computing ggg, such that for every instance xxx and every s∈Ns\in\mathbb Ns∈N, with ws=(encode(x) 0s)[0,s)w_s=(\mathrm{encode}(x)\,0^s)_{[0,s)}ws​=(encode(x)0s)[0,s)​:

  • v(ws)=[ ∣encode(x)∣≤s ∧ scale(x)≤s ]v(w_s)=[\,|\mathrm{encode}(x)|\le s\ \wedge\ \mathrm{scale}(x)\le s\,]v(ws​)=[∣encode(x)∣≤s ∧ scale(x)≤s], and
  • if ∣encode(x)∣≤s|\mathrm{encode}(x)|\le s∣encode(x)∣≤s and scale(x)≤s\mathrm{scale}(x)\le sscale(x)≤s, then g(ws)=packedSerialization(P(x))g(w_s)=\mathrm{packedSerialization}(P(x))g(ws​)=packedSerialization(P(x)).

Statement. constructQ\mathrm{constructQ}constructQ is Cook–Levin serializable on raw prefixes.

This is the uniformity (polynomial-time constructibility) part of the algorithmic statement of Theorem 7.4.

Preamble
import Definitions.Def_TwoFoldOPI_CL_Part05
import Definitions.Def_TwoFoldOPI_CLSerializableF
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
open OPI OPI.Gen
open QAlgorithms QAlgorithms.OPI TwoFoldOPI
Formal statement
theorem OPI.Gen.constructQ_CL : CLSerializableF Leaf.constructQ := by sorry
Source
Formalization of Theorem 7.4 (algorithmic part), repository https://github.com/sragavan99/lean-prove2me-fills/blob/f7224a159e790347c1a83c5ac23c63e5094a6a2c/WorkInProgress/QuantumOPIVariants/OPI/Leaf74.lean#L28-L35

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