AFTD Auto-Formalizing Theoretical Domains

ppt_qutrit_bell_source_full_rank_on_every_plane

theoremverified

The contraction of the four source vectors has full qutrit row rank for some vector in each complex two-plane.

Statement

theorem ppt_qutrit_bell_source_full_rank_on_every_plane :
  ∀ U : Matrix (Fin 3) (Fin 2) ℂ, Uᴴ * U = 1 →
    ∃ x : Fin 2 → ℂ,
      let z : Fin 3 → ℂ := U.mulVec x
      let K : Matrix (Fin 3) (Fin 4) ℂ := fun a l =>
        ∑ b : Fin 3, ppt_qutrit_bell_vector l (a,b) * z b
      K.rank = 3
Source
Source-specific rank helper for OP-693, using https://arxiv.org/abs/1405.4502.
Verified
12 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
Used by 1

The proof, explained

To show that the 3 × 4 contraction matrix K(z) of the four PPT Bell vectors has full row rank (rank 3) for some vector in any complex two-plane, the proof analyzes two 3 × 3 minors of K(z). Their determinants are proportional to homogeneous cubics q(z) = x(x² - 3y²) and p(z) = x²y + (10α/3)x²z + y³ - (10α/3)y²z - yz²/18. The argument then proves that these two cubics cannot vanish simultaneously on any two-plane: if q vanishes identically, the plane must satisfy x = k y with k ∈ {0, ±√3}, and then selecting a point on the plane with y = 1 and z = 0 forces p to evaluate to k² + 1 ≠ 0, a contradiction. Thus every plane contains a vector where at least one minor is non-zero, ensuring K(z) has full rank 3.

  1. The columns of a 3 × 2 complex isometry U are linearly independent.

    Left-multiplying the equation U *ᵥ x = U *ᵥ y by Uᴴ and using Uᴴ * U = 1 shows that multiplication by U is injective. By `Matrix.mulVec_injective_iff.mp`, this injectivity is equivalent to linear independence of the column vectors of U.

    lines 7–16

    uses Matrix.mulVec_mulVec, Matrix.one_mulVec, Matrix.mulVec_injective_iff.mp

      have hinj : Function.Injective U.mulVec := by
        intro x y h
        have hh := congrArg (fun v => Uᴴ *ᵥ v) h
        simpa only [Matrix.mulVec_mulVec, hU, Matrix.one_mulVec] using hh
      have hcol := Matrix.mulVec_injective_iff.mp hinj
      have heq : ![(fun i => U i 0),(fun i => U i 1)] = U.col := by
        funext j i
        fin_cases j <;> rfl
      rw [heq]
      exact hcol
  2. For any vector z ∈ ℂ³, the contraction matrix K(z) matches the explicit 3 × 4 matrix formula. automation

    By extensionality over the row and column indices, the equality is verified component by component. Unfolding the definition of the PPT Bell vectors and expanding the sum over the three components with `Fin.sum_univ_three`, each entry simplifies to the claimed coordinate expression via ring arithmetic.

    lines 23–25

    uses Fin.sum_univ_three

      ext i l
      fin_cases i <;> fin_cases l <;>
        simp [ppt_qutrit_bell_vector, Fin.sum_univ_three] <;> ring
  3. The 3 × 3 minors of K(z) on columns {0, 1, 2} and {0, 1, 3} are proportional to the cubics q(z) = z₀(z₀² - 3z₁²) and p(z) = z₀²z₁ + (10α/3)z₀²z₂ + z₁³ - (10α/3)z₁²z₂ - z₁z₂²/18, respectively. automation

    Using the explicit matrix representation from `in767_rankproof_contraction_explicit`, the determinants of the two 3 × 3 submatrices are expanded via `Matrix.det_fin_three` and reduce by algebraic computation to the stated factored forms.

    lines 35–37

    uses in767_rankproof_contraction_explicit, Matrix.det_fin_three

      dsimp only
      rw [in767_rankproof_contraction_explicit]
      constructor <;> simp [Matrix.det_fin_three, Matrix.submatrix_apply] <;> ring
  4. If two linearly independent vectors u, v ∈ ℂ³ satisfy u₀ = k u₁ and v₀ = k v₁ for some scalar k, then the 2 × 2 minor u₁ v₂ - u₂ v₁ is non-zero.

    Suppose for contradiction that u₁ v₂ - u₂ v₁ = 0. The linear combination v₁ • u - u₁ • v vanishes in all three coordinates: coordinate 0 vanishes because u₀ = k u₁ and v₀ = k v₁, coordinate 1 vanishes identically, and coordinate 2 vanishes by assumption. Linear independence of u and v via `LinearIndependent.pair_iff.mp` forces v₁ = 0 and u₁ = 0. Consequently, the combination v₂ • u - u₂ • v also vanishes in all coordinates, forcing v₂ = 0 and u₂ = 0. This implies u = 0, which contradicts the linear independence of u and v.

    lines 44–74

    uses LinearIndependent.pair_iff.mp

      intro hd
      have hpair := LinearIndependent.pair_iff.mp hli
      have hz1 : (v 1) • u + (-u 1) • v = 0 := by
        ext i
        fin_cases i <;> simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul, Pi.zero_apply]
        · change v 1 * u 0 + (-u 1) * v 0 = 0
          rw [hu, hv]; ring
        · change v 1 * u 1 + (-u 1) * v 1 = 0
          ring
        · change v 1 * u 2 + (-u 1) * v 2 = 0
          linear_combination -hd
      have hfirst := hpair (v 1) (-u 1) hz1
      have hv1 : v 1=0 := hfirst.1
      have hu1 : u 1=0 := by simpa using hfirst.2
      have hz2 : (v 2) • u + (-u 2) • v = 0 := by
        ext i
        fin_cases i <;> simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul, Pi.zero_apply]
        · change v 2 * u 0 + (-u 2) * v 0 = 0
          rw [hu, hv, hu1, hv1]; ring
        · change v 2 * u 1 + (-u 2) * v 1 = 0
          rw [hu1, hv1]; ring
        · change v 2 * u 2 + (-u 2) * v 2 = 0
          ring
      have hsecond := hpair (v 2) (-u 2) hz2
      have hv2 : v 2=0 := hsecond.1
      have hu2 : u 2=0 := by simpa using hsecond.2
      have hz3 : (1 : ℂ) • u + (0 : ℂ) • v = 0 := by
        ext i
        fin_cases i <;> simp [hu, hu1, hu2]
      have := hpair 1 0 hz3
      norm_num at this
  5. If both cubics q and p vanish everywhere on the two-plane spanned by independent vectors u and v, then u₀ = k u₁ and v₀ = k v₁ for some k with k = 0 or k² = 3.

    Assume for contradiction that both cubics vanish on the plane. Setting s = √3 (with s² = 3 by `Real.sq_sqrt`), the cubic factors as x(x - sy)(x + sy). Restricting to the affine line u + t v, the coordinate functions X_p(t) and Y_p(t) are polynomials in t. The polynomial X_p(X_p - s Y_p)(X_p + s Y_p) vanishes at all evaluation points t ∈ ℂ, hence is the zero polynomial by `Polynomial.funext`. Since the polynomial ring over ℂ has no zero divisors, one of the three linear factors must vanish identically. Evaluating at t = 0 and t = 1 yields u₀ = k u₁ and v₀ = k v₁ with k ∈ {0, s, -s}, so k = 0 or k² = 3.

    lines 84–127

    uses Real.sq_sqrt, Polynomial.funext

      by_contra hcontra
      dsimp only at hcontra
      push_neg at hcontra
      let s : ℂ := Real.sqrt 3
      have hs : s*s=3 := by
        dsimp [s]
        have hh : (Real.sqrt 3)^2 = 3 := Real.sq_sqrt (by norm_num)
        have hh' : (Real.sqrt 3 : ℂ)^2 = (3 : ℂ) := by exact_mod_cast hh
        simpa [pow_two] using hh'
      have hfact (x y : ℂ) : x*(x-s*y)*(x+s*y)=x*(x*x-3*y*y) := by
        linear_combination (-x*y*y) * hs
      let Xp : Polynomial ℂ := C (u 0) + X * C (v 0)
      let Yp : Polynomial ℂ := C (u 1) + X * C (v 1)
      have hpoly : Xp * (Xp - C s * Yp) * (Xp + C s * Yp) = 0 := by
        apply Polynomial.funext
        intro t
        have hq := (hcontra 1 t).1
        simp only [one_mul] at hq
        simp only [Polynomial.eval_mul, Polynomial.eval_sub, Polynomial.eval_add,
          Polynomial.eval_C, Polynomial.eval_X, Polynomial.eval_zero, Xp, Yp]
        rw [hfact]
        exact hq
      have hlin : Xp = 0 ∨ Xp - C s * Yp = 0 ∨ Xp + C s * Yp = 0 := by
        rcases mul_eq_zero.mp hpoly with h | h
        · exact mul_eq_zero.mp h |>.imp_right Or.inl
        · exact Or.inr (Or.inr h)
      have hplane : ∃ k : ℂ, u 0 = k*u 1 ∧ v 0 = k*v 1 ∧ (k=0 ∨ k*k=3) := by
        rcases hlin with h | h | h
        · have h0 := congrArg (fun P : Polynomial ℂ => P.eval 0) h
          have h1 := congrArg (fun P : Polynomial ℂ => P.eval 1) h
          simp [Xp] at h0 h1
          refine ⟨0, by simpa using h0, ?_, Or.inl rfl⟩
          simpa [h0] using h1
        · have h0 := congrArg (fun P : Polynomial ℂ => P.eval 0) h
          have h1 := congrArg (fun P : Polynomial ℂ => P.eval 1) h
          simp [Xp, Yp] at h0 h1
          refine ⟨s, by linear_combination h0, ?_, Or.inr hs⟩
          linear_combination h1 - h0
        · have h0 := congrArg (fun P : Polynomial ℂ => P.eval 0) h
          have h1 := congrArg (fun P : Polynomial ℂ => P.eval 1) h
          simp [Xp, Yp] at h0 h1
          refine ⟨-s, by linear_combination h0, ?_, Or.inr ?_⟩
          · linear_combination h1 - h0
          · linear_combination hs
  6. The cubics q and p cannot vanish simultaneously on any complex two-plane.

    Since u₀ = k u₁ and v₀ = k v₁, Lemma `in767_rankproof_plane_yz_det_ne_zero` guarantees D = u₁ v₂ - u₂ v₁ ≠ 0. We can therefore choose linear combination coefficients c = v₂/D and d = -u₂/D so that the resulting vector has y = c u₁ + d v₁ = 1 and z = c u₂ + d v₂ = 0, which forces x = c u₀ + d v₀ = k y = k. Evaluating the cubic p at (k, 1, 0) yields k² + 1 = 0. But k = 0 gives 1 = 0 and k² = 3 gives 4 = 0, both of which are contradictions in ℂ.

    lines 128–151

    uses in767_rankproof_plane_yz_det_ne_zero

      obtain ⟨k, hu, hv, hk⟩ := hplane
      let D : ℂ := u 1*v 2-u 2*v 1
      have hD : D ≠ 0 := in767_rankproof_plane_yz_det_ne_zero u v k hu hv hli
      let c : ℂ := v 2 / D
      let d : ℂ := -u 2 / D
      have hy : c*u 1 + d*v 1 = 1 := by
        dsimp [c,d]
        field_simp [hD]
        dsimp [D]
        ring
      have hz : c*u 2 + d*v 2 = 0 := by
        dsimp [c,d]
        field_simp [hD]
        dsimp [D]
        ring
      have hx : c*u 0 + d*v 0 = k := by
        rw [hu,hv]
        linear_combination k*hy
      have hp := (hcontra c d).2
      rw [hx,hy,hz] at hp
      rcases hk with rfl | hk
      · norm_num at hp
      · have hh : (4 : ℂ) = 0 := by linear_combination hp - hk
        norm_num at hh
  7. For any 3 × 2 isometry U, there is a vector x ∈ ℂ² such that the contraction matrix K(U *ᵥ x) has rank 3.

    The columns u, v of U are linearly independent by `in767_rankproof_isometry_cols_independent`. By `in767_rankproof_cubic_pair_no_common_plane`, there exists x = [c, d]ᵀ such that z = U *ᵥ x satisfies q(z) ≠ 0 or p(z) ≠ 0. By `in767_rankproof_contraction_minors`, this implies that either the {0, 1, 2} minor or the {0, 1, 3} minor of K(z) has non-zero determinant. By `Matrix.rank_of_det_ne_zero`, that 3 × 3 submatrix has rank 3. Since submatrix rank lower-bounds matrix rank (`Matrix.rank_submatrix_le`) and K has 3 rows (`Matrix.rank_le_card_height`), the rank of K(z) must be exactly 3.

    lines 160–197

    uses in767_rankproof_isometry_cols_independent, in767_rankproof_cubic_pair_no_common_plane, in767_rankproof_contraction_minors, Matrix.rank_le_card_height, Matrix.rank_of_det_ne_zero, Matrix.rank_submatrix_le

      let u : Fin 3 → ℂ := fun i => U i 0
      let v : Fin 3 → ℂ := fun i => U i 1
      let α : ℂ := (Real.sqrt (131/2 : ℝ) : ℂ)/12
      have hli : LinearIndependent ℂ ![u,v] := in767_rankproof_isometry_cols_independent U hU
      obtain ⟨c,d,h⟩ := in767_rankproof_cubic_pair_no_common_plane ((10/3 : ℂ)*α) u v hli
      let x : Fin 2 → ℂ := ![c,d]
      let z : Fin 3 → ℂ := U.mulVec x
      have hz (i : Fin 3) : z i = c*u i+d*v i := by
        simp [z, x, u, v, Matrix.mulVec, dotProduct, Fin.sum_univ_two, mul_comm]
      dsimp only at h
      rw [← hz 0, ← hz 1, ← hz 2] at h
      let K : Matrix (Fin 3) (Fin 4) ℂ := fun a l => ∑ b : Fin 3, ppt_qutrit_bell_vector l (a,b) * z b
      have h2r : Real.sqrt (2 : ℝ) ≠ 0 := ne_of_gt (Real.sqrt_pos.2 (by norm_num))
      have h3r : Real.sqrt (3 : ℝ) ≠ 0 := ne_of_gt (Real.sqrt_pos.2 (by norm_num))
      have har : Real.sqrt (131/2 : ℝ) ≠ 0 := ne_of_gt (Real.sqrt_pos.2 (by norm_num))
      have h2 : (Real.sqrt 2 : ℂ) ≠ 0 := by exact_mod_cast h2r
      have h3 : (Real.sqrt 3 : ℂ) ≠ 0 := by exact_mod_cast h3r
      have ha : α ≠ 0 := by dsimp [α]; exact div_ne_zero (by exact_mod_cast har) (by norm_num)
      have hminor := in767_rankproof_contraction_minors z
      change (K.submatrix id ![0,1,2]).det = _ ∧ (K.submatrix id ![0,1,3]).det = _ at hminor
      refine ⟨x, ?_⟩
      change K.rank = 3
      have hheight : K.rank ≤ 3 := by simpa using Matrix.rank_le_card_height K
      rcases h with hq | hp
      · have hdet : (K.submatrix id ![0,1,2]).det ≠ 0 := by
          rw [hminor.1]
          exact mul_ne_zero (mul_ne_zero (mul_ne_zero (inv_ne_zero h2) ha) (by norm_num)) hq
        have hfull : (K.submatrix id ![0,1,2]).rank = 3 := by
          simpa using Matrix.rank_of_det_ne_zero hdet
        have hle := Matrix.rank_submatrix_le K id ![0,1,2]
        omega
      · have hdet : (K.submatrix id ![0,1,3]).det ≠ 0 := by
          rw [hminor.2]
          exact mul_ne_zero (mul_ne_zero (mul_ne_zero (inv_ne_zero h2) (inv_ne_zero h3)) (by norm_num)) hp
        have hfull : (K.submatrix id ![0,1,3]).rank = 3 := by
          simpa using Matrix.rank_of_det_ne_zero hdet
        have hle := Matrix.rank_submatrix_le K id ![0,1,3]
        omega
  8. The contraction of the four source vectors has full row rank 3 for some vector in every complex two-plane.

    Given an isometry U representing the complex two-plane, applying `in767_rankproof_source_full_rank_on_plane` directly produces the required vector x and witnesses the rank condition.

    lines 206–207

    uses in767_rankproof_source_full_rank_on_plane

      intro U hU
      exact in767_rankproof_source_full_rank_on_plane U hU
