AFTD Auto-Formalizing Theoretical Domains

qary_multiple_deletion_hinge

def

For natural numbers t, q, n, and r, and a q-ary word y of length n (y : Fin n → Fin q), the t-deletion hinge sum is the sum over all words x : Fin (n + t) → Fin q of the excess embedding count q_ary_subsequence_num_embeddings q n (n + t) y x - r.

Statement

def qary_multiple_deletion_hinge (t q n r : ℕ) (y : Fin n → Fin q) : ℕ
Defined in
knowledgebase, OP-1503
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 6

Read back from the Lean

A definition of qary_multiple_deletion_hinge t q n r y, which takes natural numbers t, q, n, r and a function y : Fin n → Fin q (representing a length-$n$ word over an alphabet of size $q$), and returns the natural number given by the sum over all functions x : Fin (n + t) → Fin q of (q_ary_subsequence_num_embeddings q n (n + t) y x - r), where subtraction is the truncated subtraction on ℕ (i.e., $\max(0, \cdot - r)$).

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

/-- Hinge sum W_r(y) of excess embedding counts of a length-n word y into words of length n+t. -/
def qary_multiple_deletion_hinge (t q n r : ℕ) (y : Fin n → Fin q) : ℕ := ∑ x : Fin (n + t) → Fin q, (q_ary_subsequence_num_embeddings q n (n + t) y x - r)
See it in the graphDiscuss this resultChallenge it