Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Factor-wise preparation of the SSS registers yields a symbol-level product state

Proved
OPI.SymEnc.sRes_J

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

lean-formalizationquantum-algorithmstwo-fold-opi-construction

Field symbols are written on LLL qubits by the injective encoding enc:F→{0,1}L\mathrm{enc}:\mathbb F\to\{0,1\}^Lenc:F→{0,1}L. An embedding reg\mathrm{reg}reg places the mmm symbol pairs (Si,Ti)(S_i,T_i)(Si​,Ti​) on qubits of an nnn-qubit system. For a function Φ\PhiΦ on tuples a∈(F×F)ma\in(\mathbb F\times\mathbb F)^ma∈(F×F)m, J(Φ)=∑aΦ(a) ∣cfg(a)⟩J(\Phi)=\sum_a\Phi(a)\,|\mathrm{cfg}(a)\rangleJ(Φ)=∑a​Φ(a)∣cfg(a)⟩, where cfg(a)\mathrm{cfg}(a)cfg(a) writes enc\mathrm{enc}enc of each component into its register and 000 on every other qubit.

Let hih_ihi​ be a vector on the LLL qubits of SiS_iSi​, for i=1,…,mi=1,\dots,mi=1,…,m, supported on encodings: hi(v)≠0h_i(v)\ne0hi​(v)=0 implies v=enc(y)v=\mathrm{enc}(y)v=enc(y) for some yyy.

Statement. Placing the factor hih_ihi​ on each SiS_iSi​ register of the all-zero state gives

(⨂ihi)S⊗∣0⋯0⟩rest  =  J(∏igi),gi(y,y′)={hi(enc y),y′=0,0,y′≠0.\bigl(\textstyle\bigotimes_i h_i\bigr)_{S}\otimes|0\cdots0\rangle_{\text{rest}}\;=\;J\Bigl(\textstyle\prod_i g_i\Bigr),\qquad g_i(y,y')=\begin{cases}h_i(\mathrm{enc}\,y),&y'=0,\\0,&y'\ne0.\end{cases}(⨂i​hi​)S​⊗∣0⋯0⟩rest​=J(∏i​gi​),gi​(y,y′)={hi​(ency),0,​y′=0,y′=0.​

The qubit state equals the image under JJJ of the symbol-level product state ⨂i(hi∘enc)Si⊗∣0⟩Ti\bigotimes_i\bigl(h_i\circ\mathrm{enc}\bigr)_{S_i}\otimes|0\rangle_{T_i}⨂i​(hi​∘enc)Si​​⊗∣0⟩Ti​​.

This connects the qubit-level outcome of the repeat-until-success stages on the SSS registers with the symbol-level description used by the decoder analysis. There, hih_ihi​ is the uniform superposition over F∖{βi}\mathbb F\setminus\{\beta_i\}F∖{βi​}.

Preamble
import Definitions.Def_TwoFoldOPI_CL_Part02
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 OPI.SymEnc
open QAlgorithms TwoFoldOPI
variable {F : AvgCaseTI.FieldPres} {n m : ℕ} (reg : Fin m × Bool × Fin (bitsPerSymbol F) ↪ Fin n)
open Classical
Formal statement
theorem OPI.SymEnc.sRes_J (h : Fin m → Qubits (bitsPerSymbol F) → ℂ)
    (hs : ∀ i v, h i v ≠ 0 → ∃ y, elemBits F y = v) :
    bfacL (sRes reg h) (sysZero n) = J reg (elemBits F) (prodF (sProd h)) := by sorry
Source
Formalization of Theorem 7.4 (algorithmic part), repository https://github.com/sragavan99/lean-prove2me-fills/blob/db81d0d4e3fa008609ed37789a2eb2f6f08ee48d/WorkInProgress/QuantumOPIVariants/OPI/PrepJ.lean#L35-L122

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