Building the suffix and repetition indices of a word on the word RAM
ProvedBackreferenceMatching.SubstringIndex.ContextQueries.Native.prepare_base_nativeregular-expressionsstring-algorithmsword-ram
Starting with the text and its reversal in designated arrays, one fixed word-RAM preprocessing command constructs the suffix ranks, range-minimum tables, light-cut information and primitive repetition records for that text. The theorem specifies the contents of the resulting arrays, the number of steps, and enough space and word length for every access. This is the text preprocessing shared by the copied-substring matchers.
Preamble
import Definitions.Def_BackreferenceMatching_TextIndexWorkspace open BackreferenceMatching BackreferenceMatching.ArrayRAM BackreferenceMatching.SubstringIndex.RadixMachine BackreferenceMatching.SubstringIndex.ContextQueries.Native BackreferenceMatching.Automata BackreferenceMatching.Automata.MatrixRAM BackreferenceMatching.Repetition BackreferenceMatching.Repetition.IndexRAM Lax808846Proofs.Imp Lax808846Proofs.Reasoning
Formal statement
theorem BackreferenceMatching.SubstringIndex.ContextQueries.Native.prepare_base_native {q B cap : ℕ} (w : Word q) (s : Env) (snap : TextSource s w) (len : s.vars "length"=w.length)
(letter : Window s "letters" w.length (fun i => w[i.val].val)) (grid : GridLimits B cap q w.length) (idx : IndexLimits B q w.length)
(space : indexSpace q w.length ≤ cap) (room : ∀ k,cap ≤ (s.arrs k).length) :
∃ t,Lax808846Proofs.Reasoning.Run B (prepareBase q) s t (baseTime q w.length) ∧ BaseText t w ∧ OriginalSuffix t w := by
sorrySource
S. Kumabe and Y. Uezato, On the Complexity of the Matching Problem of Regular Expressions with Backreferences, arXiv:2605.07289. https://arxiv.org/abs/2605.07289