AFTD Auto-Formalizing Theoretical Domains

comparison_triangle_matrix

def

The real matrix U_triangle with rows indexed by comparison_feature2 n and columns by triangles, whose column at the triangle t is the triangle relation vector kappa_t.

Statement

def comparison_triangle_matrix (n : ℕ) : Matrix (comparison_feature2 n) (comparison_triangle 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 3
  • comparison_triangle_kappaThe real triangle relation vector kappa_abc : comparison_feature2 n → ℝ of a triangle a < b < c: kappa_abc = e_(ab,ac) - e_(ab,bc) +…
  • 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…
  • 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.
Used by 4
  • comparison_pi_ord_mulVec_phi2Pi_ord fixes the quadratic evaluation vector phi_2(x) of every strict order x: U_triangle^T phi_2(x) = 0 by the triangle relations, hence…
  • comparison_pi_ordThe 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 =…
  • comparison_triangle_gramThe Gram matrix of the triangle relation vectors is U_triangle^T U_triangle = 3 I + 1 1^T: each kappa_abc has squared norm 4 and two…
  • quadratic_comparison_evaluation_kernel_and_projectorLet n >= 3, N = C(n,2), nu_triangle = C(n,3). Strict orders on [n] are given by permutations x of Fin n (x i = rank of label i); for an…

Read back from the Lean

For a natural number $n$, comparison_triangle_matrix n is the real-valued matrix whose rows are indexed by comparison_feature2 n and whose columns are indexed by comparison_triangle n, where the entry at row $i$ and column $t$ is given by comparison_triangle_kappa t i.

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 matrix U_triangle with rows indexed by comparison_feature2 n and columns by triangles, whose column at the triangle t is the triangle relation vector kappa_t. -/
def comparison_triangle_matrix (n : ℕ) : Matrix (comparison_feature2 n) (comparison_triangle n) ℝ :=
  Matrix.of fun i t => comparison_triangle_kappa t i
See it in the graphDiscuss this resultChallenge it