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 #
SLGrammar α: a grammar is just a set of permitted factors overAugmented α; the locality widthkis supplied tolanguage, not baked in.SLGrammar.language k: theLanguage αit generates at widthk.SLGrammar.ofForbidden: the grammar of a forbidden-factor set (its complement).Language.IsStrictlyLocal L k:Lis strictlyk-local.Language.SuffixSubstitutionClosed L k: members sharing a length-(k − 1)window admit suffix crossover.
Main results #
Language.isStrictlyLocal_iff_suffixSubstitutionClosed: fork ≥ 2, strictk-locality is exactly closure under suffix substitution: the crossover's factors split into the two members' shared parts, and conversely the canonical grammar of licensed factors regenerates the language by stitching a member window-by-window.
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.
Instances For
The language generated at width k: strings whose boundary-augmented form has
every k-factor permitted.
Equations
- SLGrammar.language k G = {w : List α | ∀ f ∈ List.kFactors k (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
- SLGrammar.ofForbidden forbidden = forbiddenᶜ
Instances For
Membership in an SL language, position-indexed: every window over
[1 - k, w.length) is permitted.
Count-vector characterisation #
Membership in a forbidden-factor SL language is a zero-test of a single
linear functional of the word's k-factor count vector — the total count of
forbidden factors — with unit margin on nonmembers. Strict locality is thus
linearly detectable on the factor-count (cue) representation.
SL membership is the vanishing of the forbidden-factor count.
Nonmembers score at least 1 on the forbidden-factor count: the linear
detector has unit margin.
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 : SLGrammar α), SLGrammar.language k G = L
Instances For
Suffix substitution closure #
L is closed under suffix substitution at width k: two members sharing a
length-(k − 1) window admit the crossover of their suffixes at it.
Equations
- L.SuffixSubstitutionClosed k = ∀ (u₁ v₁ u₂ v₂ x : List α), x.length = k - 1 → u₁ ++ x ++ v₁ ∈ L → u₂ ++ x ++ v₂ ∈ L → u₁ ++ x ++ v₂ ∈ L
Instances For
A strictly local language is closed under suffix substitution: every k-factor of
the crossover lies in the shared left part — a factor of the first member — or in the
shared window-and-right part — a factor of the second.
A suffix-substitution-closed language is strictly local: the canonical grammar of all licensed member-factors regenerates it, stitching a member left-to-right through the shared windows.
The suffix-substitution characterization of strict locality: for widths
k ≥ 2, a language is strictly k-local if and only if it is closed under suffix
substitution at k.