Matrix.mulVec_mulVec
Matrix-vector multiplication is associative: M *ᵥ (N *ᵥ v) = (M * N) *ᵥ v.
Matrix.one_mulVec
The identity matrix acts as the identity on vectors: 1 *ᵥ v = v.
Matrix.mulVec_injective_iff.mp
If matrix-vector multiplication by M is injective, then the columns of M are linearly independent.
Fin.sum_univ_three
A sum over Fin 3 expands to f 0 + f 1 + f 2.
in767_rankproof_contraction_explicit
For any z ∈ ℂ³, the contraction of the four PPT Bell vectors against z equals the explicit 3 × 4 matrix given in coordinates.
Matrix.det_fin_three
The determinant of a 3 × 3 matrix equals the standard alternating sum of six products of its entries.
LinearIndependent.pair_iff.mp
If a pair of vectors ![u, v] is linearly independent, then s • u + t • v = 0 implies s = 0 and t = 0.
Real.sq_sqrt
For non-negative real x, (√x)² = x.
Polynomial.funext
Two polynomials over an infinite domain that evaluate to the same value everywhere are equal.
in767_rankproof_plane_yz_det_ne_zero
If two linearly independent vectors u, v ∈ ℂ³ satisfy u 0 = k * u 1 and v 0 = k * v 1, then the minor u 1 * v 2 - u 2 * v 1 is non-zero.
in767_rankproof_isometry_cols_independent
The two column vectors of a 3 × 2 complex isometry U (satisfying Uᴴ * U = 1) are linearly independent.
in767_rankproof_cubic_pair_no_common_plane
On the two-plane spanned by two linearly independent vectors u, v ∈ ℂ³, the cubics x*(x² - 3y²) and x²y + a x²z + y³ - a y²z - y z² / 18 do not vanish simultaneously everywhere.
in767_rankproof_contraction_minors
The 3 × 3 minors on columns {0, 1, 2} and {0, 1, 3} of the contraction matrix K(z) are proportional to the cubics q(z) and p(z), respectively, with non-zero scalar factors.
Matrix.rank_le_card_height
The rank of an m × n matrix is bounded above by the cardinality of its row index type m.
Matrix.rank_of_det_ne_zero
A square matrix over an integral domain with non-zero determinant has full rank equal to its dimension.
Matrix.rank_submatrix_le
The rank of any submatrix of A is at most the rank of A.
in767_rankproof_source_full_rank_on_plane
For any 3 × 2 complex isometry U, there exists x ∈ ℂ² such that the contraction matrix K(U *ᵥ x) has rank 3.

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 Matrix Polynomialopen scoped BigOperators Matrix ComplexOrderset_option backward.isDefEq.respectTransparency falseset_option linter.unusedSimpArgs falseprivate lemma in767_rankproof_isometry_cols_independent (U : Matrix (Fin 3) (Fin 2) ℂ) (hU : Uᴴ*U=1) :    LinearIndependent ℂ ![(fun i => U i 0),(fun i => U i 1)] := by  have hinj : Function.Injective U.mulVec := by    intro x y h    have hh := congrArg (fun v => Uᴴ *ᵥ v) h    simpa only [Matrix.mulVec_mulVec, hU, Matrix.one_mulVec] using hh  have hcol := Matrix.mulVec_injective_iff.mp hinj  have heq : ![(fun i => U i 0),(fun i => U i 1)] = U.col := by    funext j i    fin_cases j <;> rfl  rw [heq]  exact hcolprivate lemma in767_rankproof_contraction_explicit (z : Fin 3 → ℂ) :    (fun (a : Fin 3) (l : Fin 4) => ∑ b : Fin 3, ppt_qutrit_bell_vector l (a,b) * z b) =    !![(Real.sqrt 2 : ℂ)⁻¹*z 0, ((Real.sqrt (131/2 : ℝ) : ℂ)/12)*z 1+z 2/60, ((Real.sqrt (131/2 : ℝ) : ℂ)/12)*z 0, -(Real.sqrt 3 : ℂ)⁻¹*z 1;       (Real.sqrt 2 : ℂ)⁻¹*z 1, ((Real.sqrt (131/2 : ℝ) : ℂ)/12)*z 0, -((Real.sqrt (131/2 : ℝ) : ℂ)/12)*z 1+z 2/60, (Real.sqrt 3 : ℂ)⁻¹*z 0;       0, -(3/10 : ℂ)*z 1, (3/10 : ℂ)*z 0, (Real.sqrt 3 : ℂ)⁻¹*z 2] := by  ext i l  fin_cases i <;> fin_cases l <;>    simp [ppt_qutrit_bell_vector, Fin.sum_univ_three] <;> ringprivate lemma in767_rankproof_contraction_minors (z : Fin 3 → ℂ) :    let K : Matrix (Fin 3) (Fin 4) ℂ := fun a l => ∑ b : Fin 3, ppt_qutrit_bell_vector l (a,b) * z b    let α : ℂ := ((Real.sqrt (131/2 : ℝ) : ℂ)/12)    let q : ℂ := z 0 * (z 0*z 0 - 3*z 1*z 1)    let p : ℂ := z 0*z 0*z 1 + ((10/3 : ℂ)*α)*z 0*z 0*z 2 + z 1*z 1*z 1 -      ((10/3 : ℂ)*α)*z 1*z 1*z 2 - z 1*z 2*z 2/18    (K.submatrix id ![0,1,2]).det = ((Real.sqrt 2 : ℂ)⁻¹)*α*(3/10)*q ∧    (K.submatrix id ![0,1,3]).det = ((Real.sqrt 2 : ℂ)⁻¹)*((Real.sqrt 3 : ℂ)⁻¹)*(3/10)*p := by  dsimp only  rw [in767_rankproof_contraction_explicit]  constructor <;> simp [Matrix.det_fin_three, Matrix.submatrix_apply] <;> ringprivate lemma in767_rankproof_plane_yz_det_ne_zero    (u v : Fin 3 → ℂ) (k : ℂ)    (hu : u 0 = k*u 1) (hv : v 0 = k*v 1)    (hli : LinearIndependent ℂ ![u,v]) : u 1 * v 2 - u 2 * v 1 ≠ 0 := by  intro hd  have hpair := LinearIndependent.pair_iff.mp hli  have hz1 : (v 1) • u + (-u 1) • v = 0 := by    ext i    fin_cases i <;> simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul, Pi.zero_apply]    · change v 1 * u 0 + (-u 1) * v 0 = 0      rw [hu, hv]; ring    · change v 1 * u 1 + (-u 1) * v 1 = 0      ring    · change v 1 * u 2 + (-u 1) * v 2 = 0      linear_combination -hd  have hfirst := hpair (v 1) (-u 1) hz1  have hv1 : v 1=0 := hfirst.1  have hu1 : u 1=0 := by simpa using hfirst.2  have hz2 : (v 2) • u + (-u 2) • v = 0 := by    ext i    fin_cases i <;> simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul, Pi.zero_apply]    · change v 2 * u 0 + (-u 2) * v 0 = 0      rw [hu, hv, hu1, hv1]; ring    · change v 2 * u 1 + (-u 2) * v 1 = 0      rw [hu1, hv1]; ring    · change v 2 * u 2 + (-u 2) * v 2 = 0      ring  have hsecond := hpair (v 2) (-u 2) hz2  have hv2 : v 2=0 := hsecond.1  have hu2 : u 2=0 := by simpa using hsecond.2  have hz3 : (1 : ℂ) • u + (0 : ℂ) • v = 0 := by    ext i    fin_cases i <;> simp [hu, hu1, hu2]  have := hpair 1 0 hz3  norm_num at thisprivate lemma in767_rankproof_cubic_pair_no_common_plane    (a : ℂ) (u v : Fin 3 → ℂ) (hli : LinearIndependent ℂ ![u, v]) :    ∃ c d : ℂ,      let x := c*u 0+d*v 0      let y := c*u 1+d*v 1      let z := c*u 2+d*v 2      x*(x*x-3*y*y) ≠ 0 ∨        x*x*y + a*x*x*z + y*y*y - a*y*y*z - y*z*z/18 ≠ 0 := by  by_contra hcontra  dsimp only at hcontra  push_neg at hcontra  let s : ℂ := Real.sqrt 3  have hs : s*s=3 := by    dsimp [s]    have hh : (Real.sqrt 3)^2 = 3 := Real.sq_sqrt (by norm_num)    have hh' : (Real.sqrt 3 : ℂ)^2 = (3 : ℂ) := by exact_mod_cast hh    simpa [pow_two] using hh'  have hfact (x y : ℂ) : x*(x-s*y)*(x+s*y)=x*(x*x-3*y*y) := by    linear_combination (-x*y*y) * hs  let Xp : Polynomial ℂ := C (u 0) + X * C (v 0)  let Yp : Polynomial ℂ := C (u 1) + X * C (v 1)  have hpoly : Xp * (Xp - C s * Yp) * (Xp + C s * Yp) = 0 := by    apply Polynomial.funext    intro t    have hq := (hcontra 1 t).1    simp only [one_mul] at hq    simp only [Polynomial.eval_mul, Polynomial.eval_sub, Polynomial.eval_add,      Polynomial.eval_C, Polynomial.eval_X, Polynomial.eval_zero, Xp, Yp]    rw [hfact]    exact hq  have hlin : Xp = 0 ∨ Xp - C s * Yp = 0 ∨ Xp + C s * Yp = 0 := by    rcases mul_eq_zero.mp hpoly with h | h    · exact mul_eq_zero.mp h |>.imp_right Or.inl    · exact Or.inr (Or.inr h)  have hplane : ∃ k : ℂ, u 0 = k*u 1 ∧ v 0 = k*v 1 ∧ (k=0 ∨ k*k=3) := by    rcases hlin with h | h | h    · have h0 := congrArg (fun P : Polynomial ℂ => P.eval 0) h      have h1 := congrArg (fun P : Polynomial ℂ => P.eval 1) h      simp [Xp] at h0 h1      refine ⟨0, by simpa using h0, ?_, Or.inl rfl⟩      simpa [h0] using h1    · have h0 := congrArg (fun P : Polynomial ℂ => P.eval 0) h      have h1 := congrArg (fun P : Polynomial ℂ => P.eval 1) h      simp [Xp, Yp] at h0 h1      refine ⟨s, by linear_combination h0, ?_, Or.inr hs⟩      linear_combination h1 - h0    · have h0 := congrArg (fun P : Polynomial ℂ => P.eval 0) h      have h1 := congrArg (fun P : Polynomial ℂ => P.eval 1) h      simp [Xp, Yp] at h0 h1      refine ⟨-s, by linear_combination h0, ?_, Or.inr ?_⟩      · linear_combination h1 - h0      · linear_combination hs  obtain ⟨k, hu, hv, hk⟩ := hplane  let D : ℂ := u 1*v 2-u 2*v 1  have hD : D ≠ 0 := in767_rankproof_plane_yz_det_ne_zero u v k hu hv hli  let c : ℂ := v 2 / D  let d : ℂ := -u 2 / D  have hy : c*u 1 + d*v 1 = 1 := by    dsimp [c,d]    field_simp [hD]    dsimp [D]    ring  have hz : c*u 2 + d*v 2 = 0 := by    dsimp [c,d]    field_simp [hD]    dsimp [D]    ring  have hx : c*u 0 + d*v 0 = k := by    rw [hu,hv]    linear_combination k*hy  have hp := (hcontra c d).2  rw [hx,hy,hz] at hp  rcases hk with rfl | hk  · norm_num at hp  · have hh : (4 : ℂ) = 0 := by linear_combination hp - hk    norm_num at hhprivate lemma in767_rankproof_source_full_rank_on_plane (U : Matrix (Fin 3) (Fin 2) ℂ) (hU : Uᴴ*U=1) :    ∃ x : Fin 2 → ℂ,      let z : Fin 3 → ℂ := U.mulVec x      let K : Matrix (Fin 3) (Fin 4) ℂ := fun a l =>        ∑ b : Fin 3, ppt_qutrit_bell_vector l (a,b) * z b      K.rank = 3 := by  let u : Fin 3 → ℂ := fun i => U i 0  let v : Fin 3 → ℂ := fun i => U i 1  let α : ℂ := (Real.sqrt (131/2 : ℝ) : ℂ)/12  have hli : LinearIndependent ℂ ![u,v] := in767_rankproof_isometry_cols_independent U hU  obtain ⟨c,d,h⟩ := in767_rankproof_cubic_pair_no_common_plane ((10/3 : ℂ)*α) u v hli  let x : Fin 2 → ℂ := ![c,d]  let z : Fin 3 → ℂ := U.mulVec x  have hz (i : Fin 3) : z i = c*u i+d*v i := by    simp [z, x, u, v, Matrix.mulVec, dotProduct, Fin.sum_univ_two, mul_comm]  dsimp only at h  rw [← hz 0, ← hz 1, ← hz 2] at h  let K : Matrix (Fin 3) (Fin 4) ℂ := fun a l => ∑ b : Fin 3, ppt_qutrit_bell_vector l (a,b) * z b  have h2r : Real.sqrt (2 : ℝ) ≠ 0 := ne_of_gt (Real.sqrt_pos.2 (by norm_num))  have h3r : Real.sqrt (3 : ℝ) ≠ 0 := ne_of_gt (Real.sqrt_pos.2 (by norm_num))  have har : Real.sqrt (131/2 : ℝ) ≠ 0 := ne_of_gt (Real.sqrt_pos.2 (by norm_num))  have h2 : (Real.sqrt 2 : ℂ) ≠ 0 := by exact_mod_cast h2r  have h3 : (Real.sqrt 3 : ℂ) ≠ 0 := by exact_mod_cast h3r  have ha : α ≠ 0 := by dsimp [α]; exact div_ne_zero (by exact_mod_cast har) (by norm_num)  have hminor := in767_rankproof_contraction_minors z  change (K.submatrix id ![0,1,2]).det = _ ∧ (K.submatrix id ![0,1,3]).det = _ at hminor  refine ⟨x, ?_⟩  change K.rank = 3  have hheight : K.rank ≤ 3 := by simpa using Matrix.rank_le_card_height K  rcases h with hq | hp  · have hdet : (K.submatrix id ![0,1,2]).det ≠ 0 := by      rw [hminor.1]      exact mul_ne_zero (mul_ne_zero (mul_ne_zero (inv_ne_zero h2) ha) (by norm_num)) hq    have hfull : (K.submatrix id ![0,1,2]).rank = 3 := by      simpa using Matrix.rank_of_det_ne_zero hdet    have hle := Matrix.rank_submatrix_le K id ![0,1,2]    omega  · have hdet : (K.submatrix id ![0,1,3]).det ≠ 0 := by      rw [hminor.2]      exact mul_ne_zero (mul_ne_zero (mul_ne_zero (inv_ne_zero h2) (inv_ne_zero h3)) (by norm_num)) hp    have hfull : (K.submatrix id ![0,1,3]).rank = 3 := by      simpa using Matrix.rank_of_det_ne_zero hdet    have hle := Matrix.rank_submatrix_le K id ![0,1,3]    omegatheorem ppt_qutrit_bell_source_full_rank_on_every_plane :  ∀ U : Matrix (Fin 3) (Fin 2) ℂ, Uᴴ * U = 1 →    ∃ x : Fin 2 → ℂ,      let z : Fin 3 → ℂ := U.mulVec x      let K : Matrix (Fin 3) (Fin 4) ℂ := fun a l =>        ∑ b : Fin 3, ppt_qutrit_bell_vector l (a,b) * z b      K.rank = 3 := by  intro U hU  exact in767_rankproof_source_full_rank_on_plane U hU
See it in the graphDiscuss this resultChallenge it