Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

QPBT definitions: Algebra / PauliTheorems

Definition
QPBT_QPBT_Algebra_PauliTheorems

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

qpbt

This bundle defines the shifted and phased Pauli observables used in twisted commutation. It expands field labels into qubit labels, constructs binary Pauli projectors, and records the product, characteristic-power, and twisted X-Z identities for the multi-qudit observable.

Principal definitions:

  • MIPStarRE.QPBT.primeTauShift: the shift observable in the twisted-commutation construction.
  • MIPStarRE.QPBT.primeTauPhase: the phase observable.
  • MIPStarRE.QPBT.primeTauObservable: the multi-qudit observable with its phase convention.
  • MIPStarRE.QPBT.quditQubitLabelEquiv: expands each register label in the fixed binary basis.
  • MIPStarRE.QPBT.qubitPauliProj: the tensor product of binary Pauli projectors.
  • MIPStarRE.QPBT.primeTauObservable_mul: the Pauli product identity.
  • MIPStarRE.QPBT.primeTauObservable_pow_char: the characteristic-power consequence.
  • MIPStarRE.QPBT.primeTauObservable_X_mul_Z: the multi-qudit twisted X-Z relation.

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/Algebra/PauliTheorems.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_Preliminaries_FiniteFields
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_Pauli
import Definitions.Def_QPBT_QPBT_Algebra_SelfDualBasis
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

/-! # Pauli product, commutation, and cancellation identities

The principal results are blueprint `lem:twisted-commutation` and
`lem:cancellation`, from
`references/qpbt-paper/04_preliminaries.tex:1056-1095,1124-1151`. The
general-prime statements use the canonical character `ffChar`; binary
declarations below are separately named QPBT specializations.
-/

@[expose] public section

open scoped BigOperators Matrix

namespace MIPStarRE.QPBT

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

/-- The shift observable in blueprint
`lem:twisted-commutation`, paper `04_preliminaries.tex:1056-1089`. -/
noncomputable def primeTauShift {p : ℕ} {K : Type*} [Field K] [Fintype K]
    [DecidableEq K] [Fact p.Prime] [Algebra (ZMod p) K]
    (a : K) : _root_.LIDT.MIPStarRE.Quantum.Op K := fun i j => if i = j + a then 1 else 0

/-- The phase observable in blueprint
`lem:twisted-commutation`, paper `04_preliminaries.tex:1056-1089`. -/
noncomputable def primeTauPhase {p : ℕ} {K : Type*} [Field K] [Fintype K]
    [DecidableEq K] [Fact p.Prime] [Algebra (ZMod p) K]
    (b : K) : _root_.LIDT.MIPStarRE.Quantum.Op K := fun i j =>
  if i = j then _root_.LIDT.MIPStarRE.LDT.Preliminaries.ffChar (p := p) (F := K) (b * j) else 0

/-- The multi-qudit observable in `lem:twisted-commutation`, with `false`
denoting phase; blueprint `lem:twisted-commutation`, paper
`04_preliminaries.tex:1073-1095,1141-1151`. -/
noncomputable def primeTauObservable {p : ℕ} {K ι : Type*} [Field K] [Fintype K]
    [DecidableEq K] [Fact p.Prime] [Algebra (ZMod p) K]
    [Fintype ι] [DecidableEq ι] (W : Bool) (a : ι → K) : _root_.LIDT.MIPStarRE.Quantum.Op (ι → K) :=
  fun x y => ∏ i : ι, if W then _root_.MIPStarRE.QPBT.primeTauShift (p := p) (a i) (x i) (y i)
    else _root_.MIPStarRE.QPBT.primeTauPhase (p := p) (a i) (x i) (y i)

/-- The coordinatewise tensor-entry presentation used by the Pauli observables. -/
private def productMatrix {ι κ : Type*} [Fintype ι]
    (A : ι → Matrix κ κ ℂ) : Matrix (ι → κ) (ι → κ) ℂ :=
  fun x y => ∏ i, A i (x i) (y i)

