Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

QPBT definitions: Extraction / EPRState

Definition
QPBT_QPBT_Extraction_EPRState

by Dengnifer · Oct 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

qpbt

This bundle defines the EPR contraction data for the extraction construction. It reorders registers, contracts extracted registers against an EPR vector, defines the normalized reference vector and EPR projection, and records the unnormalized auxiliary vector.

Principal definitions:

  • MIPStarRE.QPBT.extractionEprFirstEquiv: moves each extracted register before its auxiliary registers.
  • MIPStarRE.QPBT.Extraction.eprPartialInner: defines the partial inner product with the EPR vector, leaving the auxiliary index.
  • MIPStarRE.QPBT.ProjectiveSetting.extractionAuxReference: defines the normalized reference vector on the auxiliary registers formed from the original state and one EPR pair.
  • MIPStarRE.QPBT.ProjectiveSetting.extractionEprProjection: defines the EPR projection on the extracted registers with identity on the auxiliary registers.
  • MIPStarRE.QPBT.ProjectiveSetting.extractionAux0: defines the auxiliary vector before normalization obtained by EPR contraction.

Formalization Credit. This Lean declaration is part of the Quantum Pauli basis test formalization by Ruixuan Deng. The source code was generated by AI agents; Ruixuan Deng is the responsible maintainer.

Mathematical Source. The mathematical source is Ji, Natarajan, Vidick, Wright, and Yuen, MIP*=RE, arXiv:2001.04383v3.

Definition code
-- Generated from QPBT/Extraction/EPRState.lean by skeleton subtraction.
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_AxisParallelLine
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_DiagonalLine
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_LinePolynomials
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_LowDegreePolynomial
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_OpFamily
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_ParametersBase
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_ParametersFiniteAnswers
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_QuantumState
import Definitions.Def_LIDT_MIPStarRE_LDT_CommutativityPoints_Defs
import Definitions.Def_LIDT_MIPStarRE_LDT_ExpansionHypercubeGraph_Defs_Core
import Definitions.Def_LIDT_MIPStarRE_LDT_GlobalVariance_Defs_Core
import Definitions.Def_LIDT_MIPStarRE_LDT_MakingMeasurementsProjective_Defs
import Definitions.Def_LIDT_MIPStarRE_LDT_Pasting_Defs_Families
import Definitions.Def_LIDT_MIPStarRE_LDT_Pasting_Defs_Interpolation
import Definitions.Def_LIDT_MIPStarRE_LDT_Tactic_AvgCongr
import Definitions.Def_LIDT_MIPStarRE_LDT_Test_StrategyCore
import Definitions.Def_LIDT_MIPStarRE_Quantum_FiniteMatrix_Basic
import Definitions.Def_QPBT_QPBT_Algebra_FieldBasis
import Definitions.Def_QPBT_QPBT_Algebra_LowDegreeCode
import Definitions.Def_QPBT_QPBT_Algebra_Pauli
import Definitions.Def_QPBT_QPBT_Extraction_Defs
import Definitions.Def_QPBT_QPBT_Games_Defs
import Definitions.Def_QPBT_QPBT_Observables_Defs
import Definitions.Def_QPBT_QPBT_Observables_ExpandedDefs
import Definitions.Def_QPBT_QPBT_State
import Definitions.Def_QPBT_QPBT_Test_PauliBasisTest
import Mathlib

namespace LIDT.MIPStarRE.Quantum
end LIDT.MIPStarRE.Quantum
namespace MIPStarRE.QPBT
end MIPStarRE.QPBT
namespace MIPStarRE.QPBT.Extraction
end MIPStarRE.QPBT.Extraction
namespace MIPStarRE.QPBT.ProjectiveSetting
end MIPStarRE.QPBT.ProjectiveSetting

/-!
# The auxiliary vector from the EPR projection

Taking the partial inner product with the EPR vector constructs the
unnormalized auxiliary vector. Tensoring it with EPR gives exactly the
orthogonal projection of the original vector onto the EPR subspace.

## References

Blueprint `lem:qld-unitary`; paper
`references/qpbt-paper/14_analysis_of_the_pauli_basis_test.tex:1769-1783`.
-/

@[expose] public section

open scoped BigOperators Matrix

namespace MIPStarRE.QPBT

open LIDT.MIPStarRE.Quantum

noncomputable section

