Documentation

MIPRE.Foundations.CrossConsistency

Cross-party consistency, and what winning a subtest buys #

The Pauli appendix's ≃_δ compares A ⊗ Id with Id ⊗ B: one player's operator against the other player's. MIPRE.stateDist of def:state-distance compares two families on the same side, which is what the orthonormalization step needs; this file is the cross-party form, and the one lemma that produces it.

The engine #

xSqNorm ψ A B = ‖(A ⊗ Id - Id ⊗ B)|ψ⟩‖², and xPovmDist averages its sum over outcomes against a question distribution. xSqNorm_sum_le_two_mul is the only analytic content:

∑_c ‖(A_c ⊗ Id - Id ⊗ B_c)|ψ⟩‖² ≤ 2 (1 - ∑_c ⟨ψ| A_c ⊗ B_c |ψ⟩)

for any two POVMs indexed by the same outcome set. Expand each square; the two diagonal sums are at most one because a POVM element A has A† A = A² ≤ A and the elements sum to the identity, and the cross term is exactly the agreement probability. No projectivity is used --- which matters, because the strategies this is applied to are arbitrary POVM strategies and the projectivity only arrives later, through cor:ortho-from-consistency.

Paired with condFail_agree, which says the right-hand side is twice the conditional failure of a subtest whose decider accepts iff two post-processings of the answers agree, this turns each item of lem:qld-win into an instance: name the two post-processings, check the decider, and the bound is 2 ε / μ.

The weights #

sum_mul_condFail_le is the other half: the conditional failures of any set of question pairs, weighted by their probabilities, add up to at most ε. condFail_le_div in MIPRE/Foundations/POVMValue.lean is its one-pair case. The useful corollary is sum_condFail_le_of_le: an auxiliary distribution ν on an index set that injects into the question pairs, with c · ν i ≤ μ at each, gives ∑_i ν i · condFail ≤ ε / c. That is the blueprint's "each item is the value of the corresponding subtest, divided by the probability that the subtest is selected", with c the selection probability and ν the conditional question distribution.

In a bipartite model #

Everything above is proved once, for a bipartite model (MIPRE/Foundations/BipartiteModel.lean) with the players' POVMs in their ordered algebras (BipartiteModel.xSqNorm_sum_le_two_mul, BipartiteModel.xSqNorm_sum_le_condFail, BipartiteModel.xNorm_mul_le, ...), and the matrix statements are its instances in the tensor-product model. The one positivity fact, t² ≤ t for 0 ≤ t ≤ 1, is used on the represented operator (Op.mul_self_le_self), where the functional calculus of B(H) is: a player's algebra need not have one.

In a bipartite model #

The cross-party calculus is stated for any bipartite model (MIPRE/Foundations/BipartiteModel.lean): the first player's operators in 𝒜, the second player's in ℬ, and the deviation ‖(πA a - πB b) ψ‖ a state norm of the model's algebra. The matrix statements below are its instances in the tensor-product model (xNorm_eq_tensor, xSqNorm_eq_tensor, xPovmDist_eq_tensor). The second player's state norm is the first player's in the swapped model, M.swap.stateNorm b = ‖πB b ψ‖, so nothing is stated twice.

def MIPRE.BipartiteModel.xNorm {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) (a : 𝒜) (b : ℬ) :

‖(πA a - πB b) ψ‖, the unsquared cross-party deviation.

