Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

QPBT definitions: Combining / Witnesses

Definition
QPBT_QPBT_Combining_Witnesses

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

qpbt

This bundle packages the witness data for combined point and line measurements and the subline distributions used by the direct-to-Pauli reduction. It defines scalar transport, point and line witness records, subline samples and components, and restricted line-point laws.

Principal definitions:

  • MIPStarRE.QPBT.extendedDirectScalarEquiv: identifies direct extended scalars with Pauli scalars.
  • MIPStarRE.QPBT.directPointToPauli: transports an extended direct point to the Pauli field.
  • MIPStarRE.QPBT.CombinedPointsWitness: witness data for joint point measurements and ordered consistency.
  • MIPStarRE.QPBT.CombinedLinesWitness: witness data for joint line measurements and evaluation consistency.
  • MIPStarRE.QPBT.SubLineTriple: an extended line with its projected X and Z lines.
  • MIPStarRE.QPBT.SubLinePointSample: a subline tuple with a uniformly sampled point.
  • MIPStarRE.QPBT.SubLineComponent: a shared restricted line kind and coordinate indices.
  • MIPStarRE.QPBT.restrictedLinePointDist: the restricted line-point distribution for one component.

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/Witnesses.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_Distribution
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_Preliminaries_Polynomials
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_LIDT_MIPStarRE_Quantum_Measurement
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_Combining_Defs
import Definitions.Def_QPBT_QPBT_Combining_DirectLowDegree_Game
import Definitions.Def_QPBT_QPBT_Combining_DirectLowDegree_Geometry
import Definitions.Def_QPBT_QPBT_Games_Consistency
import Definitions.Def_QPBT_QPBT_Games_Defs
import Definitions.Def_QPBT_QPBT_Games_Distance
import Definitions.Def_QPBT_QPBT_Games_DistributionAux
import Definitions.Def_QPBT_QPBT_Observables_Defs
import Definitions.Def_QPBT_QPBT_Observables_ExpandedDefs
import Definitions.Def_QPBT_QPBT_Observables_LineDefs
import Definitions.Def_QPBT_QPBT_Observables_LineMeasurement_Restriction
import Definitions.Def_QPBT_QPBT_Observables_PointConsistency
import Definitions.Def_QPBT_QPBT_Observables_WinImplications_Setup
import Definitions.Def_QPBT_QPBT_Test_LowDegreeGame
import Definitions.Def_QPBT_QPBT_Test_LowDegreeGameMeasurements
import Definitions.Def_QPBT_QPBT_Test_PauliBasisTest
import Mathlib
import Mathlib.Analysis.MeanInequalitiesPow

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

/-!
# Witnesses for combining the Pauli bases

This module defines the five measurement and distribution witnesses used in
the combining argument.  Every measurement is indexed by the player side, so
Alice's and Bob's local spaces remain distinct.  The extended-dimensional
line objects use the directly indexed low-degree interface and therefore do
not require a dimension-divisibility hypothesis.

## References

`CombinedPointsWitness`, `CombinedLinesWitness`, and `GlobalPairWitness` record
the measurement conclusions of `lem:qld-4-10`, `lem:qld-xz-lines`, and
`lem:qld-4-7`, respectively, in
`blueprint/src/chapter/ch15_qpbt_combining.tex`.  `SubLineWitness` and
`ExtendedLinesWitness` instead support `lem:qld-sublines` and `lem:qld-4-13`
through the directly indexed extended-line carrier and probability law.  The
latter also uses the completed answer alphabet, rather than the field-valued
answer sum in the source statement.  The paper source is
`references/qpbt-paper/14_analysis_of_the_pauli_basis_test.tex:689-709,
882-894,1020-1069,1267-1274`.
-/

@[expose] public section

namespace MIPStarRE.QPBT

open LIDT.MIPStarRE.LDT hiding Measurement
open LIDT.MIPStarRE.LDT.Preliminaries LIDT.MIPStarRE.Quantum

noncomputable section

/-! ## The canonical scalar identification -/

/-- Identify the direct extended game's scalar field with the Pauli scalar
field.  Both are selected by `fixedFieldModel`; only their proof argument for
admissibility differs. -/
noncomputable def extendedDirectScalarEquiv (P : _root_.MIPStarRE.QPBT.AdmissibleParams) :
    _root_.MIPStarRE.QPBT.DirectScalarQ P.extendedDirectLd ≃+* _root_.MIPStarRE.QPBT.PauliScalar P := by
  have h : P.extendedDirectLd.hq = P.hq := Subsingleton.elim _ _
  cases h
  exact RingEquiv.refl _

