qary_two_deletion_posterior
def
For a received q-ary word y of length n, qary_two_deletion_posterior q n y x is the posterior probability of transmitting x of length n + 2 after two uniformly chosen deletions under a uniform prior, given by the number of subsequence embeddings of y in x divided by q^2 * Nat.choose (n + 2) 2.
Statement
noncomputable def qary_two_deletion_posterior (q n : ℕ) (y : Fin n → Fin q) (x : Fin (n + 2) → Fin q) : ℝ
- Defined in
- arXiv:2611.01064, Lemma 2.1
- 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…
Read back from the Lean
The definition qary_two_deletion_posterior takes natural numbers q and n, a sequence y : Fin n → Fin q, and a sequence x : Fin (n + 2) → Fin q. It produces the real number obtained by dividing the number of subsequence embeddings of y into x (as given by q_ary_subsequence_num_embeddings q n (n + 2) y x) by q^2 * Nat.choose (n + 2) 2.
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
/-- Posterior probability of transmitting x given received word y after two deletions in a q-ary channel under uniform prior. -/ noncomputable def qary_two_deletion_posterior (q n : ℕ) (y : Fin n → Fin q) (x : Fin (n + 2) → Fin q) : ℝ := (q_ary_subsequence_num_embeddings q n (n + 2) y x : ℝ) / ((q : ℝ) ^ 2 * (Nat.choose (n + 2) 2 : ℝ))