AFTD Auto-Formalizing Theoretical Domains

word_gap_occ

def

The number of gaps in which w has strictly more copies of a than v: the number of indices at which the 'a'-gap profile of w exceeds that of v.

Statement

def word_gap_occ {α : Type*} [DecidableEq α] (a : α) (v w : List α) : ℕ
Source
step towards word_unary_inserted_block_exchange_exact
Verified
07 Nov 2026
Axioms
none listed
Built on 2
  • word_a_gapsThe 'a'-gap profile of a word: the list whose j-th entry is the number of copies of a appearing in the j-th gap, the gaps being the…
  • word_occpFor two gap profiles of equal shape, the number of indices where the first profile's entry is strictly larger than the second's.

Lean source view module on GitHub

def word_gap_occ {α : Type*} [DecidableEq α] (a : α) (v w : List α) : ℕ := word_occp (word_a_gaps a w) (word_a_gaps a v)
See it in the graphDiscuss this resultChallenge it