insdel_dist
def
The insertion-deletion distance between two vectors $u, v \in \alpha^n$ is $2(n - l_{\mathrm{LCS}}(u, v))$.
Statement
noncomputable def insdel_dist {n : ℕ} {α : Type*} (u v : Fin n → α) : ℕ
- Defined in
- arXiv:2611.21275 Lemma 1
- Verified
- 19 Nov 2026
- Axioms
- none listed
- Built on 1
- lcs_lengthThe length of the longest common subsequence of two vectors $u, v \in \alpha^n$ is the supremum of lengths $l \le n$ for which $u$ and $v$…
- Used by 1
- code_min_insdel_distFor any field $F$ and any $F$-submodule $C$ of $\mathrm{Fin}\,n \to F$, the minimum insertion-deletion distance of $C$ is the infimum in…
Read back from the Lean
For a natural number n, a type α, and two sequences u, v : Fin n → α of length n, insdel_dist u v is defined as 2 * (n - lcs_length u v), where lcs_length u v is the supremum of the set of lengths l ≤ n for which u and v share a common subsequence of length l.
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 insertion-deletion (insdel) distance between two words of length n. -/ noncomputable def insdel_dist {n : ℕ} {α : Type*} (u v : Fin n → α) : ℕ := 2 * (n - lcs_length u v)