Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Real block representation of a complex matrix

Definition
QMAPerfectCompleteness_Proof_RealSimulation

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

qma-perfect-completeness-bbe19ef

For a complex matrix A, defines its real representation on a leading Boolean index by the block matrix with rows (Re A, −Im A) and (Im A, Re A). Boolean false indexes the real block and true the imaginary block. This is the representation used in the exact real simulation of Lemma 3.1.

Definition code
/- Generated from Solutions.RealSimulation 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_Gates



open Matrix
open scoped ComplexOrder

namespace QMAPerfectCompleteness.Main.RealSimulation

variable {ι κ τ : Type*}

/-- The real representation used in Lemma 3.1. The new Bool wire comes first;
`false` is the real block and `true` the imaginary block. -/
def realRep (A : Matrix ι κ ℂ) : Matrix (Bool × ι) (Bool × κ) ℝ :=
  fun x y => if x.1 then (if y.1 then (A x.2 y.2).re else (A x.2 y.2).im)
    else (if y.1 then -(A x.2 y.2).im else (A x.2 y.2).re)





























































open scoped Kronecker



end QMAPerfectCompleteness.Main.RealSimulation
Source
Auxiliary construction in the formalization of Grewal–Rudolph, QMA has perfect completeness (paper manuscript ~/research/qma1z/main.tex). Source commit bbe19efbde567e5c8f7fe21655fd0c4da3573e4d, Solutions/RealSimulation.lean, lines 10–14.

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