Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

QPBT definitions: Test / MagicSquareTheorems / Rigidity / CellRelations

Definition
QPBT_QPBT_Test_MagicSquareTheorems_Rigidity_CellRelations

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

qpbt

This bundle defines the cell and variable reflections of the dilated Magic Square strategy on its composite Hilbert space. It also records the parity bit sum associated with a constraint question.

Principal definitions:

  • MIPStarRE.QPBT.MagicSquareRigidity.msCellObsA: Alice's cell reflection at a selected position of a constraint question.
  • MIPStarRE.QPBT.MagicSquareRigidity.msCellObsB: Bob's corresponding cell reflection on the composite space.
  • MIPStarRE.QPBT.MagicSquareRigidity.msVarObsA: Alice's reflection for a variable question.
  • MIPStarRE.QPBT.MagicSquareRigidity.msVarObsB: Bob's reflection for a variable question.
  • MIPStarRE.QPBT.MagicSquareRigidity.constraintBitSum: the sum of the three answer bits for a constraint question, with malformed answers contributing zero.

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/Test/MagicSquareTheorems/Rigidity/CellRelations.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_Games_Defs
import Definitions.Def_QPBT_QPBT_Test_MagicSquare
import Definitions.Def_QPBT_QPBT_Test_MagicSquareTheorems_Rigidity_Dilation
import Definitions.Def_QPBT_QPBT_Test_MagicSquareTheorems_Rigidity_Reflections
import Definitions.Def_QPBT_QPBT_Test_MagicSquareTheorems_Rigidity_Relations

namespace LIDT.MIPStarRE.LDT
end LIDT.MIPStarRE.LDT
namespace LIDT.MIPStarRE.Quantum
end LIDT.MIPStarRE.Quantum
namespace MIPStarRE.QPBT.MagicSquareRigidity
end MIPStarRE.QPBT.MagicSquareRigidity

/-!
# The Magic Square cell relations on the dilated strategy

Every question of the projectively dilated Magic Square strategy carries a
complete projective measurement, so each binary relabelling of its answers
produces a reflection.  Three reflections are attached to a constraint question,
one for each cell of the row or column, and one reflection is attached to each
variable question; the three reflections of a constraint commute exactly and
their product, in any order, is the reflection of the sum of the three reported
bits.  Reflections of the two players commute exactly.

The value-to-parity relations are converted here into operator estimates on the
dilated state, with explicit constants: the six row and column products are
close to the sign prescribed by the corresponding linear equation, and the two
reflections that the two players attach to a common cell are close to each
other.  The two logical Pauli pairs are the reflections at the cells labelled by
the paper's first and fifth variables.

## References

The statement supported here is `thm:ms-rigidity` in
`blueprint/src/chapter/ch13_qpbt_test.tex:224-253`, from
`references/qpbt-paper/08_classical_and_quantum_low_degree_tests.tex:612-652`,
proved in Coladangelo--Stark, arXiv:1709.09267v2, Theorem 6.9.  The variable and
constraint indices are zero-based, so the paper's first and fifth variables are
the cells `0` and `4`.
-/

@[expose] public section

open scoped BigOperators Matrix MatrixOrder ComplexOrder

namespace MIPStarRE.QPBT.MagicSquareRigidity

open LIDT.MIPStarRE.LDT LIDT.MIPStarRE.Quantum

noncomputable section

/-! ## Deviation of a sign observable from a comparison observable -/







/-! ## Comparison of Born masses with the game error -/







/-! ## The Magic Square reflections of the dilated strategy -/

/-- Alice's cell reflection at one position of a constraint question of the
dilated strategy, placed on its composite space.  This is a pre-isometry
observable of `msDilatedStrategy S`; the state-dependent relations below
evaluate it on `(msDilatedStrategy S).ψ`.  It is not the paper's post-isometry
operator $\tilde A$.  The post-isometry operators on the ideal state in
`thm:ms-rigidity` arise later by conjugating with the local isometries and using
the transfer theorems of issue Dengnifer/MIPStarRE-QPBT-bak#104.  Formalization-only
operator-relation
support for blueprint `ch13_qpbt_test.tex:224-253` and paper
`08_classical_and_quantum_low_degree_tests.tex:612-652`. -/
noncomputable def msCellObsA (S : _root_.MIPStarRE.QPBT.Strategy _root_.MIPStarRE.QPBT.msGame) (i : Fin 6) (k : Fin 3) :
    _root_.LIDT.MIPStarRE.Quantum.Op ((_root_.MIPStarRE.QPBT.MagicSquareRigidity.msDilatedStrategy S).ιA × (_root_.MIPStarRE.QPBT.MagicSquareRigidity.msDilatedStrategy S).ιB) :=
  _root_.MIPStarRE.QPBT.heteroKron (_root_.MIPStarRE.QPBT.MagicSquareRigidity.signObs ((_root_.MIPStarRE.QPBT.MagicSquareRigidity.msDilatedStrategy S).A (_root_.MIPStarRE.QPBT.MsType.constraint i))
    (_root_.MIPStarRE.QPBT.MagicSquareRigidity.constraintBitOrZero k)) 1

