Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

QPBT definitions: Combining / DirectLowDegree / Transport / Combining / Strategy

Definition
QPBT_QPBT_Combining_DirectLowDegree_Transport_Combining_Strategy

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

qpbt

This bundle defines the geometry and answer relabeling of the combined low-degree strategy. It separates point and combining coordinates, records the measured line and its parameter change, and maps a combined-game outcome back to the answer of the measured original-game question.

Principal definitions:

  • MIPStarRE.QPBT.directCombinedPointPart: extracts the point part of a point in the combined space.
  • MIPStarRE.QPBT.directCombinedCoefficientPart: extracts the combining part of a point in the combined space.
  • MIPStarRE.QPBT.directCombinedIndexSplit: classifies a combined coordinate as either a point coordinate or a combining coordinate.
  • MIPStarRE.QPBT.directCombinedQuestionDirection: gives the geometric direction of the line carried by a combined-game question, with zero direction on point questions.
  • MIPStarRE.QPBT.directCombinedMeasuredDirection: gives the direction of the original-game line measured by a combined-game question.
  • MIPStarRE.QPBT.directCombinedRebaseParameter: gives the parameter change between the point-part presentation and the canonical-base presentation of the measured line.
  • MIPStarRE.QPBT.directCombinedMeasuredQuestion: defines the original-game question measured by the combined strategy.
  • MIPStarRE.QPBT.directCombinedAnswerMap: defines the outcome relabeling used by the combined strategy after measuring that original-game question.

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/Combining/DirectLowDegree/Transport/Combining/Strategy.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_Measurement
import Definitions.Def_QPBT_QPBT_Algebra_FieldBasis
import Definitions.Def_QPBT_QPBT_Algebra_Lines
import Definitions.Def_QPBT_QPBT_Combining_DirectLowDegree_Game
import Definitions.Def_QPBT_QPBT_Combining_DirectLowDegree_Geometry
import Definitions.Def_QPBT_QPBT_Combining_DirectLowDegree_Transport_Combining_Answers
import Definitions.Def_QPBT_QPBT_Combining_DirectLowDegree_Transport_Combining_Parameters
import Definitions.Def_QPBT_QPBT_Combining_DirectLowDegree_Transport_Combining_Polynomial
import Definitions.Def_QPBT_QPBT_Combining_DirectLowDegree_Transport_Questions
import Definitions.Def_QPBT_QPBT_Games_Defs
import Definitions.Def_QPBT_QPBT_Test_LowDegreeGame
import Mathlib

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

/-!
# The combined strategy of the simultaneity reduction

`def:ld-combined-strategy` turns a projective strategy for the directly indexed
low-degree game at parameters `D` into a projective strategy for the same game
at the combined parameters `D.combined` of `def:ld-combining-parameters`, on
the same state and the same two Hilbert spaces.  Each question of the combined
game is answered by measuring one question of the original strategy and
relabelling its outcome; the question measured and the relabelling are fixed by
the type of the combined question and by whether its stored coordinate index is
a point coordinate or a combining coordinate.

Writing a point of the combined space as `(u, α)` with `u` its point part and
`α` its combining part, the five cases are:

1. a point question at `(u, α)` measures the point question at `u` and answers
   the combined value `∑ r, α r * b r`;
2. an axis-parallel line question whose stored index is the point coordinate
   `j` measures the canonical axis-parallel line question of the original game
   at `u` with index `j`, and answers the combination `∑ r, α r * f r` of the
   measured line answers;
3. an axis-parallel line question whose stored index is a combining coordinate
   measures the point question at `u`: the line lies in the fiber of the
   projection to the point coordinates through `u`, so the combined polynomial
   restricted to it is the affine function of the parameter determined by the
   `k` values at `u`;
4. a diagonal line question whose stored index is the point coordinate `j`
   measures the canonical diagonal line question of the original game at `u`
   with index `j` and the point part of the direction, and answers
   `t ↦ ∑ r, (α r + t * w r) * f r (t + s)`;
5. a diagonal line question whose stored index is a combining coordinate
   measures the point question at `u`, its direction having vanishing point
   part, and answers as in case 3.

The affine shift `s` of cases 2 and 4 is `directCombinedRebaseParameter`, the
change of parameter between the presentation of the image line by the point
part of the combined canonical base and its presentation by its own canonical
base; the two need not agree, since the canonical base of a line of the
combined space need not project to the canonical base of its image.

Each case measures a single measurement of the original strategy and relabels
its outcome, so the combined strategy is again projective; this is
`directCombinedStrategy_isProjective`.

## Main definitions

* `directCombinedMeasuredQuestion` — the question of the original game measured
  on a question of the combined game.
