AFTD Auto-Formalizing Theoretical Domains

rank_one_qutrit_compression_three_binary_parent

theoremverified

Every three binary qutrit effects have a positive joint parent after compression to any subspace of dimension at most one.

Statement

theorem rank_one_qutrit_compression_three_binary_parent :
  ∀ (M : Fin 3 → Matrix (Fin 3) (Fin 3) ℂ) (P : Matrix (Fin 3) (Fin 3) ℂ),
    (∀ j, (M j).PosSemidef ∧ (1-M j).PosSemidef) →
    P.IsHermitian → P*P=P → P.rank ≤ 1 →
    ∃ G : (Fin 3 → Bool) → Matrix (Fin 3) (Fin 3) ℂ,
      (∀ s, (G s).PosSemidef) ∧ (∑ s, G s) = P ∧
      ∀ j : Fin 3, (∑ s, if s j then G s else 0) = P*M j*P
Source
Local compatibility helper for OP-693.
Verified
12 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • VThe ambient space $V = \mathbb{F}_p^n \times \mathbb{F}_p^n$ of pairs of coordinate vectors.
Used by 2

The proof, explained

To show that three binary qutrit effects have a positive joint parent after compression to a subspace of dimension at most one, the proof analyzes an orthogonal projection P with rank P ≤ 1. If rank P = 0, then P = 0 and the zero operators trivially form a parent. If rank P = 1, P is a rank-one projection v vᴴ for a unit vector v, which collapses each compressed effect to a scalar multiple P * M j * P = p j • P with probabilities p j = ⟨v, M j v⟩ ∈ [0, 1]. The joint parent is then constructed by weighting P with the classical product probability distribution of three independent Bernoulli trials with parameters p 0, p 1, p 2.

  1. For any eigenvector v ≠ 0 of the projection P with eigenvalue λ, the eigenvalue satisfies λ² • v = λ • v.

    Let v be an eigenvector of P associated with eigenvalue λ. Since v is an eigenvector, P *ᵥ v = λ • v. Multiplying by P again yields P *ᵥ (P *ᵥ v) = P *ᵥ (λ • v) = λ • (P *ᵥ v) = λ • (λ • v). On the other hand, because P is an idempotent projection (P * P = P), we have P *ᵥ (P *ᵥ v) = (P * P) *ᵥ v = P *ᵥ v = λ • v. Equating these two expressions gives λ • (λ • v) = λ • v.

    lines 8–22

    uses Matrix.mulVec_smul, Matrix.mulVec_mulVec

      let v : Fin 3 → ℂ := ⇑(hP.eigenvectorBasis k)
      have hv : v ≠ 0 := by
        intro h
        apply hP.eigenvectorBasis.orthonormal.ne_zero k
        apply WithLp.ofLp_injective 2
        exact h
      have he : P *ᵥ v = (hP.eigenvalues k : ℂ) • v := by
        simpa [RCLike.real_smul_eq_coe_smul] using hP.mulVec_eigenvectorBasis k
      have hh : (hP.eigenvalues k : ℂ) • ((hP.eigenvalues k : ℂ) • v) =
          (hP.eigenvalues k : ℂ) • v := by
        calc
          _ = P *ᵥ (P *ᵥ v) := by rw [he, Matrix.mulVec_smul, he]
          _ = (P*P) *ᵥ v := Matrix.mulVec_mulVec v P P
          _ = P *ᵥ v := by rw [hPP]
          _ = _ := he
  2. The eigenvalues of an orthogonal projection P on ℂ³ belong to {0, 1}.

    Because the eigenvector v is nonzero, there exists some coordinate i such that v i ≠ 0. Evaluating the vector equality λ² • v = λ • v at coordinate i gives (λ² - λ) * v i = 0. Since v i ≠ 0, the scalar factor must vanish: λ² - λ = 0. Factoring this as λ * (λ - 1) = 0 over ℝ implies that λ = 0 or λ = 1.

    lines 23–35

    uses Or.inl, Or.inr

      obtain ⟨i,hi⟩ := Function.ne_iff.mp hv
      have hi' : v i ≠ 0 := by simpa using hi
      have hcoord := congrFun hh i
      simp only [Pi.smul_apply, smul_eq_mul] at hcoord
      have hz : ((hP.eigenvalues k : ℂ)^2 - (hP.eigenvalues k : ℂ)) * v i = 0 := by
        linear_combination hcoord
      have heval : (hP.eigenvalues k : ℝ)^2 - hP.eigenvalues k = 0 := by
        have h := (mul_eq_zero.mp hz).resolve_right hi'
        exact_mod_cast h
      have hfactor : hP.eigenvalues k * (hP.eigenvalues k - 1)=0 := by nlinarith [heval]
      rcases mul_eq_zero.mp hfactor with h | h
      · exact Or.inl h
      · exact Or.inr (sub_eq_zero.mp h)
  3. Selecting the k columns of the unitary eigenvector matrix corresponding to nonzero eigenvalues yields an isometry U ∈ Matrix (Fin 3) (Fin k) ℂ with Uᴴ * U = 1.

    Let I be the subtype of indices corresponding to nonzero eigenvalues of P. The rank of P equals the number of nonzero eigenvalues, so |I| = k. Identifying Fin k with I via an equivalence e, let U be the matrix whose j-th column is the e(j)-th column of the unitary eigenvector matrix V. Then (Uᴴ * U) i j = (Vᴴ * V) (e i) (e j). Since V is unitary (Vᴴ * V = 1), this entry is 1 when e i = e j (which is equivalent to i = j by injectivity of e) and 0 otherwise, so Uᴴ * U = 1.

    lines 40–61

    uses Fintype.equivOfCardEq, Unitary.coe_star_mul_self, Subtype.ext

      classical
      let I := {k : Fin 3 // hP.eigenvalues k ≠ 0}
      have hcard : Fintype.card I = k := by
        change Fintype.card {k : Fin 3 // hP.eigenvalues k ≠ 0} = k
        rw [← hP.rank_eq_card_non_zero_eigs]
        exact hRank
      let e : Fin k ≃ I := Fintype.equivOfCardEq (by simp [hcard])
      let V : Matrix (Fin 3) (Fin 3) ℂ := hP.eigenvectorUnitary
      let U : Matrix (Fin 3) (Fin k) ℂ := fun i j => V i (e j).val
      have hV : Vᴴ*V=1 := by
        have hh := Unitary.coe_star_mul_self hP.eigenvectorUnitary
        simpa [V, Matrix.star_eq_conjTranspose] using hh
      have hU : Uᴴ*U=1 := by
        ext i j
        have hh := congrArg (fun M : Matrix (Fin 3) (Fin 3) ℂ => M (e i).val (e j).val) hV
        have heq : (e i).val = (e j).val ↔ i=j := by
          constructor
          · intro h
            exact e.injective (Subtype.ext h)
          · rintro rfl
            rfl
        simpa [U, Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.one_apply, heq] using hh
  4. The isometry U satisfies U * Uᴴ = P, representing the projection P as the range projection of a k-dimensional isometry.

    By the spectral theorem, P = V * diagonal(λ) * Vᴴ. Because every eigenvalue λ is 0 or 1, each summand V i m * λ m * star (V j m) reduces to V i m * star (V j m) if λ m ≠ 0 (i.e. λ m = 1) and 0 otherwise. Summing only over the indices with nonzero eigenvalues (the set I) and reindexing through the bijection e matches the product (U * Uᴴ) i j = ∑ m, U i m * star (U j m). Thus U * Uᴴ = P.

    lines 62–87

    uses in767_rankoneproof_projection_eigenvalues, Finset.sum_filter, Finset.sum_subtype

      have hspec : P = V * Matrix.diagonal (fun k => (hP.eigenvalues k : ℂ)) * Vᴴ := by
        have hh := hP.spectral_theorem
        simpa [V, Unitary.conjStarAlgAut_apply, Matrix.star_eq_conjTranspose, Function.comp_def] using hh
      have heig (k : Fin 3) : hP.eigenvalues k = 0 ∨ hP.eigenvalues k = 1 :=
        in767_rankoneproof_projection_eigenvalues P hP hPP k
      have hterm (i j k : Fin 3) :
          V i k * (hP.eigenvalues k : ℂ) * star (V j k) =
          if hP.eigenvalues k ≠ 0 then V i k * star (V j k) else 0 := by
        rcases heig k with h | h <;> simp [h]
      have hsub (i j : Fin 3) :
          (∑ k : Fin 3, if hP.eigenvalues k ≠ 0 then V i k * star (V j k) else 0) =
          ∑ k : I, V i k.val * star (V j k.val) := by
        rw [← Finset.sum_filter]
        exact Finset.sum_subtype (Finset.univ.filter fun k : Fin 3 => hP.eigenvalues k ≠ 0) (by simp) _
      have hUU : U*Uᴴ=P := by
        ext i j
        have hh := congrArg (fun M : Matrix (Fin 3) (Fin 3) ℂ => M i j) hspec
        rw [Matrix.mul_apply] at hh
        simp only [Matrix.mul_diagonal, Matrix.conjTranspose_apply] at hh
        simp_rw [hterm] at hh
        rw [hsub] at hh
        have he := e.sum_comp (fun k : I => V i k.val * star (V j k.val))
        change (∑ k : Fin k, V i (e k).val * star (V j (e k).val)) = P i j
        rw [he]
        exact hh.symm
      exact ⟨U,hU,hUU⟩
  5. The product probability weight w(p, s) is nonnegative for every binary sequence s ∈ Fin 3 → Bool. automation

    The weight w(p, s) is defined as the product over j ∈ Fin 3 of p j (if s j is true) and 1 - p j (if s j is false). Since each p j ∈ [0, 1], every factor is nonnegative, so their product is nonnegative by Finset.prod_nonneg.

    lines 97–99

    uses Finset.prod_nonneg

      apply Finset.prod_nonneg
      intro j hj
      split <;> linarith [hp j]
  6. The product probability weights sum to 1 over all eight binary sequences s ∈ Fin 3 → Bool.

    Factoring the sum of products over independent binary assignments via Finset.sum_prod_piFinset converts ∑ s, ∏ j (s j ? p j : 1 - p j) into the product of coordinate sums ∏ j (p j + (1 - p j)) = ∏ j 1 = 1.

    lines 103–106

    uses Finset.sum_prod_piFinset

      have hh := Finset.sum_prod_piFinset (ι := Fin 3) (Finset.univ : Finset Bool)
        (fun j b => if b then p j else 1-p j)
      simp only [Fintype.piFinset_univ] at hh
      simpa [in767_rankoneproof_probability_weight, Fintype.sum_bool] using hh
  7. For each coordinate j, the marginal sum of weights with s j = true equals p j. automation

    By setting the j-th factor to p j when s j is true and 0 when s j is false while leaving the other coordinates unchanged, the sum over binary sequences factors via Finset.sum_prod_piFinset into (p j + 0) * ∏ (i ≠ j) (p i + (1 - p i)) = p j * 1 = p j. Linear arithmetic and finite-case expansion verify the equality for each j ∈ Fin 3.

    lines 110–118

    uses Finset.sum_prod_piFinset, Fin.prod_univ_three

      let f : Fin 3 → Bool → ℝ := fun i b => if i=j then if b then p i else 0 else if b then p i else 1-p i
      have hprod (s : Fin 3 → Bool) : (∏ i, f i (s i)) =
          if s j then in767_rankoneproof_probability_weight p s else 0 := by
        fin_cases j <;> cases h0 : s 0 <;> cases h1 : s 1 <;> cases h2 : s 2 <;>
          simp [f, in767_rankoneproof_probability_weight, Fin.prod_univ_three, h0,h1,h2]
      have hh := Finset.sum_prod_piFinset (ι := Fin 3) (Finset.univ : Finset Bool) f
      simp only [Fintype.piFinset_univ] at hh
      simp_rw [hprod] at hh
      fin_cases j <;> simp [f, Fintype.sum_bool, Fin.prod_univ_three] at hh ⊢ <;> linarith
  8. The candidate joint parent operators G s = ∑ t, w(p(·, t), s) • Q t are positive semidefinite.

    Each operator G s is a linear combination of positive semidefinite matrices Q t with nonnegative scalar weights w(p(·, t), s). By induction on the finite set of indices t, using the fact that scaling by a nonnegative real and adding positive semidefinite matrices preserves positive semidefiniteness, G s is positive semidefinite.

    lines 128–139

    uses Finset.induction_on, Matrix.PosSemidef.zero, Finset.sum_insert, in767_rankoneproof_probability_weight_nonneg

      let G : (Fin 3 → Bool) → Matrix (Fin n) (Fin n) ℂ := fun s =>
        ∑ t, in767_rankoneproof_probability_weight (fun j => p j t) s • Q t
      refine ⟨G, ?_, ?_, ?_⟩
      · intro s
        change (∑ t, in767_rankoneproof_probability_weight (fun j => p j t) s • Q t).PosSemidef
        have H (T : Finset (Fin m)) : (∑ t ∈ T, in767_rankoneproof_probability_weight (fun j => p j t) s • Q t).PosSemidef := by
          induction T using Finset.induction_on with
          | empty => simpa using (Matrix.PosSemidef.zero : (0 : Matrix (Fin n) (Fin n) ℂ).PosSemidef)
          | @insert t T ht ih =>
            rw [Finset.sum_insert ht]
            exact ((hQ t).smul (in767_rankoneproof_probability_weight_nonneg _ (fun j => hp j t) s)).add ih
        exact H Finset.univ
  9. The operators G s sum to P over all binary sequences s.

    Interchanging the order of summation between s and t yields ∑ t, (∑ s, w(p(·, t), s)) • Q t. Because each product probability distribution sums to 1, the inner sum simplifies to 1, leaving ∑ t, Q t = P.

    lines 140–146

    uses Finset.sum_comm, Finset.sum_smul, in767_rankoneproof_probability_weight_sum

      · change (∑ s, ∑ t, in767_rankoneproof_probability_weight (fun j => p j t) s • Q t) = P
        rw [Finset.sum_comm]
        calc
          (∑ t, ∑ s, in767_rankoneproof_probability_weight (fun j => p j t) s • Q t) =
              ∑ t, (∑ s, in767_rankoneproof_probability_weight (fun j => p j t) s) • Q t := by simp [Finset.sum_smul]
          _ = ∑ t, Q t := by simp [in767_rankoneproof_probability_weight_sum]
          _ = P := hsum
  10. For each effect index j, the marginal sum of G s with s j = true equals ∑ t, p j t • Q t.

    Interchanging the summations over s and t, the marginal sum becomes ∑ t, (∑ s with s j = true, w(p(·, t), s)) • Q t. By the marginal property of the product distribution, the inner sum equals p j t, yielding ∑ t, p j t • Q t.

    lines 147–159

    uses Finset.sum_comm, Finset.sum_smul, in767_rankoneproof_probability_weight_marginal

      · intro j
        change (∑ s, if s j then (∑ t, in767_rankoneproof_probability_weight (fun k => p k t) s • Q t) else 0) = _
        have heq (s : Fin 3 → Bool) :
            (if s j then (∑ t, in767_rankoneproof_probability_weight (fun k => p k t) s • Q t) else 0) =
            ∑ t, (if s j then in767_rankoneproof_probability_weight (fun k => p k t) s else 0) • Q t := by
          cases hs : s j <;> simp [hs]
        simp_rw [heq]
        rw [Finset.sum_comm]
        calc
          (∑ t, ∑ s, (if s j then in767_rankoneproof_probability_weight (fun k => p k t) s else 0) • Q t) =
              ∑ t, (∑ s, if s j then in767_rankoneproof_probability_weight (fun k => p k t) s else 0) • Q t := by simp [Finset.sum_smul]
          _ = ∑ t, (p j t) • Q t := by simp [in767_rankoneproof_probability_weight_marginal]
    
  11. When rank P = 0, P = 0 and the zero operator G s = 0 is a valid positive joint parent.

    By the rank isometry lemma with k = 0, rank P = 0 implies P = 0. Assigning G s = 0 for every s satisfies positive semidefiniteness, sums to 0 = P, and has marginals 0 = P * M j * P.

    lines 168–180

    uses Nat.eq_zero_or_pos, in767_rankoneproof_projection_rank_isometry, Matrix.PosSemidef.zero

      classical
      rcases Nat.eq_zero_or_pos P.rank with hzero | hpos
      · obtain ⟨U,hU,hUU⟩ := in767_rankoneproof_projection_rank_isometry 0 P hP hPP hzero
        have hPzero : P=0 := by
          rw [← hUU]
          ext i j
          simp [Matrix.mul_apply]
        refine ⟨fun _ => 0, ?_, ?_, ?_⟩
        · intro s
          exact Matrix.PosSemidef.zero
        · simp [hPzero]
        · intro j
          simp [hPzero]
  12. When rank P = 1, P = v vᴴ for a unit vector v, and the expectation values p j = Re(vᴴ *ᵥ (M j *ᵥ v)) lie in [0, 1].

    Since rank P ≤ 1 and rank P ≠ 0, rank P = 1. The rank isometry lemma for k = 1 yields a unit vector v ∈ ℂ³ with star v ⬝ᵥ v = 1 and P = vecMulVec v (star v). Because M j and 1 - M j are positive semidefinite, the quadratic forms star v ⬝ᵥ (M j *ᵥ v) and star v ⬝ᵥ ((1 - M j) *ᵥ v) = 1 - star v ⬝ᵥ (M j *ᵥ v) are nonnegative real numbers, so p j = Re(star v ⬝ᵥ (M j *ᵥ v)) ∈ [0, 1].

    lines 181–204

    uses in767_rankoneproof_projection_rank_isometry, Matrix.PosSemidef.dotProduct_mulVec_nonneg, Matrix.sub_mulVec, dotProduct_sub

      · have hrank : P.rank=1 := by omega
        obtain ⟨U,hU,hUU⟩ := in767_rankoneproof_projection_rank_isometry 1 P hP hPP hrank
        let v : Fin 3 → ℂ := fun i => U i 0
        have hv : star v ⬝ᵥ v = 1 := by
          have hh := congrArg (fun A : Matrix (Fin 1) (Fin 1) ℂ => A 0 0) hU
          simpa [v, Matrix.mul_apply, Matrix.conjTranspose_apply, dotProduct] using hh
        have hPvv : P = Matrix.vecMulVec v (star v) := by
          rw [← hUU]
          ext i j
          simp [v, Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.vecMulVec_apply]
        let p : Fin 3 → Fin 1 → ℝ := fun j _ => (star v ⬝ᵥ (M j *ᵥ v)).re
        have hp (j : Fin 3) (t : Fin 1) : 0 ≤ p j t ∧ p j t ≤ 1 := by
          have ha := (hM j).1.dotProduct_mulVec_nonneg v
          have hb := (hM j).2.dotProduct_mulVec_nonneg v
          have ha' := (Complex.nonneg_iff.mp ha).1
          have hb' := (Complex.nonneg_iff.mp hb).1
          have hb'' : (star v ⬝ᵥ ((1 - M j) *ᵥ v)).re =
              1 - (star v ⬝ᵥ (M j *ᵥ v)).re := by
            simp [Matrix.sub_mulVec, dotProduct_sub, hv]
          dsimp [p]
          constructor
          · exact ha'
          · rw [hb''] at hb'
            linarith
  13. The compressed effects satisfy P * M j * P = p j • P, and the hidden variable model produces the joint parent G.

    Since P = v vᴴ, direct matrix algebra shows P * M j * P = (star v ⬝ᵥ (M j *ᵥ v)) • (v vᴴ) = p j • P. Also, P = U * Uᴴ is positive semidefinite. Applying in767_rankoneproof_hidden_model_parent with single term Q 0 = P and probabilities p j yields a family of positive semidefinite operators G s summing to P whose marginals equal p j • P = P * M j * P.

    lines 205–225

    uses Complex.ext, Matrix.ext, Matrix.posSemidef_self_mul_conjTranspose, in767_rankoneproof_hidden_model_parent

        have hp_eq (j : Fin 3) : ((p j 0 : ℝ) : ℂ) = star v ⬝ᵥ (M j *ᵥ v) := by
          have ha := (hM j).1.dotProduct_mulVec_nonneg v
          have ha' := (Complex.nonneg_iff.mp ha).2
          apply Complex.ext <;> simp [p, ha']
        have houter (j : Fin 3) : P * M j * P = (p j 0) • P := by
          rw [hPvv]
          apply Matrix.ext
          intro i k
          simp only [Matrix.smul_apply, Complex.real_smul, hp_eq]
          simp [Matrix.mul_apply, Matrix.vecMulVec_apply, dotProduct, Matrix.mulVec,
            Fin.sum_univ_three, Pi.star_apply]
          ring
        have hPpos : P.PosSemidef := by
          rw [← hUU]
          exact Matrix.posSemidef_self_mul_conjTranspose U
        obtain ⟨G,hG,hGsum,hGmarg⟩ := in767_rankoneproof_hidden_model_parent 3 1 (fun _ => P) p P
          (fun _ => hPpos) (by simp) hp
        refine ⟨G,hG,hGsum,?_⟩
        intro j
        rw [hGmarg j]
        simpa using (houter j).symm
  14. Every three binary qutrit effects have a positive joint parent after compression to any subspace of dimension at most one.

    The theorem follows directly by applying in767_rankoneproof_rank_one_parent to the given effects M j and projection P.

    line 234

    uses in767_rankoneproof_rank_one_parent

      exact in767_rankoneproof_rank_one_parent
Matrix.mulVec_smul
Multiplying a matrix by a scalar multiple of a vector equals scaling the matrix-vector product: M (c • v) = c • (M v).
Matrix.mulVec_mulVec
Composition of matrix-vector multiplications equals multiplication by the product matrix: M (N v) = (M * N) v.
Or.inl
Proves a disjunction A ∨ B from the left disjunct A.
Or.inr
Proves a disjunction A ∨ B from the right disjunct B.
Fintype.equivOfCardEq
Any two finite types with the same cardinality are in bijection.
Unitary.coe_star_mul_self
For any unitary element U in a star ring, Uᴴ * U = 1.
Subtype.ext
Two elements of a subtype are equal if their underlying values are equal.
in767_rankoneproof_projection_eigenvalues
Every eigenvalue of a Hermitian projection matrix (P = Pᴴ and P * P = P) on ℂ³ is either 0 or 1.
Finset.sum_filter
The sum over a filtered finite set equals the sum over the entire set of terms guarded by an if-then-else condition.
Finset.sum_subtype
A sum over a subtype defined by a predicate equals the sum over the filtered finite set of elements satisfying that predicate.
Finset.prod_nonneg
The product of nonnegative real numbers over a finite set is nonnegative.
Finset.sum_prod_piFinset
The sum of products over function spaces factors into the product of coordinate-wise sums (distributivity of multiplication over addition).
Fin.prod_univ_three
The product of a function over Fin 3 equals f 0 * f 1 * f 2.
Finset.induction_on
Principle of induction for finite sets: a property holding for the empty set and preserved under inserting elements holds for all finite sets.
Matrix.PosSemidef.zero
The zero matrix is positive semidefinite.
Finset.sum_insert
Summing over an inserted element adds that element's term to the sum over the rest of the set: ∑ x ∈ insert a s, f x = f a + ∑ x ∈ s, f x.
in767_rankoneproof_probability_weight_nonneg
Product probability weights w(p, s) are nonnegative whenever each coordinate probability p(j) lies in [0, 1].
Finset.sum_comm
Double sums over finite sets can be interchanged: ∑ x, ∑ y, f x y = ∑ y, ∑ x, f x y.
Finset.sum_smul
Scalar multiplication distributes over finite sums: (∑ i, f i) • x = ∑ i, f i • x.
in767_rankoneproof_probability_weight_sum
The product probability weights sum to 1 over all eight binary sequences s ∈ Fin 3 → Bool.
in767_rankoneproof_probability_weight_marginal
The marginal sum of product weights over sequences with s(j) = true equals p(j).
Nat.eq_zero_or_pos
Every natural number is either zero or strictly positive: n = 0 ∨ n > 0.
in767_rankoneproof_projection_rank_isometry
A rank-k Hermitian projection P on ℂ³ factors as P = U * Uᴴ for an isometry U ∈ Matrix (Fin 3) (Fin k) ℂ with Uᴴ * U = 1.
Matrix.PosSemidef.dotProduct_mulVec_nonneg
For any positive semidefinite matrix M and vector x, the quadratic form star x ⬝ᵥ M.mulVec x is nonnegative.
Matrix.sub_mulVec
Matrix subtraction distributes over vector multiplication: (A - B) *ᵥ x = A *ᵥ x - B *ᵥ x.
dotProduct_sub
The dot product distributes over vector subtraction: u ⬝ᵥ (v - w) = u ⬝ᵥ v - u ⬝ᵥ w.
Complex.ext
Two complex numbers are equal if and only if their real and imaginary parts are equal.
Matrix.ext
Two matrices are equal if and only if all corresponding entries are equal.
Matrix.posSemidef_self_mul_conjTranspose
For any matrix A, the product A * Aᴴ is positive semidefinite.
in767_rankoneproof_hidden_model_parent
Given a decomposition P = ∑ t, Q t into positive semidefinite operators and coordinate probabilities p(j, t) ∈ [0, 1], the mixture of product weights produces a valid positive joint parent for ∑ t, p(j, t) • Q t.
in767_rankoneproof_rank_one_parent
For any three effects M j and projection P with rank P ≤ 1, there exists a positive joint parent G summing to P whose marginals equal P * M j * P.

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 falseprivate lemma in767_rankoneproof_projection_eigenvalues (P : Matrix (Fin 3) (Fin 3) ℂ)    (hP : P.IsHermitian) (hPP : P*P=P) (k : Fin 3) :    hP.eigenvalues k = 0 ∨ hP.eigenvalues k = 1 := by  let v : Fin 3 → ℂ := ⇑(hP.eigenvectorBasis k)  have hv : v ≠ 0 := by    intro h    apply hP.eigenvectorBasis.orthonormal.ne_zero k    apply WithLp.ofLp_injective 2    exact h  have he : P *ᵥ v = (hP.eigenvalues k : ℂ) • v := by    simpa [RCLike.real_smul_eq_coe_smul] using hP.mulVec_eigenvectorBasis k  have hh : (hP.eigenvalues k : ℂ) • ((hP.eigenvalues k : ℂ) • v) =      (hP.eigenvalues k : ℂ) • v := by    calc      _ = P *ᵥ (P *ᵥ v) := by rw [he, Matrix.mulVec_smul, he]      _ = (P*P) *ᵥ v := Matrix.mulVec_mulVec v P P      _ = P *ᵥ v := by rw [hPP]      _ = _ := he  obtain ⟨i,hi⟩ := Function.ne_iff.mp hv  have hi' : v i ≠ 0 := by simpa using hi  have hcoord := congrFun hh i  simp only [Pi.smul_apply, smul_eq_mul] at hcoord  have hz : ((hP.eigenvalues k : ℂ)^2 - (hP.eigenvalues k : ℂ)) * v i = 0 := by    linear_combination hcoord  have heval : (hP.eigenvalues k : ℝ)^2 - hP.eigenvalues k = 0 := by    have h := (mul_eq_zero.mp hz).resolve_right hi'    exact_mod_cast h  have hfactor : hP.eigenvalues k * (hP.eigenvalues k - 1)=0 := by nlinarith [heval]  rcases mul_eq_zero.mp hfactor with h | h  · exact Or.inl h  · exact Or.inr (sub_eq_zero.mp h)private lemma in767_rankoneproof_projection_rank_isometry    (k : ℕ) (P : Matrix (Fin 3) (Fin 3) ℂ) (hP : P.IsHermitian) (hPP : P*P=P) (hRank : P.rank=k) :    ∃ U : Matrix (Fin 3) (Fin k) ℂ, Uᴴ*U=1 ∧ U*Uᴴ=P := by  classical  let I := {k : Fin 3 // hP.eigenvalues k ≠ 0}  have hcard : Fintype.card I = k := by    change Fintype.card {k : Fin 3 // hP.eigenvalues k ≠ 0} = k    rw [← hP.rank_eq_card_non_zero_eigs]    exact hRank  let e : Fin k ≃ I := Fintype.equivOfCardEq (by simp [hcard])  let V : Matrix (Fin 3) (Fin 3) ℂ := hP.eigenvectorUnitary  let U : Matrix (Fin 3) (Fin k) ℂ := fun i j => V i (e j).val  have hV : Vᴴ*V=1 := by    have hh := Unitary.coe_star_mul_self hP.eigenvectorUnitary    simpa [V, Matrix.star_eq_conjTranspose] using hh  have hU : Uᴴ*U=1 := by    ext i j    have hh := congrArg (fun M : Matrix (Fin 3) (Fin 3) ℂ => M (e i).val (e j).val) hV    have heq : (e i).val = (e j).val ↔ i=j := by      constructor      · intro h        exact e.injective (Subtype.ext h)      · rintro rfl        rfl    simpa [U, Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.one_apply, heq] using hh  have hspec : P = V * Matrix.diagonal (fun k => (hP.eigenvalues k : ℂ)) * Vᴴ := by    have hh := hP.spectral_theorem    simpa [V, Unitary.conjStarAlgAut_apply, Matrix.star_eq_conjTranspose, Function.comp_def] using hh  have heig (k : Fin 3) : hP.eigenvalues k = 0 ∨ hP.eigenvalues k = 1 :=    in767_rankoneproof_projection_eigenvalues P hP hPP k  have hterm (i j k : Fin 3) :      V i k * (hP.eigenvalues k : ℂ) * star (V j k) =      if hP.eigenvalues k ≠ 0 then V i k * star (V j k) else 0 := by    rcases heig k with h | h <;> simp [h]  have hsub (i j : Fin 3) :      (∑ k : Fin 3, if hP.eigenvalues k ≠ 0 then V i k * star (V j k) else 0) =      ∑ k : I, V i k.val * star (V j k.val) := by    rw [← Finset.sum_filter]    exact Finset.sum_subtype (Finset.univ.filter fun k : Fin 3 => hP.eigenvalues k ≠ 0) (by simp) _  have hUU : U*Uᴴ=P := by    ext i j    have hh := congrArg (fun M : Matrix (Fin 3) (Fin 3) ℂ => M i j) hspec    rw [Matrix.mul_apply] at hh    simp only [Matrix.mul_diagonal, Matrix.conjTranspose_apply] at hh    simp_rw [hterm] at hh    rw [hsub] at hh    have he := e.sum_comp (fun k : I => V i k.val * star (V j k.val))    change (∑ k : Fin k, V i (e k).val * star (V j (e k).val)) = P i j    rw [he]    exact hh.symm  exact ⟨U,hU,hUU⟩private noncomputable def in767_rankoneproof_probability_weight (p : Fin 3 → ℝ) (s : Fin 3 → Bool) : ℝ :=  ∏ j, if s j then p j else 1-p jprivate lemma in767_rankoneproof_probability_weight_nonneg (p : Fin 3 → ℝ)    (hp : ∀ j, 0 ≤ p j ∧ p j ≤ 1) (s : Fin 3 → Bool) :    0 ≤ in767_rankoneproof_probability_weight p s := by  apply Finset.prod_nonneg  intro j hj  split <;> linarith [hp j]private lemma in767_rankoneproof_probability_weight_sum (p : Fin 3 → ℝ) :    (∑ s : Fin 3 → Bool, in767_rankoneproof_probability_weight p s) = 1 := by  have hh := Finset.sum_prod_piFinset (ι := Fin 3) (Finset.univ : Finset Bool)    (fun j b => if b then p j else 1-p j)  simp only [Fintype.piFinset_univ] at hh  simpa [in767_rankoneproof_probability_weight, Fintype.sum_bool] using hhprivate lemma in767_rankoneproof_probability_weight_marginal (p : Fin 3 → ℝ) (j : Fin 3) :    (∑ s : Fin 3 → Bool, if s j then in767_rankoneproof_probability_weight p s else 0) = p j := by  let f : Fin 3 → Bool → ℝ := fun i b => if i=j then if b then p i else 0 else if b then p i else 1-p i  have hprod (s : Fin 3 → Bool) : (∏ i, f i (s i)) =      if s j then in767_rankoneproof_probability_weight p s else 0 := by    fin_cases j <;> cases h0 : s 0 <;> cases h1 : s 1 <;> cases h2 : s 2 <;>      simp [f, in767_rankoneproof_probability_weight, Fin.prod_univ_three, h0,h1,h2]  have hh := Finset.sum_prod_piFinset (ι := Fin 3) (Finset.univ : Finset Bool) f  simp only [Fintype.piFinset_univ] at hh  simp_rw [hprod] at hh  fin_cases j <;> simp [f, Fintype.sum_bool, Fin.prod_univ_three] at hh ⊢ <;> linarithprivate lemma in767_rankoneproof_hidden_model_parent    (n m : ℕ) (Q : Fin m → Matrix (Fin n) (Fin n) ℂ)    (p : Fin 3 → Fin m → ℝ) (P : Matrix (Fin n) (Fin n) ℂ)    (hQ : ∀ t, (Q t).PosSemidef) (hsum : (∑ t, Q t)=P)    (hp : ∀ j t, 0 ≤ p j t ∧ p j t ≤ 1) :    ∃ G : (Fin 3 → Bool) → Matrix (Fin n) (Fin n) ℂ,      (∀ s, (G s).PosSemidef) ∧ (∑ s, G s) = P ∧      ∀ j : Fin 3, (∑ s, if s j then G s else 0) = ∑ t, (p j t) • Q t := by  let G : (Fin 3 → Bool) → Matrix (Fin n) (Fin n) ℂ := fun s =>    ∑ t, in767_rankoneproof_probability_weight (fun j => p j t) s • Q t  refine ⟨G, ?_, ?_, ?_⟩  · intro s    change (∑ t, in767_rankoneproof_probability_weight (fun j => p j t) s • Q t).PosSemidef    have H (T : Finset (Fin m)) : (∑ t ∈ T, in767_rankoneproof_probability_weight (fun j => p j t) s • Q t).PosSemidef := by      induction T using Finset.induction_on with      | empty => simpa using (Matrix.PosSemidef.zero : (0 : Matrix (Fin n) (Fin n) ℂ).PosSemidef)      | @insert t T ht ih =>        rw [Finset.sum_insert ht]        exact ((hQ t).smul (in767_rankoneproof_probability_weight_nonneg _ (fun j => hp j t) s)).add ih    exact H Finset.univ  · change (∑ s, ∑ t, in767_rankoneproof_probability_weight (fun j => p j t) s • Q t) = P    rw [Finset.sum_comm]    calc      (∑ t, ∑ s, in767_rankoneproof_probability_weight (fun j => p j t) s • Q t) =          ∑ t, (∑ s, in767_rankoneproof_probability_weight (fun j => p j t) s) • Q t := by simp [Finset.sum_smul]      _ = ∑ t, Q t := by simp [in767_rankoneproof_probability_weight_sum]      _ = P := hsum  · intro j    change (∑ s, if s j then (∑ t, in767_rankoneproof_probability_weight (fun k => p k t) s • Q t) else 0) = _    have heq (s : Fin 3 → Bool) :        (if s j then (∑ t, in767_rankoneproof_probability_weight (fun k => p k t) s • Q t) else 0) =        ∑ t, (if s j then in767_rankoneproof_probability_weight (fun k => p k t) s else 0) • Q t := by      cases hs : s j <;> simp [hs]    simp_rw [heq]    rw [Finset.sum_comm]    calc      (∑ t, ∑ s, (if s j then in767_rankoneproof_probability_weight (fun k => p k t) s else 0) • Q t) =          ∑ t, (∑ s, if s j then in767_rankoneproof_probability_weight (fun k => p k t) s else 0) • Q t := by simp [Finset.sum_smul]      _ = ∑ t, (p j t) • Q t := by simp [in767_rankoneproof_probability_weight_marginal]private lemma in767_rankoneproof_rank_one_parent (M : Fin 3 → Matrix (Fin 3) (Fin 3) ℂ)    (P : Matrix (Fin 3) (Fin 3) ℂ)    (hM : ∀ j, (M j).PosSemidef ∧ (1 - M j).PosSemidef)    (hP : P.IsHermitian) (hPP : P*P=P) (hr : P.rank ≤ 1) :    ∃ G : (Fin 3 → Bool) → Matrix (Fin 3) (Fin 3) ℂ,      (∀ s, (G s).PosSemidef) ∧ (∑ s, G s) = P ∧      ∀ j : Fin 3, (∑ s, if s j then G s else 0) = P * M j * P := by  classical  rcases Nat.eq_zero_or_pos P.rank with hzero | hpos  · obtain ⟨U,hU,hUU⟩ := in767_rankoneproof_projection_rank_isometry 0 P hP hPP hzero    have hPzero : P=0 := by      rw [← hUU]      ext i j      simp [Matrix.mul_apply]    refine ⟨fun _ => 0, ?_, ?_, ?_⟩    · intro s      exact Matrix.PosSemidef.zero    · simp [hPzero]    · intro j      simp [hPzero]  · have hrank : P.rank=1 := by omega    obtain ⟨U,hU,hUU⟩ := in767_rankoneproof_projection_rank_isometry 1 P hP hPP hrank    let v : Fin 3 → ℂ := fun i => U i 0    have hv : star v ⬝ᵥ v = 1 := by      have hh := congrArg (fun A : Matrix (Fin 1) (Fin 1) ℂ => A 0 0) hU      simpa [v, Matrix.mul_apply, Matrix.conjTranspose_apply, dotProduct] using hh    have hPvv : P = Matrix.vecMulVec v (star v) := by      rw [← hUU]      ext i j      simp [v, Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.vecMulVec_apply]    let p : Fin 3 → Fin 1 → ℝ := fun j _ => (star v ⬝ᵥ (M j *ᵥ v)).re    have hp (j : Fin 3) (t : Fin 1) : 0 ≤ p j t ∧ p j t ≤ 1 := by      have ha := (hM j).1.dotProduct_mulVec_nonneg v      have hb := (hM j).2.dotProduct_mulVec_nonneg v      have ha' := (Complex.nonneg_iff.mp ha).1      have hb' := (Complex.nonneg_iff.mp hb).1      have hb'' : (star v ⬝ᵥ ((1 - M j) *ᵥ v)).re =          1 - (star v ⬝ᵥ (M j *ᵥ v)).re := by        simp [Matrix.sub_mulVec, dotProduct_sub, hv]      dsimp [p]      constructor      · exact ha'      · rw [hb''] at hb'        linarith    have hp_eq (j : Fin 3) : ((p j 0 : ℝ) : ℂ) = star v ⬝ᵥ (M j *ᵥ v) := by      have ha := (hM j).1.dotProduct_mulVec_nonneg v      have ha' := (Complex.nonneg_iff.mp ha).2      apply Complex.ext <;> simp [p, ha']    have houter (j : Fin 3) : P * M j * P = (p j 0) • P := by      rw [hPvv]      apply Matrix.ext      intro i k      simp only [Matrix.smul_apply, Complex.real_smul, hp_eq]      simp [Matrix.mul_apply, Matrix.vecMulVec_apply, dotProduct, Matrix.mulVec,        Fin.sum_univ_three, Pi.star_apply]      ring    have hPpos : P.PosSemidef := by      rw [← hUU]      exact Matrix.posSemidef_self_mul_conjTranspose U    obtain ⟨G,hG,hGsum,hGmarg⟩ := in767_rankoneproof_hidden_model_parent 3 1 (fun _ => P) p P      (fun _ => hPpos) (by simp) hp    refine ⟨G,hG,hGsum,?_⟩    intro j    rw [hGmarg j]    simpa using (houter j).symmtheorem rank_one_qutrit_compression_three_binary_parent :  ∀ (M : Fin 3 → Matrix (Fin 3) (Fin 3) ℂ) (P : Matrix (Fin 3) (Fin 3) ℂ),    (∀ j, (M j).PosSemidef ∧ (1-M j).PosSemidef) →    P.IsHermitian → P*P=P → P.rank ≤ 1 →    ∃ G : (Fin 3 → Bool) → Matrix (Fin 3) (Fin 3) ℂ,      (∀ s, (G s).PosSemidef) ∧ (∑ s, G s) = P ∧      ∀ j : Fin 3, (∑ s, if s j then G s else 0) = P*M j*P := by  exact in767_rankoneproof_rank_one_parent
See it in the graphDiscuss this resultChallenge it