AFTD Auto-Formalizing Theoretical Domains

qary_deletion_collision

def

For natural numbers q, k, and n and a word w of length n over an alphabet of size q, qary_deletion_collision q k n w is the sum over all words u of length n - k over Fin q of the square of qary_deletion_num_embeddings q k n u w.

Statement

def qary_deletion_collision (q k n : ℕ) (w : Fin n → Fin q) : ℕ
Defined in
arXiv:2611.01064
Verified
10 Nov 2026
Axioms
none listed
Built on 1
  • qary_deletion_num_embeddingsFor natural numbers q, k, and n, a word u of length n - k over an alphabet of size q, and a word w of length n over the same alphabet,…

Read back from the Lean

For natural numbers q, k, and n, and a word w : Fin n → Fin q, qary_deletion_collision q k n w is defined as the sum over all words u : Fin (n - k) → Fin q of the square of qary_deletion_num_embeddings q k n u w.

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

/-- Sum of squared embedding counts over all subwords of length n - k. -/
def qary_deletion_collision (q k n : ℕ) (w : Fin n → Fin q) : ℕ := ∑ u : Fin (n - k) → Fin q, (qary_deletion_num_embeddings q k n u w) ^ 2
See it in the graphDiscuss this resultChallenge it