* `directCombinedAnswerMap` — the relabelling of the measured outcome.
* `directCombinedStrategy` — `def:ld-combined-strategy`.

## References

* `references/neexp-paper/05_quantum_preliminaries.tex:1409-1503`
* `references/qpbt-paper/08_classical_and_quantum_low_degree_tests.tex:413-458`
* `blueprint/src/chapter/ch13_qpbt_test.tex:420-472`
-/

@[expose] public section

open scoped BigOperators MatrixOrder Matrix ComplexOrder

namespace MIPStarRE.QPBT

open LIDT.MIPStarRE.LDT
open LIDT.MIPStarRE.LDT.Preliminaries
open LIDT.MIPStarRE.Quantum

noncomputable section

/-! ## Coordinates of a combined question -/

/-- The point part of a point of the combined space, at the combined
parameters of `def:ld-combining-parameters`. -/
def directCombinedPointPart (D : _root_.MIPStarRE.QPBT.DirectLdParams)
    (z : Fin D.combined.m → _root_.MIPStarRE.QPBT.DirectScalarQ D) : Fin D.m → _root_.MIPStarRE.QPBT.DirectScalarQ D :=
  _root_.MIPStarRE.QPBT.combinedPointPart (m := D.m) (k := D.k) z

/-- The combining part of a point of the combined space. -/
def directCombinedCoefficientPart (D : _root_.MIPStarRE.QPBT.DirectLdParams)
    (z : Fin D.combined.m → _root_.MIPStarRE.QPBT.DirectScalarQ D) : Fin D.k → _root_.MIPStarRE.QPBT.DirectScalarQ D :=
  _root_.MIPStarRE.QPBT.combinedCoefficientPart (m := D.m) (k := D.k) z

@[simp] theorem directCombinedPointPart_combinedPoint (D : _root_.MIPStarRE.QPBT.DirectLdParams)
    (u : Fin D.m → _root_.MIPStarRE.QPBT.DirectScalarQ D) (α : Fin D.k → _root_.MIPStarRE.QPBT.DirectScalarQ D) :
    _root_.MIPStarRE.QPBT.directCombinedPointPart D (_root_.MIPStarRE.QPBT.combinedPoint u α) = u :=
  _root_.MIPStarRE.QPBT.combinedPointPart_combinedPoint u α

@[simp] theorem directCombinedCoefficientPart_combinedPoint (D : _root_.MIPStarRE.QPBT.DirectLdParams)
    (u : Fin D.m → _root_.MIPStarRE.QPBT.DirectScalarQ D) (α : Fin D.k → _root_.MIPStarRE.QPBT.DirectScalarQ D) :
    _root_.MIPStarRE.QPBT.directCombinedCoefficientPart D (_root_.MIPStarRE.QPBT.combinedPoint u α) = α :=
  _root_.MIPStarRE.QPBT.combinedCoefficientPart_combinedPoint u α

/-- A coordinate of the combined dimension is either a point coordinate or a
combining coordinate. -/
def directCombinedIndexSplit (D : _root_.MIPStarRE.QPBT.DirectLdParams) (i : Fin D.combined.m) :
    Fin D.m ⊕ Fin D.k :=
  finSumFinEquiv.symm i

@[simp] theorem directCombinedIndexSplit_combinedPointVar (D : _root_.MIPStarRE.QPBT.DirectLdParams)
    (j : Fin D.m) :
    _root_.MIPStarRE.QPBT.directCombinedIndexSplit D (_root_.MIPStarRE.QPBT.combinedPointVar D.m D.k j) = Sum.inl j := by
  simp [_root_.MIPStarRE.QPBT.directCombinedIndexSplit, _root_.MIPStarRE.QPBT.combinedPointVar]

@[simp] theorem directCombinedIndexSplit_combinedCoefficientVar
    (D : _root_.MIPStarRE.QPBT.DirectLdParams) (r : Fin D.k) :
    _root_.MIPStarRE.QPBT.directCombinedIndexSplit D (_root_.MIPStarRE.QPBT.combinedCoefficientVar D.m D.k r) = Sum.inr r := by
  simp [_root_.MIPStarRE.QPBT.directCombinedIndexSplit, _root_.MIPStarRE.QPBT.combinedCoefficientVar]

/-- The geometric direction of the line carried by a question of the combined
game; the zero direction on point questions. -/
def directCombinedQuestionDirection (D : _root_.MIPStarRE.QPBT.DirectLdParams)
    (q : _root_.MIPStarRE.QPBT.DirectLdQuestion D.combined) : Fin D.combined.m → _root_.MIPStarRE.QPBT.DirectScalarQ D :=
  match q.1 with
  | .point => 0
  | .aline => _root_.MIPStarRE.QPBT.coordinateDirection q.2.index
  | .dline => q.2.direction