/-- Transport an extended direct point into the canonical Pauli scalar field. -/
def directPointToPauli (P : _root_.MIPStarRE.QPBT.AdmissibleParams)
    (u : Fin P.extendedDirectLd.m -> _root_.MIPStarRE.QPBT.DirectScalarQ P.extendedDirectLd) :
    Fin (2 * P.m + 2) -> _root_.MIPStarRE.QPBT.PauliScalar P :=
  fun i => _root_.MIPStarRE.QPBT.extendedDirectScalarEquiv P (u i)

/-! ## Combined point and line measurements -/

/-- Projective joint point measurements and their ordered consistency
guarantees from `lem:qld-4-10`, paper lines 689--709.  The `XZ` and `ZX`
products are retained as distinct fields. -/
structure CombinedPointsWitness {P : _root_.MIPStarRE.QPBT.AdmissibleParams} {ε : ℝ}
    (S : _root_.MIPStarRE.QPBT.ProjectiveSetting P ε) (δ : ℝ) where
  /-- The complete joint measurement on each player's expanded local space. -/
  Q : (side : _root_.MIPStarRE.QPBT.PlayerSide) ->
    (Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P) ->
    (Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P) ->
    _root_.LIDT.MIPStarRE.Quantum.Measurement (_root_.MIPStarRE.QPBT.PauliScalar P × _root_.MIPStarRE.QPBT.PauliScalar P) (S.ExpandedLocalSpace side)
  /-- Every joint point measurement is projective. -/
  projective : ∀ side x z, _root_.MIPStarRE.QPBT.Measurement.IsProjective (Q side x z)
  /-- Joint point measurements agree across every directed opposite placement. -/
  self_consistent : ∀ p1 p2 : _root_.MIPStarRE.QPBT.Placement, p1.IsOpposite p2 ->
    _root_.MIPStarRE.QPBT.opFamilyDistSq
      (_root_.LIDT.MIPStarRE.LDT.uniformDistribution
        ((Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P) × (Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P)))
      (fun xz ab => S.place p1 ((Q p1.side xz.1 xz.2).effect ab))
      (fun xz ab => S.place p2 ((Q p2.side xz.1 xz.2).effect ab))
      S.psiHat <= δ
  /-- Joint point measurements are close to the ordered `X`-then-`Z` product. -/
  consistent_XZ : ∀ p1 p2 : _root_.MIPStarRE.QPBT.Placement, p1.IsOpposite p2 ->
    _root_.MIPStarRE.QPBT.opFamilyDistSq
      (_root_.LIDT.MIPStarRE.LDT.uniformDistribution
        ((Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P) × (Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P)))
      (fun xz ab => S.place p1 ((Q p1.side xz.1 xz.2).effect ab))
      (fun xz ab => S.place p2
        ((S.pointMeasExp p2.side .X xz.1).effect ab.1 *
          (S.pointMeasExp p2.side .Z xz.2).effect ab.2))
      S.psiHat <= δ
  /-- Joint point measurements are close to the ordered `Z`-then-`X` product. -/
  consistent_ZX : ∀ p1 p2 : _root_.MIPStarRE.QPBT.Placement, p1.IsOpposite p2 ->
    _root_.MIPStarRE.QPBT.opFamilyDistSq
      (_root_.LIDT.MIPStarRE.LDT.uniformDistribution
        ((Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P) × (Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P)))
      (fun xz ab => S.place p1 ((Q p1.side xz.1 xz.2).effect ab))
      (fun xz ab => S.place p2
        ((S.pointMeasExp p2.side .Z xz.2).effect ab.2 *
          (S.pointMeasExp p2.side .X xz.1).effect ab.1))
      S.psiHat <= δ