/-- Matrix multiplication distributes over `productMatrix`. -/
private theorem productMatrix_mul {ι κ : Type*} [Fintype ι] [DecidableEq ι]
    [Fintype κ]
    (A B : ι → Matrix κ κ ℂ) :
    (productMatrix A * productMatrix B : Matrix (ι → κ) (ι → κ) ℂ) =
      productMatrix (fun i => A i * B i) := by
  classical
  ext x y
  simpa only [productMatrix, Matrix.mul_apply, Finset.prod_mul_distrib] using
    (Fintype.prod_sum (fun i z => A i (x i) z * B i z (y i))).symm

/-- Two single-coordinate shifts compose by adding their displacements. -/
private theorem primeTauShift_mul {p : ℕ} {K : Type*} [Field K] [Fintype K]
    [DecidableEq K] [Fact p.Prime] [Algebra (ZMod p) K] (a a' : K) :
    _root_.MIPStarRE.QPBT.primeTauShift (p := p) a * _root_.MIPStarRE.QPBT.primeTauShift (p := p) a' =
      _root_.MIPStarRE.QPBT.primeTauShift (p := p) (a + a') := by
  ext x y
  simp [Matrix.mul_apply, _root_.MIPStarRE.QPBT.primeTauShift, add_comm, add_left_comm]

/-- Two single-coordinate phases compose by adding their labels. -/
private theorem primeTauPhase_mul {p : ℕ} {K : Type*} [Field K] [Fintype K]
    [DecidableEq K] [Fact p.Prime] [Algebra (ZMod p) K] (b b' : K) :
    _root_.MIPStarRE.QPBT.primeTauPhase (p := p) b * _root_.MIPStarRE.QPBT.primeTauPhase (p := p) b' =
      _root_.MIPStarRE.QPBT.primeTauPhase (p := p) (b + b') := by
  ext x y
  simp [Matrix.mul_apply, _root_.MIPStarRE.QPBT.primeTauPhase, add_mul, AddChar.map_add_eq_mul]

/-- The generalized Pauli observable with zero label is the identity. -/
private theorem primeTauObservable_zero {p : ℕ} {K ι : Type*} [Field K]
    [Fintype K] [DecidableEq K] [Fact p.Prime] [Algebra (ZMod p) K]
    [Fintype ι] [DecidableEq ι] (W : Bool) :
    _root_.MIPStarRE.QPBT.primeTauObservable (p := p) W (0 : ι → K) = 1 := by
  classical
  ext x y
  cases W <;>
    simp only [_root_.MIPStarRE.QPBT.primeTauObservable, if_true, Pi.zero_apply, _root_.MIPStarRE.QPBT.primeTauShift,
      _root_.MIPStarRE.QPBT.primeTauPhase, zero_mul, AddChar.map_zero_eq_one, Matrix.one_apply]
  all_goals
    by_cases hxy : ∀ i, x i = y i
    · have h : x = y := funext hxy
      simp [h]
    · simp only [not_forall] at hxy
      obtain ⟨i, hi⟩ := hxy
      rw [Finset.prod_eq_zero (Finset.mem_univ i) (by simp [hi])]
      have h : x ≠ y := fun hxy => hi (congr_fun hxy i)
      simp [h]

/-- The product identity blueprint
`eq:pauli-product-power`, paper `04_preliminaries.tex:1082-1089`. -/
theorem primeTauObservable_mul {p : ℕ} {K ι : Type*} [Field K] [Fintype K]
    [DecidableEq K] [Fact p.Prime] [Algebra (ZMod p) K] [Fintype ι]
    [DecidableEq ι] (W : Bool) (a a' : ι → K) :
    _root_.MIPStarRE.QPBT.primeTauObservable (p := p) W a * _root_.MIPStarRE.QPBT.primeTauObservable (p := p) W a' =
      _root_.MIPStarRE.QPBT.primeTauObservable (p := p) W (a + a') := by
  cases W with
  | false =>
      change productMatrix (fun i => _root_.MIPStarRE.QPBT.primeTauPhase (p := p) (a i)) *
          productMatrix (fun i => _root_.MIPStarRE.QPBT.primeTauPhase (p := p) (a' i)) =
        productMatrix (fun i => _root_.MIPStarRE.QPBT.primeTauPhase (p := p) ((a + a') i))
      simpa [primeTauPhase_mul] using
        (productMatrix_mul
          (A := fun i => _root_.MIPStarRE.QPBT.primeTauPhase (p := p) (a i))
          (B := fun i => _root_.MIPStarRE.QPBT.primeTauPhase (p := p) (a' i)))
  | true =>
      change productMatrix (fun i => _root_.MIPStarRE.QPBT.primeTauShift (p := p) (a i)) *
          productMatrix (fun i => _root_.MIPStarRE.QPBT.primeTauShift (p := p) (a' i)) =
        productMatrix (fun i => _root_.MIPStarRE.QPBT.primeTauShift (p := p) ((a + a') i))
      simpa [primeTauShift_mul] using
        (productMatrix_mul
          (A := fun i => _root_.MIPStarRE.QPBT.primeTauShift (p := p) (a i))
          (B := fun i => _root_.MIPStarRE.QPBT.primeTauShift (p := p) (a' i)))

/-- Natural powers of a generalized Pauli observable multiply its label by
repeated addition. -/
private theorem primeTauObservable_pow_nat {p : ℕ} {K ι : Type*} [Field K]
    [Fintype K] [DecidableEq K] [Fact p.Prime] [Algebra (ZMod p) K]
    [Fintype ι] [DecidableEq ι] (W : Bool) (a : ι → K) (n : ℕ) :
    (_root_.MIPStarRE.QPBT.primeTauObservable (p := p) W a) ^ n =
      _root_.MIPStarRE.QPBT.primeTauObservable (p := p) W (fun i => n • a i) := by
  induction n with
  | zero =>
      rw [pow_zero]
      have hzero : (fun i => (0 : ℕ) • a i) = (0 : ι → K) := by
        funext i
        simp
      rw [hzero]
      exact (primeTauObservable_zero (p := p) (K := K) (ι := ι) W).symm
  | succ n ih =>
      calc
        (_root_.MIPStarRE.QPBT.primeTauObservable (p := p) W a) ^ (n + 1) =
            (_root_.MIPStarRE.QPBT.primeTauObservable (p := p) W a) ^ n *
              _root_.MIPStarRE.QPBT.primeTauObservable (p := p) W a := pow_succ _ _
        _ = _root_.MIPStarRE.QPBT.primeTauObservable (p := p) W (fun i => n • a i) *
              _root_.MIPStarRE.QPBT.primeTauObservable (p := p) W a := by rw [ih]
        _ = _root_.MIPStarRE.QPBT.primeTauObservable (p := p) W ((fun i => n • a i) + a) :=
              _root_.MIPStarRE.QPBT.primeTauObservable_mul W _ _
        _ = _root_.MIPStarRE.QPBT.primeTauObservable (p := p) W (fun i => (n + 1) • a i) := by
              have hlabels : ((fun i => n • a i) + a) =
                  (fun i => (n + 1) • a i) := by
                funext i
                rw [Pi.add_apply, add_nsmul, one_nsmul]
              exact congrArg
                (fun c => _root_.MIPStarRE.QPBT.primeTauObservable (p := p) W c) hlabels



/-- The characteristic-`p` consequence of `primeTauObservable_pow`, blueprint
`eq:pauli-product-power`, paper `04_preliminaries.tex:1088-1089`. -/
theorem primeTauObservable_pow_char {p : ℕ} {K ι : Type*} [Field K] [Fintype K]
    [DecidableEq K] [Fact p.Prime] [Algebra (ZMod p) K] [Fintype ι]
    [DecidableEq ι] (W : Bool) (a : ι → K) :
    (_root_.MIPStarRE.QPBT.primeTauObservable (p := p) W a) ^ p = 1 := by
  haveI : CharP K p := (Algebra.charP_iff (ZMod p) K p).mp (ZMod.charP p)
  rw [primeTauObservable_pow_nat]
  have hlabel : (fun i => p • a i) = (0 : ι → K) := by
    funext i
    simp [nsmul_eq_mul, CharP.cast_eq_zero]
  rw [hlabel, primeTauObservable_zero]













/-- A single-coordinate shift and phase satisfy the generalized Pauli twisted
commutation relation. -/
private theorem primeTauShift_mul_primeTauPhase {p : ℕ} {K : Type*} [Field K]
    [Fintype K] [DecidableEq K] [Fact p.Prime] [Algebra (ZMod p) K]
    (a b : K) :
    _root_.MIPStarRE.QPBT.primeTauShift (p := p) a * _root_.MIPStarRE.QPBT.primeTauPhase (p := p) b =
      (_root_.LIDT.MIPStarRE.LDT.Preliminaries.ffChar (p := p) (F := K) (-a * b)) •
        (_root_.MIPStarRE.QPBT.primeTauPhase (p := p) b * _root_.MIPStarRE.QPBT.primeTauShift (p := p) a) := by
  ext x y
  by_cases hxy : x = y + a
  · subst x
    simp only [Matrix.mul_apply, _root_.MIPStarRE.QPBT.primeTauShift, _root_.MIPStarRE.QPBT.primeTauPhase, Matrix.smul_apply,
      smul_eq_mul]
    simp only [add_left_inj, mul_ite, ite_mul, one_mul, zero_mul, mul_zero,
      Finset.sum_ite_eq', Finset.mem_univ, mul_one]
    rw [← AddChar.map_add_eq_mul]
    congr 1
    ring_nf
  · simp [Matrix.mul_apply, _root_.MIPStarRE.QPBT.primeTauShift, _root_.MIPStarRE.QPBT.primeTauPhase, Matrix.smul_apply, hxy]

/-- The source multi-qudit twisted relation blueprint
`eq:twisted-fq`, paper `04_preliminaries.tex:1090-1095,1141-1151`. -/
theorem primeTauObservable_X_mul_Z {p : ℕ} {K ι : Type*} [Field K] [Fintype K]
    [DecidableEq K] [Fact p.Prime] [Algebra (ZMod p) K] [Fintype ι]
    [DecidableEq ι] [Nonempty ι] (a b : ι → K) :
    _root_.MIPStarRE.QPBT.primeTauObservable (p := p) true a * _root_.MIPStarRE.QPBT.primeTauObservable (p := p) false b =
      (_root_.LIDT.MIPStarRE.LDT.Preliminaries.ffChar (p := p) (F := K) (-dotProduct a b)) •
        (_root_.MIPStarRE.QPBT.primeTauObservable (p := p) false b * _root_.MIPStarRE.QPBT.primeTauObservable (p := p) true a) := by
  let ψ := _root_.LIDT.MIPStarRE.LDT.Preliminaries.ffChar (p := p) (F := K)
  have hchar : ψ (-dotProduct a b) = ∏ i, ψ (-(a i) * b i) := by
    calc
      ψ (-dotProduct a b) = ψ (∑ i, -(a i) * b i) := by
        congr 1
        simp [dotProduct]
      _ = ∏ i, ψ (-(a i) * b i) := by
        simpa only [AddChar.toMonoidHom_apply, toAdd_prod, toAdd_ofAdd] using
          (map_prod ψ.toMonoidHom (fun i => Multiplicative.ofAdd (-(a i) * b i))
            Finset.univ)
  change productMatrix (fun i => _root_.MIPStarRE.QPBT.primeTauShift (p := p) (a i)) *
      productMatrix (fun i => _root_.MIPStarRE.QPBT.primeTauPhase (p := p) (b i)) =
    ψ (-dotProduct a b) •
      (productMatrix (fun i => _root_.MIPStarRE.QPBT.primeTauPhase (p := p) (b i)) *
        productMatrix (fun i => _root_.MIPStarRE.QPBT.primeTauShift (p := p) (a i)))
  rw [productMatrix_mul, productMatrix_mul]
  ext x y
  simp only [productMatrix, primeTauShift_mul_primeTauPhase, Matrix.smul_apply,
    smul_eq_mul, Finset.prod_mul_distrib]
  rw [← hchar]

/-- The canonical finite-field character at `p = 2` is `phaseSign` composed
with the binary trace. -/
private theorem ffChar_two_eq_phaseSign {K : Type*} [Field K]
    [Algebra (ZMod 2) K] (x : K) :
    _root_.LIDT.MIPStarRE.LDT.Preliminaries.ffChar (p := 2) (F := K) x = _root_.MIPStarRE.QPBT.phaseSign (_root_.MIPStarRE.QPBT.binTrace K x) := by
  rw [_root_.LIDT.MIPStarRE.LDT.Preliminaries.ffChar_apply]
  exact (_root_.MIPStarRE.QPBT.phaseSign_eq_ffChar (_root_.MIPStarRE.QPBT.binTrace K x)).symm

/-- The binary Pauli observable is the characteristic-two specialization of
the prime-characteristic observable. -/
private theorem tauObservable_eq_primeTauObservable {K ι : Type*} [Field K]
    [Fintype K] [DecidableEq K] [Algebra (ZMod 2) K] [Fintype ι]
    [DecidableEq ι] (W : _root_.MIPStarRE.QPBT.PauliKind) (a : ι → K) :
    _root_.MIPStarRE.QPBT.tauObservable W a = _root_.MIPStarRE.QPBT.primeTauObservable (p := 2)
      (match W with | .X => true | .Z => false) a := by
  cases W with
  | X =>
      ext x y
      rfl
  | Z =>
      ext x y
      simp only [_root_.MIPStarRE.QPBT.tauObservable, _root_.MIPStarRE.QPBT.primeTauObservable, Bool.false_eq_true, if_false,
        _root_.MIPStarRE.QPBT.tauPhase, _root_.MIPStarRE.QPBT.primeTauPhase]
      apply Finset.prod_congr rfl
      intro i hi
      by_cases hxy : x i = y i
      · rw [if_pos hxy, if_pos hxy, _root_.LIDT.MIPStarRE.LDT.Preliminaries.ffChar_apply]
        exact _root_.MIPStarRE.QPBT.phaseSign_eq_ffChar _
      · rw [if_neg hxy, if_neg hxy]

/-- With no coordinates, every binary Pauli observable is the identity. -/
private theorem tauObservable_eq_one_of_isEmpty {K ι : Type*} [Field K]
    [DecidableEq K] [Algebra (ZMod 2) K] [Fintype ι]
    [DecidableEq ι] [IsEmpty ι] (W : _root_.MIPStarRE.QPBT.PauliKind) (a : ι → K) :
    _root_.MIPStarRE.QPBT.tauObservable W a = 1 := by
  classical
  ext x y
  have hxy : x = y := Subsingleton.elim _ _
  subst y
  simp [_root_.MIPStarRE.QPBT.tauObservable]

/-- Binary specialization of blueprint
`eq:pauli-product-power`, paper `04_preliminaries.tex:1082-1089`.

**Scope restriction:** This characteristic-two specialization is separated
from the general-prime identity as documented in
`docs/paper-gaps/qpbt_characteristic-two-pauli-scope.tex`. -/
theorem tauObservable_mul {K ι : Type*} [Field K] [Fintype K] [DecidableEq K]
    [Algebra (ZMod 2) K] [Fintype ι] [DecidableEq ι]
    (W : _root_.MIPStarRE.QPBT.PauliKind) (a a' : ι → K) :
    _root_.MIPStarRE.QPBT.tauObservable W a * _root_.MIPStarRE.QPBT.tauObservable W a' = _root_.MIPStarRE.QPBT.tauObservable W (a + a') := by
  cases W with
  | X =>
      simpa only [tauObservable_eq_primeTauObservable] using
        (_root_.MIPStarRE.QPBT.primeTauObservable_mul (p := 2) true a a')
  | Z =>
      simpa only [tauObservable_eq_primeTauObservable] using
        (_root_.MIPStarRE.QPBT.primeTauObservable_mul (p := 2) false a a')

/-- Binary characteristic-two specialization of blueprint
`eq:pauli-product-power`, paper `04_preliminaries.tex:1088-1089`.

**Scope restriction:** This characteristic-two specialization is separated
from the general-prime identity as documented in
`docs/paper-gaps/qpbt_characteristic-two-pauli-scope.tex`. -/
theorem tauObservable_sq {K ι : Type*} [Field K] [Fintype K] [DecidableEq K]
    [Algebra (ZMod 2) K] [Fintype ι] [DecidableEq ι] (W : _root_.MIPStarRE.QPBT.PauliKind) (a : ι → K) :
    _root_.MIPStarRE.QPBT.tauObservable W a * _root_.MIPStarRE.QPBT.tauObservable W a = 1 := by
  cases W with
  | X =>
      simpa only [tauObservable_eq_primeTauObservable, pow_two] using
        (_root_.MIPStarRE.QPBT.primeTauObservable_pow_char (p := 2) true a)
  | Z =>
      simpa only [tauObservable_eq_primeTauObservable, pow_two] using
        (_root_.MIPStarRE.QPBT.primeTauObservable_pow_char (p := 2) false a)

/-- Binary specialization of blueprint
`eq:twisted-fq`, paper `04_preliminaries.tex:1090-1095`.

**Scope restriction:** This characteristic-two specialization is separated
from the general-prime identity as documented in
`docs/paper-gaps/qpbt_characteristic-two-pauli-scope.tex`. -/
theorem tauObservable_X_mul_Z {K ι : Type*} [Field K] [Fintype K] [DecidableEq K]
    [Algebra (ZMod 2) K] [Fintype ι] [DecidableEq ι] (a b : ι → K) :
    _root_.MIPStarRE.QPBT.tauObservable .X a * _root_.MIPStarRE.QPBT.tauObservable .Z b =
      (_root_.MIPStarRE.QPBT.phaseSign (_root_.MIPStarRE.QPBT.binTrace K (dotProduct a b))) •
        (_root_.MIPStarRE.QPBT.tauObservable .Z b * _root_.MIPStarRE.QPBT.tauObservable .X a) := by
  cases isEmpty_or_nonempty ι with
  | inl hι =>
      letI : IsEmpty ι := hι
      rw [tauObservable_eq_one_of_isEmpty]
      simp [dotProduct, _root_.MIPStarRE.QPBT.phaseSign]
  | inr hι =>
      letI : Nonempty ι := hι
      have hphase : _root_.LIDT.MIPStarRE.LDT.Preliminaries.ffChar (p := 2) (F := K) (-dotProduct a b) =
          _root_.MIPStarRE.QPBT.phaseSign (_root_.MIPStarRE.QPBT.binTrace K (dotProduct a b)) := by
        rw [ffChar_two_eq_phaseSign]
        congr 1
        rw [map_neg]
        exact ZMod.neg_eq_self_mod_two _
      simpa only [tauObservable_eq_primeTauObservable, hphase] using
        (_root_.MIPStarRE.QPBT.primeTauObservable_X_mul_Z (p := 2) a b)













/-- Expand every register label in the fixed self-dual binary basis. This
arbitrary-index construction is the computational-basis identification in the
proof of `lem:pauli-binary`, shared by the algebra and soundness modules. -/
noncomputable def quditQubitLabelEquiv {q : ℕ} {ι : Type*}
    (F : _root_.MIPStarRE.QPBT.FixedFieldModel q) :
    (ι → F.K) ≃ (ι × Fin F.basisDim → ZMod 2) :=
  (Equiv.piCongrRight (fun _ : ι => F.binaryCoordinates.toEquiv)).trans
    (Equiv.curry ι (Fin F.basisDim) (ZMod 2)).symm















/-- The tensor product of binary Pauli projectors, obtained by specializing
`pauliProj` to `ZMod 2`. This is the binary target in blueprint
`lem:pauli-binary`, paper
`references/qpbt-paper/04_preliminaries.tex:1163-1208`. -/
noncomputable abbrev qubitPauliProj {ι : Type*} [Fintype ι] [DecidableEq ι]
    (W : _root_.MIPStarRE.QPBT.PauliKind) (b : ι → ZMod 2) : _root_.LIDT.MIPStarRE.Quantum.Op (ι → ZMod 2) :=
  _root_.MIPStarRE.QPBT.pauliProj W b



end MIPStarRE.QPBT
Source
https://github.com/Dengnifer/MIPStarRE-QPBT/blob/8f4118aeea7be16912adbaee3df6dce1741a2c26/QPBT/Algebra/PauliTheorems.lean#L26-L708

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