Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Complement of the index register in the block layout

Proved
QMAPerfectCompleteness.Main.BlockHadamardCoordinates.spectator_mask

by Dorian Rudolph · Nov 14, 2026 · Mathlib 0df444a (Lean v4.33.1)

qma-perfect-completeness-bbe19ef

For any G₂ verifier V, any workspace size w, and basis strings x and y on the block register, agreement outside the index wires is equivalent to agreement on the clock, verifier, flag, and workspace coordinates. No initialized-workspace assumption is needed.

x=y outside the index bank  ⟺  (xclock,xverifier,xflag,xwork)=(yclock,yverifier,yflag,ywork).x=y\text{ outside the index bank}\iff(x_{\rm clock},x_{\rm verifier},x_{\rm flag},x_{\rm work})=(y_{\rm clock},y_{\rm verifier},y_{\rm flag},y_{\rm work}).x=y outside the index bank⟺(xclock​,xverifier​,xflag​,xwork​)=(yclock​,yverifier​,yflag​,ywork​).

This partition identity supplies the spectator conditions for the physical index-Hadamard bank.

Preamble
/- Generated from Solutions.BlockHadamardCoordinates by authoritative Stage-2 skeleton subtraction.
Original explanatory text, declaration names and scoped commands are retained.
Only selected proof cuts, import rewrites and fact-indexed platform edits are applied. -/
import Definitions.Def_QMAPerfectCompleteness_Main_Compiler
import Definitions.Def_QMAPerfectCompleteness_Main_Cyclic
import Init.Data.BitVec.Bitblast
import Definitions.Def_QMAPerfectCompleteness_Main_BlockEncoding
import Definitions.Def_QMAPerfectCompleteness_Proof_BlockCompiler
import Definitions.Def_QMAPerfectCompleteness_Proof_BlockCoordinates
import Definitions.Def_QMAPerfectCompleteness_Proof_BlockEncoding
import Definitions.Def_QMAPerfectCompleteness_Proof_CircuitUnitary
import Definitions.Def_QMAPerfectCompleteness_Proof_ClockCircuits
import Definitions.Def_QMAPerfectCompleteness_Proof_ComparisonCircuits
import Definitions.Def_QMAPerfectCompleteness_Proof_ControlCircuits
import Definitions.Def_QMAPerfectCompleteness_Proof_Cyclic
import Definitions.Def_QMAPerfectCompleteness_Proof_EqualityCircuits
import Definitions.Def_QMAPerfectCompleteness_Proof_EuclideanStates
import Definitions.Def_QMAPerfectCompleteness_Proof_IndexHadamards
import Definitions.Def_QMAPerfectCompleteness_Proof_ReversibleGadgets



/-! The physical paired-H bank implements the logical H bank with clean workspace. -/
open Matrix
open scoped Kronecker
set_option backward.isDefEq.respectTransparency false
set_option maxHeartbeats 3000000
namespace QMAPerfectCompleteness.Main.BlockHadamardCoordinates
end QMAPerfectCompleteness.Main.BlockHadamardCoordinates
section
open QMAPerfectCompleteness QMAPerfectCompleteness.Main QMAPerfectCompleteness.Main.BlockHadamardCoordinates
open BlockCircuit BlockCoordinates BlockCompiler

set_option maxHeartbeats 2000000 
Formal statement
theorem QMAPerfectCompleteness.Main.BlockHadamardCoordinates.spectator_mask (V : Verifier gatesG2) (w : ℕ)
    (y x : Basis (bodyWires V+w)) :
    (∀ j, (∀ a, (indexWire (V := V) (w := w) a) ≠ j) → y j = x j) ↔
      (y ∘ clockWire = x ∘ clockWire) ∧ (y ∘ verifierWire = x ∘ verifierWire) ∧
        y flagWire = x flagWire ∧ (y ∘ workspaceWire = x ∘ workspaceWire) := by sorry
Source
Local source commit bbe19efbde567e5c8f7fe21655fd0c4da3573e4d, Solutions/BlockHadamardCoordinates.lean:12-67; paper: QMA has perfect completeness, Sabee Grewal and Dorian Rudolph, user-provided main.tex.

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