/-- Joint line measurements and their evaluation consistency from
`lem:qld-xz-lines`, paper lines 882--894.  Evaluation uses explicit `Option`
outcomes, including the class of answers not determined at the sampled point. -/
structure CombinedLinesWitness {P : _root_.MIPStarRE.QPBT.AdmissibleParams} {ε δQ : ℝ}
    (S : _root_.MIPStarRE.QPBT.ProjectiveSetting P ε) (points : _root_.MIPStarRE.QPBT.CombinedPointsWitness S δQ)
    (δ : ℝ) where
  /-- The complete paired-line measurement on each expanded local space. -/
  T : (side : _root_.MIPStarRE.QPBT.PlayerSide) ->
    _root_.MIPStarRE.QPBT.LineDesc P.toLdParams -> _root_.MIPStarRE.QPBT.LineDesc P.toLdParams ->
    _root_.LIDT.MIPStarRE.Quantum.Measurement
      (_root_.MIPStarRE.QPBT.DegPoly P.toLdParams (P.m * P.d) ×
        _root_.MIPStarRE.QPBT.DegPoly P.toLdParams (P.m * P.d))
      (S.ExpandedLocalSpace side)
  /-- On an axis-parallel X line, outcomes outside degree `d` have zero effect. -/
  axis_degree_X : ∀ side lineX lineZ fX fZ,
    lineX.kind = .axis -> Not (_root_.MIPStarRE.QPBT.DegPoly.FitsDegree P.d fX) ->
      (T side lineX lineZ).effect (fX, fZ) = 0
  /-- On an axis-parallel Z line, outcomes outside degree `d` have zero effect. -/
  axis_degree_Z : ∀ side lineX lineZ fX fZ,
    lineZ.kind = .axis -> Not (_root_.MIPStarRE.QPBT.DegPoly.FitsDegree P.d fZ) ->
      (T side lineX lineZ).effect (fX, fZ) = 0
  /-- Evaluated line pairs are consistent with the completed point-pair
  measurement on every directed opposite placement. -/
  consistent : ∀ p1 p2 : _root_.MIPStarRE.QPBT.Placement, p1.IsOpposite p2 ->
    _root_.MIPStarRE.QPBT.consistencyDefect
      (_root_.MIPStarRE.QPBT.Distribution.prod (_root_.MIPStarRE.QPBT.linePointDist P.toLdParams)
        (_root_.MIPStarRE.QPBT.linePointDist P.toLdParams))
      (fun sample answer => S.place p1
        (((T p1.side sample.1.1 sample.2.1).postprocess fun fs =>
          (_root_.MIPStarRE.QPBT.evalOpt sample.1.1 sample.1.2 fs.1,
            _root_.MIPStarRE.QPBT.evalOpt sample.2.1 sample.2.2 fs.2)).effect answer))
      (fun sample answer => S.place p2
        (((points.Q p2.side sample.1.2 sample.2.2).postprocess fun ab =>
          (some ab.1, some ab.2)).effect answer))
      S.psiHat <= δ

/-! ## The subline distribution -/

/-- A tuple consisting of an extended line and its projected X and Z lines. -/
abbrev SubLineTriple (P : _root_.MIPStarRE.QPBT.AdmissibleParams) :=
  _root_.MIPStarRE.QPBT.DirectLineDesc P.extendedDirectLd ×
    (_root_.MIPStarRE.QPBT.LineDesc P.toLdParams × _root_.MIPStarRE.QPBT.LineDesc P.toLdParams)

/-- An extended line tuple together with a point sampled uniformly on it. -/
abbrev SubLinePointSample (P : _root_.MIPStarRE.QPBT.AdmissibleParams) :=
  _root_.MIPStarRE.QPBT.SubLineTriple P ×
    (Fin P.extendedDirectLd.m -> _root_.MIPStarRE.QPBT.DirectScalarQ P.extendedDirectLd)

/-- The shared restricted line kind and two coordinate indices in one mixture
component of the subline law. -/
abbrev SubLineComponent (P : _root_.MIPStarRE.QPBT.AdmissibleParams) :=
  _root_.MIPStarRE.QPBT.LineKind × (Fin P.m × Fin P.m)

/-- Select the restricted line-point distribution of a given kind and index. -/
noncomputable def restrictedLinePointDist (P : _root_.MIPStarRE.QPBT.AdmissibleParams)
    (kind : _root_.MIPStarRE.QPBT.LineKind) (i : Fin P.m) :
    _root_.LIDT.MIPStarRE.LDT.Distribution (_root_.MIPStarRE.QPBT.LineDesc P.toLdParams × (Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P)) :=
  match kind with
  | .axis => _root_.MIPStarRE.QPBT.restrictedALineDist P.toLdParams i
  | .diagonal => _root_.MIPStarRE.QPBT.restrictedDLineDist P.toLdParams i