/-- Move each extracted register before its auxiliary registers. This
permutation puts the ideal state in the order used by
`MagicSquareRigidity.exists_unit_residual`. -/
def extractionEprFirstEquiv (P : _root_.MIPStarRE.QPBT.AdmissibleParams) (ιA ιB : Type*) :
    _root_.MIPStarRE.QPBT.SixReg P ιA ιB ≃
      (_root_.MIPStarRE.QPBT.PauliRegister P × (ιA × _root_.MIPStarRE.QPBT.PauliRegister P)) ×
        (_root_.MIPStarRE.QPBT.PauliRegister P × (ιB × _root_.MIPStarRE.QPBT.PauliRegister P)) :=
  (_root_.MIPStarRE.QPBT.sixRegExtractionEquiv P ιA ιB).trans
    (Equiv.prodCongr (Equiv.prodComm _ _) (Equiv.prodComm _ _))

namespace Extraction

/-- Partial inner product with the EPR vector, leaving the auxiliary index.
This is the coordinate form of the vector defined at paper line 1769. -/
def eprPartialInner {R V : Type*} [Fintype R] [DecidableEq R]
    [Fintype V] [DecidableEq V] [Nonempty V]
    (ψ : EuclideanSpace ℂ (R × (V × V))) : EuclideanSpace ℂ R :=
  (EuclideanSpace.equiv R ℂ).symm
    (fun r => ∑ p : V × V, star (_root_.MIPStarRE.QPBT.eprState V p) * ψ (r, p))



end Extraction

namespace ProjectiveSetting

variable {P : _root_.MIPStarRE.QPBT.AdmissibleParams} {ε : ℝ} (S : _root_.MIPStarRE.QPBT.ProjectiveSetting P ε)

open scoped Classical





/-- A normalized reference vector on `AA'BB'`, formed from the original state
and one EPR pair. It is used when the EPR projection of the given state vanishes. -/
def extractionAuxReference : EuclideanSpace ℂ
    (_root_.MIPStarRE.QPBT.ExtractionAuxRegisters P S.toStrategy.ιA S.toStrategy.ιB) :=
  _root_.MIPStarRE.QPBT.reindexState _root_.MIPStarRE.QPBT.prodShuffle (_root_.MIPStarRE.QPBT.vecTensor S.toStrategy.ψ (_root_.MIPStarRE.QPBT.eprState (_root_.MIPStarRE.QPBT.PauliRegister P)))



/-- The EPR projection on registers `A''B''`, with identity on `AA'BB'`.
Paper lines 1766-1769 use this projection to select the auxiliary vector. -/
def extractionEprProjection : _root_.LIDT.MIPStarRE.Quantum.Op (_root_.MIPStarRE.QPBT.SixReg P S.toStrategy.ιA S.toStrategy.ιB) :=
  _root_.MIPStarRE.QPBT.reindexOp (_root_.MIPStarRE.QPBT.extractionIdealShuffle P S.toStrategy.ιA S.toStrategy.ιB).symm
    (_root_.MIPStarRE.QPBT.heteroKron (1 : _root_.LIDT.MIPStarRE.Quantum.Op (_root_.MIPStarRE.QPBT.ExtractionAuxRegisters P S.toStrategy.ιA S.toStrategy.ιB))
      (Matrix.vecMulVec (fun x => _root_.MIPStarRE.QPBT.eprState (_root_.MIPStarRE.QPBT.PauliRegister P) x)
        (fun y => star (_root_.MIPStarRE.QPBT.eprState (_root_.MIPStarRE.QPBT.PauliRegister P) y))))

/-- The auxiliary vector before normalization, obtained by contracting the
extracted registers against EPR. This is `aux_0` at paper line 1769. -/
def extractionAux0
    (θ : EuclideanSpace ℂ (_root_.MIPStarRE.QPBT.SixReg P S.toStrategy.ιA S.toStrategy.ιB)) :
    EuclideanSpace ℂ (_root_.MIPStarRE.QPBT.ExtractionAuxRegisters P S.toStrategy.ιA S.toStrategy.ιB) :=
  _root_.MIPStarRE.QPBT.Extraction.eprPartialInner
    (_root_.MIPStarRE.QPBT.reindexState (_root_.MIPStarRE.QPBT.extractionIdealShuffle P S.toStrategy.ιA S.toStrategy.ιB).symm θ)





end ProjectiveSetting

end

end MIPStarRE.QPBT
Source
https://github.com/Dengnifer/MIPStarRE-QPBT/blob/8f4118aeea7be16912adbaee3df6dce1741a2c26/QPBT/Extraction/EPRState.lean#L29-L126

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