AFTD Auto-Formalizing Theoretical Domains

comparison_pi_ord

def

The real square matrix Pi_ord on comparison_feature2 n defined by Pi_ord = I - (1/3) U U^T + (1 / (3 (C(n,3) + 3))) v v^T, where U = U_triangle is the matrix of triangle relation vectors, v = U 1 is the sum of its columns, and C(n,3) is the binomial coefficient nu_triangle.

Statement

noncomputable def comparison_pi_ord (n : ℕ) : Matrix (comparison_feature2 n) (comparison_feature2 n) ℝ
Defined in
arXiv:2610.34762 (Quantum ordinal selection with two comparisons), Section 3.1, the notation before Lemma 1
Verified
08 Nov 2026
Axioms
none listed
Built on 4
  • comparison_triangle_matrixThe real matrix U_triangle with rows indexed by comparison_feature2 n and columns by triangles, whose column at the triangle t is the…
  • comparison_edgeThe type of edges of the label set [n] = Fin n: the subtype of pairs (a, b) in Fin n × Fin n with a < b, each unordered edge {a, b} being…
  • comparison_triangleThe type of triangles of the label set [n] = Fin n: the subtype of triples (a, (b, c)) in Fin n × Fin n × Fin n with a < b and b < c.
  • comparison_feature2The type indexing the orthonormal coordinate basis of the formal quadratic feature space F_2 = span{1, d_e, d_e d_f}: the sum type of…
Used by 2

Read back from the Lean

comparison_pi_ord is a definition taking a natural number n and returning a real-valued square matrix indexed by comparison_feature2 n, defined by: I - (1/3) • (U * Uᵀ) + (1 / (3 * ((n.choose 3) + 3))) • (v * vᵀ) where: - I is the identity matrix on comparison_feature2 n. - U is comparison_triangle_matrix n, a matrix with rows indexed by comparison_feature2 n and columns indexed by comparison_triangle n. - v is Matrix.mulVec U (fun _ => 1), the column-sum vector of U (the result of multiplying U by the all-ones vector on comparison_triangle n). - v * vᵀ is Matrix.vecMulVec v v, the outer product of v with itself.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The real square matrix Pi_ord on comparison_feature2 n defined by Pi_ord = I - (1/3) U U^T + (1 / (3 (C(n,3) + 3))) v v^T, where U = U_triangle is the matrix of triangle relation vectors, v = U 1 is the sum of its columns, and C(n,3) is the binomial coefficient nu_triangle. -/
noncomputable def comparison_pi_ord (n : ℕ) : Matrix (comparison_feature2 n) (comparison_feature2 n) ℝ :=
  let U := comparison_triangle_matrix n
  let v := Matrix.mulVec U (fun _ => 1)
  1 - (1 / 3 : ℝ) • (U * U.transpose)
    + (1 / (3 * ((n.choose 3 : ℝ) + 3))) • Matrix.vecMulVec v v
See it in the graphDiscuss this resultChallenge it