/-- Sample a subline tuple and then a uniform affine parameter on its
extended line. -/
noncomputable def subLinePointDist (P : _root_.MIPStarRE.QPBT.AdmissibleParams)
    (D : _root_.LIDT.MIPStarRE.LDT.Distribution (_root_.MIPStarRE.QPBT.SubLineTriple P)) :
    _root_.LIDT.MIPStarRE.LDT.Distribution (_root_.MIPStarRE.QPBT.SubLinePointSample P) :=
  (_root_.MIPStarRE.QPBT.Distribution.prod D
    (_root_.LIDT.MIPStarRE.LDT.uniformDistribution (_root_.MIPStarRE.QPBT.DirectScalarQ P.extendedDirectLd))).map fun sample =>
      (sample.1, sample.1.1.base + sample.2 • sample.1.1.direction)

/-- Retain the projected line pair and the X projection of an extended point. -/
def subLineXProjection {P : _root_.MIPStarRE.QPBT.AdmissibleParams} (sample : _root_.MIPStarRE.QPBT.SubLinePointSample P) :
    (_root_.MIPStarRE.QPBT.LineDesc P.toLdParams × _root_.MIPStarRE.QPBT.LineDesc P.toLdParams) ×
      (Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P) :=
  (sample.1.2, _root_.MIPStarRE.QPBT.projX (_root_.MIPStarRE.QPBT.directPointToPauli P sample.2))

/-- Retain the projected line pair and the Z projection of an extended point. -/
def subLineZProjection {P : _root_.MIPStarRE.QPBT.AdmissibleParams} (sample : _root_.MIPStarRE.QPBT.SubLinePointSample P) :
    (_root_.MIPStarRE.QPBT.LineDesc P.toLdParams × _root_.MIPStarRE.QPBT.LineDesc P.toLdParams) ×
      (Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P) :=
  (sample.1.2, _root_.MIPStarRE.QPBT.projZ (_root_.MIPStarRE.QPBT.directPointToPauli P sample.2))

/-- The X-point marginal associated with one restricted product component. -/
noncomputable def subLineXComponentDist (P : _root_.MIPStarRE.QPBT.AdmissibleParams)
    (component : _root_.MIPStarRE.QPBT.SubLineComponent P) :
    _root_.LIDT.MIPStarRE.LDT.Distribution
      ((_root_.MIPStarRE.QPBT.LineDesc P.toLdParams × _root_.MIPStarRE.QPBT.LineDesc P.toLdParams) ×
        (Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P)) :=
  (_root_.MIPStarRE.QPBT.Distribution.prod
    (_root_.MIPStarRE.QPBT.restrictedLinePointDist P component.1 component.2.1)
    ((_root_.MIPStarRE.QPBT.restrictedLinePointDist P component.1 component.2.2).map Prod.fst)).map
      fun sample => ((sample.1.1, sample.2), sample.1.2)

/-- The Z-point marginal associated with one restricted product component. -/
noncomputable def subLineZComponentDist (P : _root_.MIPStarRE.QPBT.AdmissibleParams)
    (component : _root_.MIPStarRE.QPBT.SubLineComponent P) :
    _root_.LIDT.MIPStarRE.LDT.Distribution
      ((_root_.MIPStarRE.QPBT.LineDesc P.toLdParams × _root_.MIPStarRE.QPBT.LineDesc P.toLdParams) ×
        (Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P)) :=
  (_root_.MIPStarRE.QPBT.Distribution.prod
    ((_root_.MIPStarRE.QPBT.restrictedLinePointDist P component.1 component.2.1).map Prod.fst)
    (_root_.MIPStarRE.QPBT.restrictedLinePointDist P component.1 component.2.2)).map
      fun sample => ((sample.1, sample.2.1), sample.2.2)