/-! ## The measured question -/

/-- The direction of the line of the original game measured on a question of
the combined game.  It is the coordinate direction of the stored point
coordinate for an axis-parallel question, and the prefix projection of the
point part of the combined direction for a diagonal question; on the three
cases measuring a point question it is the zero direction. -/
def directCombinedMeasuredDirection (D : _root_.MIPStarRE.QPBT.DirectLdParams)
    (q : _root_.MIPStarRE.QPBT.DirectLdQuestion D.combined) : Fin D.m → _root_.MIPStarRE.QPBT.DirectScalarQ D :=
  match q.1, _root_.MIPStarRE.QPBT.directCombinedIndexSplit D q.2.index with
  | .aline, .inl j => _root_.MIPStarRE.QPBT.coordinateDirection j
  | .dline, .inl j =>
      _root_.MIPStarRE.QPBT.directPrefixProjection j (_root_.MIPStarRE.QPBT.directCombinedPointPart D q.2.direction)
  | _, _ => 0

/-- The change of parameter between the presentation of the measured line by
the point part of the canonical base of the combined line and its presentation
by its own canonical base.  It is the canonical parameter of that line for the
measured direction; it is needed because the canonical base of a line of the
combined space need not project to the canonical base of its image line. -/
def directCombinedRebaseParameter (D : _root_.MIPStarRE.QPBT.DirectLdParams)
    (q : _root_.MIPStarRE.QPBT.DirectLdQuestion D.combined) : _root_.MIPStarRE.QPBT.DirectScalarQ D :=
  _root_.MIPStarRE.QPBT.directLineRepParameter (_root_.MIPStarRE.QPBT.directCombinedMeasuredDirection D q)
    (_root_.MIPStarRE.QPBT.directCombinedPointPart D q.2.point)

/-- The question of the original game measured by the combined strategy on a
question of the combined game.  This is the case distinction of
`def:ld-combined-strategy`: cases 1, 3 and 5 measure a point question, case 2
an axis-parallel line question, and case 4 a diagonal line question. -/
def directCombinedMeasuredQuestion (D : _root_.MIPStarRE.QPBT.DirectLdParams)
    (q : _root_.MIPStarRE.QPBT.DirectLdQuestion D.combined) : _root_.MIPStarRE.QPBT.DirectLdQuestion D :=
  match q.1, _root_.MIPStarRE.QPBT.directCombinedIndexSplit D q.2.index with
  | .aline, .inl j =>
      (.aline, _root_.MIPStarRE.QPBT.directLdMap D .aline
        ⟨_root_.MIPStarRE.QPBT.directCombinedPointPart D q.2.point, j, 0⟩)
  | .dline, .inl j =>
      (.dline, _root_.MIPStarRE.QPBT.directLdMap D .dline
        ⟨_root_.MIPStarRE.QPBT.directCombinedPointPart D q.2.point, j,
          _root_.MIPStarRE.QPBT.directCombinedPointPart D q.2.direction⟩)
  | _, _ => _root_.MIPStarRE.QPBT.directLdPointQuestionOf D (_root_.MIPStarRE.QPBT.directCombinedPointPart D q.2.point)

/-! ## The relabelling of the measured outcome -/

