AFTD Auto-Formalizing Theoretical Domains

ppt_qutrit_steered_effect_is_valid

theoremverified

Each of the three normalized steered operators and its complement is positive semidefinite.

Statement

theorem ppt_qutrit_steered_effect_is_valid : ∀ j : Fin 3, (ppt_qutrit_steered_effect j).PosSemidef ∧ (1 - ppt_qutrit_steered_effect j).PosSemidef
Source
Helper for OP-693; construction from arXiv:1405.4502, and steering normalization in arXiv:2010.04048, Appendix A.
Verified
12 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 6
Used by 2

The proof, explained

To show that each normalized steered effect E_j = N S(A_j) N and its complement 1 - E_j are positive semidefinite, the proof first establishes that Alice's effect A_j is an orthogonal projector onto a unit vector, so both A_j and 1 - A_j are positive semidefinite. Because the shared Bell state ρ is a conic mixture of pure states with non-negative weights, the linear steering map S preserves positive semidefiniteness. Conjugating the steered operators S(A_j) and S(1 - A_j) by the Hermitian normalizer N therefore yields positive semidefinite operators for both E_j and N S(1 - A_j) N. Finally, the normalization condition N M N = 1 for Bob's marginal state M = S(1) equates N S(1 - A_j) N with 1 - E_j.

  1. For each setting index j ∈ {0, 1, 2}, Alice's measurement vector v_j is a unit vector (v_jᴴ ⬝ᵥ v_j = 1).

    The proof records the radical squares (√3)^2 = 3 and (√21)^2 = 21, and exhausts all three values of j ∈ {0, 1, 2}. For each case, it expands the definition of Alice's setting vector into a sum of three terms and simplifies the rational arithmetic to 1.

    lines 10–13

    uses Real.sq_sqrt, Fin.sum_univ_three, map_ofNat

      have h3 : (Real.sqrt 3 : ℂ)^2 = 3 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ) ≤ 3 by norm_num)
      have h21 : (Real.sqrt 21 : ℂ)^2 = 21 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ) ≤ 21 by norm_num)
      fin_cases j <;> simp [ppt_qutrit_bell_setting, dotProduct, Fin.sum_univ_three] <;>
        ring_nf <;> simp [h3,h21, map_ofNat] <;> norm_num
  2. For each setting index j, Alice's effect matrix A_j = v_j v_jᴴ and its complement 1 - A_j are positive semidefinite.

    The outer product A_j = v_j v_jᴴ is positive semidefinite by Matrix.posSemidef_vecMulVec_self_star. Since v_j is a unit vector, A_j is an idempotent projector (A_j^2 = A_j). The complement 1 - A_j is Hermitian and also idempotent, (1 - A_j)^2 = 1 - 2 A_j + A_j^2 = 1 - A_j, which implies it can be written as (1 - A_j)ᴴ (1 - A_j) and is therefore positive semidefinite.

    lines 19–32

    uses Matrix.posSemidef_vecMulVec_self_star, Matrix.vecMulVec_mul_vecMulVec, in767_effectvalidproof_alice_setting_unit, one_smul, Matrix.posSemidef_conjTranspose_mul_self

      let v := ppt_qutrit_bell_setting j
      let A : Matrix (Fin 3) (Fin 3) ℂ := vecMulVec v (star v)
      have hA : A.PosSemidef := Matrix.posSemidef_vecMulVec_self_star v
      have hAsq : A*A=A := by
        dsimp [A]
        rw [Matrix.vecMulVec_mul_vecMulVec, in767_effectvalidproof_alice_setting_unit j, one_smul]
      have hQherm : (1-A).IsHermitian := Matrix.isHermitian_one.sub hA.isHermitian
      have hQsq : (1-A)*(1-A)=1-A := by
        calc
          (1-A)*(1-A) = 1-A-A+A*A := by noncomm_ring
          _ = 1-A := by rw [hAsq]; abel
      have hQ := Matrix.posSemidef_conjTranspose_mul_self (1-A)
      rw [hQherm.eq, hQsq] at hQ
      exact ⟨hA,hQ⟩
  3. Bob's unnormalized marginal matrix M(x, y) = ∑_i ρ_{(i,x), (i,y)} is diagonal with diagonal entries 3437/6884, 3437/6884, and 5/3442. automation

    The proof evaluates the matrix entrywise over all nine index pairs (x, y) ∈ {0, 1, 2}². For each pair, it expands the definitions of the shared state and the four pure state vectors, clears denominators using the non-zeroness of √2 and √3, substitutes the radical squares (√2)^2 = 2, (√3)^2 = 3, and (√131)^2 = 131, and simplifies the rational arithmetic.

    lines 37–47

    uses Real.sq_sqrt, ne_of_gt, Matrix.sum_apply, Matrix.smul_apply, Matrix.vecMulVec_apply, Fin.sum_univ_three, Fin.sum_univ_four, Matrix.diagonal_apply, Complex.real_smul, map_ofNat

      have h2 : (Real.sqrt 2 : ℂ)^2=2 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ)≤2 by norm_num)
      have h3 : (Real.sqrt 3 : ℂ)^2=3 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ)≤3 by norm_num)
      have h131 : (Real.sqrt (131 : ℝ) : ℂ)^2=131 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ)≤131 by norm_num)
      have hn2 : (Real.sqrt 2 : ℂ) ≠ 0 := by exact_mod_cast (ne_of_gt (Real.sqrt_pos.2 (by norm_num : (0:ℝ)<2)))
      have hn3 : (Real.sqrt 3 : ℂ) ≠ 0 := by exact_mod_cast (ne_of_gt (Real.sqrt_pos.2 (by norm_num : (0:ℝ)<3)))
      ext x y
      fin_cases x <;> fin_cases y <;>
        simp [ppt_qutrit_bell_state, ppt_qutrit_bell_vector, Matrix.sum_apply, Matrix.smul_apply,
          Matrix.vecMulVec_apply, Fin.sum_univ_three, Fin.sum_univ_four, Matrix.diagonal_apply,
          Complex.real_smul, map_ofNat] <;>
        field_simp [hn2,hn3] <;> ring_nf <;> simp [h2,h3,h131] <;> norm_num
  4. Bob's normalizer matrix N satisfies N * M * N = 1, where M is Bob's marginal matrix. automation

    Rewriting M with its diagonal value from the previous step reduces N * M * N to a diagonal matrix. The proof verifies by linear combination that the diagonal squares satisfy (√6884/√3437)^2 * (3437/6884) = 1 and (√3442/√5)^2 * (5/3442) = 1, and then checks entrywise across all index pairs that the product equals the identity matrix.

    lines 52–72

    uses in767_effectvalidproof_source_second_marginal, Real.sq_sqrt, ne_of_gt, Fin.sum_univ_three, mul_comm, mul_left_comm, mul_assoc

      dsimp only
      rw [in767_effectvalidproof_source_second_marginal]
      have h6884 : (Real.sqrt 6884 : ℂ)^2=6884 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ)≤6884 by norm_num)
      have h3437 : (Real.sqrt 3437 : ℂ)^2=3437 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ)≤3437 by norm_num)
      have h3442 : (Real.sqrt 3442 : ℂ)^2=3442 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ)≤3442 by norm_num)
      have h5 : (Real.sqrt 5 : ℂ)^2=5 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ)≤5 by norm_num)
      have hn3437 : (Real.sqrt 3437 : ℂ) ≠ 0 := by exact_mod_cast (ne_of_gt (Real.sqrt_pos.2 (by norm_num : (0:ℝ)<3437)))
      have hn5 : (Real.sqrt 5 : ℂ) ≠ 0 := by exact_mod_cast (ne_of_gt (Real.sqrt_pos.2 (by norm_num : (0:ℝ)<5)))
      have hs0 : (Real.sqrt 6884 : ℂ) / (Real.sqrt 3437 : ℂ) * (3437/6884) *
          ((Real.sqrt 6884 : ℂ) / (Real.sqrt 3437 : ℂ)) = 1 := by
        field_simp [hn3437]
        linear_combination 3437*h6884-6884*h3437
      have hs2 : (Real.sqrt 3442 : ℂ) / (Real.sqrt 5 : ℂ) * (5/3442) *
          ((Real.sqrt 3442 : ℂ) / (Real.sqrt 5 : ℂ)) = 1 := by
        field_simp [hn5]
        linear_combination 5*h3442-3442*h5
      ext i j
      fin_cases i <;> fin_cases j <;>
        simp only [ppt_qutrit_steered_normalizer, Matrix.mul_apply, Fin.sum_univ_three,
          Matrix.diagonal_apply, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_two] <;>
        norm_num <;> first | exact hs0 | simpa [mul_comm,mul_left_comm,mul_assoc] using hs0 | exact hs2
  5. Bob's normalizer matrix N is Hermitian: Nᴴ = N.

    Entrywise, if i = j, the diagonal entries of N are real square roots, so their complex conjugate equals themselves. If i ≠ j, the off-diagonal entries are 0, so both N_{i,j} and N_{j,i} vanish.

    lines 75–79

    uses Matrix.conjTranspose_apply, Matrix.diagonal_apply, Ne.symm

      ext i j
      by_cases h : i = j
      · subst j
        by_cases hi : i = 2 <;> simp [ppt_qutrit_steered_normalizer, Matrix.conjTranspose_apply, Matrix.diagonal_apply, hi]
      · simp [ppt_qutrit_steered_normalizer, Matrix.conjTranspose_apply, Matrix.diagonal_apply, h, Ne.symm h]
  6. Steering any four-vector conic mixture by a positive semidefinite matrix produces a positive semidefinite operator.

    For each pure vector v_t, define the operator (B_t)_{x, i} = v_t(i, x). Since A is positive semidefinite, its transpose A^T is positive semidefinite, hence B_t A^T B_tᴴ is positive semidefinite. By finite set induction, the conic combination ∑_t λ_t (B_t A^T B_tᴴ) is positive semidefinite because each weight λ_t is non-negative. Expanding entrywise shows this conic sum equals the steered operator formula.

    lines 86–105

    uses Matrix.posSemidef_transpose_iff.mpr, Finset.induction_on, Matrix.PosSemidef.zero, Finset.sum_insert, Finset.univ, Matrix.sum_apply, Matrix.smul_apply, Complex.real_smul, Fin.sum_univ_three, Fin.sum_univ_four

      let B : Fin 4 → Matrix (Fin 3) (Fin 3) ℂ := fun t x i => v t (i,x)
      have hterm (t : Fin 4) : (B t * A.transpose * (B t)ᴴ).PosSemidef :=
        (Matrix.posSemidef_transpose_iff.mpr hA).mul_mul_conjTranspose_same (B t)
      have hsum : (∑ t, lam t • (B t * A.transpose * (B t)ᴴ)).PosSemidef := by
        have H (T : Finset (Fin 4)) : (∑ t ∈ T, lam t • (B t * A.transpose * (B t)ᴴ)).PosSemidef := by
          induction T using Finset.induction_on with
          | empty => simpa using (Matrix.PosSemidef.zero : (0 : Matrix (Fin 3) (Fin 3) ℂ).PosSemidef)
          | @insert t T ht ih =>
            rw [Finset.sum_insert ht]
            exact ((hterm t).smul (hlam t)).add ih
        exact H Finset.univ
      have heq : (fun x y : Fin 3 => ∑ i : Fin 3, ∑ j : Fin 3,
          (∑ t : Fin 4, (lam t : ℂ) * v t (i,x) * star (v t (j,y))) * A j i) =
          ∑ t, lam t • (B t * A.transpose * (B t)ᴴ) := by
        ext x y
        simp [B, Matrix.sum_apply, Matrix.smul_apply, Complex.real_smul, Matrix.mul_apply,
          Matrix.transpose_apply, Matrix.conjTranspose_apply, Fin.sum_univ_three, Fin.sum_univ_four]
        ring
      rw [heq]
      exact hsum
  7. For each setting j, the normalized steered effect E_j = N * S(A_j) * N and its complement 1 - E_j are positive semidefinite.

    The shared Bell state is expressed as a conic combination of four pure vectors with non-negative weights λ_t ≥ 0. By the general steering positivity lemma, the linear steering map S preserves positive semidefiniteness. Since Alice's effect A_j and its complement 1 - A_j are positive semidefinite, S(A_j) and S(1 - A_j) are positive semidefinite. Conjugation by the Hermitian normalizer N preserves positivity, yielding (N * S(A_j) * N).PosSemidef and (N * S(1 - A_j) * N).PosSemidef. Finally, linearity of S together with the normalization N * M * N = 1 yields N * S(1 - A_j) * N = 1 - N * S(A_j) * N.

    lines 109–144

    uses in767_effectvalidproof_alice_settings_valid, in767_effectvalidproof_positive_steering_from_four_vectors, in767_effectvalidproof_normalizer_hermitian, Matrix.mul_sub, Matrix.sub_mul, in767_effectvalidproof_source_normalizer_marginal

      let lam : Fin 4 → ℝ := fun t => if t = 0 then 3257/6884 else if t = 3 then 27/6884 else 450/1721
      let ρ : Matrix (Fin 3 × Fin 3) (Fin 3 × Fin 3) ℂ := fun ax cy =>
        ∑ t : Fin 4, (lam t : ℂ) * ppt_qutrit_bell_vector t ax * star (ppt_qutrit_bell_vector t cy)
      have hlam : ∀ t, 0 ≤ lam t := by intro t; dsimp [lam]; split_ifs <;> norm_num
      have hρ : ρ = ppt_qutrit_bell_state := by
        ext ax cy
        simp [ρ, ppt_qutrit_bell_state, lam, Fin.sum_univ_four, Matrix.sum_apply,
          Matrix.smul_apply, Matrix.vecMulVec_apply, Pi.star_apply, Complex.real_smul, mul_assoc]
      let S (B : Matrix (Fin 3) (Fin 3) ℂ) : Matrix (Fin 3) (Fin 3) ℂ := fun x y =>
        ∑ i : Fin 3, ∑ k : Fin 3, ppt_qutrit_bell_state (i,x) (k,y) * B k i
      let M : Matrix (Fin 3) (Fin 3) ℂ := fun x y => ∑ i : Fin 3, ppt_qutrit_bell_state (i,x) (i,y)
      let A : Matrix (Fin 3) (Fin 3) ℂ := vecMulVec (ppt_qutrit_bell_setting j) (star (ppt_qutrit_bell_setting j))
      let N := ppt_qutrit_steered_normalizer
      have hA : A.PosSemidef ∧ (1-A).PosSemidef := in767_effectvalidproof_alice_settings_valid j
      have hS (B : Matrix (Fin 3) (Fin 3) ℂ) (hB : B.PosSemidef) : (S B).PosSemidef := by
        have hh := in767_effectvalidproof_positive_steering_from_four_vectors ppt_qutrit_bell_vector lam hlam B hB
        change Matrix.PosSemidef (show Matrix (Fin 3) (Fin 3) ℂ from fun x y =>
          ∑ i : Fin 3, ∑ k : Fin 3, ρ (i,x) (k,y) * B k i) at hh
        rw [hρ] at hh
        exact hh
      have hlin : S (1-A)=M-S A := by
        ext x y
        simp [S, M, Matrix.sub_apply, Matrix.one_apply, Fin.sum_univ_three]
        ring
      have hpos : (N * S A * N).PosSemidef := by
        have hh := (hS A hA.1).mul_mul_conjTranspose_same N
        rw [in767_effectvalidproof_normalizer_hermitian] at hh
        exact hh
      have hneg : (N * S (1-A) * N).PosSemidef := by
        have hh := (hS (1-A) hA.2).mul_mul_conjTranspose_same N
        rw [in767_effectvalidproof_normalizer_hermitian] at hh
        exact hh
      have heq : N*S (1-A)*N = 1-N*S A*N := by
        rw [hlin, Matrix.mul_sub, Matrix.sub_mul, in767_effectvalidproof_source_normalizer_marginal]
      rw [heq] at hneg
      exact ⟨hpos,hneg⟩
  8. For every measurement setting j ∈ {0, 1, 2}, the steered effect is valid: E_j and 1 - E_j are positive semidefinite.

    Introducing the setting index j, the theorem directly applies the validity lemma established for arbitrary settings.

    lines 147–148

    uses in767_effectvalidproof_actual_steered_effects_valid

      intro j
      exact in767_effectvalidproof_actual_steered_effects_valid j