/-- Directly indexed form of the subline distribution of `lem:qld-sublines`,
paper lines 1063--1069.  Its extended-line marginal is the directly indexed
line-point law rather than the seed-indexed line-point distribution over
`F_q^(2m+2)` of the source statement; that replacement is documented in
`docs/paper-gaps/qpbt_ld-dimension-divisibility.tex`, so this is a
formalization auxiliary record, not the source-labelled statement.  Its
source-mixture field records the X and Z point marginals separately; it does
not assert a joint conditional law for the pair of projected points. -/
structure SubLineWitness (P : _root_.MIPStarRE.QPBT.AdmissibleParams) where
  /-- The actual distribution of an extended line and two projected lines. -/
  D : _root_.LIDT.MIPStarRE.LDT.Distribution (_root_.MIPStarRE.QPBT.SubLineTriple P)
  /-- The distribution has total mass one. -/
  isProbability : D.IsProbability
  /-- Its extended-line marginal is the direct line-point marginal. -/
  extended_marginal : D.map Prod.fst =
    (_root_.MIPStarRE.QPBT.directLinePointDist P.extendedDirectLd).map Prod.fst
  /-- Every point of an extended line projects onto both stored source lines. -/
  incidence : ∀ sample ∈ D.support, ∀ u ∈ sample.1.pointSet,
    _root_.MIPStarRE.QPBT.projX (_root_.MIPStarRE.QPBT.directPointToPauli P u) ∈ sample.2.1.pointSet ∧
      _root_.MIPStarRE.QPBT.projZ (_root_.MIPStarRE.QPBT.directPointToPauli P u) ∈ sample.2.2.pointSet
  /-- Each line triple carries affine data sufficient for
  `combineLinePoly_spec`. -/
  compatibility : ∀ sample ∈ D.support,
    ∃ aX bX aZ bZ uAlpha vAlpha uBeta vBeta : _root_.MIPStarRE.QPBT.PauliScalar P,
      _root_.MIPStarRE.QPBT.IsCombineLineCompatible
        (_root_.MIPStarRE.QPBT.directPointToPauli P sample.1.base)
        (_root_.MIPStarRE.QPBT.directPointToPauli P sample.1.direction)
        sample.2.1.base sample.2.1.direction
        sample.2.2.base sample.2.2.direction
        aX bX aZ bZ uAlpha vAlpha uBeta vBeta
  /-- Each one-point projected marginal is a mixture of restricted product
  laws.  No equality for their joint conditional law is claimed. -/
  source_mixture : ∃ components : _root_.LIDT.MIPStarRE.LDT.Distribution (_root_.MIPStarRE.QPBT.SubLineComponent P),
    components.IsProbability ∧
      (_root_.MIPStarRE.QPBT.subLinePointDist P D).map _root_.MIPStarRE.QPBT.subLineXProjection =
        _root_.MIPStarRE.QPBT.Distribution.bind components (_root_.MIPStarRE.QPBT.subLineXComponentDist P) ∧
      (_root_.MIPStarRE.QPBT.subLinePointDist P D).map _root_.MIPStarRE.QPBT.subLineZProjection =
        _root_.MIPStarRE.QPBT.Distribution.bind components (_root_.MIPStarRE.QPBT.subLineZComponentDist P)
  /-- An extended axis line has axis-parallel projected lines. -/
  axis_closure : ∀ sample ∈ D.support, sample.1.kind = .axis ->
    sample.2.1.kind = .axis ∧ sample.2.2.kind = .axis

/-! ## Extended lines and global polynomial pairs -/

/-- Extended-line POVMs and directly indexed, completed-answer forms of the two
consistency relations in `lem:qld-4-13`, paper lines 1020--1034. The direct line
carrier avoids the dimension-divisibility obstruction documented in
`docs/paper-gaps/qpbt_ld-dimension-divisibility.tex`. -/
structure ExtendedLinesWitness {P : _root_.MIPStarRE.QPBT.AdmissibleParams} {ε δQ : ℝ}
    (S : _root_.MIPStarRE.QPBT.ProjectiveSetting P ε) (points : _root_.MIPStarRE.QPBT.CombinedPointsWitness S δQ)
    (δ : ℝ) where
  /-- The complete extended-line measurement on each player side. -/
  Qline : (side : _root_.MIPStarRE.QPBT.PlayerSide) -> _root_.MIPStarRE.QPBT.DirectLineDesc P.extendedDirectLd ->
    _root_.LIDT.MIPStarRE.Quantum.Measurement (_root_.MIPStarRE.QPBT.DirectDegPoly P.extendedDirectLd (P.m * P.d + 1))
      (S.ExpandedLocalSpace side)
  /-- Axis-line outcomes outside degree `d` have zero effect. -/
  axis_degree : ∀ side line f, line.kind = .axis ->
    Not (∀ i, P.d < i.val -> f i = 0) ->
      (Qline side line).effect f = 0
  /-- Alice's evaluated line measurement is consistent with Bob's completed
  combined point measurement. -/
  consistent_alice : _root_.MIPStarRE.QPBT.consistencyDefect
    (_root_.MIPStarRE.QPBT.directLinePointDist P.extendedDirectLd)
    (fun sample answer => S.place .AA'
      (((Qline .alice sample.1).postprocess
        (fun f => (_root_.MIPStarRE.QPBT.directEvalOpt sample.1 sample.2 f).map
          (_root_.MIPStarRE.QPBT.extendedDirectScalarEquiv P))).effect answer))
    (fun sample answer => S.place .BA''
      (((points.Q .bob
        (_root_.MIPStarRE.QPBT.projX (_root_.MIPStarRE.QPBT.directPointToPauli P sample.2))
        (_root_.MIPStarRE.QPBT.projZ (_root_.MIPStarRE.QPBT.directPointToPauli P sample.2))).postprocess fun ab =>
          some (_root_.MIPStarRE.QPBT.directPointToPauli P sample.2 (_root_.MIPStarRE.QPBT.alphaVar P.m) * ab.1 +
            _root_.MIPStarRE.QPBT.directPointToPauli P sample.2 (_root_.MIPStarRE.QPBT.betaVar P.m) * ab.2)).effect answer))
    S.psiHat <= δ
  /-- Bob's evaluated line measurement is consistent with Alice's completed
  combined point measurement. -/
  consistent_bob : _root_.MIPStarRE.QPBT.consistencyDefect
    (_root_.MIPStarRE.QPBT.directLinePointDist P.extendedDirectLd)
    (fun sample answer => S.place .BB'
      (((Qline .bob sample.1).postprocess
        (fun f => (_root_.MIPStarRE.QPBT.directEvalOpt sample.1 sample.2 f).map
          (_root_.MIPStarRE.QPBT.extendedDirectScalarEquiv P))).effect answer))
    (fun sample answer => S.place .AB''
      (((points.Q .alice
        (_root_.MIPStarRE.QPBT.projX (_root_.MIPStarRE.QPBT.directPointToPauli P sample.2))
        (_root_.MIPStarRE.QPBT.projZ (_root_.MIPStarRE.QPBT.directPointToPauli P sample.2))).postprocess fun ab =>
          some (_root_.MIPStarRE.QPBT.directPointToPauli P sample.2 (_root_.MIPStarRE.QPBT.alphaVar P.m) * ab.1 +
            _root_.MIPStarRE.QPBT.directPointToPauli P sample.2 (_root_.MIPStarRE.QPBT.betaVar P.m) * ab.2)).effect answer))
    S.psiHat <= δ

