AFTD Auto-Formalizing Theoretical Domains

three_qubit_singular_pair_form_gives_degeneracy

theoremverified

If any of the three pair-correlation matrices is singular, the parallel-correlation hypothesis has unit-vector witnesses.

Statement

theorem three_qubit_singular_pair_form_gives_degeneracy
    (A B C : Matrix (Fin 3) (Fin 3) ℝ) :
    let dot := fun (a b : Fin 3 → ℝ) => ∑ i, a i * b i
    let pair := fun (M : Matrix (Fin 3) (Fin 3) ℝ) (a b : Fin 3 → ℝ) =>
      ∑ i, ∑ j, a i * M i j * b j
    (A.det = 0 ∨ B.det = 0 ∨ C.det = 0) →
    ∃ (a b n : Fin 3 → ℝ) (r s : ℝ),
      dot a a = 1 ∧ dot b b = 1 ∧ dot n n = 1 ∧ pair A a b = 0 ∧
      (∀ j, (∑ i, a i * B i j) = r * n j) ∧
      (∀ j, (∑ i, b i * C i j) = s * n j)
Source
Filed by the prover as a step towards another result
Verified
15 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1

The proof, explained

The theorem proves that whenever any of the three 3x3 pair-correlation matrices A, B, C is singular, the parallel-correlation condition admits unit-vector witnesses. The proof divides into two cases depending on whether det C = 0. When det C = 0, a unit vector in the left kernel of C makes b C = 0, and pairing it with a unit vector orthogonal to A b directly produces the desired degeneracy. When det C ≠ 0, either A or B is singular, whose left kernel yields an isotropic unit vector for a four-index form q, reducing the statement to the non-singular isotropic theorem.

  1. There exists a non-zero vector in the kernel of M.

    The linear map associated to M has determinant 0 because its matrix representation is M, whose determinant is zero by assumption. Since the space is finite-dimensional, a linear map with zero determinant has a non-trivial kernel, from which a non-zero vector v can be selected.

    lines 4–10

    uses LinearMap.det_toMatrix', LinearMap.toMatrix'_toLin', LinearMap.det_eq_zero_iff_ker_ne_bot.mp, Submodule.exists_mem_ne_zero_of_ne_bot, Matrix.toLin'_apply, LinearMap.mem_ker.mp

      have hdet : LinearMap.det (Matrix.toLin' M) = 0 := by
        rw [← LinearMap.det_toMatrix' (Matrix.toLin' M), LinearMap.toMatrix'_toLin', hM]
      have hker : (Matrix.toLin' M).ker ≠ ⊥ := LinearMap.det_eq_zero_iff_ker_ne_bot.mp hdet
      obtain ⟨v, hv_ker, hv_ne⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hker
      have hv_eq : M.mulVec v = 0 := by
        rw [← Matrix.toLin'_apply]
        exact LinearMap.mem_ker.mp hv_ker
  2. There exists a unit vector u such that M u = 0.

    Normalizing the non-zero kernel vector v by the reciprocal of its Euclidean norm yields a unit vector u. By the linearity of matrix-vector multiplication, M u = c (M v) = c · 0 = 0.

    lines 11–18

    uses three_qubit_isotropic_pair_form_gives_degeneracy_dotProduct_normalize, Matrix.mulVec_smul, smul_zero

      let c := (Real.sqrt (v ⬝ᵥ v))⁻¹
      let u := c • v
      have hu_unit : (∑ i, u i * u i) = 1 :=
        three_qubit_isotropic_pair_form_gives_degeneracy_dotProduct_normalize hv_ne
      have hu_eq : M.mulVec u = 0 := by
        dsimp [u]
        rw [Matrix.mulVec_smul, hv_eq, smul_zero]
      exact ⟨u, hu_unit, hu_eq⟩
  3. For any 3x3 matrix M with determinant zero, there exists a unit vector v such that v M = 0.

    The transpose Mᵀ has the same determinant as M, so det(Mᵀ) = 0. Applying the previous lemma to Mᵀ yields a unit vector v such that Mᵀ v = 0, which transposes to v M = 0.

    lines 23–28

    uses Matrix.det_transpose, three_qubit_singular_pair_form_gives_degeneracy_exists_unit_mulVec_eq_zero, Matrix.mulVec_transpose

      have hdet : M.transpose.det = 0 := by rw [Matrix.det_transpose, hM]
      obtain ⟨v, hv_unit, hv_eq⟩ :=
        three_qubit_singular_pair_form_gives_degeneracy_exists_unit_mulVec_eq_zero M.transpose hdet
      refine ⟨v, hv_unit, ?_⟩
      rw [← Matrix.mulVec_transpose]
      exact hv_eq
  4. If (A b) · a = 0, the bilinear form ∑ a_i A_ij b_j is zero.

    The bilinear form can be expressed as the dot product (a A) · b = a · (A b) = (A b) · a, which vanishes by the orthogonality hypothesis.

    lines 34–37

    uses three_qubit_isotropic_pair_form_gives_degeneracy_pair_eq_dot, Matrix.dotProduct_mulVec, dotProduct_comm

      rw [three_qubit_isotropic_pair_form_gives_degeneracy_pair_eq_dot,
          ← Matrix.dotProduct_mulVec,
          dotProduct_comm,
          h]
  5. The zero vector can be expressed as 0 · n for a unit vector n. automation

    When u = 0, choosing n = (1, 0, 0) gives a unit vector, and setting r = 0 satisfies u = 0 = 0 · n for all coordinates.

    lines 41–46

    uses Fin.sum_univ_three

      by_cases hu : u = 0
      · refine ⟨![1, 0, 0], 0, ?_, ?_⟩
        · simp [Fin.sum_univ_three]
        · intro j
          rw [hu]
          simp
  6. Any non-zero vector u can be written as r · n for a scalar r and unit vector n.

    Because u is non-zero, its Euclidean norm r = √(u · u) is strictly positive and non-zero. The normalized vector n = r⁻¹ u is a unit vector, and multiplying by r yields r · n_j = r (r⁻¹ u_j) = u_j.

    lines 47–57

    uses three_qubit_isotropic_pair_form_gives_degeneracy_dotProduct_pos_of_ne_zero, ne_of_gt, Real.sqrt_pos.mpr, three_qubit_isotropic_pair_form_gives_degeneracy_dotProduct_normalize, mul_assoc, mul_inv_cancel₀, one_mul

      · have hu_pos : 0 < u ⬝ᵥ u :=
          three_qubit_isotropic_pair_form_gives_degeneracy_dotProduct_pos_of_ne_zero hu
        have hu_sqrt_ne : Real.sqrt (u ⬝ᵥ u) ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr hu_pos)
        let cu := (Real.sqrt (u ⬝ᵥ u))⁻¹
        let n := cu • u
        let r := Real.sqrt (u ⬝ᵥ u)
        refine ⟨n, r, ?_, ?_⟩
        · exact three_qubit_isotropic_pair_form_gives_degeneracy_dotProduct_normalize hu
        · intro j
          dsimp [n, cu, r]
          rw [← mul_assoc, mul_inv_cancel₀ hu_sqrt_ne, one_mul]
  7. If a A = 0, then the quadratic form q(a) vanishes.

    The form q(a) equals the dot product of a A with adj(Cᵀ) (a B)ᵀ. Since a A = 0, this dot product is 0 · v = 0.

    lines 65–68

    uses three_qubit_isotropic_pair_form_gives_degeneracy_q_eq_pair, three_qubit_isotropic_pair_form_gives_degeneracy_pair_eq_dot, zero_dotProduct

      dsimp
      rw [three_qubit_isotropic_pair_form_gives_degeneracy_q_eq_pair]
      rw [three_qubit_isotropic_pair_form_gives_degeneracy_pair_eq_dot]
      rw [ha, zero_dotProduct]
  8. If a B = 0, then the quadratic form q(a) vanishes.

    The form q(a) equals (a A) · (adj(Cᵀ) (a B)ᵀ). Because a B = 0, the second vector is adj(Cᵀ) 0 = 0, so the dot product is (a A) · 0 = 0.

    lines 76–81

    uses three_qubit_isotropic_pair_form_gives_degeneracy_q_eq_pair, Matrix.mulVec_zero, three_qubit_isotropic_pair_form_gives_degeneracy_pair_eq_dot, dotProduct_zero

      dsimp
      rw [three_qubit_isotropic_pair_form_gives_degeneracy_q_eq_pair]
      have hv : Matrix.mulVec C.transpose.adjugate (Matrix.vecMul a B) = 0 := by
        rw [ha, Matrix.mulVec_zero]
      rw [three_qubit_isotropic_pair_form_gives_degeneracy_pair_eq_dot]
      rw [hv, dotProduct_zero]
  9. If det C = 0, the parallel-correlation hypothesis has unit-vector witnesses.

    When det C = 0, there is a unit vector b in the left kernel of C, so b C = 0. A unit vector a orthogonal to A b is chosen, ensuring pair(A, a, b) = 0. Then u = a B is factored as r · n for a unit vector n, and setting s = 0 ensures b C = 0 = s · n.

    lines 93–111

    uses three_qubit_singular_pair_form_gives_degeneracy_exists_unit_vecMul_eq_zero, three_qubit_isotropic_pair_form_gives_degeneracy_exists_unit_orthogonal, three_qubit_singular_pair_form_gives_degeneracy_pair_zero_of_orth, three_qubit_singular_pair_form_gives_degeneracy_exists_r_n

      intro dot pair h
      by_cases hC : C.det = 0
      · obtain ⟨b, hb_unit, hb_ker⟩ :=
          three_qubit_singular_pair_form_gives_degeneracy_exists_unit_vecMul_eq_zero C hC
        obtain ⟨a, ha_unit, ha_orth⟩ :=
          three_qubit_isotropic_pair_form_gives_degeneracy_exists_unit_orthogonal (Matrix.mulVec A b)
        have h_pair : pair A a b = 0 :=
          three_qubit_singular_pair_form_gives_degeneracy_pair_zero_of_orth A a b ha_orth
        let u := Matrix.vecMul a B
        obtain ⟨n, r, hn_unit, hr_eq⟩ :=
          three_qubit_singular_pair_form_gives_degeneracy_exists_r_n u
        refine ⟨a, b, n, r, 0, ha_unit, hb_unit, hn_unit, h_pair, ?_, ?_⟩
        · intro j
          have hu_def : (∑ i, a i * B i j) = u j := rfl
          rw [hu_def, hr_eq j]
        · intro j
          have hc_def : (∑ i, b i * C i j) = (Matrix.vecMul b C) j := rfl
          rw [hc_def, hb_ker]
          simp
  10. If det C ≠ 0, there is an isotropic unit vector a with q(a) = 0.

    Given det A = 0 ∨ det B = 0 ∨ det C = 0 and det C ≠ 0, either det A = 0 or det B = 0. A unit vector in the left kernel of A (if det A = 0) or of B (if det B = 0) makes q(a) = 0.

    lines 112–128

    uses Or.inl, Or.inr, False.elim, three_qubit_singular_pair_form_gives_degeneracy_exists_unit_vecMul_eq_zero, three_qubit_singular_pair_form_gives_degeneracy_q_zero_of_vecMul_A_zero, three_qubit_singular_pair_form_gives_degeneracy_q_zero_of_vecMul_B_zero

      · have hAB : A.det = 0 ∨ B.det = 0 := by
          rcases h with hA | hB | hC_eq
          · exact Or.inl hA
          · exact Or.inr hB
          · exact False.elim (hC hC_eq)
        let q := fun (a : Fin 3 → ℝ) =>
          ∑ i, ∑ j, ∑ k, ∑ l, a i * A i j * (C.transpose.adjugate) j k * B l k * a l
        have hq : ∃ a : Fin 3 → ℝ, dot a a = 1 ∧ q a = 0 := by
          rcases hAB with hA | hB
          · obtain ⟨a, ha_unit, ha_ker⟩ :=
              three_qubit_singular_pair_form_gives_degeneracy_exists_unit_vecMul_eq_zero A hA
            exact ⟨a, ha_unit,
              three_qubit_singular_pair_form_gives_degeneracy_q_zero_of_vecMul_A_zero A B C a ha_ker⟩
          · obtain ⟨a, ha_unit, ha_ker⟩ :=
              three_qubit_singular_pair_form_gives_degeneracy_exists_unit_vecMul_eq_zero B hB
            exact ⟨a, ha_unit,
              three_qubit_singular_pair_form_gives_degeneracy_q_zero_of_vecMul_B_zero A B C a ha_ker⟩
  11. If det C ≠ 0, the parallel-correlation hypothesis has unit-vector witnesses.

    Applying the previously established non-singular isotropic reduction theorem with the isotropic unit vector a produces the required witnesses.

    line 129

    uses three_qubit_isotropic_pair_form_gives_degeneracy

        exact three_qubit_isotropic_pair_form_gives_degeneracy A B C hC hq
LinearMap.det_toMatrix'
The determinant of the matrix of an endomorphism equals the determinant of the endomorphism.
LinearMap.toMatrix'_toLin'
Converting a matrix to an endomorphism and taking its matrix returns the original matrix.
LinearMap.det_eq_zero_iff_ker_ne_bot.mp
A linear endomorphism on a finite-dimensional space has determinant zero only if its kernel is non-trivial.
Submodule.exists_mem_ne_zero_of_ne_bot
A non-trivial submodule contains a non-zero vector.
Matrix.toLin'_apply
Evaluating the linear map associated to a matrix at a vector yields the matrix-vector product.
LinearMap.mem_ker.mp
An element of the kernel of a linear map maps to zero.
three_qubit_isotropic_pair_form_gives_degeneracy_dotProduct_normalize
Scaling any non-zero vector by the reciprocal of its Euclidean norm gives a unit vector.
Matrix.mulVec_smul
Matrix-vector multiplication distributes over scalar multiplication: M(c v) = c (M v).
smul_zero
Multiplying any scalar by the zero vector gives the zero vector.
Matrix.det_transpose
The determinant of the transpose of a square matrix equals the determinant of the matrix.
three_qubit_singular_pair_form_gives_degeneracy_exists_unit_mulVec_eq_zero
If a 3x3 matrix has determinant zero, there exists a unit vector v such that M v = 0.
Matrix.mulVec_transpose
Multiplying the transpose of a matrix by a column vector equals multiplying the row vector by the matrix on the left.
three_qubit_isotropic_pair_form_gives_degeneracy_pair_eq_dot
The bilinear form of a matrix evaluated on two vectors equals the dot product of the left vector-matrix product with the right vector.
Matrix.dotProduct_mulVec
The dot product of v with A w equals the dot product of v A with w.
dotProduct_comm
The dot product of two vectors is commutative.
Fin.sum_univ_three
The sum of a function over Fin 3 equals the sum of its values at 0, 1, and 2.
three_qubit_isotropic_pair_form_gives_degeneracy_dotProduct_pos_of_ne_zero
The dot product of any non-zero real vector with itself is strictly positive.
ne_of_gt
If b < a, then a ≠ b.
Real.sqrt_pos.mpr
If a real number is strictly positive, its square root is strictly positive.
mul_assoc
Multiplication is associative: (a * b) * c = a * (b * c).
mul_inv_cancel₀
Multiplying a non-zero element by its multiplicative inverse yields one.
one_mul
Multiplying any element by one leaves it unchanged.
three_qubit_isotropic_pair_form_gives_degeneracy_q_eq_pair
The four-index form q(a) equals the bilinear pair form of A applied to a and the vector adj(Cᵀ) (a B)ᵀ.
zero_dotProduct
The dot product of the zero vector with any vector is zero.
Matrix.mulVec_zero
Multiplying any matrix by the zero vector yields the zero vector.
dotProduct_zero
The dot product of any vector with the zero vector is zero.
three_qubit_singular_pair_form_gives_degeneracy_exists_unit_vecMul_eq_zero
If a 3x3 matrix has determinant zero, there exists a unit vector v such that v M = 0.
three_qubit_isotropic_pair_form_gives_degeneracy_exists_unit_orthogonal
For any vector in ℝ³, there exists an orthogonal unit vector.
three_qubit_singular_pair_form_gives_degeneracy_pair_zero_of_orth
If (A b) · a = 0, then the bilinear pairing ∑ a_i A_ij b_j vanishes.
three_qubit_singular_pair_form_gives_degeneracy_exists_r_n
Any vector in ℝ³ can be decomposed as a scalar multiple of a unit vector.
Or.inl
Proves a disjunction a ∨ b given a proof of a.
Or.inr
Proves a disjunction a ∨ b given a proof of b.
False.elim
From False, any proposition follows.
three_qubit_singular_pair_form_gives_degeneracy_q_zero_of_vecMul_A_zero
If a A = 0, then the quadratic form q(a) vanishes.
three_qubit_singular_pair_form_gives_degeneracy_q_zero_of_vecMul_B_zero
If a B = 0, then the quadratic form q(a) vanishes.
three_qubit_isotropic_pair_form_gives_degeneracy
When det C ≠ 0, an isotropic unit vector for q guarantees unit-vector witnesses for the parallel-correlation hypothesis.

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

lemma three_qubit_singular_pair_form_gives_degeneracy_exists_unit_mulVec_eq_zero    (M : Matrix (Fin 3) (Fin 3) ℝ) (hM : M.det = 0) :    ∃ v : Fin 3 → ℝ, (∑ i, v i * v i) = 1 ∧ M.mulVec v = 0 := by  have hdet : LinearMap.det (Matrix.toLin' M) = 0 := by    rw [← LinearMap.det_toMatrix' (Matrix.toLin' M), LinearMap.toMatrix'_toLin', hM]  have hker : (Matrix.toLin' M).ker ≠ ⊥ := LinearMap.det_eq_zero_iff_ker_ne_bot.mp hdet  obtain ⟨v, hv_ker, hv_ne⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hker  have hv_eq : M.mulVec v = 0 := by    rw [← Matrix.toLin'_apply]    exact LinearMap.mem_ker.mp hv_ker  let c := (Real.sqrt (v ⬝ᵥ v))⁻¹  let u := c • v  have hu_unit : (∑ i, u i * u i) = 1 :=    three_qubit_isotropic_pair_form_gives_degeneracy_dotProduct_normalize hv_ne  have hu_eq : M.mulVec u = 0 := by    dsimp [u]    rw [Matrix.mulVec_smul, hv_eq, smul_zero]  exact ⟨u, hu_unit, hu_eq⟩lemma three_qubit_singular_pair_form_gives_degeneracy_exists_unit_vecMul_eq_zero    (M : Matrix (Fin 3) (Fin 3) ℝ) (hM : M.det = 0) :    ∃ v : Fin 3 → ℝ, (∑ i, v i * v i) = 1 ∧ Matrix.vecMul v M = 0 := by  have hdet : M.transpose.det = 0 := by rw [Matrix.det_transpose, hM]  obtain ⟨v, hv_unit, hv_eq⟩ :=    three_qubit_singular_pair_form_gives_degeneracy_exists_unit_mulVec_eq_zero M.transpose hdet  refine ⟨v, hv_unit, ?_⟩  rw [← Matrix.mulVec_transpose]  exact hv_eqlemma three_qubit_singular_pair_form_gives_degeneracy_pair_zero_of_orth    (A : Matrix (Fin 3) (Fin 3) ℝ) (a b : Fin 3 → ℝ)    (h : (Matrix.mulVec A b) ⬝ᵥ a = 0) :    (∑ i, ∑ j, a i * A i j * b j) = 0 := by  rw [three_qubit_isotropic_pair_form_gives_degeneracy_pair_eq_dot,      ← Matrix.dotProduct_mulVec,      dotProduct_comm,      h]lemma three_qubit_singular_pair_form_gives_degeneracy_exists_r_n (u : Fin 3 → ℝ) :    ∃ (n : Fin 3 → ℝ) (r : ℝ), (∑ i, n i * n i) = 1 ∧ (∀ j, u j = r * n j) := by  by_cases hu : u = 0  · refine ⟨![1, 0, 0], 0, ?_, ?_⟩    · simp [Fin.sum_univ_three]    · intro j      rw [hu]      simp  · have hu_pos : 0 < u ⬝ᵥ u :=      three_qubit_isotropic_pair_form_gives_degeneracy_dotProduct_pos_of_ne_zero hu    have hu_sqrt_ne : Real.sqrt (u ⬝ᵥ u) ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr hu_pos)    let cu := (Real.sqrt (u ⬝ᵥ u))⁻¹    let n := cu • u    let r := Real.sqrt (u ⬝ᵥ u)    refine ⟨n, r, ?_, ?_⟩    · exact three_qubit_isotropic_pair_form_gives_degeneracy_dotProduct_normalize hu    · intro j      dsimp [n, cu, r]      rw [← mul_assoc, mul_inv_cancel₀ hu_sqrt_ne, one_mul]lemma three_qubit_singular_pair_form_gives_degeneracy_q_zero_of_vecMul_A_zero    (A B C : Matrix (Fin 3) (Fin 3) ℝ) (a : Fin 3 → ℝ)    (ha : Matrix.vecMul a A = 0) :    (let q := fun (a : Fin 3 → ℝ) =>      ∑ i, ∑ j, ∑ k, ∑ l, a i * A i j * (C.transpose.adjugate) j k * B l k * a l     q a = 0) := by  dsimp  rw [three_qubit_isotropic_pair_form_gives_degeneracy_q_eq_pair]  rw [three_qubit_isotropic_pair_form_gives_degeneracy_pair_eq_dot]  rw [ha, zero_dotProduct]lemma three_qubit_singular_pair_form_gives_degeneracy_q_zero_of_vecMul_B_zero    (A B C : Matrix (Fin 3) (Fin 3) ℝ) (a : Fin 3 → ℝ)    (ha : Matrix.vecMul a B = 0) :    (let q := fun (a : Fin 3 → ℝ) =>      ∑ i, ∑ j, ∑ k, ∑ l, a i * A i j * (C.transpose.adjugate) j k * B l k * a l     q a = 0) := by  dsimp  rw [three_qubit_isotropic_pair_form_gives_degeneracy_q_eq_pair]  have hv : Matrix.mulVec C.transpose.adjugate (Matrix.vecMul a B) = 0 := by    rw [ha, Matrix.mulVec_zero]  rw [three_qubit_isotropic_pair_form_gives_degeneracy_pair_eq_dot]  rw [hv, dotProduct_zero]theorem three_qubit_singular_pair_form_gives_degeneracy    (A B C : Matrix (Fin 3) (Fin 3) ℝ) :    let dot := fun (a b : Fin 3 → ℝ) => ∑ i, a i * b i    let pair := fun (M : Matrix (Fin 3) (Fin 3) ℝ) (a b : Fin 3 → ℝ) =>      ∑ i, ∑ j, a i * M i j * b j    (A.det = 0 ∨ B.det = 0 ∨ C.det = 0) →    ∃ (a b n : Fin 3 → ℝ) (r s : ℝ),      dot a a = 1 ∧ dot b b = 1 ∧ dot n n = 1 ∧ pair A a b = 0 ∧      (∀ j, (∑ i, a i * B i j) = r * n j) ∧      (∀ j, (∑ i, b i * C i j) = s * n j) := by  intro dot pair h  by_cases hC : C.det = 0  · obtain ⟨b, hb_unit, hb_ker⟩ :=      three_qubit_singular_pair_form_gives_degeneracy_exists_unit_vecMul_eq_zero C hC    obtain ⟨a, ha_unit, ha_orth⟩ :=      three_qubit_isotropic_pair_form_gives_degeneracy_exists_unit_orthogonal (Matrix.mulVec A b)    have h_pair : pair A a b = 0 :=      three_qubit_singular_pair_form_gives_degeneracy_pair_zero_of_orth A a b ha_orth    let u := Matrix.vecMul a B    obtain ⟨n, r, hn_unit, hr_eq⟩ :=      three_qubit_singular_pair_form_gives_degeneracy_exists_r_n u    refine ⟨a, b, n, r, 0, ha_unit, hb_unit, hn_unit, h_pair, ?_, ?_⟩    · intro j      have hu_def : (∑ i, a i * B i j) = u j := rfl      rw [hu_def, hr_eq j]    · intro j      have hc_def : (∑ i, b i * C i j) = (Matrix.vecMul b C) j := rfl      rw [hc_def, hb_ker]      simp  · have hAB : A.det = 0 ∨ B.det = 0 := by      rcases h with hA | hB | hC_eq      · exact Or.inl hA      · exact Or.inr hB      · exact False.elim (hC hC_eq)    let q := fun (a : Fin 3 → ℝ) =>      ∑ i, ∑ j, ∑ k, ∑ l, a i * A i j * (C.transpose.adjugate) j k * B l k * a l    have hq : ∃ a : Fin 3 → ℝ, dot a a = 1 ∧ q a = 0 := by      rcases hAB with hA | hB      · obtain ⟨a, ha_unit, ha_ker⟩ :=          three_qubit_singular_pair_form_gives_degeneracy_exists_unit_vecMul_eq_zero A hA        exact ⟨a, ha_unit,          three_qubit_singular_pair_form_gives_degeneracy_q_zero_of_vecMul_A_zero A B C a ha_ker⟩      · obtain ⟨a, ha_unit, ha_ker⟩ :=          three_qubit_singular_pair_form_gives_degeneracy_exists_unit_vecMul_eq_zero B hB        exact ⟨a, ha_unit,          three_qubit_singular_pair_form_gives_degeneracy_q_zero_of_vecMul_B_zero A B C a ha_ker⟩    exact three_qubit_isotropic_pair_form_gives_degeneracy A B C hC hq
See it in the graphDiscuss this resultChallenge it