is_word_mask
def
A binary mask of a word with respect to sources u and v has the same length as the word and projects to u on true and to v on false.
Statement
def is_word_mask {α : Type*} (u v w : List α) (M : List Bool) : Prop
- Defined in
- arXiv:2610.39941, Section 3
- Verified
- 31 Oct 2026
- Axioms
- none listed
- Built on 1
- word_projThe projection of a word under a binary mask keeps only the letters at positions where the mask equals a given target boolean.
- Used by 4
- word_block_exchange_cThe commuting minimum degree word_block_exchange_c E u v is the infimum in WithTop Nat of mask_u_runs N over all commuting masks N of the…
- word_block_exchange_bThe noncommuting minimum degree word_block_exchange_b E u v is the infimum in WithTop Nat of mask_u_runs N over all noncommuting masks N…
- word_insertion_degreeThe minimum insertion degree word_insertion_degree u v w of word w with respect to source words u and v is the infimum in WithTop Nat of…
- word_block_exchange_transport_back_is_mask_iffFor an exchange E and a mask N satisfying is_word_mask u v (word_block_exchange_after E) N, the backward-transported mask…
Read back from the Lean
For a type α, lists u, v, w : List α, and a boolean mask M : List Bool, is_word_mask u v w M asserts the conjunction of three conditions:
1. The length of M is equal to the length of w;
2. The sublist of w consisting of elements at indices where M is true (word_proj true w M) is equal to u; and
3. The sublist of w consisting of elements at indices where M is false (word_proj false w M) is equal to v.
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
/-- A binary mask M of word w with respect to source words u and v. -/ def is_word_mask {α : Type*} (u v w : List α) (M : List Bool) : Prop := M.length = w.length ∧ word_proj true w M = u ∧ word_proj false w M = v