/-- Bob's cell reflection at one position of a constraint question of the
dilated strategy, placed on its composite space.  This is a pre-isometry
observable of `msDilatedStrategy S`; the state-dependent relations below
evaluate it on `(msDilatedStrategy S).ψ`.  It is not the paper's post-isometry
operator $\tilde B$.  The post-isometry operators on the ideal state in
`thm:ms-rigidity` arise later by conjugating with the local isometries and using
the transfer theorems of issue Dengnifer/MIPStarRE-QPBT-bak#104.  Formalization-only
operator-relation
support for blueprint `ch13_qpbt_test.tex:224-253` and paper
`08_classical_and_quantum_low_degree_tests.tex:612-652`. -/
noncomputable def msCellObsB (S : _root_.MIPStarRE.QPBT.Strategy _root_.MIPStarRE.QPBT.msGame) (i : Fin 6) (k : Fin 3) :
    _root_.LIDT.MIPStarRE.Quantum.Op ((_root_.MIPStarRE.QPBT.MagicSquareRigidity.msDilatedStrategy S).ιA × (_root_.MIPStarRE.QPBT.MagicSquareRigidity.msDilatedStrategy S).ιB) :=
  _root_.MIPStarRE.QPBT.heteroKron 1 (_root_.MIPStarRE.QPBT.MagicSquareRigidity.signObs ((_root_.MIPStarRE.QPBT.MagicSquareRigidity.msDilatedStrategy S).B (_root_.MIPStarRE.QPBT.MsType.constraint i))
    (_root_.MIPStarRE.QPBT.MagicSquareRigidity.constraintBitOrZero k))

/-- Alice's reflection at a variable question of the dilated strategy, placed on
the composite space. -/
noncomputable def msVarObsA (S : _root_.MIPStarRE.QPBT.Strategy _root_.MIPStarRE.QPBT.msGame) (j : Fin 9) :
    _root_.LIDT.MIPStarRE.Quantum.Op ((_root_.MIPStarRE.QPBT.MagicSquareRigidity.msDilatedStrategy S).ιA × (_root_.MIPStarRE.QPBT.MagicSquareRigidity.msDilatedStrategy S).ιB) :=
  _root_.MIPStarRE.QPBT.heteroKron (_root_.MIPStarRE.QPBT.MagicSquareRigidity.signObs ((_root_.MIPStarRE.QPBT.MagicSquareRigidity.msDilatedStrategy S).A (_root_.MIPStarRE.QPBT.MsType.var j)) _root_.MIPStarRE.QPBT.msBitOrZero) 1

/-- Bob's reflection at a variable question of the dilated strategy, placed on
the composite space. -/
noncomputable def msVarObsB (S : _root_.MIPStarRE.QPBT.Strategy _root_.MIPStarRE.QPBT.msGame) (j : Fin 9) :
    _root_.LIDT.MIPStarRE.Quantum.Op ((_root_.MIPStarRE.QPBT.MagicSquareRigidity.msDilatedStrategy S).ιA × (_root_.MIPStarRE.QPBT.MagicSquareRigidity.msDilatedStrategy S).ιB) :=
  _root_.MIPStarRE.QPBT.heteroKron 1 (_root_.MIPStarRE.QPBT.MagicSquareRigidity.signObs ((_root_.MIPStarRE.QPBT.MagicSquareRigidity.msDilatedStrategy S).B (_root_.MIPStarRE.QPBT.MsType.var j)) _root_.MIPStarRE.QPBT.msBitOrZero)

























/-! ## The six row and column product relations -/

/-- The sum of the three answer bits reported for a constraint question, with
malformed answers contributing zero. -/
def constraintBitSum (a : _root_.MIPStarRE.QPBT.MsAnswer) : ZMod 2 :=
  _root_.MIPStarRE.QPBT.MagicSquareRigidity.constraintBitOrZero 0 a + _root_.MIPStarRE.QPBT.MagicSquareRigidity.constraintBitOrZero 1 a + _root_.MIPStarRE.QPBT.MagicSquareRigidity.constraintBitOrZero 2 a















/-! ## Agreement of the two reflections attached to a common cell -/





/-! ## Permuted row and column products -/









/-! ## The two logical Pauli pairs -/

























/-! ## Unit scalars -/







/-! ## Building blocks of the solution-group computation -/







end

end MIPStarRE.QPBT.MagicSquareRigidity
Source
https://github.com/Dengnifer/MIPStarRE-QPBT/blob/8f4118aeea7be16912adbaee3df6dce1741a2c26/QPBT/Test/MagicSquareTheorems/Rigidity/CellRelations.lean#L193-L317

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