b4_quotient_trace_sq
For any n : Fin 4 → ℕ, the trace of the square of b4_quotient_matrix n equals ((n 0 : ℝ) + n 1)^2 + ((n 2 : ℝ) + n 3)^2 + 2 * (n 1 : ℝ) * n 3 - 2 * ((n 0 : ℝ) + n 1 + n 2 + n 3) + 4.
Statement
theorem b4_quotient_trace_sq (n : Fin 4 → ℕ) :
(b4_quotient_matrix n ^ 2).trace =
((n 0 : ℝ) + n 1) ^ 2 + ((n 2 : ℝ) + n 3) ^ 2 + 2 * (n 1 : ℝ) * n 3
- 2 * ((n 0 : ℝ) + n 1 + n 2 + n 3) + 4- Formalizes
- arXiv:2610.21388, Theorem 2.5
- Verified
- 23 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- b4_quotient_matrixGiven a function n : Fin 4 → ℕ of natural numbers, b4_quotient_matrix n is the 4x4 real matrix Matrix (Fin 4) (Fin 4) ℝ with entries: row…
- Used by 2
- b4_sqrt_trace_quotient_sq_gt_clique_bound_of_one_oneFor n : Fin 4 → ℕ with n 0 = 1, n 1 = 1, n 2 = 1, and n 3 = 1, (∑ i, (n i : ℝ)) * (1 - 1 / ((b4_graph n).cliqueNum : ℝ)) < Real.sqrt…
- b4_sqrt_trace_quotient_sq_le_clique_boundFor any n : Fin 4 → ℕ with 1 ≤ n i for all i : Fin 4 and ¬ (n 0 = 1 ∧ n 1 = 1 ∧ n 2 = 1 ∧ n 3 = 1), Real.sqrt ((b4_quotient_matrix n ^…
Read back from the Lean
For every function $n : \text{Fin } 4 \to \mathbb{N}$, the trace of the square of the $4 \times 4$ real matrix b4_quotient_matrix n is equal to $((n(0) : \mathbb{R}) + n(1))^2 + ((n(2) : \mathbb{R}) + n(3))^2 + 2 (n(1) : \mathbb{R}) n(3) - 2 ((n(0) : \mathbb{R}) + n(1) + n(2) + n(3)) + 4$.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
The identity is proved by direct computation. First, the definitions of the quotient matrix, matrix squaring, and matrix trace are expanded, reducing the trace of the squared matrix to the explicit sum of its four diagonal entries. The resulting expression is then verified to be identical to the target polynomial via ring arithmetic.
The trace of the squared quotient matrix is expanded into the sum of the four diagonal entries of the matrix product.
Unfolding the definition of the quotient matrix b4_quotient_matrix and rewriting the matrix square as multiplication via pow_two, Matrix.trace and Matrix.diag_apply express the trace as the sum over the diagonal entries. Fin.sum_univ_four expands this sum over Fin 4 into four terms, and the simplifier evaluates the inner product of each row with its corresponding column to produce explicit polynomial terms in the variables n 0, n 1, n 2, and n 3.
uses
b4_quotient_matrix,Matrix.trace,Fin.sum_univ_four,pow_two,Matrix.diag_applysimp [b4_quotient_matrix, Matrix.trace, Fin.sum_univ_four, pow_two, Matrix.diag_apply]The expanded sum of diagonal entries equals ((n 0 + n 1)^2 + (n 2 + n 3)^2 + 2 * n 1 * n 3 - 2 * (n 0 + n 1 + n 2 + n 3) + 4).
Both sides of the equality are polynomial expressions in the real variables n 0, n 1, n 2, and n 3. The ring tactic expands all products, collects like terms, and verifies that the polynomials are identical in the commutative ring ℝ.
ring
Matrix.trace- The trace of a square matrix is the sum of its diagonal entries.
Fin.sum_univ_four- The sum of a function over the index type Fin 4 equals the sum of its values at 0, 1, 2, and 3: ∑ i, f i = f 0 + f 1 + f 2 + f 3.
pow_two- The square of an element a in a monoid equals a * a.
Matrix.diag_apply- The i-th entry of the diagonal of a square matrix A is its diagonal entry A i i.
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.
/-- tr(M^2) = (n_0 + n_1)^2 + (n_2 + n_3)^2 + 2 n_1 n_3 - 2(n_0 + n_1 + n_2 + n_3) + 4 for the quotient matrix M of B_4. -/theorem b4_quotient_trace_sq (n : Fin 4 → ℕ) : (b4_quotient_matrix n ^ 2).trace = ((n 0 : ℝ) + n 1) ^ 2 + ((n 2 : ℝ) + n 3) ^ 2 + 2 * (n 1 : ℝ) * n 3 - 2 * ((n 0 : ℝ) + n 1 + n 2 + n 3) + 4 := by simp [b4_quotient_matrix, Matrix.trace, Fin.sum_univ_four, pow_two, Matrix.diag_apply] ring