ppt_qutrit_rational_binary_effect_incompatible
The three explicit rational qutrit effects have no joint positive parent.
Statement
theorem ppt_qutrit_rational_binary_effect_incompatible : ¬ ∃ G : (Fin 3 → Bool) → Matrix (Fin 3) (Fin 3) ℂ, (∀ s, (G s).PosSemidef) ∧ (∑ s, G s = 1) ∧ ∀ j : Fin 3, (∑ s, if s j then G s else 0) = ppt_qutrit_rational_binary_effect j
- Source
- Helper for OP-693, derived from the Bell witness of arXiv:1405.4502; rational matrices and exact dual certificates in experiments 22874, 22875, 22880, and 22905.
- Verified
- 12 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- ppt_qutrit_rational_binary_effectThe three explicit rational qutrit effects obtained from a strictly positive rational PPT Bell example.
The proof, explained
The theorem proves that three explicit rational qutrit effects are incompatible (they have no joint positive parent POVM) using semidefinite programming duality. Assuming for contradiction that a joint positive parent G exists, the proof constructs an explicit dual certificate consisting of positive semidefinite matrices Z(s) for each binary assignment s. Because both Z(s) and G(s) are positive semidefinite, the total trace inner product ∑_s Re(Tr(Z(s) * G(s))) must be non-negative; however, expanding Z(s) and applying the normalization and marginal conditions shows that this sum equals an explicit rational scalar that is verified by exact arithmetic to be strictly negative.
The real part of the trace inner product of any two positive semidefinite complex matrices is non-negative: 0 ≤ Re(Tr(P * ρ)).
By continuous functional calculus for self-adjoint operators with non-negative spectrum, P has a self-adjoint square root X such that X² = P. Using the associative and cyclic properties of the matrix trace, Tr(P * ρ) = Tr(X² * ρ) = Tr(X * ρ * X). Since ρ is positive semidefinite and X is self-adjoint, the congruence X * ρ * X = X * ρ * Xᴴ is positive semidefinite, and therefore its trace has a non-negative real part.
uses
CFC.exists_sqrt_of_isSelfAdjoint_of_quasispectrumRestricts,QuasispectrumRestricts.nnreal_of_nonneg,Matrix.mul_assoc,Matrix.trace_mul_comm,Matrix.star_eq_conjTransposeprivate lemma in767_witness_trace_psd {n : Type} [Fintype n] [DecidableEq n] {P ρ : Matrix n n ℂ} (hP : P.PosSemidef) (hρ : ρ.PosSemidef) : 0 ≤ (P * ρ).trace.re := by obtain ⟨X, hX, -, rfl⟩ := CFC.exists_sqrt_of_isSelfAdjoint_of_quasispectrumRestricts hP.isHermitian (QuasispectrumRestricts.nnreal_of_nonneg hP.nonneg) rw [Matrix.mul_assoc, Matrix.trace_mul_comm, Matrix.mul_assoc, ← Matrix.mul_assoc] have h := hρ.mul_mul_conjTranspose_same X rw [← Matrix.star_eq_conjTranspose, hX.star_eq] at h exact (Complex.nonneg_iff.1 h.trace_nonneg).1
The four dual witness vectors evaluate to their specified rational coordinate vectors. automation
The function defining the dual vectors is given by an if-then-else chain over index i ∈ Fin 4. For each index 0, 1, 2, 3, the conditional branches are resolved and the rational components are evaluated.
uses
if_false,if_trueprivate noncomputable def in767_witness_dual_vec (i : Fin 4) : Fin 3 → ℂ := if i = 0 then ![10599/1557500, 1791231/3115000, 1991/89000] else if i = 1 then ![-773727/1557500, -448691/1557500, 3993/178000] else if i = 2 then ![1565119/3115000, -455757/1557500, 1947/89000] else ![0, 0, 77/2000] private lemma in767_witness_dual_vec0 : in767_witness_dual_vec 0 = ![10599/1557500, 1791231/3115000, 1991/89000] := by norm_num [in767_witness_dual_vec] private lemma in767_witness_dual_vec1 : in767_witness_dual_vec 1 = ![-773727/1557500, -448691/1557500, 3993/178000] := by norm_num [in767_witness_dual_vec] private lemma in767_witness_dual_vec2 : in767_witness_dual_vec 2 = ![1565119/3115000, -455757/1557500, 1947/89000] := by simp only [in767_witness_dual_vec, show (2 : Fin 4) ≠ 0 from by decide, show (2 : Fin 4) ≠ 1 from by decide, if_false, if_true] private lemma in767_witness_dual_vec3 : in767_witness_dual_vec 3 = ![0, 0, 77/2000] := by simp only [in767_witness_dual_vec, show (3 : Fin 4) ≠ 0 from by decide, show (3 : Fin 4) ≠ 1 from by decide, show (3 : Fin 4) ≠ 2 from by decide, if_false]
For every binary assignment s : Fin 3 → Bool, the dual matrix Z(s) is positive semidefinite.
Each projector P_i is the outer product of a vector with its conjugate transpose, hence positive semidefinite. For seven of the eight boolean assignments s, Z(s) simplifies via abelian group operations to the sum of two such projectors P_a + P_b, which is positive semidefinite. For the remaining assignment s = (true, true, true), Z(s) decomposes as v * vᴴ + w * wᴴ for two explicit vectors v = (3533/5000, 0, 0) and w = (0, 3533/5000, 0), which is verified component-wise across all nine matrix entries by exact rational arithmetic.
uses
two_smul,in767_witness_dual_p_psd,Matrix.posSemidef_vecMulVec_self_starprivate noncomputable def in767_witness_dual_p (i : Fin 4) : Matrix (Fin 3) (Fin 3) ℂ := Matrix.vecMulVec (in767_witness_dual_vec i) (star (in767_witness_dual_vec i)) private noncomputable def in767_witness_dual_z (s : Fin 3 → Bool) : Matrix (Fin 3) (Fin 3) ℂ := (2 : ℝ) • in767_witness_dual_p 3 + (if s 0 then in767_witness_dual_p 1 - in767_witness_dual_p 3 else 0) + (if s 1 then in767_witness_dual_p 0 - in767_witness_dual_p 3 else 0) + (if s 2 then in767_witness_dual_p 2 - in767_witness_dual_p 3 else 0) private lemma in767_witness_dual_p_psd (i : Fin 4) : (in767_witness_dual_p i).PosSemidef := Matrix.posSemidef_vecMulVec_self_star _ private lemma in767_witness_dual_all_psd (s : Fin 3 → Bool) : (in767_witness_dual_z s).PosSemidef := by cases h0 : s 0 <;> cases h1 : s 1 <;> cases h2 : s 2 · have he : in767_witness_dual_z s = in767_witness_dual_p 3 + in767_witness_dual_p 3 := by simp [in767_witness_dual_z, h0, h1, h2, two_smul] <;> abel rw [he]; exact (in767_witness_dual_p_psd 3).add (in767_witness_dual_p_psd 3) · have he : in767_witness_dual_z s = in767_witness_dual_p 2 + in767_witness_dual_p 3 := by simp [in767_witness_dual_z, h0, h1, h2, two_smul] <;> abel rw [he]; exact (in767_witness_dual_p_psd 2).add (in767_witness_dual_p_psd 3) · have he : in767_witness_dual_z s = in767_witness_dual_p 0 + in767_witness_dual_p 3 := by simp [in767_witness_dual_z, h0, h1, h2, two_smul] <;> abel rw [he]; exact (in767_witness_dual_p_psd 0).add (in767_witness_dual_p_psd 3) · have he : in767_witness_dual_z s = in767_witness_dual_p 0 + in767_witness_dual_p 2 := by simp [in767_witness_dual_z, h0, h1, h2, two_smul] <;> abel rw [he]; exact (in767_witness_dual_p_psd 0).add (in767_witness_dual_p_psd 2) · have he : in767_witness_dual_z s = in767_witness_dual_p 1 + in767_witness_dual_p 3 := by simp [in767_witness_dual_z, h0, h1, h2, two_smul] <;> abel rw [he]; exact (in767_witness_dual_p_psd 1).add (in767_witness_dual_p_psd 3) · have he : in767_witness_dual_z s = in767_witness_dual_p 1 + in767_witness_dual_p 2 := by simp [in767_witness_dual_z, h0, h1, h2, two_smul] <;> abel rw [he]; exact (in767_witness_dual_p_psd 1).add (in767_witness_dual_p_psd 2) · have he : in767_witness_dual_z s = in767_witness_dual_p 0 + in767_witness_dual_p 1 := by simp [in767_witness_dual_z, h0, h1, h2, two_smul] <;> abel rw [he]; exact (in767_witness_dual_p_psd 0).add (in767_witness_dual_p_psd 1) · let v : Fin 3 → ℂ := ![3533/5000, 0, 0] let w : Fin 3 → ℂ := ![0, 3533/5000, 0] have he : in767_witness_dual_z s = Matrix.vecMulVec v (star v) + Matrix.vecMulVec w (star w) := by simp only [in767_witness_dual_z, h0, h1, h2, if_true, in767_witness_dual_p, in767_witness_dual_vec0, in767_witness_dual_vec1, in767_witness_dual_vec2, in767_witness_dual_vec3, two_smul] ext i j fin_cases i <;> fin_cases j <;> simp only [Matrix.add_apply, Matrix.sub_apply, Matrix.vecMulVec_apply, Pi.star_apply] <;> norm_num [v, w, map_div₀, map_ofNat] rw [he] exact (Matrix.posSemidef_vecMulVec_self_star v).add (Matrix.posSemidef_vecMulVec_self_star w)
The dual objective value 2 * Re(Tr(P₃)) + Re(Tr((P₁ - P₃) * E₀)) + Re(Tr((P₀ - P₃) * E₁)) + Re(Tr((P₂ - P₃) * E₂)) is strictly negative. automation
The traces of the matrix products involving the rank-one projectors and the rational effect matrices are expanded into explicit sums of rational numbers and evaluated. Lean's exact arithmetic automation verifies that the final rational scalar is strictly less than zero.
uses
Fin.sum_univ_succprivate lemma in767_witness_rational_dual_number : (2 * (in767_witness_dual_p 3).trace.re + ((in767_witness_dual_p 1 - in767_witness_dual_p 3) * in767_witness_effect0).trace.re + ((in767_witness_dual_p 0 - in767_witness_dual_p 3) * in767_witness_effect1).trace.re + ((in767_witness_dual_p 2 - in767_witness_dual_p 3) * in767_witness_effect2).trace.re) < 0 := by simp only [in767_witness_dual_p, in767_witness_dual_vec0, in767_witness_dual_vec1, in767_witness_dual_vec2, in767_witness_dual_vec3] simp only [Matrix.trace, Matrix.diag_apply, Matrix.mul_apply, Matrix.sub_apply, Matrix.vecMulVec_apply, Pi.star_apply, Fin.sum_univ_succ] norm_num [in767_witness_effect0, in767_witness_effect1, in767_witness_effect2, Matrix.cons_val_two, Matrix.vecHead, Matrix.vecTail, Matrix.mul_apply, Matrix.sub_apply, Matrix.vecMulVec_apply, Pi.star_apply, Fin.sum_univ_succ, map_div₀, map_ofNat]
The trace inner product Re(Tr(A * ·)) distributes over finite matrix sums: Re(Tr(A * ∑_s G(s))) = ∑_s Re(Tr(A * G(s))).
Matrix multiplication distributes over finite sums, the trace commutes with summation, and taking the real part commutes with finite addition of complex numbers.
uses
Matrix.mul_sum,Matrix.trace_sum,Complex.re_sumprivate lemma in767_witness_trace_matrix_sum (A : Matrix (Fin 3) (Fin 3) ℂ) (G : (Fin 3 → Bool) → Matrix (Fin 3) (Fin 3) ℂ) : (A * ∑ s, G s).trace.re = ∑ s, (A * G s).trace.re := by simp only [Matrix.mul_sum, Matrix.trace_sum, Complex.re_sum]
Under the assumption that a joint parent G exists, summing Re(Tr(A * G(s))) over all assignments where s(j) is true yields Re(Tr(A * E_j)).
Suppose for contradiction that a joint positive parent G exists. Multiplying A by the marginal condition ∑_{s: s(j)=true} G(s) = E_j and applying the trace linearity lemma shows that the marginal sum of trace inner products equals Re(Tr(A * E_j)).
uses
in767_witness_trace_matrix_sum,Finset.sum_congrprivate theorem in767_witness_rational_not_joint : ¬ ∃ G : (Fin 3 → Bool) → Matrix (Fin 3) (Fin 3) ℂ, (∀ s, (G s).PosSemidef) ∧ (∑ s, G s = 1) ∧ ∀ j : Fin 3, (∑ s, if s j then G s else 0) = in767_witness_rational_effect j := by classical rintro ⟨G, hG, hsum, hmarg⟩ have hmargin (A : Matrix (Fin 3) (Fin 3) ℂ) (j : Fin 3) : (∑ s, if s j then (A * G s).trace.re else 0) = (A * in767_witness_rational_effect j).trace.re := by rw [← hmarg j, in767_witness_trace_matrix_sum] apply Finset.sum_congr rfl intro s _ split_ifs <;> simp_all
For each assignment s, the trace inner product Re(Tr(Z(s) * G(s))) splits into a base term 2 * Re(Tr(P₃ * G(s))) and conditional terms for each measurement outcome s(j).
By case analysis on the boolean values s(0), s(1), and s(2), the definition of Z(s) is substituted. Distributing matrix multiplication and linearity of trace over matrix addition and subtraction decomposes the trace into four separate terms.
uses
two_smul,Matrix.add_mul,Matrix.sub_mul,Matrix.trace_add,Matrix.trace_subhave hsplit (s : Fin 3 → Bool) : (in767_witness_dual_z s * G s).trace.re = 2 * (in767_witness_dual_p 3 * G s).trace.re + (if s 0 then ((in767_witness_dual_p 1 - in767_witness_dual_p 3) * G s).trace.re else 0) + (if s 1 then ((in767_witness_dual_p 0 - in767_witness_dual_p 3) * G s).trace.re else 0) + (if s 2 then ((in767_witness_dual_p 2 - in767_witness_dual_p 3) * G s).trace.re else 0) := by cases h0 : s 0 <;> cases h1 : s 1 <;> cases h2 : s 2 <;> simp [in767_witness_dual_z, h0, h1, h2, two_smul, Matrix.add_mul, Matrix.sub_mul, Matrix.trace_add, Matrix.trace_sub] <;> ring
The total sum ∑_s Re(Tr(Z(s) * G(s))) algebraically equals the dual objective value.
Summing the pointwise expansion over all assignments s, we split the sum into four parts. The first part, 2 * ∑_s Re(Tr(P₃ * G(s))), simplifies to 2 * Re(Tr(P₃)) using the normalization condition ∑_s G(s) = 1. The remaining three parts correspond to the marginals at j = 0, 1, 2, which equal Re(Tr((P₁ - P₃) * E₀)), Re(Tr((P₀ - P₃) * E₁)), and Re(Tr((P₂ - P₃) * E₂)) respectively.
uses
Finset.sum_congr,Finset.sum_add_distrib,in767_witness_trace_matrix_sum,Matrix.mul_onehave heq : (∑ s, (in767_witness_dual_z s * G s).trace.re) = 2 * (in767_witness_dual_p 3).trace.re + ((in767_witness_dual_p 1 - in767_witness_dual_p 3) * in767_witness_effect0).trace.re + ((in767_witness_dual_p 0 - in767_witness_dual_p 3) * in767_witness_effect1).trace.re + ((in767_witness_dual_p 2 - in767_witness_dual_p 3) * in767_witness_effect2).trace.re := by calc _ = ∑ s, (2 * (in767_witness_dual_p 3 * G s).trace.re + (if s 0 then ((in767_witness_dual_p 1 - in767_witness_dual_p 3) * G s).trace.re else 0) + (if s 1 then ((in767_witness_dual_p 0 - in767_witness_dual_p 3) * G s).trace.re else 0) + (if s 2 then ((in767_witness_dual_p 2 - in767_witness_dual_p 3) * G s).trace.re else 0)) := by exact Finset.sum_congr rfl fun s _ => hsplit s _ = _ := by simp only [Finset.sum_add_distrib, ← Finset.mul_sum] rw [← in767_witness_trace_matrix_sum, hsum, Matrix.mul_one] rw [hmargin _ 0, hmargin _ 1, hmargin _ 2] simp [in767_witness_rational_effect]
The existence of a joint parent G leads to a contradiction between non-negativity and strict negativity of the dual sum. automation
Since each Z(s) is positive semidefinite and each G(s) is assumed positive semidefinite, every term Re(Tr(Z(s) * G(s))) is non-negative, so the total sum is non-negative. However, this sum was proved equal to the dual objective value, which is strictly negative. Linear arithmetic derives the contradiction.
uses
Finset.sum_nonneg,in767_witness_trace_psd,in767_witness_dual_all_psd,in767_witness_rational_dual_numberhave hnonneg : 0 ≤ ∑ s, (in767_witness_dual_z s * G s).trace.re := Finset.sum_nonneg fun s _ => in767_witness_trace_psd (in767_witness_dual_all_psd s) (hG s) rw [heq] at hnonneg have := in767_witness_rational_dual_number linarith
The three explicit rational qutrit effects have no joint positive parent.
The theorem follows directly from the incompatibility result in767_witness_rational_not_joint, because the effect definitions coincide.
uses
in767_witness_rational_not_jointtheorem ppt_qutrit_rational_binary_effect_incompatible : ¬ ∃ G : (Fin 3 → Bool) → Matrix (Fin 3) (Fin 3) ℂ, (∀ s, (G s).PosSemidef) ∧ (∑ s, G s = 1) ∧ ∀ j : Fin 3, (∑ s, if s j then G s else 0) = ppt_qutrit_rational_binary_effect j := by exact in767_witness_rational_not_joint
CFC.exists_sqrt_of_isSelfAdjoint_of_quasispectrumRestricts- A self-adjoint element whose spectrum is non-negative has a self-adjoint square root.
Complex.re_sum- The real part of a finite sum of complex numbers equals the sum of the real parts.
Fin.sum_univ_succ- A sum over Fin (n + 1) splits into the term at 0 and the sum of the remaining n terms.
Finset.sum_add_distrib- A sum of sums can be split into two separate sums.
Finset.sum_congr- Sums over equal index sets are equal if their summands are pointwise equal.
Finset.sum_nonneg- A finite sum of non-negative elements is non-negative.
if_false- An if-then-else expression with a false condition evaluates to the else branch.
if_true- An if-then-else expression with a true condition evaluates to the then branch.
in767_witness_dual_all_psd- The dual witness matrix Z(s) is positive semidefinite for all eight assignments s.
in767_witness_dual_p_psd- Each of the rank-one dual witness matrices P_i is positive semidefinite.
in767_witness_rational_dual_number- The dual witness objective value evaluated on the three rational effects is strictly negative.
in767_witness_rational_not_joint- There exists no joint positive parent POVM for the three rational qutrit effects.
in767_witness_trace_matrix_sum- The real part of the trace of a matrix multiplied by a sum of matrices equals the sum of the trace inner products.
in767_witness_trace_psd- The trace inner product Re(Tr(P * ρ)) of two positive semidefinite matrices is non-negative.
Matrix.add_mul- Right multiplication distributes over matrix addition.
Matrix.mul_assoc- Matrix multiplication is associative.
Matrix.mul_sum- Matrix multiplication distributes on the left over a finite sum of matrices.
Matrix.mul_one- Multiplying a matrix on the right by the identity matrix leaves it unchanged.
Matrix.posSemidef_vecMulVec_self_star- The outer product of any vector with its conjugate transpose is positive semidefinite.
Matrix.star_eq_conjTranspose- The adjoint of a complex matrix is its conjugate transpose.
Matrix.sub_mul- Right multiplication distributes over matrix subtraction.
Matrix.trace_add- The trace is additive over matrix addition.
Matrix.trace_mul_comm- The trace of a product of matrices is invariant under cyclic permutation: Tr(AB) = Tr(BA).
Matrix.trace_sub- The trace is additive over matrix subtraction.
Matrix.trace_sum- The trace of a finite sum of matrices equals the sum of their traces.
QuasispectrumRestricts.nnreal_of_nonneg- An element greater than or equal to zero has its spectrum restricted to the non-negative reals.
two_smul- Multiplying by the scalar 2 equals adding an element to itself.
- The strict negativity of the dual objective value and the rank-two decomposition of the dual matrix Z(1,1,1) are verified by exact rational matrix arithmetic using Lean's norm_num automation.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
open Matrixopen scoped ComplexOrder Matrix BigOperatorsset_option maxRecDepth 8192set_option maxHeartbeats 4000000private noncomputable def in767_witness_effect0 : Matrix (Fin 3) (Fin 3) ℂ := !![(1215916159000 / 21192203043001), (-2086398000000 / 21192203043001), (1071090000 / 65981951167); (-2086398000000 / 21192203043001), (3622358659000 / 21192203043001), (532050000 / 65981951167); (1071090000 / 65981951167), (532050000 / 65981951167), (7650594020 / 10066309561)]private noncomputable def in767_witness_effect1 : Matrix (Fin 3) (Fin 3) ℂ := !![(316737473028500 / 1360728454130809), 0, 0; 0, (605951028500 / 1360728454130809), (-76179480000 / 4236629775103); 0, (-76179480000 / 4236629775103), (488260819680 / 646346857849)]private noncomputable def in767_witness_effect2 : Matrix (Fin 3) (Fin 3) ℂ := !![(1215916159000 / 21192203043001), (2086398000000 / 21192203043001), (-1071090000 / 65981951167); (2086398000000 / 21192203043001), (3622358659000 / 21192203043001), (532050000 / 65981951167); (-1071090000 / 65981951167), (532050000 / 65981951167), (7650594020 / 10066309561)]private noncomputable def in767_witness_rational_effect (j : Fin 3) : Matrix (Fin 3) (Fin 3) ℂ := if j = 0 then in767_witness_effect0 else if j = 1 then in767_witness_effect1 else in767_witness_effect2open scoped MatrixOrderprivate lemma in767_witness_trace_psd {n : Type} [Fintype n] [DecidableEq n] {P ρ : Matrix n n ℂ} (hP : P.PosSemidef) (hρ : ρ.PosSemidef) : 0 ≤ (P * ρ).trace.re := by obtain ⟨X, hX, -, rfl⟩ := CFC.exists_sqrt_of_isSelfAdjoint_of_quasispectrumRestricts hP.isHermitian (QuasispectrumRestricts.nnreal_of_nonneg hP.nonneg) rw [Matrix.mul_assoc, Matrix.trace_mul_comm, Matrix.mul_assoc, ← Matrix.mul_assoc] have h := hρ.mul_mul_conjTranspose_same X rw [← Matrix.star_eq_conjTranspose, hX.star_eq] at h exact (Complex.nonneg_iff.1 h.trace_nonneg).1private noncomputable def in767_witness_dual_vec (i : Fin 4) : Fin 3 → ℂ := if i = 0 then ![10599/1557500, 1791231/3115000, 1991/89000] else if i = 1 then ![-773727/1557500, -448691/1557500, 3993/178000] else if i = 2 then ![1565119/3115000, -455757/1557500, 1947/89000] else ![0, 0, 77/2000]private lemma in767_witness_dual_vec0 : in767_witness_dual_vec 0 = ![10599/1557500, 1791231/3115000, 1991/89000] := by norm_num [in767_witness_dual_vec]private lemma in767_witness_dual_vec1 : in767_witness_dual_vec 1 = ![-773727/1557500, -448691/1557500, 3993/178000] := by norm_num [in767_witness_dual_vec]private lemma in767_witness_dual_vec2 : in767_witness_dual_vec 2 = ![1565119/3115000, -455757/1557500, 1947/89000] := by simp only [in767_witness_dual_vec, show (2 : Fin 4) ≠ 0 from by decide, show (2 : Fin 4) ≠ 1 from by decide, if_false, if_true]private lemma in767_witness_dual_vec3 : in767_witness_dual_vec 3 = ![0, 0, 77/2000] := by simp only [in767_witness_dual_vec, show (3 : Fin 4) ≠ 0 from by decide, show (3 : Fin 4) ≠ 1 from by decide, show (3 : Fin 4) ≠ 2 from by decide, if_false]private noncomputable def in767_witness_dual_p (i : Fin 4) : Matrix (Fin 3) (Fin 3) ℂ := Matrix.vecMulVec (in767_witness_dual_vec i) (star (in767_witness_dual_vec i))private noncomputable def in767_witness_dual_z (s : Fin 3 → Bool) : Matrix (Fin 3) (Fin 3) ℂ := (2 : ℝ) • in767_witness_dual_p 3 + (if s 0 then in767_witness_dual_p 1 - in767_witness_dual_p 3 else 0) + (if s 1 then in767_witness_dual_p 0 - in767_witness_dual_p 3 else 0) + (if s 2 then in767_witness_dual_p 2 - in767_witness_dual_p 3 else 0)private lemma in767_witness_dual_p_psd (i : Fin 4) : (in767_witness_dual_p i).PosSemidef := Matrix.posSemidef_vecMulVec_self_star _private lemma in767_witness_dual_all_psd (s : Fin 3 → Bool) : (in767_witness_dual_z s).PosSemidef := by cases h0 : s 0 <;> cases h1 : s 1 <;> cases h2 : s 2 · have he : in767_witness_dual_z s = in767_witness_dual_p 3 + in767_witness_dual_p 3 := by simp [in767_witness_dual_z, h0, h1, h2, two_smul] <;> abel rw [he]; exact (in767_witness_dual_p_psd 3).add (in767_witness_dual_p_psd 3) · have he : in767_witness_dual_z s = in767_witness_dual_p 2 + in767_witness_dual_p 3 := by simp [in767_witness_dual_z, h0, h1, h2, two_smul] <;> abel rw [he]; exact (in767_witness_dual_p_psd 2).add (in767_witness_dual_p_psd 3) · have he : in767_witness_dual_z s = in767_witness_dual_p 0 + in767_witness_dual_p 3 := by simp [in767_witness_dual_z, h0, h1, h2, two_smul] <;> abel rw [he]; exact (in767_witness_dual_p_psd 0).add (in767_witness_dual_p_psd 3) · have he : in767_witness_dual_z s = in767_witness_dual_p 0 + in767_witness_dual_p 2 := by simp [in767_witness_dual_z, h0, h1, h2, two_smul] <;> abel rw [he]; exact (in767_witness_dual_p_psd 0).add (in767_witness_dual_p_psd 2) · have he : in767_witness_dual_z s = in767_witness_dual_p 1 + in767_witness_dual_p 3 := by simp [in767_witness_dual_z, h0, h1, h2, two_smul] <;> abel rw [he]; exact (in767_witness_dual_p_psd 1).add (in767_witness_dual_p_psd 3) · have he : in767_witness_dual_z s = in767_witness_dual_p 1 + in767_witness_dual_p 2 := by simp [in767_witness_dual_z, h0, h1, h2, two_smul] <;> abel rw [he]; exact (in767_witness_dual_p_psd 1).add (in767_witness_dual_p_psd 2) · have he : in767_witness_dual_z s = in767_witness_dual_p 0 + in767_witness_dual_p 1 := by simp [in767_witness_dual_z, h0, h1, h2, two_smul] <;> abel rw [he]; exact (in767_witness_dual_p_psd 0).add (in767_witness_dual_p_psd 1) · let v : Fin 3 → ℂ := ![3533/5000, 0, 0] let w : Fin 3 → ℂ := ![0, 3533/5000, 0] have he : in767_witness_dual_z s = Matrix.vecMulVec v (star v) + Matrix.vecMulVec w (star w) := by simp only [in767_witness_dual_z, h0, h1, h2, if_true, in767_witness_dual_p, in767_witness_dual_vec0, in767_witness_dual_vec1, in767_witness_dual_vec2, in767_witness_dual_vec3, two_smul] ext i j fin_cases i <;> fin_cases j <;> simp only [Matrix.add_apply, Matrix.sub_apply, Matrix.vecMulVec_apply, Pi.star_apply] <;> norm_num [v, w, map_div₀, map_ofNat] rw [he] exact (Matrix.posSemidef_vecMulVec_self_star v).add (Matrix.posSemidef_vecMulVec_self_star w)private lemma in767_witness_rational_dual_number : (2 * (in767_witness_dual_p 3).trace.re + ((in767_witness_dual_p 1 - in767_witness_dual_p 3) * in767_witness_effect0).trace.re + ((in767_witness_dual_p 0 - in767_witness_dual_p 3) * in767_witness_effect1).trace.re + ((in767_witness_dual_p 2 - in767_witness_dual_p 3) * in767_witness_effect2).trace.re) < 0 := by simp only [in767_witness_dual_p, in767_witness_dual_vec0, in767_witness_dual_vec1, in767_witness_dual_vec2, in767_witness_dual_vec3] simp only [Matrix.trace, Matrix.diag_apply, Matrix.mul_apply, Matrix.sub_apply, Matrix.vecMulVec_apply, Pi.star_apply, Fin.sum_univ_succ] norm_num [in767_witness_effect0, in767_witness_effect1, in767_witness_effect2, Matrix.cons_val_two, Matrix.vecHead, Matrix.vecTail, Matrix.mul_apply, Matrix.sub_apply, Matrix.vecMulVec_apply, Pi.star_apply, Fin.sum_univ_succ, map_div₀, map_ofNat]private lemma in767_witness_trace_matrix_sum (A : Matrix (Fin 3) (Fin 3) ℂ) (G : (Fin 3 → Bool) → Matrix (Fin 3) (Fin 3) ℂ) : (A * ∑ s, G s).trace.re = ∑ s, (A * G s).trace.re := by simp only [Matrix.mul_sum, Matrix.trace_sum, Complex.re_sum]private theorem in767_witness_rational_not_joint : ¬ ∃ G : (Fin 3 → Bool) → Matrix (Fin 3) (Fin 3) ℂ, (∀ s, (G s).PosSemidef) ∧ (∑ s, G s = 1) ∧ ∀ j : Fin 3, (∑ s, if s j then G s else 0) = in767_witness_rational_effect j := by classical rintro ⟨G, hG, hsum, hmarg⟩ have hmargin (A : Matrix (Fin 3) (Fin 3) ℂ) (j : Fin 3) : (∑ s, if s j then (A * G s).trace.re else 0) = (A * in767_witness_rational_effect j).trace.re := by rw [← hmarg j, in767_witness_trace_matrix_sum] apply Finset.sum_congr rfl intro s _ split_ifs <;> simp_all have hsplit (s : Fin 3 → Bool) : (in767_witness_dual_z s * G s).trace.re = 2 * (in767_witness_dual_p 3 * G s).trace.re + (if s 0 then ((in767_witness_dual_p 1 - in767_witness_dual_p 3) * G s).trace.re else 0) + (if s 1 then ((in767_witness_dual_p 0 - in767_witness_dual_p 3) * G s).trace.re else 0) + (if s 2 then ((in767_witness_dual_p 2 - in767_witness_dual_p 3) * G s).trace.re else 0) := by cases h0 : s 0 <;> cases h1 : s 1 <;> cases h2 : s 2 <;> simp [in767_witness_dual_z, h0, h1, h2, two_smul, Matrix.add_mul, Matrix.sub_mul, Matrix.trace_add, Matrix.trace_sub] <;> ring have heq : (∑ s, (in767_witness_dual_z s * G s).trace.re) = 2 * (in767_witness_dual_p 3).trace.re + ((in767_witness_dual_p 1 - in767_witness_dual_p 3) * in767_witness_effect0).trace.re + ((in767_witness_dual_p 0 - in767_witness_dual_p 3) * in767_witness_effect1).trace.re + ((in767_witness_dual_p 2 - in767_witness_dual_p 3) * in767_witness_effect2).trace.re := by calc _ = ∑ s, (2 * (in767_witness_dual_p 3 * G s).trace.re + (if s 0 then ((in767_witness_dual_p 1 - in767_witness_dual_p 3) * G s).trace.re else 0) + (if s 1 then ((in767_witness_dual_p 0 - in767_witness_dual_p 3) * G s).trace.re else 0) + (if s 2 then ((in767_witness_dual_p 2 - in767_witness_dual_p 3) * G s).trace.re else 0)) := by exact Finset.sum_congr rfl fun s _ => hsplit s _ = _ := by simp only [Finset.sum_add_distrib, ← Finset.mul_sum] rw [← in767_witness_trace_matrix_sum, hsum, Matrix.mul_one] rw [hmargin _ 0, hmargin _ 1, hmargin _ 2] simp [in767_witness_rational_effect] have hnonneg : 0 ≤ ∑ s, (in767_witness_dual_z s * G s).trace.re := Finset.sum_nonneg fun s _ => in767_witness_trace_psd (in767_witness_dual_all_psd s) (hG s) rw [heq] at hnonneg have := in767_witness_rational_dual_number linariththeorem ppt_qutrit_rational_binary_effect_incompatible : ¬ ∃ G : (Fin 3 → Bool) → Matrix (Fin 3) (Fin 3) ℂ, (∀ s, (G s).PosSemidef) ∧ (∑ s, G s = 1) ∧ ∀ j : Fin 3, (∑ s, if s j then G s else 0) = ppt_qutrit_rational_binary_effect j := by exact in767_witness_rational_not_joint