comparison_sign
def
The real-valued comparison sign d_e(x) of a strict order. A strict order on the labels Fin n is given by a permutation x : Equiv.Perm (Fin n), x i being the rank of label i. For an edge e = (a, b) with a < b, comparison_sign x e is the real number 1 if x a < x b and the real number -1 otherwise.
Statement
def comparison_sign {n : ℕ} (x : Equiv.Perm (Fin n)) (e : comparison_edge 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 1
- 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…
- Used by 5
- comparison_triangle_kappa_mem_eval_kerEach triangle relation vector kappa_abc evaluates to zero on every strict order: d_ab d_ac - d_ab d_bc + d_ac d_bc - 1 = 0.
- comparison_eval_ker_le_span_kappaEvery formal quadratic feature vector c in F_2 that evaluates to zero on every strict order (<phi_2(x), c> = 0 for all permutations x of…
- comparison_phi1_linearIndependentThe constant function 1 and the comparison signs d_e, e an edge of [n], are linearly independent real functions on strict orders…
- comparison_phi1The real linear evaluation vector phi_1(x) : comparison_feature1 n → ℝ of a strict order x (a permutation of Fin n giving the ranks): its…
- comparison_phi2The real quadratic evaluation vector phi_2(x) : comparison_feature2 n → ℝ of a strict order x (a permutation of Fin n giving the ranks):…
Read back from the Lean
Given a natural number n, a permutation x of Fin n, and e : comparison_edge n (a pair of elements of Fin n with the first strictly less than the second), comparison_sign x e is defined as the real number equal to 1 if x maps the first component of e to a value strictly less than x applied to the second component, and -1 otherwise.
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-valued comparison sign d_e(x) of a strict order. A strict order on the labels Fin n is given by a permutation x : Equiv.Perm (Fin n), x i being the rank of label i. For an edge e = (a, b) with a < b, comparison_sign x e is the real number 1 if x a < x b and the real number -1 otherwise. -/ def comparison_sign {n : ℕ} (x : Equiv.Perm (Fin n)) (e : comparison_edge n) : ℝ := if x e.1.1 < x e.1.2 then 1 else -1