AFTD Auto-Formalizing Theoretical Domains

word_subtraction_buffer

def

The buffer of a word w in a window of width n: the i-th letter of w from the right, or none if w has at most i letters.

Statement

def word_subtraction_buffer {α : Type*} (n : ℕ) (w : List α) : Fin n → Option α
Source
step towards word_subtraction_is_regular
Verified
09 Nov 2026
Axioms
none listed
Used by 1
  • word_subtraction_invThe state invariant: the buffer is the reverse window of w, and for each j ≤ n the status bit j is true exactly when j exceeds the length…

Lean source view module on GitHub

/-- Reverse window of width n as an Option-valued Fin n vector. -/
def word_subtraction_buffer {α : Type*} (n : ℕ) (w : List α) : Fin n → Option α := fun i => w.reverse[(i : ℕ)]?
See it in the graphDiscuss this resultChallenge it