Equations
Instances For
    def MIPRE.BipartiteModel.xSqNorm {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) (a : 𝒜) (b : ℬ) :

    ‖(πA a - πB b) ψ‖², the appendix's A ⊗ Id ≃ Id ⊗ B at a single pair of operators.

    Equations
    Instances For
      theorem MIPRE.BipartiteModel.xNorm_nonneg {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) (a : 𝒜) (b : ℬ) :
      0 ≤ M.xNorm a b
      theorem MIPRE.BipartiteModel.xSqNorm_nonneg {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) (a : 𝒜) (b : ℬ) :
      0 ≤ M.xSqNorm a b
      theorem MIPRE.BipartiteModel.xSqNorm_eq_sq {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) (a : 𝒜) (b : ℬ) :
      M.xSqNorm a b = M.xNorm a b ^ 2
      theorem MIPRE.BipartiteModel.xNorm_swap {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) (a : 𝒜) (b : ℬ) :
      M.swap.xNorm b a = M.xNorm a b

      The swap exchanges the two sides of a deviation.

      theorem MIPRE.BipartiteModel.xSqNorm_swap {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) (a : 𝒜) (b : ℬ) :
      M.swap.xSqNorm b a = M.xSqNorm a b
      theorem MIPRE.BipartiteModel.stateNorm_sub_comm {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) (a a' : 𝒜) :
      M.stateNorm (a - a') = M.stateNorm (a' - a)
      theorem MIPRE.BipartiteModel.stateSqNorm_sub_comm {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) (a a' : 𝒜) :
      M.stateSqNorm (a - a') = M.stateSqNorm (a' - a)
      theorem MIPRE.BipartiteModel.stateSqNorm_sum_le {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) {κ : Type u_4} [Fintype κ] (f : κ → 𝒜) :
      M.stateSqNorm (∑ k : κ, f k) ≤ ↑(Fintype.card κ) * ∑ k : κ, M.stateSqNorm (f k)

      Pushing a sum inside a deviation costs the number of terms.

      def MIPRE.BipartiteModel.xStateDist {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) {X : Type u_4} [Fintype X] (μ : X → ℝ) (A : X → 𝒜) (B : X → ℬ) :

      The cross-party distance of two families of operators, one on each side.

      Equations
      Instances For
        def MIPRE.BipartiteModel.xPovmDist {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) {X : Type u_4} [Fintype X] [PartialOrder 𝒜] [PartialOrder ℬ] {C : Type u_5} [Fintype C] (μ : X → ℝ) (MA : X → POVMIn C 𝒜) (MB : X → POVMIn C ℬ) :

        The cross-party distance of two families of POVMs, one on each side, relative to a question distribution: the appendix's M^x_a ⊗ Id ≃_δ Id ⊗ N^x_a.

        Equations
        Instances For
          theorem MIPRE.BipartiteModel.xStateDist_obsOf_le {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) {X : Type u_4} [Fintype X] [PartialOrder 𝒜] [PartialOrder ℬ] {C : Type u_5} [Fintype C] {μ : X → ℝ} (hμ0 : ∀ (x : X), 0 ≤ μ x) (MA : X → POVMIn C 𝒜) (MB : X → POVMIn C ℬ) (α : C → ℂ) (hα : ∀ (a : C), ‖α a‖ ≤ 1) :
          (M.xStateDist μ (fun (x : X) => pvmObs (MA x).op α) fun (x : X) => pvmObs (MB x).op α) ≤ ↑(Fintype.card C) * M.xPovmDist μ MA MB

          From POVM elements to generalized observables, across the two parties: the triangle inequality, then Cauchy--Schwarz over the outcome set, at the factor |𝒜|.

          Products, and the order reversal #

          theorem MIPRE.BipartiteModel.xNorm_mul_le {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) {K L : ℝ} (a b : 𝒜) (a' b' : ℬ) (hA : M.Bnd (M.πA a) K) (hB' : M.Bnd (M.πB b') L) :
          M.xNorm (a * b) (b' * a') ≤ K * M.xNorm b b' + L * M.xNorm a a'

          The order-reversal rule. If πA a is K-bounded and πB b' is L-bounded, then a b is close to b' a' across the parties: the second player's factors appear in the opposite order, and each deviation is paid for by the operator norm of the factor in front of it.

          theorem MIPRE.BipartiteModel.xNorm_mul_le_one {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) (a b : 𝒜) (a' b' : ℬ) (hA : M.Bnd (M.πA a) 1) (hB' : M.Bnd (M.πB b') 1) :
          M.xNorm (a * b) (b' * a') ≤ M.xNorm b b' + M.xNorm a a'

          The order reversal for contractions.

          theorem MIPRE.BipartiteModel.xSqNorm_mul_le_one {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) (a b : 𝒜) (a' b' : ℬ) (hA : M.Bnd (M.πA a) 1) (hB' : M.Bnd (M.πB b') 1) :
          M.xSqNorm (a * b) (b' * a') ≤ 2 * M.xSqNorm b b' + 2 * M.xSqNorm a a'

          The squared form of the order reversal, at the usual cost of a factor two.

          theorem MIPRE.BipartiteModel.stateNorm_anticomm_le {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) (a b : 𝒜) (a' b' : ℬ) (hA : M.Bnd (M.πA a) 1) (hB : M.Bnd (M.πA b) 1) (hA' : M.Bnd (M.πB a') 1) (hB' : M.Bnd (M.πB b') 1) :
          M.stateNorm (a * b + b * a) ≤ 2 * M.xNorm a a' + 2 * M.xNorm b b' + M.swap.stateNorm (a' * b' + b' * a')

          An anticommutation on the second player's side transfers to the first player's, at the cost of the two cross-party deviations counted twice each. The split

          ab + ba = [ab - b'a'] + [a'b' + b'a'] + [ba - a'b']

          is an identity across the two sides, and its summands are an order reversal, the second player's anticommutator, and the other order reversal.

          theorem MIPRE.BipartiteModel.stateNorm_comm_le {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) (a b : 𝒜) (a' b' : ℬ) (hA : M.Bnd (M.πA a) 1) (hB : M.Bnd (M.πA b) 1) (hA' : M.Bnd (M.πB a') 1) (hB' : M.Bnd (M.πB b') 1) :
          M.stateNorm (a * b - b * a) ≤ 2 * M.xNorm a a' + 2 * M.xNorm b b' + M.swap.stateNorm (b' * a' - a' * b')

          The commutator form of the transfer: the same split, with the middle term a commutator.

          theorem MIPRE.BipartiteModel.xSqNorm_eq {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) {a : 𝒜} (ha : star a = a) (b : ℬ) :
          M.xSqNorm a b = M.stateSqNorm a + M.swap.stateSqNorm b - 2 * M.bornProb a b

          The expansion of a cross-party deviation, for a self-adjoint first operator: the two players' squared norms, less twice the Born term.

          Measurements are contractions on the state #

          theorem MIPRE.BipartiteModel.bnd_πA_of_star_mul_self_le {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) [PartialOrder 𝒜] [StarOrderedRing 𝒜] {a : 𝒜} (h : star a * a ≤ 1) :
          M.Bnd (M.πA a) 1

          An element with a* a ≤ 1 is represented by a contraction.

          theorem MIPRE.BipartiteModel.π_πA_le_one {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) [PartialOrder 𝒜] [StarOrderedRing 𝒜] {t : 𝒜} (h1 : t ≤ 1) :
          M.π (M.πA t) ≤ 1

          An element between 0 and 1 is represented by a positive operator at most one.

          theorem MIPRE.BipartiteModel.bnd_πA_sub {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) [PartialOrder 𝒜] [StarOrderedRing 𝒜] {C : Type u_5} [Fintype C] (P : POVMIn C 𝒜) (p q : C) :
          M.Bnd (M.πA (P.op p - P.op q)) 1

          The difference of two POVM elements is represented by a contraction, with no projectivity: this is what makes a two-outcome coarse-graining a ±1-observable in every estimate.

          theorem MIPRE.BipartiteModel.stateSqNorm_le_qform {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) [PartialOrder 𝒜] [StarOrderedRing 𝒜] {t : 𝒜} (h0 : 0 ≤ t) (h1 : t ≤ 1) :
          M.stateSqNorm t ≤ M.qform (M.πA t)

          A POVM element is a contraction on the state: ‖πA t ψ‖² ≤ ⟨ψ, πA t ψ⟩ for 0 ≤ t ≤ 1, because t² ≤ t.

          theorem MIPRE.BipartiteModel.sum_stateSqNorm_le_one {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) [PartialOrder 𝒜] [StarOrderedRing 𝒜] (hψ : ‖M.ψ‖ = 1) {C : Type u_5} [Fintype C] (MA : POVMIn C 𝒜) :
          ∑ c : C, M.stateSqNorm (MA.op c) ≤ 1

          ∑_a ‖πA(A_a) ψ‖² ≤ 1 for a POVM on a unit vector.

          theorem MIPRE.BipartiteModel.xSqNorm_sum_le_two_mul {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) [PartialOrder 𝒜] [StarOrderedRing 𝒜] [PartialOrder ℬ] [StarOrderedRing ℬ] {C : Type u_5} [Fintype C] (hψ : ‖M.ψ‖ = 1) (MA : POVMIn C 𝒜) (MB : POVMIn C ℬ) :
          ∑ c : C, M.xSqNorm (MA.op c) (MB.op c) ≤ 2 * (1 - ∑ c : C, M.bornProb (MA.op c) (MB.op c))

          From agreement to cross-party closeness. For any two POVMs with the same outcome set, the summed cross-party squared deviation is at most twice the disagreement probability. Expand each square: the two diagonal sums are at most one (sum_stateSqNorm_le_one, on each side), and the cross term is the agreement probability. No projectivity.

          The conditional failure of an agreement subtest #

          theorem MIPRE.BipartiteModel.sum_bornProb_mapB {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) [PartialOrder ℬ] [StarOrderedRing ℬ] {B : Type u_8} [Fintype B] {B' : Type u_9} [Fintype B'] [DecidableEq B'] (a : 𝒜) (NB : POVMIn B ℬ) (φB : B → B') (w : B' → ℝ) :
          ∑ b' : B', w b' * M.bornProb a ((POVMIn.map φB NB).op b') = ∑ b : B, w (φB b) * M.bornProb a (NB.op b)

          Relabelling the second player's outcomes is data processing: a weighted sum over the relabelled outcomes is the same weighted sum over the original ones, with the weight pulled back.

          theorem MIPRE.BipartiteModel.sum_bornProb_mapA {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) [PartialOrder 𝒜] [StarOrderedRing 𝒜] {A : Type u_7} [Fintype A] {A' : Type u_9} [Fintype A'] [DecidableEq A'] (NA : POVMIn A 𝒜) (φA : A → A') (b : ℬ) (w : A' → ℝ) :
          ∑ a' : A', w a' * M.bornProb ((POVMIn.map φA NA).op a') b = ∑ a : A, w (φA a) * M.bornProb (NA.op a) b

          Relabelling the first player's outcomes is data processing.

          theorem MIPRE.BipartiteModel.sum_weight_bornProb_map {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) [PartialOrder 𝒜] [StarOrderedRing 𝒜] [PartialOrder ℬ] [StarOrderedRing ℬ] {A : Type u_7} {B : Type u_8} [Fintype A] [Fintype B] {A' : Type u_9} {B' : Type u_10} [Fintype A'] [DecidableEq A'] [Fintype B'] [DecidableEq B'] (NA : POVMIn A 𝒜) (NB : POVMIn B ℬ) (φA : A → A') (φB : B → B') (w : A' → B' → ℝ) :
          ∑ a' : A', ∑ b' : B', w a' b' * M.bornProb ((POVMIn.map φA NA).op a') ((POVMIn.map φB NB).op b') = ∑ a : A, ∑ b : B, w (φA a) (φB b) * M.bornProb (NA.op a) (NB.op b)

          Relabelling both players' outcomes is data processing on the Born distribution. A weighted sum over the relabelled outcome pairs is the same weighted sum over the original pairs, with the weights pulled back.

          theorem MIPRE.BipartiteModel.sum_bornProb_map {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) [PartialOrder 𝒜] [StarOrderedRing 𝒜] [PartialOrder ℬ] [StarOrderedRing ℬ] {C : Type u_5} [Fintype C] {A : Type u_7} {B : Type u_8} [Fintype A] [Fintype B] [DecidableEq C] (NA : POVMIn A 𝒜) (NB : POVMIn B ℬ) (f : A → C) (g : B → C) :
          ∑ c : C, M.bornProb ((POVMIn.map f NA).op c) ((POVMIn.map g NB).op c) = ∑ a : A, ∑ b : B, (if f a = g b then 1 else 0) * M.bornProb (NA.op a) (NB.op b)

          The agreement probability of two coarse-grained POVMs, as a sum over the original outcome pairs.

          theorem MIPRE.BipartiteModel.one_sub_sum_bornProb_le_condFail {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) {X : Type u_4} [Fintype X] [PartialOrder 𝒜] [StarOrderedRing 𝒜] [PartialOrder ℬ] [StarOrderedRing ℬ] {C : Type u_5} [Fintype C] {Y : Type u_6} {A : Type u_7} {B : Type u_8} [Fintype Y] [Fintype A] [Fintype B] {G : Game X Y A B} {MA : X → POVMIn A 𝒜} {MB : Y → POVMIn B ℬ} [DecidableEq C] {x : X} {y : Y} (f : A → C) (g : B → C) (hD : ∀ (a : A) (b : B), G.D x y a b = true → f a = g b) :
          1 - ∑ c : C, M.bornProb ((POVMIn.map f (MA x)).op c) ((POVMIn.map g (MB y)).op c) ≤ M.condFail G MA MB x y

          Accept implies agree bounds the disagreement of the coarse-grained POVMs by the conditional failure.

          theorem MIPRE.BipartiteModel.xSqNorm_sum_le_condFail {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) {X : Type u_4} [Fintype X] [PartialOrder 𝒜] [StarOrderedRing 𝒜] [PartialOrder ℬ] [StarOrderedRing ℬ] {C : Type u_5} [Fintype C] {Y : Type u_6} {A : Type u_7} {B : Type u_8} [Fintype Y] [Fintype A] [Fintype B] {G : Game X Y A B} {MA : X → POVMIn A 𝒜} {MB : Y → POVMIn B ℬ} [DecidableEq C] (hψ : ‖M.ψ‖ = 1) {x : X} {y : Y} (f : A → C) (g : B → C) (hD : ∀ (a : A) (b : B), G.D x y a b = true → f a = g b) :
          ∑ c : C, M.xSqNorm ((POVMIn.map f (MA x)).op c) ((POVMIn.map g (MB y)).op c) ≤ 2 * M.condFail G MA MB x y

          The master estimate. A subtest that accepts only when two post-processings of the answers agree bounds the cross-party deviation of the coarse-grained POVMs by twice its conditional failure.

          The weights of the subtests #

          theorem MIPRE.BipartiteModel.sum_mul_condFail_le {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) {X : Type u_4} [Fintype X] [PartialOrder 𝒜] [StarOrderedRing 𝒜] [PartialOrder ℬ] [StarOrderedRing ℬ] {Y : Type u_6} {A : Type u_7} {B : Type u_8} [Fintype Y] [Fintype A] [Fintype B] {G : Game X Y A B} {MA : X → POVMIn A 𝒜} {MB : Y → POVMIn B ℬ} {ε : ℝ} (hψ : ‖M.ψ‖ = 1) (hfail : 1 - M.povmValue G MA MB ≤ ε) (S : Finset (X × Y)) :
          ∑ p ∈ S, G.μ p.1 p.2 * M.condFail G MA MB p.1 p.2 ≤ ε

          The conditional failures of any set of question pairs, weighted by their probabilities, add up to at most ε.

          theorem MIPRE.BipartiteModel.sum_condFail_le_of_pushforward {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) {X : Type u_4} [Fintype X] [PartialOrder 𝒜] [StarOrderedRing 𝒜] [PartialOrder ℬ] [StarOrderedRing ℬ] {Y : Type u_6} {A : Type u_7} {B : Type u_8} [Fintype Y] [Fintype A] [Fintype B] {G : Game X Y A B} {MA : X → POVMIn A 𝒜} {MB : Y → POVMIn B ℬ} {ε : ℝ} {ι : Type u_9} [Fintype ι] [DecidableEq X] [DecidableEq Y] (hψ : ‖M.ψ‖ = 1) (hfail : 1 - M.povmValue G MA MB ≤ ε) (ν : ι → ℝ) (q : ι → X × Y) {c : ℝ} (hc : 0 < c) (hpush : ∀ (p : X × Y), c * ∑ i : ι with q i = p, ν i ≤ G.μ p.1 p.2) :
          ∑ i : ι, ν i * M.condFail G MA MB (q i).1 (q i).2 ≤ ε / c

          The conditional error of a subtest, at the cost of its selection probability: an auxiliary weighting ν and a map q to question pairs whose pushforward stays below μ / c gives ∑_i ν i · condFail (q i) ≤ ε / c.

          theorem MIPRE.BipartiteModel.sum_condFail_le_of_le {𝒞 : Type u_1} {𝒜 : Type u_2} {ℬ : Type u_3} [Ring 𝒞] [StarRing 𝒞] [Algebra ℂ 𝒞] [Ring 𝒜] [StarRing 𝒜] [Algebra ℂ 𝒜] [Ring ℬ] [StarRing ℬ] [Algebra ℂ ℬ] (M : BipartiteModel 𝒞 𝒜 ℬ) {X : Type u_4} [Fintype X] [PartialOrder 𝒜] [StarOrderedRing 𝒜] [PartialOrder ℬ] [StarOrderedRing ℬ] {Y : Type u_6} {A : Type u_7} {B : Type u_8} [Fintype Y] [Fintype A] [Fintype B] {G : Game X Y A B} {MA : X → POVMIn A 𝒜} {MB : Y → POVMIn B ℬ} {ε : ℝ} {ι : Type u_9} [Fintype ι] (hψ : ‖M.ψ‖ = 1) (hfail : 1 - M.povmValue G MA MB ≤ ε) (ν : ι → ℝ) (q : ι → X × Y) (hq : Function.Injective q) {c : ℝ} (hc : 0 < c) (hνμ : ∀ (i : ι), c * ν i ≤ G.μ (q i).1 (q i).2) :
          ∑ i : ι, ν i * M.condFail G MA MB (q i).1 (q i).2 ≤ ε / c

          The injective form: an auxiliary distribution on an index set that injects into the question pairs, with c · ν i below the question probability at each.

          The cross-party squared deviation #

          noncomputable def MIPRE.xSqNorm {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (ψ : dA × dB → ℂ) (A : Matrix dA dA ℂ) (B : Matrix dB dB ℂ) :

          ‖(A ⊗ Id - Id ⊗ B)|ψ⟩‖², the appendix's A ⊗ Id ≃ Id ⊗ B at a single pair of operators.

          Equations
          Instances For
            noncomputable def MIPRE.xNorm {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (ψ : dA × dB → ℂ) (A : Matrix dA dA ℂ) (B : Matrix dB dB ℂ) :

            ‖(A ⊗ Id - Id ⊗ B)|ψ⟩‖, the unsquared cross-party deviation.

            Equations
            Instances For
              theorem MIPRE.xSqNorm_eq_sq {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (ψ : dA × dB → ℂ) (A : Matrix dA dA ℂ) (B : Matrix dB dB ℂ) :
              xSqNorm ψ A B = xNorm ψ A B ^ 2
              theorem MIPRE.xNorm_eq_snorm {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (ψ : dA × dB → ℂ) (A : Matrix dA dA ℂ) (B : Matrix dB dB ℂ) :
              xNorm ψ A B = snorm ψ (aOp A - bOp B)

              The deviation is the state-norm of the single operator A ⊗ Id - Id ⊗ B on the product space, which is what the operator-norm calculus of MIPRE/Foundations/OpBound.lean consumes.

              theorem MIPRE.xNorm_eq_tensor {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (ψ : dA × dB → ℂ) (A : Matrix dA dA ℂ) (B : Matrix dB dB ℂ) :

              The matrix deviation is that of the tensor-product model.

              theorem MIPRE.xSqNorm_eq_tensor {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (ψ : dA × dB → ℂ) (A : Matrix dA dA ℂ) (B : Matrix dB dB ℂ) :
              theorem MIPRE.xNorm_nonneg {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (ψ : dA × dB → ℂ) (A : Matrix dA dA ℂ) (B : Matrix dB dB ℂ) :
              0 ≤ xNorm ψ A B
              theorem MIPRE.xSqNorm_nonneg {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (ψ : dA × dB → ℂ) (A : Matrix dA dA ℂ) (B : Matrix dB dB ℂ) :
              0 ≤ xSqNorm ψ A B
              noncomputable def MIPRE.xPovmDist {X : Type u_1} {C : Type u_5} {dA : Type u_6} {dB : Type u_7} [Fintype X] [Fintype C] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (μ : X → ℝ) (ψ : dA × dB → ℂ) (M : X → POVM C dA) (N : X → POVM C dB) :

              The cross-party distance of two families of POVMs, one on each side, relative to a question distribution: the appendix's M^x_a ⊗ Id ≃_δ Id ⊗ N^x_a.

              Equations
              Instances For
                def MIPRE.IsXPOVMClose {X : Type u_1} {C : Type u_5} {dA : Type u_6} {dB : Type u_7} [Fintype X] [Fintype C] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (μ : X → ℝ) (ψ : dA × dB → ℂ) (δ : ℝ) (M : X → POVM C dA) (N : X → POVM C dB) :

                M^x_a ⊗ Id ≃_δ Id ⊗ N^x_a on ψ, relative to μ.

                Equations
                Instances For
                  theorem MIPRE.xPovmDist_eq_tensor {X : Type u_1} {C : Type u_5} {dA : Type u_6} {dB : Type u_7} [Fintype X] [Fintype C] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (μ : X → ℝ) (ψ : dA × dB → ℂ) (M : X → POVM C dA) (N : X → POVM C dB) :
                  xPovmDist μ ψ M N = (BipartiteModel.tensor ψ).xPovmDist μ (fun (x : X) => (M x).toIn) fun (x : X) => (N x).toIn

                  The cross-party distance of generalized observables #

                  stateDist_obsOf_le is the same-side statement (blueprint lem:qld-povm-to-obs); the appendix needs it across the two parties as well, to pass from a two-outcome coarse-graining of a point measurement to the ±1-observable it defines.

                  noncomputable def MIPRE.xStateDist {X : Type u_1} {dA : Type u_6} {dB : Type u_7} [Fintype X] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (μ : X → ℝ) (ψ : dA × dB → ℂ) (A : X → Matrix dA dA ℂ) (B : X → Matrix dB dB ℂ) :

                  The cross-party distance of two families of operators, one on each side.

                  Equations
                  Instances For
                    theorem MIPRE.xStateDist_eq_tensor {X : Type u_1} {dA : Type u_6} {dB : Type u_7} [Fintype X] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (μ : X → ℝ) (ψ : dA × dB → ℂ) (A : X → Matrix dA dA ℂ) (B : X → Matrix dB dB ℂ) :
                    theorem MIPRE.xStateDist_obsOf_le {X : Type u_1} {C : Type u_5} {dA : Type u_6} {dB : Type u_7} [Fintype X] [Fintype C] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {μ : X → ℝ} (hμ0 : ∀ (x : X), 0 ≤ μ x) (ψ : dA × dB → ℂ) (M : X → POVM C dA) (N : X → POVM C dB) (α : C → ℂ) (hα : ∀ (a : C), ‖α a‖ ≤ 1) :
                    xStateDist μ ψ (obsOf α M) (obsOf α N) ≤ ↑(Fintype.card C) * xPovmDist μ ψ M N

                    From POVM elements to generalized observables, across the two parties: the cross-party analogue of stateDist_obsOf_le, at the same factor |𝒜|.

                    A POVM element is a contraction on the state #

                    A† A = A² ≤ A for 0 ≤ A ≤ 1, so the diagonal terms of the expansion below sum to at most one. This is the only place positivity of the POVM is used.

                    theorem MIPRE.POVM.mul_self_le_self {A : Type u_3} {dA : Type u_6} [Fintype A] [Fintype dA] [DecidableEq dA] (M : POVM A dA) (a : A) :
                    ↑(M.mats a) * ↑(M.mats a) ≤ ↑(M.mats a)

                    A² ≤ A for a POVM element: A^{1/2}(1 - A)A^{1/2} ≥ 0, here through the commuting product A * (1 - A).

                    theorem MIPRE.sub_kronecker_right {dA : Type u_6} {dB : Type u_7} (N P : Matrix dA dA ℂ) (R : Matrix dB dB ℂ) :
                    Matrix.kroneckerMap (fun (x1 x2 : ℂ) => x1 * x2) (N - P) R = Matrix.kroneckerMap (fun (x1 x2 : ℂ) => x1 * x2) N R - Matrix.kroneckerMap (fun (x1 x2 : ℂ) => x1 * x2) P R

                    A difference in the left factor of a Kronecker product splits off.

                    theorem MIPRE.sum_stateSqNorm_le_one {A : Type u_3} {dA : Type u_6} {dB : Type u_7} [Fintype A] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {ψ : dA × dB → ℂ} (hψ : star ψ ⬝ᵥ ψ = 1) (M : POVM A dA) :
                    ∑ a : A, stateSqNorm ψ ↑(M.mats a) ≤ 1

                    ∑_a ‖(A_a ⊗ Id)|ψ⟩‖² ≤ 1 for a POVM on a unit vector.

                    theorem MIPRE.sum_stateSqNormB_le_one {B : Type u_4} {dA : Type u_6} {dB : Type u_7} [Fintype B] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {ψ : dA × dB → ℂ} (hψ : star ψ ⬝ᵥ ψ = 1) (N : POVM B dB) :
                    ∑ b : B, ‖stateVecB ψ ↑(N.mats b)‖ ^ 2 ≤ 1

                    Bob's version: the first player's in the swapped model.

                    The engine #

                    theorem MIPRE.xSqNorm_sum_le_two_mul {C : Type u_5} {dA : Type u_6} {dB : Type u_7} [Fintype C] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {ψ : dA × dB → ℂ} (hψ : star ψ ⬝ᵥ ψ = 1) (M : POVM C dA) (N : POVM C dB) :
                    ∑ c : C, xSqNorm ψ ↑(M.mats c) ↑(N.mats c) ≤ 2 * (1 - ∑ c : C, bornProb ψ ↑(M.mats c) ↑(N.mats c))

                    From agreement to cross-party closeness. For any two POVMs with the same outcome set, the summed cross-party squared deviation is at most twice the disagreement probability (BipartiteModel.xSqNorm_sum_le_two_mul in the tensor-product model). No projectivity, and no hypothesis beyond ψ being a unit vector.

                    The conditional failure of an agreement subtest #

                    The decider of a real test does not equal an agreement predicate: it first checks the answer formats and rejects if they fail, so an ill-formatted pair with agreeing post-processings is still rejected. What holds, and all that is needed, is the implication accept implies agree. The coarse-grainings are then free to send ill-formatted answers anywhere --- 0 is the usual choice --- since the test rejects them either way.

                    theorem MIPRE.sum_bornProb_map {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} {C : Type u_5} {dA : Type u_6} {dB : Type u_7} [Fintype A] [Fintype B] [Fintype C] [DecidableEq C] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {ψ : dA × dB → ℂ} {MA : X → POVM A dA} {MB : Y → POVM B dB} {x : X} {y : Y} (f : A → C) (g : B → C) :
                    ∑ c : C, bornProb ψ ↑((POVM.map f (MA x)).mats c) ↑((POVM.map g (MB y)).mats c) = ∑ a : A, ∑ b : B, (if f a = g b then 1 else 0) * bornProb ψ ↑((MA x).mats a) ↑((MB y).mats b)

                    The agreement probability of the coarse-grained POVMs, as a sum over the original outcome pairs.

                    theorem MIPRE.sum_bornProb_mapB {B : Type u_4} {dA : Type u_6} {dB : Type u_7} [Fintype B] [Fintype dA] [Fintype dB] [DecidableEq dB] {ψ : dA × dB → ℂ} {B' : Type u_8} [Fintype B'] [DecidableEq B'] (EA : Matrix dA dA ℂ) (NB : POVM B dB) (φB : B → B') (w : B' → ℝ) :
                    ∑ b' : B', w b' * bornProb ψ EA ↑((POVM.map φB NB).mats b') = ∑ b : B, w (φB b) * bornProb ψ EA ↑(NB.mats b)

                    Relabelling Bob's outcomes is data processing: a weighted sum over the relabelled outcomes is the same weighted sum over the original ones, with the weight pulled back.

                    theorem MIPRE.sum_bornProb_mapA {A : Type u_3} {dA : Type u_6} {dB : Type u_7} [Fintype A] [Fintype dA] [DecidableEq dA] [Fintype dB] {ψ : dA × dB → ℂ} {A' : Type u_8} [Fintype A'] [DecidableEq A'] (NA : POVM A dA) (φA : A → A') (EB : Matrix dB dB ℂ) (w : A' → ℝ) :
                    ∑ a' : A', w a' * bornProb ψ (↑((POVM.map φA NA).mats a')) EB = ∑ a : A, w (φA a) * bornProb ψ (↑(NA.mats a)) EB

                    Relabelling Alice's outcomes is data processing.

                    theorem MIPRE.sum_weight_bornProb_map {A : Type u_3} {B : Type u_4} {dA : Type u_6} {dB : Type u_7} [Fintype A] [Fintype B] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {ψ : dA × dB → ℂ} {A' : Type u_8} {B' : Type u_9} [Fintype A'] [DecidableEq A'] [Fintype B'] [DecidableEq B'] (NA : POVM A dA) (NB : POVM B dB) (φA : A → A') (φB : B → B') (w : A' → B' → ℝ) :
                    ∑ a' : A', ∑ b' : B', w a' b' * bornProb ψ ↑((POVM.map φA NA).mats a') ↑((POVM.map φB NB).mats b') = ∑ a : A, ∑ b : B, w (φA a) (φB b) * bornProb ψ ↑(NA.mats a) ↑(NB.mats b)

                    Relabelling both players' outcomes is data processing on the Born distribution. A weighted sum over the relabelled outcome pairs is the same weighted sum over the original pairs, with the weights pulled back. This is what says the value of a relabelled strategy is at least the value of the original one whenever the relabelled decider is more permissive.

                    theorem MIPRE.one_sub_sum_bornProb_le_condFail {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} {C : Type u_5} {dA : Type u_6} {dB : Type u_7} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [Fintype C] [DecidableEq C] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {G : Game X Y A B} {ψ : dA × dB → ℂ} {MA : X → POVM A dA} {MB : Y → POVM B dB} {x : X} {y : Y} (f : A → C) (g : B → C) (hD : ∀ (a : A) (b : B), G.D x y a b = true → f a = g b) :
                    1 - ∑ c : C, bornProb ψ ↑((POVM.map f (MA x)).mats c) ↑((POVM.map g (MB y)).mats c) ≤ condFail G ψ MA MB x y

                    Accept implies agree bounds the disagreement of the coarse-grained POVMs by the conditional failure.

                    theorem MIPRE.xSqNorm_sum_le_condFail {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} {C : Type u_5} {dA : Type u_6} {dB : Type u_7} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [Fintype C] [DecidableEq C] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {G : Game X Y A B} {ψ : dA × dB → ℂ} {MA : X → POVM A dA} {MB : Y → POVM B dB} (hψ : star ψ ⬝ᵥ ψ = 1) {x : X} {y : Y} (f : A → C) (g : B → C) (hD : ∀ (a : A) (b : B), G.D x y a b = true → f a = g b) :
                    ∑ c : C, xSqNorm ψ ↑((POVM.map f (MA x)).mats c) ↑((POVM.map g (MB y)).mats c) ≤ 2 * condFail G ψ MA MB x y

                    The master estimate. A subtest that accepts only when two post-processings of the answers agree bounds the cross-party deviation of the coarse-grained POVMs by twice its conditional failure. Every item of lem:qld-win is an instance: name f and g, check the decider, and read off the bound.

                    The weights of the subtests #

                    theorem MIPRE.sum_mul_condFail_le {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} {dA : Type u_6} {dB : Type u_7} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {G : Game X Y A B} {ψ : dA × dB → ℂ} {MA : X → POVM A dA} {MB : Y → POVM B dB} {ε : ℝ} (hψ : star ψ ⬝ᵥ ψ = 1) (hfail : 1 - povmValue G ψ MA MB ≤ ε) (S : Finset (X × Y)) :
                    ∑ p ∈ S, G.μ p.1 p.2 * condFail G ψ MA MB p.1 p.2 ≤ ε

                    The conditional failures of any set of question pairs, weighted by their probabilities, add up to at most ε. condFail_le_div is the one-pair case.

                    theorem MIPRE.sum_condFail_le_of_pushforward {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} {dA : Type u_6} {dB : Type u_7} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {G : Game X Y A B} {ψ : dA × dB → ℂ} {MA : X → POVM A dA} {MB : Y → POVM B dB} {ε : ℝ} {ι : Type u_8} [Fintype ι] [DecidableEq ι] [DecidableEq X] [DecidableEq Y] (hψ : star ψ ⬝ᵥ ψ = 1) (hfail : 1 - povmValue G ψ MA MB ≤ ε) (ν : ι → ℝ) (q : ι → X × Y) {c : ℝ} (hc : 0 < c) (hpush : ∀ (p : X × Y), c * ∑ i : ι with q i = p, ν i ≤ G.μ p.1 p.2) :
                    ∑ i : ι, ν i * condFail G ψ MA MB (q i).1 (q i).2 ≤ ε / c

                    The blueprint's "divided by the probability that the subtest is selected", in the form the Pauli basis test needs. An auxiliary weighting ν on an index set and a map q to question pairs whose pushforward stays below μ / c gives ∑_i ν i · condFail (q i) ≤ ε / c. Unlike sum_condFail_le_of_le this asks nothing of q: the subtests of the Pauli basis test are indexed by the verifier's content, and several contents give the same question pair whenever the types involved do not read all of it --- a (Pauli, W) question reads none of it at all.

                    theorem MIPRE.sum_condFail_le_of_le {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} {dA : Type u_6} {dB : Type u_7} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {G : Game X Y A B} {ψ : dA × dB → ℂ} {MA : X → POVM A dA} {MB : Y → POVM B dB} {ε : ℝ} {ι : Type u_8} [Fintype ι] (hψ : star ψ ⬝ᵥ ψ = 1) (hfail : 1 - povmValue G ψ MA MB ≤ ε) (ν : ι → ℝ) (q : ι → X × Y) (hq : Function.Injective q) {c : ℝ} (hc : 0 < c) (hνμ : ∀ (i : ι), c * ν i ≤ G.μ (q i).1 (q i).2) :
                    ∑ i : ι, ν i * condFail G ψ MA MB (q i).1 (q i).2 ≤ ε / c

                    The blueprint's "divided by the probability that the subtest is selected". An auxiliary distribution ν on an index set that injects into the question pairs, with c · ν i below the question probability at each, has ∑_i ν i · condFail ≤ ε / c: the conditional error of the subtest, at the cost of its selection probability c.

                    Products, and the order reversal #

                    lem:qld-obs-commutation needs one algebraic rule on top of the estimate above: if each of two of Alice's operators is cross-close to one of Bob's, then their product is cross-close to the product of Bob's in the reverse order. The reversal is not an accident of bookkeeping; it is where it comes from. Split

                    AB ⊗ Id - Id ⊗ B'A' = (A ⊗ Id)(B ⊗ Id - Id ⊗ B') + (Id ⊗ B')(A ⊗ Id - Id ⊗ A')
                    

                    --- the second step is legitimate because A ⊗ Id and Id ⊗ B' commute, and it is that commuting step that puts B' on the left of A'. Each summand then loses its front factor to a bound on its operator norm (BipartiteModel.xNorm_mul_le, here in the tensor-product model).

                    This is stated on the unsquared deviation, because the triangle inequality is what the argument uses; xSqNorm_mul_le squares it at the cost of the usual factor two.

                    theorem MIPRE.xSqNorm_eq_snorm_sq {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (ψ : dA × dB → ℂ) (A : Matrix dA dA ℂ) (B : Matrix dB dB ℂ) :
                    xSqNorm ψ A B = snorm ψ (aOp A - bOp B) ^ 2

                    The squared cross-party deviation as a snorm on the joint space, which is the form the chains of the appendix are run in.

                    theorem MIPRE.sum_weighted_xSqNorm_eq {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {ι : Type u_8} {κ : Type u_9} [Fintype κ] (ψ : dA × dB → ℂ) (w : ι → ℝ) (S : Finset ι) (Q : ι → κ → Matrix dA dA ℂ) (R : ι → κ → Matrix dB dB ℂ) :
                    ∑ i ∈ S, w i * ∑ o : κ, xSqNorm ψ (Q i o) (R i o) = ∑ i ∈ S, w i * ∑ o : κ, snorm ψ (aOp (Q i o) - bOp (R i o)) ^ 2

                    The weighted, doubly indexed form of xSqNorm_eq_snorm_sq: the shape every item of lem:qld-win is stated in, rewritten for the triangle inequalities on the joint space.

                    theorem MIPRE.sum_weighted_xSqNorm_eq' {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {ι : Type u_8} {κ : Type u_9} [Fintype κ] (ψ : dA × dB → ℂ) (w : ι → ℝ) (S : Finset ι) (Q : ι → κ → Matrix dA dA ℂ) (R : ι → κ → Matrix dB dB ℂ) :
                    ∑ i ∈ S, w i * ∑ o : κ, xSqNorm ψ (Q i o) (R i o) = ∑ i ∈ S, w i * ∑ o : κ, snorm ψ (bOp (R i o) - aOp (Q i o)) ^ 2

                    The same with the two sides exchanged, for a link the chain traverses backwards.

                    theorem MIPRE.norm_stateVec_eq_snorm {dA : Type u_6} {dB : Type u_7} [Fintype dA] [Fintype dB] [DecidableEq dB] (ψ : dA × dB → ℂ) (A : Matrix dA dA ℂ) :
                    theorem MIPRE.norm_stateVecB_eq_snorm {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] (ψ : dA × dB → ℂ) (B : Matrix dB dB ℂ) :
                    theorem MIPRE.xNorm_mul_le {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {ψ : dA × dB → ℂ} {K L : ℝ} (A B : Matrix dA dA ℂ) (A' B' : Matrix dB dB ℂ) (hA : Bnd (aOp A) K) (hB' : Bnd (bOp B') L) :
                    xNorm ψ (A * B) (B' * A') ≤ K * xNorm ψ B B' + L * xNorm ψ A A'

                    The order-reversal rule. If A ⊗ Id is K-boundedly close to Id ⊗ A' and B ⊗ Id to Id ⊗ B', then AB ⊗ Id is close to Id ⊗ B'A': Bob's factors appear in the opposite order, and each deviation is paid for by the operator norm of the factor in front of it.

                    theorem MIPRE.xNorm_mul_le_one {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {ψ : dA × dB → ℂ} (A B : Matrix dA dA ℂ) (A' B' : Matrix dB dB ℂ) (hA : A.conjTranspose * A ≤ 1) (hB' : B'.conjTranspose * B' ≤ 1) :
                    xNorm ψ (A * B) (B' * A') ≤ xNorm ψ B B' + xNorm ψ A A'

                    The order reversal for contractions, which is how every consumer uses it: POVM elements and generalized observables are bounded by one on either factor.

                    theorem MIPRE.xSqNorm_mul_le_one {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {ψ : dA × dB → ℂ} (A B : Matrix dA dA ℂ) (A' B' : Matrix dB dB ℂ) (hA : A.conjTranspose * A ≤ 1) (hB' : B'.conjTranspose * B' ≤ 1) :
                    xSqNorm ψ (A * B) (B' * A') ≤ 2 * xSqNorm ψ B B' + 2 * xSqNorm ψ A A'

                    The squared form of the order reversal, at the usual cost of a factor two.

                    A sum inside a deviation #

                    Pushing a sum inside a deviation costs the number of terms; the appendix's chains need it when a marginal of a joint measurement replaces the measurement itself.

                    theorem MIPRE.stateSqNorm_sub_comm {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (ψ : dA × dB → ℂ) (M N : Matrix dA dA ℂ) :
                    stateSqNorm ψ (M - N) = stateSqNorm ψ (N - M)
                    theorem MIPRE.norm_stateVecB_sub_comm {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (ψ : dA × dB → ℂ) (M N : Matrix dB dB ℂ) :
                    ‖stateVecB ψ (M - N)‖ = ‖stateVecB ψ (N - M)‖
                    theorem MIPRE.stateSqNorm_sum_le {dA : Type u_6} {dB : Type u_7} [Fintype dA] [Fintype dB] [DecidableEq dB] {κ : Type u_8} [Fintype κ] (ψ : dA × dB → ℂ) (f : κ → Matrix dA dA ℂ) :
                    stateSqNorm ψ (∑ k : κ, f k) ≤ ↑(Fintype.card κ) * ∑ k : κ, stateSqNorm ψ (f k)

                    Pushing a sum inside a deviation costs the number of terms.

                    Transferring an anticommutation across the two factors #

                    This is the shape the anticommuting case of lem:qld-obs-commutation needs, and it is where the sign comes from. Suppose A ⊗ Id ~ Id ⊗ A' and B ⊗ Id ~ Id ⊗ B'. Then

                    AB + BA ⊗ Id = [AB ⊗ Id - Id ⊗ B'A'] + [Id ⊗ (A'B' + B'A')] + [BA ⊗ Id - Id ⊗ A'B']
                    

                    is an identity --- Bob's two products cancel --- and its three summands are, in order: an order reversal, Bob's own anticommutator, and the other order reversal. So if Bob's two operators anticommute on the state then Alice's two anticommute on it as well: the product picked up a reversal on the way across and a second one on the way back, and the two reversals do not cancel because the anticommutator in the middle is a sum, not a difference.

                    theorem MIPRE.norm_stateVec_anticomm_le {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {ψ : dA × dB → ℂ} (A B : Matrix dA dA ℂ) (A' B' : Matrix dB dB ℂ) (hA : A.conjTranspose * A ≤ 1) (hB : B.conjTranspose * B ≤ 1) (hA' : A'.conjTranspose * A' ≤ 1) (hB' : B'.conjTranspose * B' ≤ 1) :
                    ‖stateVec ψ (A * B + B * A)‖ ≤ 2 * xNorm ψ A A' + 2 * xNorm ψ B B' + ‖stateVecB ψ (A' * B' + B' * A')‖

                    An anticommutation on Bob's side transfers to Alice's, at the cost of the two cross-party deviations counted twice each (BipartiteModel.stateNorm_anticomm_le). Every operator in sight is assumed to be a contraction, which is what a ±1-observable coming from a two-outcome POVM is.

                    Two-outcome observables #

                    A two-outcome POVM's ±1-observable is the difference of its two elements, which is what obsOf sgn computes; stating it as a difference is what makes the contraction bound of POVM.sub_mul_self_le_one available, and every consumer of the order reversal needs that.

                    def MIPRE.obs2 {d : Type u_8} [Fintype d] [DecidableEq d] (P : POVM (ZMod 2) d) :

                    The ±1-observable of a POVM with outcomes in F_2.

                    Equations
                    Instances For
                      theorem MIPRE.obsOf_sgn_eq_obs2 {X : Type u_1} {dA : Type u_6} [Fintype dA] [DecidableEq dA] (M : X → POVM (ZMod 2) dA) (x : X) :
                      obsOf sgn M x = obs2 (M x)
                      theorem MIPRE.obs2_map {A : Type u_3} {dA : Type u_6} [Fintype A] [Fintype dA] [DecidableEq dA] (P : POVM A dA) (f : A → ZMod 2) :
                      obs2 (POVM.map f P) = ∑ x : A, sgn (f x) • ↑(P.mats x)

                      The observable of a coarse-grained POVM, in terms of the original one.

                      The swap, for mixed operators #

                      norm_stateVecB says Bob's norm is Alice's norm of the swapped state, but only for an operator sitting on one factor. The chain below needs it for a difference of one operator on each factor, and the clean statement is at the level of vectors: a Kronecker product applied to the swapped state is the swap of the exchanged product applied to the state. Everything else follows by linearity.

                      theorem MIPRE.mulVec_kronecker_swapVec {dA : Type u_6} {dB : Type u_7} [Fintype dA] [Fintype dB] (X : Matrix dB dB ℂ) (Y : Matrix dA dA ℂ) (ψ : dA × dB → ℂ) :
                      (Matrix.kroneckerMap (fun (x1 x2 : ℂ) => x1 * x2) X Y).mulVec (swapVec ψ) = swapVec ((Matrix.kroneckerMap (fun (x1 x2 : ℂ) => x1 * x2) Y X).mulVec ψ)
                      theorem MIPRE.swapVec_sub {dA : Type u_6} {dB : Type u_7} (u v : dA × dB → ℂ) :
                      theorem MIPRE.norm_swapVec {dA : Type u_6} {dB : Type u_7} [Fintype dA] [Fintype dB] (v : dA × dB → ℂ) :
                      theorem MIPRE.snorm_swapVec_aOp_sub_bOp {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] (ψ : dA × dB → ℂ) (X : Matrix dB dB ℂ) (Y : Matrix dA dA ℂ) :
                      snorm (swapVec ψ) (aOp X - bOp Y) = xNorm ψ Y X

                      The swap exchanges the two sides of a cross-party deviation.

                      theorem MIPRE.snorm_swapVec_aOp {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] (ψ : dA × dB → ℂ) (X : Matrix dB dB ℂ) :

                      The same for a single operator on Bob's factor.

                      The commutator form of the transfer #

                      The same split as norm_stateVec_anticomm_le, with the middle term a commutator rather than an anticommutator: Bob's two products cancel either way.

                      theorem MIPRE.norm_stateVec_comm_le {dA : Type u_6} {dB : Type u_7} [Fintype dA] [DecidableEq dA] [Fintype dB] [DecidableEq dB] {ψ : dA × dB → ℂ} (A B : Matrix dA dA ℂ) (A' B' : Matrix dB dB ℂ) (hA : A.conjTranspose * A ≤ 1) (hB : B.conjTranspose * B ≤ 1) (hA' : A'.conjTranspose * A' ≤ 1) (hB' : B'.conjTranspose * B' ≤ 1) :
                      ‖stateVec ψ (A * B - B * A)‖ ≤ 2 * xNorm ψ A A' + 2 * xNorm ψ B B' + ‖stateVecB ψ (B' * A' - A' * B')‖