/-- The relabelling by which the combined strategy answers a question of the
combined game from the outcome of the measured question of the original game.
An outcome whose constructor does not match the measured question type is sent
to the zero answer of the constructor required by the combined question type,
which the combined win predicate treats exactly as the original win predicate
treats the mismatched outcome. -/
def directCombinedAnswerMap (D : _root_.MIPStarRE.QPBT.DirectLdParams)
    (q : _root_.MIPStarRE.QPBT.DirectLdQuestion D.combined) (a : _root_.MIPStarRE.QPBT.DirectLdAnswer D) :
    _root_.MIPStarRE.QPBT.DirectLdAnswer D.combined :=
  let α := _root_.MIPStarRE.QPBT.directCombinedCoefficientPart D q.2.point
  let w := _root_.MIPStarRE.QPBT.directCombinedCoefficientPart D (_root_.MIPStarRE.QPBT.directCombinedQuestionDirection D q)
  let s := _root_.MIPStarRE.QPBT.directCombinedRebaseParameter D q
  match q.1, _root_.MIPStarRE.QPBT.directCombinedIndexSplit D q.2.index with
  | .point, _ =>
      .pointVals fun _ =>
        match a with
        | .pointVals b => ∑ r : Fin D.k, α r * b r
        | .alinePolys _ => 0
        | .dlinePolys _ => 0
  | .aline, .inl _ =>
      .alinePolys fun _ =>
        match a with
        | .alinePolys f =>
            _root_.MIPStarRE.QPBT.coefficientsOfPolynomial D.combined.d (_root_.MIPStarRE.QPBT.combinedAxisPolynomial α s f)
        | .pointVals _ => 0
        | .dlinePolys _ => 0
  | .aline, .inr _ =>
      .alinePolys fun _ =>
        match a with
        | .pointVals b =>
            _root_.MIPStarRE.QPBT.coefficientsOfPolynomial D.combined.d (_root_.MIPStarRE.QPBT.fiberLinePolynomial α w b)
        | .alinePolys _ => 0
        | .dlinePolys _ => 0
  | .dline, .inl _ =>
      .dlinePolys fun _ =>
        match a with
        | .dlinePolys f =>
            _root_.MIPStarRE.QPBT.coefficientsOfPolynomial (D.combined.m * D.combined.d)
              (_root_.MIPStarRE.QPBT.combinedDiagonalPolynomial α w s f)
        | .pointVals _ => 0
        | .alinePolys _ => 0
  | .dline, .inr _ =>
      .dlinePolys fun _ =>
        match a with
        | .pointVals b =>
            _root_.MIPStarRE.QPBT.coefficientsOfPolynomial (D.combined.m * D.combined.d)
              (_root_.MIPStarRE.QPBT.fiberLinePolynomial α w b)
        | .alinePolys _ => 0
        | .dlinePolys _ => 0

/-! ## The combined strategy -/

/-- The combined strategy of `def:ld-combined-strategy`: the same state and the
same two Hilbert spaces, each question of the combined game answered by
measuring `directCombinedMeasuredQuestion` and relabelling its outcome by
`directCombinedAnswerMap`. -/
def directCombinedStrategy (D : _root_.MIPStarRE.QPBT.DirectLdParams) (S : _root_.MIPStarRE.QPBT.Strategy (_root_.MIPStarRE.QPBT.directLdGame D)) :
    _root_.MIPStarRE.QPBT.Strategy (_root_.MIPStarRE.QPBT.directLdGame D.combined) where
  ιA := S.ιA
  ιB := S.ιB
  ψ := S.ψ
  ψ_norm := S.ψ_norm
  A := fun q =>
    (S.A (_root_.MIPStarRE.QPBT.directCombinedMeasuredQuestion D q)).postprocess
      (_root_.MIPStarRE.QPBT.directCombinedAnswerMap D q)
  B := fun q =>
    (S.B (_root_.MIPStarRE.QPBT.directCombinedMeasuredQuestion D q)).postprocess
      (_root_.MIPStarRE.QPBT.directCombinedAnswerMap D q)

@[simp] theorem directCombinedStrategy_state (D : _root_.MIPStarRE.QPBT.DirectLdParams)
    (S : _root_.MIPStarRE.QPBT.Strategy (_root_.MIPStarRE.QPBT.directLdGame D)) : (_root_.MIPStarRE.QPBT.directCombinedStrategy D S).ψ = S.ψ := rfl

@[simp] theorem directCombinedStrategy_A (D : _root_.MIPStarRE.QPBT.DirectLdParams)
    (S : _root_.MIPStarRE.QPBT.Strategy (_root_.MIPStarRE.QPBT.directLdGame D)) (q : _root_.MIPStarRE.QPBT.DirectLdQuestion D.combined) :
    (_root_.MIPStarRE.QPBT.directCombinedStrategy D S).A q =
      (S.A (_root_.MIPStarRE.QPBT.directCombinedMeasuredQuestion D q)).postprocess
        (_root_.MIPStarRE.QPBT.directCombinedAnswerMap D q) := rfl

@[simp] theorem directCombinedStrategy_B (D : _root_.MIPStarRE.QPBT.DirectLdParams)
    (S : _root_.MIPStarRE.QPBT.Strategy (_root_.MIPStarRE.QPBT.directLdGame D)) (q : _root_.MIPStarRE.QPBT.DirectLdQuestion D.combined) :
    (_root_.MIPStarRE.QPBT.directCombinedStrategy D S).B q =
      (S.B (_root_.MIPStarRE.QPBT.directCombinedMeasuredQuestion D q)).postprocess
        (_root_.MIPStarRE.QPBT.directCombinedAnswerMap D q) := rfl



end

end MIPStarRE.QPBT
Source
https://github.com/Dengnifer/MIPStarRE-QPBT/blob/8f4118aeea7be16912adbaee3df6dce1741a2c26/QPBT/Combining/DirectLowDegree/Transport/Combining/Strategy.lean#L79-L250

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