Real.sq_sqrt
The square of the square root of a non-negative real number equals the number itself: √x ^ 2 = x for x ≥ 0.
Fin.sum_univ_three
A sum over the three elements of Fin 3 evaluates to the sum of the values at 0, 1, and 2.
map_ofNat
Ring homomorphisms preserve natural number literals.
Matrix.posSemidef_vecMulVec_self_star
The outer product v vᴴ of any vector v with its conjugate transpose is positive semidefinite.
Matrix.vecMulVec_mul_vecMulVec
The product of two rank-one outer products satisfies (u vᴴ)(w xᴴ) = (v ⬝ᵥ w) • (u xᴴ).
in767_effectvalidproof_alice_setting_unit
Each of Alice's three measurement vectors is normalized: v_jᴴ ⬝ᵥ v_j = 1.
one_smul
Multiplying by scalar 1 acts as the identity: 1 • b = b.
Matrix.posSemidef_conjTranspose_mul_self
For any matrix A, the product Aᴴ A is positive semidefinite.
ne_of_gt
If b < a in a preorder, then a ≠ b.
Matrix.sum_apply
Entrywise evaluation of a finite sum of matrices equals the sum of the entries.
Matrix.smul_apply
The (i, j) entry of a scalar-multiplied matrix r • A is r • A i j.
Matrix.vecMulVec_apply
The (i, j) entry of the outer product of two vectors u and v is u i * v j.
Fin.sum_univ_four
A sum over the four elements of Fin 4 evaluates to the sum of the values at 0, 1, 2, and 3.
Matrix.diagonal_apply
The (i, j) entry of a diagonal matrix is d i when i = j, and 0 when i ≠ j.
Complex.real_smul
Real scalar multiplication on complex numbers coincides with multiplication by the embedded real number.
in767_effectvalidproof_source_second_marginal
The partial trace marginal state of the two-qutrit Bell state is the diagonal matrix diag(3437/6884, 3437/6884, 5/3442).
mul_comm
Multiplication is commutative: a * b = b * a.
mul_left_comm
Left commutativity: a * (b * c) = b * (a * c).
mul_assoc
Multiplication is associative: a * b * c = a * (b * c).
Matrix.conjTranspose_apply
The (j, i) entry of the conjugate transpose Mᴴ is star (M i j).
Ne.symm
Inequality is symmetric: a ≠ b implies b ≠ a.
Matrix.posSemidef_transpose_iff.mpr
If a matrix is positive semidefinite, then its transpose is also positive semidefinite.
Finset.induction_on
Induction principle on finite sets starting from the empty set.
Matrix.PosSemidef.zero
The zero matrix is positive semidefinite.
Finset.sum_insert
Inserting a new element into a finite set splits the sum into the new term and the sum over the rest.
Finset.univ
The universal finset containing all elements of a finite type.
in767_effectvalidproof_alice_settings_valid
For each setting j, Alice's projector A and its complement 1 - A are positive semidefinite.
in767_effectvalidproof_positive_steering_from_four_vectors
Steering a four-vector conic mixture with any positive semidefinite matrix yields a positive semidefinite matrix.
in767_effectvalidproof_normalizer_hermitian
Bob's normalizer matrix N is Hermitian: Nᴴ = N.
Matrix.mul_sub
Matrix multiplication distributes over subtraction from the left: M * (N - N') = M * N - M * N'.
Matrix.sub_mul
Matrix multiplication distributes over subtraction from the right: (M - M') * N = M * N - M' * N.
in767_effectvalidproof_source_normalizer_marginal
Bob's normalizer matrix N inverts the marginal state: N * M * N = 1.
in767_effectvalidproof_actual_steered_effects_valid
For each setting j, the normalized steered effect and its complement are both positive semidefinite.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

open Matrixopen scoped BigOperators Matrix ComplexOrderset_option backward.isDefEq.respectTransparency falseset_option maxRecDepth 8192set_option maxHeartbeats 4000000set_option linter.unusedSimpArgs falseset_option linter.unnecessarySeqFocus falseprivate lemma in767_effectvalidproof_alice_setting_unit (j : Fin 3) :    star (ppt_qutrit_bell_setting j) ⬝ᵥ ppt_qutrit_bell_setting j = 1 := by  have h3 : (Real.sqrt 3 : ℂ)^2 = 3 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ) ≤ 3 by norm_num)  have h21 : (Real.sqrt 21 : ℂ)^2 = 21 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ) ≤ 21 by norm_num)  fin_cases j <;> simp [ppt_qutrit_bell_setting, dotProduct, Fin.sum_univ_three] <;>    ring_nf <;> simp [h3,h21, map_ofNat] <;> norm_numprivate lemma in767_effectvalidproof_alice_settings_valid (j : Fin 3) :    let A : Matrix (Fin 3) (Fin 3) ℂ :=      vecMulVec (ppt_qutrit_bell_setting j) (star (ppt_qutrit_bell_setting j))    A.PosSemidef ∧ (1-A).PosSemidef := by  let v := ppt_qutrit_bell_setting j  let A : Matrix (Fin 3) (Fin 3) ℂ := vecMulVec v (star v)  have hA : A.PosSemidef := Matrix.posSemidef_vecMulVec_self_star v  have hAsq : A*A=A := by    dsimp [A]    rw [Matrix.vecMulVec_mul_vecMulVec, in767_effectvalidproof_alice_setting_unit j, one_smul]  have hQherm : (1-A).IsHermitian := Matrix.isHermitian_one.sub hA.isHermitian  have hQsq : (1-A)*(1-A)=1-A := by    calc      (1-A)*(1-A) = 1-A-A+A*A := by noncomm_ring      _ = 1-A := by rw [hAsq]; abel  have hQ := Matrix.posSemidef_conjTranspose_mul_self (1-A)  rw [hQherm.eq, hQsq] at hQ  exact ⟨hA,hQ⟩private lemma in767_effectvalidproof_source_second_marginal :    (fun x y : Fin 3 => ∑ i : Fin 3, ppt_qutrit_bell_state (i,x) (i,y)) =      Matrix.diagonal ![(3437/6884 : ℂ), 3437/6884, 5/3442] := by  have h2 : (Real.sqrt 2 : ℂ)^2=2 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ)≤2 by norm_num)  have h3 : (Real.sqrt 3 : ℂ)^2=3 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ)≤3 by norm_num)  have h131 : (Real.sqrt (131 : ℝ) : ℂ)^2=131 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ)≤131 by norm_num)  have hn2 : (Real.sqrt 2 : ℂ) ≠ 0 := by exact_mod_cast (ne_of_gt (Real.sqrt_pos.2 (by norm_num : (0:ℝ)<2)))  have hn3 : (Real.sqrt 3 : ℂ) ≠ 0 := by exact_mod_cast (ne_of_gt (Real.sqrt_pos.2 (by norm_num : (0:ℝ)<3)))  ext x y  fin_cases x <;> fin_cases y <;>    simp [ppt_qutrit_bell_state, ppt_qutrit_bell_vector, Matrix.sum_apply, Matrix.smul_apply,      Matrix.vecMulVec_apply, Fin.sum_univ_three, Fin.sum_univ_four, Matrix.diagonal_apply,      Complex.real_smul, map_ofNat] <;>    field_simp [hn2,hn3] <;> ring_nf <;> simp [h2,h3,h131] <;> norm_numprivate lemma in767_effectvalidproof_source_normalizer_marginal :    let M : Matrix (Fin 3) (Fin 3) ℂ := fun x y => ∑ i : Fin 3, ppt_qutrit_bell_state (i,x) (i,y)    ppt_qutrit_steered_normalizer * M * ppt_qutrit_steered_normalizer = 1 := by  dsimp only  rw [in767_effectvalidproof_source_second_marginal]  have h6884 : (Real.sqrt 6884 : ℂ)^2=6884 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ)≤6884 by norm_num)  have h3437 : (Real.sqrt 3437 : ℂ)^2=3437 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ)≤3437 by norm_num)  have h3442 : (Real.sqrt 3442 : ℂ)^2=3442 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ)≤3442 by norm_num)  have h5 : (Real.sqrt 5 : ℂ)^2=5 := by exact_mod_cast Real.sq_sqrt (show (0:ℝ)≤5 by norm_num)  have hn3437 : (Real.sqrt 3437 : ℂ) ≠ 0 := by exact_mod_cast (ne_of_gt (Real.sqrt_pos.2 (by norm_num : (0:ℝ)<3437)))  have hn5 : (Real.sqrt 5 : ℂ) ≠ 0 := by exact_mod_cast (ne_of_gt (Real.sqrt_pos.2 (by norm_num : (0:ℝ)<5)))  have hs0 : (Real.sqrt 6884 : ℂ) / (Real.sqrt 3437 : ℂ) * (3437/6884) *      ((Real.sqrt 6884 : ℂ) / (Real.sqrt 3437 : ℂ)) = 1 := by    field_simp [hn3437]    linear_combination 3437*h6884-6884*h3437  have hs2 : (Real.sqrt 3442 : ℂ) / (Real.sqrt 5 : ℂ) * (5/3442) *      ((Real.sqrt 3442 : ℂ) / (Real.sqrt 5 : ℂ)) = 1 := by    field_simp [hn5]    linear_combination 5*h3442-3442*h5  ext i j  fin_cases i <;> fin_cases j <;>    simp only [ppt_qutrit_steered_normalizer, Matrix.mul_apply, Fin.sum_univ_three,      Matrix.diagonal_apply, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_two] <;>    norm_num <;> first | exact hs0 | simpa [mul_comm,mul_left_comm,mul_assoc] using hs0 | exact hs2private lemma in767_effectvalidproof_normalizer_hermitian : ppt_qutrit_steered_normalizerᴴ = ppt_qutrit_steered_normalizer := by  ext i j  by_cases h : i = j  · subst j    by_cases hi : i = 2 <;> simp [ppt_qutrit_steered_normalizer, Matrix.conjTranspose_apply, Matrix.diagonal_apply, hi]  · simp [ppt_qutrit_steered_normalizer, Matrix.conjTranspose_apply, Matrix.diagonal_apply, h, Ne.symm h]private lemma in767_effectvalidproof_positive_steering_from_four_vectors    (v : Fin 4 → Fin 3 × Fin 3 → ℂ) (lam : Fin 4 → ℝ)    (hlam : ∀ t, 0 ≤ lam t) (A : Matrix (Fin 3) (Fin 3) ℂ) (hA : A.PosSemidef) :    Matrix.PosSemidef (show Matrix (Fin 3) (Fin 3) ℂ from fun x y => ∑ i : Fin 3, ∑ j : Fin 3,      (∑ t : Fin 4, (lam t : ℂ) * v t (i,x) * star (v t (j,y))) * A j i) := by  let B : Fin 4 → Matrix (Fin 3) (Fin 3) ℂ := fun t x i => v t (i,x)  have hterm (t : Fin 4) : (B t * A.transpose * (B t)ᴴ).PosSemidef :=    (Matrix.posSemidef_transpose_iff.mpr hA).mul_mul_conjTranspose_same (B t)  have hsum : (∑ t, lam t • (B t * A.transpose * (B t)ᴴ)).PosSemidef := by    have H (T : Finset (Fin 4)) : (∑ t ∈ T, lam t • (B t * A.transpose * (B t)ᴴ)).PosSemidef := by      induction T using Finset.induction_on with      | empty => simpa using (Matrix.PosSemidef.zero : (0 : Matrix (Fin 3) (Fin 3) ℂ).PosSemidef)      | @insert t T ht ih =>        rw [Finset.sum_insert ht]        exact ((hterm t).smul (hlam t)).add ih    exact H Finset.univ  have heq : (fun x y : Fin 3 => ∑ i : Fin 3, ∑ j : Fin 3,      (∑ t : Fin 4, (lam t : ℂ) * v t (i,x) * star (v t (j,y))) * A j i) =      ∑ t, lam t • (B t * A.transpose * (B t)ᴴ) := by    ext x y    simp [B, Matrix.sum_apply, Matrix.smul_apply, Complex.real_smul, Matrix.mul_apply,      Matrix.transpose_apply, Matrix.conjTranspose_apply, Fin.sum_univ_three, Fin.sum_univ_four]    ring  rw [heq]  exact hsumprivate lemma in767_effectvalidproof_actual_steered_effects_valid (j : Fin 3) :    (ppt_qutrit_steered_effect j).PosSemidef ∧ (1-ppt_qutrit_steered_effect j).PosSemidef := by  let lam : Fin 4 → ℝ := fun t => if t = 0 then 3257/6884 else if t = 3 then 27/6884 else 450/1721  let ρ : Matrix (Fin 3 × Fin 3) (Fin 3 × Fin 3) ℂ := fun ax cy =>    ∑ t : Fin 4, (lam t : ℂ) * ppt_qutrit_bell_vector t ax * star (ppt_qutrit_bell_vector t cy)  have hlam : ∀ t, 0 ≤ lam t := by intro t; dsimp [lam]; split_ifs <;> norm_num  have hρ : ρ = ppt_qutrit_bell_state := by    ext ax cy    simp [ρ, ppt_qutrit_bell_state, lam, Fin.sum_univ_four, Matrix.sum_apply,      Matrix.smul_apply, Matrix.vecMulVec_apply, Pi.star_apply, Complex.real_smul, mul_assoc]  let S (B : Matrix (Fin 3) (Fin 3) ℂ) : Matrix (Fin 3) (Fin 3) ℂ := fun x y =>    ∑ i : Fin 3, ∑ k : Fin 3, ppt_qutrit_bell_state (i,x) (k,y) * B k i  let M : Matrix (Fin 3) (Fin 3) ℂ := fun x y => ∑ i : Fin 3, ppt_qutrit_bell_state (i,x) (i,y)  let A : Matrix (Fin 3) (Fin 3) ℂ := vecMulVec (ppt_qutrit_bell_setting j) (star (ppt_qutrit_bell_setting j))  let N := ppt_qutrit_steered_normalizer  have hA : A.PosSemidef ∧ (1-A).PosSemidef := in767_effectvalidproof_alice_settings_valid j  have hS (B : Matrix (Fin 3) (Fin 3) ℂ) (hB : B.PosSemidef) : (S B).PosSemidef := by    have hh := in767_effectvalidproof_positive_steering_from_four_vectors ppt_qutrit_bell_vector lam hlam B hB    change Matrix.PosSemidef (show Matrix (Fin 3) (Fin 3) ℂ from fun x y =>      ∑ i : Fin 3, ∑ k : Fin 3, ρ (i,x) (k,y) * B k i) at hh    rw [hρ] at hh    exact hh  have hlin : S (1-A)=M-S A := by    ext x y    simp [S, M, Matrix.sub_apply, Matrix.one_apply, Fin.sum_univ_three]    ring  have hpos : (N * S A * N).PosSemidef := by    have hh := (hS A hA.1).mul_mul_conjTranspose_same N    rw [in767_effectvalidproof_normalizer_hermitian] at hh    exact hh  have hneg : (N * S (1-A) * N).PosSemidef := by    have hh := (hS (1-A) hA.2).mul_mul_conjTranspose_same N    rw [in767_effectvalidproof_normalizer_hermitian] at hh    exact hh  have heq : N*S (1-A)*N = 1-N*S A*N := by    rw [hlin, Matrix.mul_sub, Matrix.sub_mul, in767_effectvalidproof_source_normalizer_marginal]  rw [heq] at hneg  exact ⟨hpos,hneg⟩theorem ppt_qutrit_steered_effect_is_valid : ∀ j : Fin 3, (ppt_qutrit_steered_effect j).PosSemidef ∧ (1 - ppt_qutrit_steered_effect j).PosSemidef := by  intro j  exact in767_effectvalidproof_actual_steered_effects_valid j
See it in the graphDiscuss this resultChallenge it