word_a_gaps_mask_aux
def
Auxiliary version of the masked gap profile: scanning letter/mask-label pairs, accumulating for the current gap the number of false-labelled copies of a and of true-labelled copies of a, emitting the pair when a letter different from a is met.
Statement
def word_a_gaps_mask_aux {α : Type*} [DecidableEq α] (a : α) : ℕ → ℕ → List (α × Bool) → List (ℕ × ℕ)
- Source
- step towards word_unary_inserted_block_exchange_exact
- Verified
- 07 Nov 2026
- Axioms
- none listed
- Used by 1
- word_a_gaps_maskThe masked 'a'-gap profile of w under mask M: for each gap of w, the pair (number of false-labelled copies of a in it, number of…
Lean source view module on GitHub
def word_a_gaps_mask_aux {α : Type*} [DecidableEq α] (a : α) : ℕ → ℕ → List (α × Bool) → List (ℕ × ℕ) | f, t, [] => [(f, t)] | f, t, (x, b) :: xs => if x = a then (if b then word_a_gaps_mask_aux a f (t + 1) xs else word_a_gaps_mask_aux a (f + 1) t xs) else (f, t) :: word_a_gaps_mask_aux a 0 0 xs