Strictly local languages (SL_k) #
A language L is strictly k-local when membership is determined by the
length-k substrings of the boundary-augmented input: a grammar is a set G of
permitted k-factors, and w ∈ L iff every k-factor of boundary k w lies in
G. The forbidden-factor dual (G = Fᶜ) is finite even over an infinite alphabet.
Main definitions #
Subregular.SLGrammar α— a grammar is just a set of permitted factors overAugmented α; the locality widthkis supplied tolanguage, not baked in.Subregular.SLGrammar.language k— theLanguage αit generates at widthk.Subregular.SLGrammar.ofForbidden— the grammar of a forbidden-factor set (its complement).Language.IsStrictlyLocal L k—Lis strictlyk-local.
A strictly-local grammar over α: a set of permitted factors over the
boundary-augmented alphabet Option α (none the boundary). The locality width
k is supplied to language, not baked into the carrier.
Equations
- Subregular.SLGrammar α = Set (Subregular.Augmented α)
Instances For
The language generated at width k: strings whose boundary-augmented form has
every k-factor permitted.
Equations
- Subregular.SLGrammar.language k G = {w : List α | ∀ f ∈ List.kFactors k (Subregular.boundary k w), f ∈ G}
Instances For
The grammar of a forbidden-factor set is its complement: a string is
accepted iff none of its k-factors are forbidden.
Equations
- Subregular.SLGrammar.ofForbidden forbidden = forbiddenᶜ
Instances For
A language L is strictly k-local iff some SLGrammar α generates it at
width k. Witness-style, mirroring Language.IsRegular/Language.IsContextFree
("L is regular iff some DFA accepts L").
Equations
- L.IsStrictlyLocal k = ∃ (G : Subregular.SLGrammar α), Subregular.SLGrammar.language k G = L