product_witness_negative_expectation_implies_entangled
A product-positive witness with negative expectation on a matrix proves that the matrix is not separable.
Statement
theorem product_witness_negative_expectation_implies_entangled
(dA dB : ℕ) (W ρ : Matrix (Fin dA × Fin dB) (Fin dA × Fin dB) ℂ)
(hw : ∀ (x : Fin dA → ℂ) (y : Fin dB → ℂ),
0 ≤ (∑ p : Fin dA × Fin dB, ∑ q : Fin dA × Fin dB,
star (x p.1 * y p.2) * W p q * (x q.1 * y q.2)).re)
(hneg : (∑ p : Fin dA × Fin dB, ∑ q : Fin dA × Fin dB, W p q * ρ q p).re < 0) :
¬ matrix_is_separable dA dB ρ- Source
- Product-witness reduction for OP-2299.
- Verified
- 28 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- matrix_is_separableWith dA dB : ℕ explicit arguments, in this order, and ρ : Matrix (Fin dA × Fin dB) (Fin dA × Fin dB) ℂ, the proposition that ρ is…
The proof, explained
We argue by contradiction, assuming that the density matrix ρ is separable and thus decomposes into a finite sum of pure product states. Expanding the expectation value Tr(W ρ) = ∑ p q, W p q ρ q p with this decomposition and exchanging the order of summation expresses the expectation as a sum of expectation values of W on individual product states. Since W is product-positive by hypothesis, each term in this sum has a non-negative real part, forcing the total real part to be non-negative. This directly contradicts the assumption that Tr(W ρ) has a strictly negative real part, proving that ρ is not separable (i.e., entangled).
Assume for contradiction that ρ is separable, yielding an explicit convex-like decomposition into product states.
By definition, separability of ρ means there exist a natural number N and families of local vectors x_i and y_i for each i < N such that the matrix elements satisfy ρ p q = ∑ i, x i p.1 * star (x i q.1) * (y i p.2 * star (y i q.2)). We introduce these components into the context to derive a contradiction.
intro ⟨N, x, y, hρ⟩For each term in the sum, W p q * (x i q.1 * star (x i p.1) * (y i q.2 * star (y i p.2))) equals star (x i p.1 * y i p.2) * W p q * (x i q.1 * y i q.2).
Expanding the complex conjugate of the product via star_mul and rearranging scalar factors using commutativity and associativity of multiplication in ℂ (ring) establishes that the summand matches the quadratic form of W on the product vector x i ⊗ y i.
uses
star_mulhave hswap (i : Fin N) (p q : Fin dA × Fin dB) : W p q * (x i q.1 * star (x i p.1) * (y i q.2 * star (y i p.2))) = star (x i p.1 * y i p.2) * W p q * (x i q.1 * y i q.2) := by simp only [star_mul] ring
The expectation sum ∑ p, ∑ q, W p q * ρ q p equals ∑ i, ∑ p, ∑ q, star (x i p.1 * y i p.2) * W p q * (x i q.1 * y i q.2).
Substituting the separable decomposition of ρ into the sum and distributing W p q across the summation over i (Finset.mul_sum) gives a triple sum. Exchanging the order of summation using Finset.sum_comm (applied inside via Finset.sum_congr) brings the summation over i to the outside. Applying the algebraic identity hswap then converts each term into product quadratic form.
uses
Finset.mul_sum,Finset.sum_congr,Finset.sum_commhave heq : (∑ p : Fin dA × Fin dB, ∑ q : Fin dA × Fin dB, W p q * ρ q p) = ∑ i : Fin N, ∑ p : Fin dA × Fin dB, ∑ q : Fin dA × Fin dB, star (x i p.1 * y i p.2) * W p q * (x i q.1 * y i q.2) := by calc _ = ∑ p : Fin dA × Fin dB, ∑ q : Fin dA × Fin dB, ∑ i : Fin N, W p q * (x i q.1 * star (x i p.1) * (y i q.2 * star (y i p.2))) := by simp_rw [hρ, Finset.mul_sum] _ = ∑ p : Fin dA × Fin dB, ∑ i : Fin N, ∑ q : Fin dA × Fin dB, W p q * (x i q.1 * star (x i p.1) * (y i q.2 * star (y i p.2))) := by apply Finset.sum_congr rfl intro p hp rw [Finset.sum_comm] _ = ∑ i : Fin N, ∑ p : Fin dA × Fin dB, ∑ q : Fin dA × Fin dB, W p q * (x i q.1 * star (x i p.1) * (y i q.2 * star (y i p.2))) := by rw [Finset.sum_comm] _ = _ := by simp_rw [hswap]
The sum over i of the real parts of each product expectation is non-negative: 0 ≤ ∑ i, (∑ p, ∑ q, star (x i p.1 * y i p.2) * W p q * (x i q.1 * y i q.2)).re.
By the assumption hw, the expectation of W on any product vector has a non-negative real part. Because each term in the sum over i is non-negative, the entire sum is non-negative by Finset.sum_nonneg.
uses
Finset.sum_nonneghave hn : 0 ≤ ∑ i : Fin N, (∑ p : Fin dA × Fin dB, ∑ q : Fin dA × Fin dB, star (x i p.1 * y i p.2) * W p q * (x i q.1 * y i q.2)).re := by exact Finset.sum_nonneg fun i _ => hw (x i) (y i)
The assumption that ρ is separable produces a contradiction.
Taking the real part of the trace equality (congrArg Complex.re) and distributing the real part through the finite sums (Complex.re_sum) shows that the real part of the trace equals the sum of the real parts of the product expectations. Since this sum is non-negative but the trace real part is strictly negative by hneg, linear arithmetic (linarith) derives False.
uses
congrArg,Complex.re_sumhave hh := congrArg Complex.re heq simp only [Complex.re_sum] at hh hneg hn linarith
star_mul- The complex conjugate (or involution) of a product is the reversed product of the conjugates: star (r * s) = star s * star r.
Finset.mul_sum- Multiplication distributes over a finite sum: a * ∑ i ∈ s, f i = ∑ i ∈ s, a * f i.
Finset.sum_congr- If two finite index sets are equal and their summands agree on every element, their sums are equal.
Finset.sum_comm- The order of summation in a double finite sum can be interchanged: ∑ x ∈ s, ∑ y ∈ t, f x y = ∑ y ∈ t, ∑ x ∈ s, f x y.
Finset.sum_nonneg- A finite sum of non-negative elements is non-negative.
congrArg- Functions preserve equality: if a₁ = a₂, then f a₁ = f a₂.
Complex.re_sum- The real part of a finite sum of complex numbers is the sum of their real parts: (∑ i ∈ s, f i).re = ∑ i ∈ s, (f i).re.
- The trace of the product W ρ and the expectation values on product vectors are written out as coordinate sums over Fin dA × Fin dB rather than using abstract trace or tensor product operators.
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 scoped BigOperatorstheorem product_witness_negative_expectation_implies_entangled (dA dB : ℕ) (W ρ : Matrix (Fin dA × Fin dB) (Fin dA × Fin dB) ℂ) (hw : ∀ (x : Fin dA → ℂ) (y : Fin dB → ℂ), 0 ≤ (∑ p : Fin dA × Fin dB, ∑ q : Fin dA × Fin dB, star (x p.1 * y p.2) * W p q * (x q.1 * y q.2)).re) (hneg : (∑ p : Fin dA × Fin dB, ∑ q : Fin dA × Fin dB, W p q * ρ q p).re < 0) : ¬ matrix_is_separable dA dB ρ := by intro ⟨N, x, y, hρ⟩ have hswap (i : Fin N) (p q : Fin dA × Fin dB) : W p q * (x i q.1 * star (x i p.1) * (y i q.2 * star (y i p.2))) = star (x i p.1 * y i p.2) * W p q * (x i q.1 * y i q.2) := by simp only [star_mul] ring have heq : (∑ p : Fin dA × Fin dB, ∑ q : Fin dA × Fin dB, W p q * ρ q p) = ∑ i : Fin N, ∑ p : Fin dA × Fin dB, ∑ q : Fin dA × Fin dB, star (x i p.1 * y i p.2) * W p q * (x i q.1 * y i q.2) := by calc _ = ∑ p : Fin dA × Fin dB, ∑ q : Fin dA × Fin dB, ∑ i : Fin N, W p q * (x i q.1 * star (x i p.1) * (y i q.2 * star (y i p.2))) := by simp_rw [hρ, Finset.mul_sum] _ = ∑ p : Fin dA × Fin dB, ∑ i : Fin N, ∑ q : Fin dA × Fin dB, W p q * (x i q.1 * star (x i p.1) * (y i q.2 * star (y i p.2))) := by apply Finset.sum_congr rfl intro p hp rw [Finset.sum_comm] _ = ∑ i : Fin N, ∑ p : Fin dA × Fin dB, ∑ q : Fin dA × Fin dB, W p q * (x i q.1 * star (x i p.1) * (y i q.2 * star (y i p.2))) := by rw [Finset.sum_comm] _ = _ := by simp_rw [hswap] have hn : 0 ≤ ∑ i : Fin N, (∑ p : Fin dA × Fin dB, ∑ q : Fin dA × Fin dB, star (x i p.1 * y i p.2) * W p q * (x i q.1 * y i q.2)).re := by exact Finset.sum_nonneg fun i _ => hw (x i) (y i) have hh := congrArg Complex.re heq simp only [Complex.re_sum] at hh hneg hn linarith