Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

A one-register qubit operator acts on symbol-level states as a kernel on one component

Proved
OPI.SymEnc.embedOp_J

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

lean-formalizationquantum-algorithmstwo-fold-opi-construction

Let KKK be a finite set of symbols with an injective encoding enc:K→{0,1}L\mathrm{enc}:K\to\{0,1\}^Lenc:K→{0,1}L. There are mmm coordinates; coordinate iii holds a pair (xi,yi)∈K×K(x_i,y_i)\in K\times K(xi​,yi​)∈K×K in two registers of LLL qubits each, indexed by a component bit c∈{0,1}c\in\{0,1\}c∈{0,1} (component 000 is xix_ixi​, component 111 is yiy_iyi​). Every other qubit is 000. A tuple a∈(K×K)ma\in(K\times K)^ma∈(K×K)m thus determines a basis configuration cfg(a)\mathrm{cfg}(a)cfg(a), and a symbol-level state F:(K×K)m→CF:(K\times K)^m\to\mathbb CF:(K×K)m→C is embedded as J(F)=∑aF(a) ∣cfg(a)⟩J(F)=\sum_a F(a)\,|\mathrm{cfg}(a)\rangleJ(F)=∑a​F(a)∣cfg(a)⟩.

Let MMM be an LLL-qubit matrix that maps encodings into the span of encodings: M[y,enc(x)]=0M[y,\mathrm{enc}(x)]=0M[y,enc(x)]=0 whenever yyy is not an encoding. Fix a coordinate iii and a component ccc, and let M(i,c)M^{(i,c)}M(i,c) be MMM acting on that register.

Statement.

M(i,c) J(F)=J(F′),F′(b)=∑x∈KM[enc(bi(c)), enc(x)]  F(b with component c of coordinate i replaced by x).M^{(i,c)}\,J(F)=J(F'),\qquad F'(b)=\sum_{x\in K}M\big[\mathrm{enc}(b_i^{(c)}),\ \mathrm{enc}(x)\big]\;F\big(b\text{ with component }c\text{ of coordinate }i\text{ replaced by }x\big).M(i,c)J(F)=J(F′),F′(b)=x∈K∑​M[enc(bi(c)​), enc(x)]F(b with component c of coordinate i replaced by x).

In the Lean statement F′F'F′ is written as the kernel operator opKi(κ)F\mathrm{opK}_i(\kappa)FopKi​(κ)F, where κ(w,z)=M[enc(w(c)),enc(z(c))]\kappa(w,z)=M[\mathrm{enc}(w^{(c)}),\mathrm{enc}(z^{(c)})]κ(w,z)=M[enc(w(c)),enc(z(c))] if zzz and www have the same other component, and 000 otherwise.

This lets the analysis of the decoder work entirely at the level of field symbols: each gate that acts on one symbol register (re-encodings, QFTq\mathrm{QFT}_qQFTq​, the maps y↦βi−yy\mapsto\beta_i-yy↦βi​−y) becomes an explicit kernel on that coordinate.

Preamble
import Definitions.Def_TwoFoldOPI_CL_Part01
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
variable {n m L : ℕ} {K : Type} [Fintype K] [DecidableEq K]
  (reg : Fin m × Bool × Fin L ↪ Fin n) (enc : K → Qubits L)
variable {reg enc}
variable (reg enc)
variable {reg enc}
open Classical
Formal statement
theorem OPI.SymEnc.embedOp_J (henc : Function.Injective enc) (M : Matrix (Qubits L) (Qubits L) ℂ)
    (hM : ∀ y x, y ∉ Set.range enc → M y (enc x) = 0) (i : Fin m) (c : Bool)
    (Fn : (Fin m → K × K) → ℂ) :
    (embedOp M (bReg reg i c)).mulVec (J reg enc Fn) =
      J reg enc (opK i (fun w z => if z = setComp c w (comp c z) then
        M (enc (comp c w)) (enc (comp c z)) else 0) Fn) := by sorry
Source
Formalization of Theorem 7.4 (algorithmic part), repository https://github.com/sragavan99/lean-prove2me-fills/blob/db81d0d4e3fa008609ed37789a2eb2f6f08ee48d/WorkInProgress/QuantumOPIVariants/OPI/SymEnc.lean#L237-L283

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