qary_two_deletion_hinge
For integers q, n, and r, and a q-ary word y of length n, qary_two_deletion_hinge q n r y is the sum over all words x : Fin (n + 2) → Fin q of the thresholded excess embedding count max(e(y, x) - r, 0), computed via truncating natural subtraction.
Statement
def qary_two_deletion_hinge (q n r : ℕ) (y : Fin n → Fin q) : ℕ- Related work
- OP-1499; arXiv:2611.01064
- Verified
- 11 Nov 2026
- Axioms
- none listed
- Built on 1
- q_ary_subsequence_num_embeddingsFor words u of length m and w of length n over an alphabet of size q represented by Fin q, q_ary_subsequence_num_embeddings q m n u w is…
- Used by 3
- op_1499_quaternary_length_twoFor every quaternary word y of length 2 (y : Fin 2 → Fin 4), the two-deletion hinge sums satisfy qary_two_deletion_hinge 4 2 2 y ≥ 2^2 + 2…
- op_1503_two_deletion_hinge_eqFor any alphabet size q, length n, threshold r, and word y : Fin n → Fin q, the multiple-deletion hinge sum for two deletions…
- op_1499_ternary_length_twoFor every ternary word y of length 2 (y : Fin 2 → Fin 3), the two-deletion hinge sums satisfy qary_two_deletion_hinge 3 2 2 y ≥ 2^2 + 2 -…
Read back from the Lean
qary_two_deletion_hinge q n r y is defined for natural numbers q, n, r and a sequence y : Fin n → Fin q as the sum over all sequences x : Fin (n + 2) → Fin q of q_ary_subsequence_num_embeddings q n (n + 2) y x - r (using natural number subtraction), where q_ary_subsequence_num_embeddings counts the number of strictly monotonic functions f : Fin n → Fin (n + 2) such that x (f i) = y i for all i : Fin n.
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
/-- Thresholded excess subsequence embedding sum W_r(y) over length n + 2 words. -/ def qary_two_deletion_hinge (q n r : ℕ) (y : Fin n → Fin q) : ℕ := ∑ x : Fin (n + 2) → Fin q, (q_ary_subsequence_num_embeddings q n (n + 2) y x - r)