/-- The side-indexed global polynomial-pair measurements handed to Chapter 16.
This is the exact conclusion of `lem:qld-4-7`, paper lines 1267--1274, with
the two heterogeneous point-consistency displays stated separately. -/
structure GlobalPairWitness {P : _root_.MIPStarRE.QPBT.AdmissibleParams} {ε : ℝ}
    (S : _root_.MIPStarRE.QPBT.ProjectiveSetting P ε) (δ : ℝ) where
  /-- The complete global polynomial-pair measurement on each player side. -/
  Smeas : (side : _root_.MIPStarRE.QPBT.PlayerSide) ->
    _root_.LIDT.MIPStarRE.Quantum.Measurement (_root_.MIPStarRE.QPBT.PolyPair P) (S.ExpandedLocalSpace side)
  /-- Both global polynomial-pair measurements are projective. -/
  projective : ∀ side, _root_.MIPStarRE.QPBT.Measurement.IsProjective (Smeas side)
  /-- Alice's global evaluations are consistent with Bob's source point
  measurements, for each Pauli basis. -/
  point_consistent_alice : ∀ W : _root_.MIPStarRE.QPBT.PauliKind,
    _root_.MIPStarRE.QPBT.consistencyDefect (_root_.LIDT.MIPStarRE.LDT.uniformDistribution (Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P))
      (fun u a => S.place .AA'
        (((Smeas .alice).postprocess (_root_.MIPStarRE.QPBT.evalAt W u)).effect a))
      (fun u a => S.place .BA''
        ((S.pointMeasExp .bob W u).effect a))
      S.psiHat <= δ
  /-- Bob's global evaluations are consistent with Alice's source point
  measurements, for each Pauli basis. -/
  point_consistent_bob : ∀ W : _root_.MIPStarRE.QPBT.PauliKind,
    _root_.MIPStarRE.QPBT.consistencyDefect (_root_.LIDT.MIPStarRE.LDT.uniformDistribution (Fin P.m -> _root_.MIPStarRE.QPBT.PauliScalar P))
      (fun u a => S.place .BB'
        (((Smeas .bob).postprocess (_root_.MIPStarRE.QPBT.evalAt W u)).effect a))
      (fun u a => S.place .AB''
        ((S.pointMeasExp .alice W u).effect a))
      S.psiHat <= δ

end

end MIPStarRE.QPBT
Source
https://github.com/Dengnifer/MIPStarRE-QPBT/blob/8f4118aeea7be16912adbaee3df6dce1741a2c26/QPBT/Combining/Witnesses.lean#L43-L322

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