rank_four_ppt_normal_completion_phase
Two independent real vectors in dimension three admit a phase rotation that makes the normal-completion equation solvable.
Statement
theorem rank_four_ppt_normal_completion_phase : ∀ (R S : Matrix (Fin 3) (Fin 3) ℝ) (x y : Fin 3 → ℝ), LinearIndependent ℝ ![x, y] → ∃ c s a b : ℝ, c*c + s*s = 1 ∧ ∀ i : Fin 3, (R.mulVec (fun j => s*x j + c*y j)) i - (S.mulVec (fun j => c*x j - s*y j)) i + b*(c*x i - s*y i) - a*(s*x i + c*y i) = 0
- Source
- Helper for OP-693, using the rank-four PPT source from https://arxiv.org/abs/1405.4502 and the normal-completion context https://arxiv.org/abs/0903.0090.
- Verified
- 12 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Used by 3
- rank_four_ppt_block_four_product_decompositionA normalized 3-by-2 rank-four partial-transpose-invariant positive block has a four-term real-qutrit product decomposition.
- ppt_qutrit_steered_effect_all_proper_subspaces_compatibleEvery proper subspace compression of the three normalized steered effects has a joint parent.
- open_problem_693_three_dim_fewer_than_nineThere exists a natural number k strictly less than 9 such that has_subspace_compatible_incompatible_family 3 k holds, meaning there is a…
The proof, explained
Two linearly independent vectors x, y in ℝ³ define an oriented plane with non-zero normal vector n = x ⨯₃ y. Any phase rotation (c, s) on the unit circle preserves this normal: (c x - s y) ⨯₃ (s x + c y) = n. The vector v = R(s x + c y) - S(c x - s y) depends linearly on (c, s), so its projection along n takes the form c A + s B; choosing (c, s) orthogonal to (A, B) forces v ⬝ᵥ n = 0. Since v is orthogonal to the normal of the non-degenerate plane, Cramer's rule in coordinates guarantees that v lies in the span of the rotated vectors, solving the normal-completion equation.
Given three coordinates with a non-zero 2×2 minor and satisfying the coplanarity relation, there exist coefficients a and b solving the linear system in all three coordinates.
Let D = xᵢ yⱼ - xⱼ yᵢ ≠ 0 be the 2×2 determinant. Choosing a = (xᵢ vⱼ - xⱼ vᵢ)/D and b = (yᵢ vⱼ - yⱼ vᵢ)/D by Cramer's rule solves the equations for coordinates i and j by direct ring operations. Multiplying the equation for coordinate k by D reproduces the coplanarity hypothesis, which vanishes by linear combination.
let D : ℝ := xi*yj-xj*yi have hD : D ≠ 0 := hd refine ⟨(xi*vj-xj*vi)/D, (yi*vj-yj*vi)/D, ?_, ?_, ?_⟩ · field_simp [hD] dsimp [D] ring · field_simp [hD] dsimp [D] ring · field_simp [hD] dsimp [D] linear_combination hv
The orthogonality condition v ⬝ᵥ (X ⨯₃ Y) = 0 expands in coordinates as v₀(X₁ Y₂ - X₂ Y₁) + v₁(X₂ Y₀ - X₀ Y₂) + v₂(X₀ Y₁ - X₁ Y₀) = 0.
Expanding the definitions of the dot product and cross product over Fin 3 expresses the geometric orthogonality as an explicit coordinate sum.
uses
dotProduct,cross_apply,Fin.sum_univ_threehave hv : v 0*(X 1*Y 2-X 2*Y 1) + v 1*(X 2*Y 0-X 0*Y 2) + v 2*(X 0*Y 1-X 1*Y 0)=0 := by simpa [dotProduct, cross_apply, Fin.sum_univ_three] using hdot
If the zeroth component of X ⨯₃ Y is non-zero, there exist coefficients a and b such that v + b X - a Y = 0.
Since X ⨯₃ Y ≠ 0, some coordinate is non-zero. When (X ⨯₃ Y)₀ = X₁ Y₂ - X₂ Y₁ ≠ 0, applying in767_phaseproof_solve_three_coordinates to the coordinate permutation (1, 2, 0) produces the coefficients a and b satisfying the vector relation for all coordinates.
uses
Function.ne_iff.mp,cross_apply,in767_phaseproof_solve_three_coordinatesobtain ⟨i, hi⟩ := Function.ne_iff.mp hn fin_cases i · change (X ⨯₃ Y) 0 ≠ 0 at hi have hd : X 1*Y 2-X 2*Y 1 ≠ 0 := by simpa [cross_apply] using hi obtain ⟨a,b,h1,h2,h0⟩ := in767_phaseproof_solve_three_coordinates (X 1) (X 2) (X 0) (Y 1) (Y 2) (Y 0) (v 1) (v 2) (v 0) hd hv refine ⟨a,b,?_⟩ intro i fin_cases i <;> assumption
If the first component of X ⨯₃ Y is non-zero, there exist coefficients a and b such that v + b X - a Y = 0.
When (X ⨯₃ Y)₁ = X₂ Y₀ - X₀ Y₂ ≠ 0, cyclically permuting the coplanarity relation and applying in767_phaseproof_solve_three_coordinates to coordinates (2, 0, 1) yields the coefficients a and b.
uses
cross_apply,in767_phaseproof_solve_three_coordinates· change (X ⨯₃ Y) 1 ≠ 0 at hi have hd : X 2*Y 0-X 0*Y 2 ≠ 0 := by simpa [cross_apply] using hi have hv' : v 1*(X 2*Y 0-X 0*Y 2) + v 2*(X 0*Y 1-X 1*Y 0) + v 0*(X 1*Y 2-X 2*Y 1)=0 := by linear_combination hv obtain ⟨a,b,h2,h0,h1⟩ := in767_phaseproof_solve_three_coordinates (X 2) (X 0) (X 1) (Y 2) (Y 0) (Y 1) (v 2) (v 0) (v 1) hd hv' refine ⟨a,b,?_⟩ intro i fin_cases i <;> assumption
If the second component of X ⨯₃ Y is non-zero, there exist coefficients a and b such that v + b X - a Y = 0.
When (X ⨯₃ Y)₂ = X₀ Y₁ - X₁ Y₀ ≠ 0, cyclically permuting the coplanarity relation and applying in767_phaseproof_solve_three_coordinates to coordinates (0, 1, 2) yields the coefficients a and b, completing the proof that v lies in the plane spanned by X and Y.
uses
cross_apply,in767_phaseproof_solve_three_coordinates· change (X ⨯₃ Y) 2 ≠ 0 at hi have hd : X 0*Y 1-X 1*Y 0 ≠ 0 := by simpa [cross_apply] using hi have hv' : v 2*(X 0*Y 1-X 1*Y 0) + v 0*(X 1*Y 2-X 2*Y 1) + v 1*(X 2*Y 0-X 0*Y 2)=0 := by linear_combination hv obtain ⟨a,b,h0,h1,h2⟩ := in767_phaseproof_solve_three_coordinates (X 0) (X 1) (X 2) (Y 0) (Y 1) (Y 2) (v 0) (v 1) (v 2) hd hv' refine ⟨a,b,?_⟩ intro i fin_cases i <;> assumption
If A = 0 and B = 0, the point (c, s) = (1, 0) lies on the unit circle and satisfies c A + s B = 0.
Setting c = 1 and s = 0 gives 1² + 0² = 1 and 1 · 0 + 0 · 0 = 0 by direct computation.
by_cases h : A=0 ∧ B=0 · refine ⟨1,0,by norm_num,?_⟩ rcases h with ⟨rfl,rfl⟩ norm_num
If (A, B) ≠ (0, 0), the normalized orthogonal vector (c, s) = (B/d, -A/d) with d = √(A² + B²) lies on the unit circle and satisfies c A + s B = 0.
Since A and B are not both zero, A² + B² > 0 by non-negativity of squares (sq_nonneg). Its square root d = √(A² + B²) is strictly positive (ne_of_gt) and satisfies d² = A² + B² (Real.sq_sqrt, le_of_lt). Setting c = B/d and s = -A/d satisfies c² + s² = (B² + A²)/d² = 1 and c A + s B = (B A - A B)/d = 0.
uses
sq_nonneg,ne_of_gt,Real.sq_sqrt,le_of_lt· have hpos : 0 < A*A+B*B := by have hnonneg : 0 ≤ A*A+B*B := by nlinarith [sq_nonneg A, sq_nonneg B] by_contra hn have ha : A=0 := by nlinarith [sq_nonneg A, sq_nonneg B] have hb : B=0 := by nlinarith [sq_nonneg A, sq_nonneg B] exact h ⟨ha,hb⟩ let d : ℝ := Real.sqrt (A*A+B*B) have hd : d ≠ 0 := ne_of_gt (Real.sqrt_pos.2 hpos) have hs : d*d = A*A+B*B := by dsimp [d] nlinarith [Real.sq_sqrt (le_of_lt hpos)] refine ⟨B/d, -A/d, ?_, ?_⟩ · field_simp [hd] nlinarith [hs] · field_simp [hd] ring
The normal vector n = x ⨯₃ y is non-zero, and there exists a unit phase (c, s) orthogonal to the linear projection coefficients A and B.
Since x and y are linearly independent, their cross product n = x ⨯₃ y is non-zero (crossProduct_ne_zero_iff_linearIndependent.mpr). Defining A = (R y - S x) ⬝ᵥ n and B = (R x + S y) ⬝ᵥ n, in767_phaseproof_unit_circle_orthogonal provides c, s ∈ ℝ with c² + s² = 1 such that c A + s B = 0.
uses
crossProduct_ne_zero_iff_linearIndependent.mpr,in767_phaseproof_unit_circle_orthogonallet n : Fin 3 → ℝ := x ⨯₃ y have hn : n ≠ 0 := crossProduct_ne_zero_iff_linearIndependent.mpr hli let A : ℝ := (fun i => (R.mulVec y) i-(S.mulVec x) i) ⬝ᵥ n let B : ℝ := (fun i => (R.mulVec x) i+(S.mulVec y) i) ⬝ᵥ n obtain ⟨c,s,hunit,horth⟩ := in767_phaseproof_unit_circle_orthogonal A B
The phase-rotated vectors X = c x - s y and Y = s x + c y satisfy X ⨯₃ Y = n.
Expanding the cross product coordinate-wise shows X ⨯₃ Y = (c² + s²)(x ⨯₃ y) using cross_apply. Because c² + s² = 1, this simplifies to X ⨯₃ Y = n.
uses
cross_applylet X : Fin 3 → ℝ := fun i => c*x i-s*y i let Y : Fin 3 → ℝ := fun i => s*x i+c*y i let v : Fin 3 → ℝ := fun i => (R.mulVec Y) i-(S.mulVec X) i have hcross' : X ⨯₃ Y = (c*c+s*s) • (x ⨯₃ y) := by ext i fin_cases i <;> simp [cross_apply, X, Y] <;> ring have hcross : X ⨯₃ Y = n := by simpa [hunit, n] using hcross'
The difference vector v = R Y - S X is orthogonal to X ⨯₃ Y, and X ⨯₃ Y is non-zero.
Expanding v ⬝ᵥ n using matrix-vector multiplication and dot product definitions shows v ⬝ᵥ n = c A + s B (Matrix.mulVec, dotProduct, Fin.sum_univ_three). Since c A + s B = 0 and X ⨯₃ Y = n ≠ 0, it follows that v ⬝ᵥ (X ⨯₃ Y) = 0.
uses
Matrix.mulVec,dotProduct,Fin.sum_univ_threehave hdot' : v ⬝ᵥ n = c*A+s*B := by simp [v, X, Y, A, B, Matrix.mulVec, dotProduct, Fin.sum_univ_three] ring have hdot : v ⬝ᵥ (X ⨯₃ Y) = 0 := by rw [hcross, hdot', horth] have hn' : X ⨯₃ Y ≠ 0 := by rw [hcross]; exact hn
There exist coefficients a and b such that v + b X - a Y = 0, completing the normal-completion equation.
Since X ⨯₃ Y ≠ 0 and v ⬝ᵥ (X ⨯₃ Y) = 0, in767_phaseproof_plane_span_from_cross yields coefficients a, b ∈ ℝ such that v + b X - a Y = 0. Together with the unit phase (c, s), this witnesses the existential statement.
uses
in767_phaseproof_plane_span_from_crossobtain ⟨a,b,hab⟩ := in767_phaseproof_plane_span_from_cross X Y v hn' hdot exact ⟨c,s,a,b,hunit,hab⟩
The main theorem rank_four_ppt_normal_completion_phase holds.
Introducing the matrices R, S, vectors x, y, and the linear independence hypothesis, the conclusion follows directly from in767_phaseproof_phase_completion.
uses
in767_phaseproof_phase_completionintro R S x y hli exact in767_phaseproof_phase_completion R S x y hli
dotProduct- The standard dot product of two vectors, defined as the sum of coordinate-wise products.
cross_apply- The coordinate formula for the cross product of two 3-dimensional vectors.
Fin.sum_univ_three- The sum of a function over the three-element index type Fin 3 equals the sum of its values at 0, 1, and 2.
Function.ne_iff.mp- Two functions (or vectors) are unequal if and only if they differ at some coordinate.
in767_phaseproof_solve_three_coordinates- If a 2×2 coordinate determinant is non-zero and the coplanarity condition holds, there exist coefficients a and b solving the 3-coordinate linear system.
sq_nonneg- The square of any real number is non-negative.
ne_of_gt- A strictly greater element is not equal to the smaller element.
Real.sq_sqrt- The square of the square root of a non-negative real number x equals x.
le_of_lt- Strict inequality implies non-strict inequality.
crossProduct_ne_zero_iff_linearIndependent.mpr- Two linearly independent vectors in dimension 3 have a non-zero cross product.
in767_phaseproof_unit_circle_orthogonal- For any real numbers A and B, there exists a unit vector (c, s) on the unit circle orthogonal to (A, B).
Matrix.mulVec- Matrix-vector multiplication, yielding the transformed vector.
in767_phaseproof_plane_span_from_cross- If the cross product X ⨯₃ Y is non-zero and v is orthogonal to X ⨯₃ Y, then v lies in the linear span of X and Y.
in767_phaseproof_phase_completion- Given two 3×3 matrices and two linearly independent 3D vectors, there exists a unit phase rotation (c, s) and plane coefficients (a, b) satisfying the normal-completion equation.
- In the Lean proof, the case analysis on which component of X ⨯₃ Y is non-zero (lines 31–57) explicitly duplicates the argument for coordinates 0, 1, and 2, whereas on paper one would simply pick a non-zero coordinate without loss of generality.
- Verification of Cramer's rule identities and the expansion of rotated cross products and dot products relies on `ring` and `simp`.
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 BigOperators Matrix ComplexOrderset_option backward.isDefEq.respectTransparency falseset_option maxRecDepth 8192set_option linter.unusedSimpArgs falseprivate lemma in767_phaseproof_solve_three_coordinates (xi xj xk yi yj yk vi vj vk : ℝ) (hd : xi*yj-xj*yi ≠ 0) (hv : vk*(xi*yj-xj*yi)+vi*(xj*yk-xk*yj)+vj*(xk*yi-xi*yk)=0) : ∃ a b : ℝ, vi+b*xi-a*yi=0 ∧ vj+b*xj-a*yj=0 ∧ vk+b*xk-a*yk=0 := by let D : ℝ := xi*yj-xj*yi have hD : D ≠ 0 := hd refine ⟨(xi*vj-xj*vi)/D, (yi*vj-yj*vi)/D, ?_, ?_, ?_⟩ · field_simp [hD] dsimp [D] ring · field_simp [hD] dsimp [D] ring · field_simp [hD] dsimp [D] linear_combination hvprivate lemma in767_phaseproof_plane_span_from_cross (X Y v : Fin 3 → ℝ) (hn : (X ⨯₃ Y) ≠ 0) (hdot : v ⬝ᵥ (X ⨯₃ Y) = 0) : ∃ a b : ℝ, ∀ i : Fin 3, v i + b*X i-a*Y i = 0 := by have hv : v 0*(X 1*Y 2-X 2*Y 1) + v 1*(X 2*Y 0-X 0*Y 2) + v 2*(X 0*Y 1-X 1*Y 0)=0 := by simpa [dotProduct, cross_apply, Fin.sum_univ_three] using hdot obtain ⟨i, hi⟩ := Function.ne_iff.mp hn fin_cases i · change (X ⨯₃ Y) 0 ≠ 0 at hi have hd : X 1*Y 2-X 2*Y 1 ≠ 0 := by simpa [cross_apply] using hi obtain ⟨a,b,h1,h2,h0⟩ := in767_phaseproof_solve_three_coordinates (X 1) (X 2) (X 0) (Y 1) (Y 2) (Y 0) (v 1) (v 2) (v 0) hd hv refine ⟨a,b,?_⟩ intro i fin_cases i <;> assumption · change (X ⨯₃ Y) 1 ≠ 0 at hi have hd : X 2*Y 0-X 0*Y 2 ≠ 0 := by simpa [cross_apply] using hi have hv' : v 1*(X 2*Y 0-X 0*Y 2) + v 2*(X 0*Y 1-X 1*Y 0) + v 0*(X 1*Y 2-X 2*Y 1)=0 := by linear_combination hv obtain ⟨a,b,h2,h0,h1⟩ := in767_phaseproof_solve_three_coordinates (X 2) (X 0) (X 1) (Y 2) (Y 0) (Y 1) (v 2) (v 0) (v 1) hd hv' refine ⟨a,b,?_⟩ intro i fin_cases i <;> assumption · change (X ⨯₃ Y) 2 ≠ 0 at hi have hd : X 0*Y 1-X 1*Y 0 ≠ 0 := by simpa [cross_apply] using hi have hv' : v 2*(X 0*Y 1-X 1*Y 0) + v 0*(X 1*Y 2-X 2*Y 1) + v 1*(X 2*Y 0-X 0*Y 2)=0 := by linear_combination hv obtain ⟨a,b,h0,h1,h2⟩ := in767_phaseproof_solve_three_coordinates (X 0) (X 1) (X 2) (Y 0) (Y 1) (Y 2) (v 0) (v 1) (v 2) hd hv' refine ⟨a,b,?_⟩ intro i fin_cases i <;> assumptionprivate lemma in767_phaseproof_unit_circle_orthogonal (A B : ℝ) : ∃ c s : ℝ, c*c+s*s=1 ∧ c*A+s*B=0 := by by_cases h : A=0 ∧ B=0 · refine ⟨1,0,by norm_num,?_⟩ rcases h with ⟨rfl,rfl⟩ norm_num · have hpos : 0 < A*A+B*B := by have hnonneg : 0 ≤ A*A+B*B := by nlinarith [sq_nonneg A, sq_nonneg B] by_contra hn have ha : A=0 := by nlinarith [sq_nonneg A, sq_nonneg B] have hb : B=0 := by nlinarith [sq_nonneg A, sq_nonneg B] exact h ⟨ha,hb⟩ let d : ℝ := Real.sqrt (A*A+B*B) have hd : d ≠ 0 := ne_of_gt (Real.sqrt_pos.2 hpos) have hs : d*d = A*A+B*B := by dsimp [d] nlinarith [Real.sq_sqrt (le_of_lt hpos)] refine ⟨B/d, -A/d, ?_, ?_⟩ · field_simp [hd] nlinarith [hs] · field_simp [hd] ringprivate lemma in767_phaseproof_phase_completion (R S : Matrix (Fin 3) (Fin 3) ℝ) (x y : Fin 3 → ℝ) (hli : LinearIndependent ℝ ![x,y]) : ∃ c s a b : ℝ, c*c+s*s=1 ∧ ∀ i : Fin 3, (R.mulVec (fun j => s*x j+c*y j)) i - (S.mulVec (fun j => c*x j-s*y j)) i + b*(c*x i-s*y i)-a*(s*x i+c*y i)=0 := by let n : Fin 3 → ℝ := x ⨯₃ y have hn : n ≠ 0 := crossProduct_ne_zero_iff_linearIndependent.mpr hli let A : ℝ := (fun i => (R.mulVec y) i-(S.mulVec x) i) ⬝ᵥ n let B : ℝ := (fun i => (R.mulVec x) i+(S.mulVec y) i) ⬝ᵥ n obtain ⟨c,s,hunit,horth⟩ := in767_phaseproof_unit_circle_orthogonal A B let X : Fin 3 → ℝ := fun i => c*x i-s*y i let Y : Fin 3 → ℝ := fun i => s*x i+c*y i let v : Fin 3 → ℝ := fun i => (R.mulVec Y) i-(S.mulVec X) i have hcross' : X ⨯₃ Y = (c*c+s*s) • (x ⨯₃ y) := by ext i fin_cases i <;> simp [cross_apply, X, Y] <;> ring have hcross : X ⨯₃ Y = n := by simpa [hunit, n] using hcross' have hdot' : v ⬝ᵥ n = c*A+s*B := by simp [v, X, Y, A, B, Matrix.mulVec, dotProduct, Fin.sum_univ_three] ring have hdot : v ⬝ᵥ (X ⨯₃ Y) = 0 := by rw [hcross, hdot', horth] have hn' : X ⨯₃ Y ≠ 0 := by rw [hcross]; exact hn obtain ⟨a,b,hab⟩ := in767_phaseproof_plane_span_from_cross X Y v hn' hdot exact ⟨c,s,a,b,hunit,hab⟩theorem rank_four_ppt_normal_completion_phase : ∀ (R S : Matrix (Fin 3) (Fin 3) ℝ) (x y : Fin 3 → ℝ), LinearIndependent ℝ ![x, y] → ∃ c s a b : ℝ, c*c + s*s = 1 ∧ ∀ i : Fin 3, (R.mulVec (fun j => s*x j + c*y j)) i - (S.mulVec (fun j => c*x j - s*y j)) i + b*(c*x i - s*y i) - a*(s*x i + c*y i) = 0 := by intro R S x y hli exact in767_phaseproof_phase_completion R S x y hli