Output strictly local functions #
This file defines the output strictly local functions. A function f : List α → List β is
k-output strictly local (k-OSL) when the block it emits for each input symbol depends only
on that symbol and the last k - 1 symbols already emitted. Progressive spreading is the
motivating case, since its trigger is adjacent in the output however far back it lies in the
input. Chandlee, Eyraud and Heinz characterize the class by tails and show it incomparable with
the input strictly local functions, and Burness and McMullin relativize the window to a tier of
the output alphabet.
We compute OSL functions by rules, characterize them by residuals, and prove that the classes
nest in k and are subsequential over a finite alphabet. Dissimilation after an input symbol is
ISL and not OSL, progressive spreading is OSL and neither ISL nor right-OSL, and long-distance
assimilation across transparent symbols is Mealy-computable and neither ISL nor OSL.
Main definitions #
OSLRule k α β: a rule emitting a block from a window ofk - 1output symbolsOSLRule.apply: the function a rule computesOSLRule.applyOnTier: a rule run with its window over the tier projection of its outputIsLeftOutputStrictlyLocal k f,IsRightOutputStrictlyLocal k f: some rule computesf, scanning left to right or right to left
Main results #
isLeftOutputStrictlyLocal_iff_factorsThrough_residual: characterization by residualsIsLeftOutputStrictlyLocal.weaken:k-OSL functions arek'-OSL fork ≤ k'isLeftOutputStrictlyLocal_one_iff: the1-OSL functions are the letterwise homomorphismsIsLeftOutputStrictlyLocal.isLeftSubsequential: OSL functions are subsequentialISLRule.dissimilate_not_isLeftOutputStrictlyLocal,OSLRule.spread_not_isLeftInputStrictlyLocal: ISL and OSL are incomparablelongDistanceAgree_not_isLeftInputStrictlyLocal,longDistanceAgree_not_isLeftOutputStrictlyLocal: a Mealy-computable function in neither
Implementation notes #
Rules carry neither the initial nor the final output of Chandlee, Eyraud and Heinz's
transducers, so the classes are the sequential ones with f [] = []; progressive spreading fails
right-OSL here for want of a final output. 0-OSL and 1-OSL coincide, and k indexes apply
alone.
TODO #
- Final outputs, recovering Chandlee, Eyraud and Heinz's classes through
Function.prefixFunction. - The output tier-based class as a predicate, characterized by residuals.
References #
A k-output strictly local rule emits, for each input symbol, a block computed from
the last k - 1 symbols it has emitted and the input symbol itself.
- windowOutput : List β → α → List β
The block emitted for the current input symbol after the given window of output.
Instances For
The rule applied from a given window, the window recursion windowRun that accumulates what
the rule emits truncated to k - 1 symbols.
Equations
- r.applyAux = SubsequentialTransducer.windowRun (k - 1) r.windowOutput r.windowOutput
Instances For
The window before each symbol is the last k - 1 symbols of the output so far.
f is k-left-output strictly local if some k-OSL rule computes it.
Equations
- Subregular.IsLeftOutputStrictlyLocal k f = ∃ (r : Subregular.OSLRule k α β), r.apply = f
Instances For
f is k-right-output strictly local if its reverse-conjugate is k-left-OSL, that is,
if some k-OSL rule computes it scanning right to left.
Equations
Instances For
Residuals #
The residuals of a k-OSL function factor through the last k - 1 output symbols, so inputs
whose outputs end alike have the same continuations.
A function is k-OSL if and only if it fixes [], is prefix-preserving, and has residuals
factoring through the last k - 1 output symbols.
The hierarchy in k #
A k-OSL function is k'-OSL for every k' ≥ k.
The 1-OSL functions are the letterwise homomorphisms List.flatMap h, which are also the
1-ISL functions.
OSL ⊆ Subsequential #
An OSL rule is a window recursion accumulating its own output, so over a finite output alphabet
the bounded output window is a finite state space (isLeftSubsequential_windowRun).
Over a finite output alphabet, left-OSL functions are left-subsequential.
A rule emitting one symbol per input symbol is Mealy-computable, the bounded output window being the state.
Over a finite output alphabet, right-OSL functions are right-subsequential.
Output tiers #
The rule run with its window over the tier p of the output alphabet, so that each block
depends on the last k - 1 on-tier symbols emitted ([BMcM20], Definition 8).
Equations
- r.applyOnTier p = SubsequentialTransducer.windowRun (k - 1) r.windowOutput (fun (w : List β) (x : α) => List.filter (fun (x : β) => decide (p x)) (r.windowOutput w x)) []
Instances For
The window before each symbol is the last k - 1 on-tier symbols of the output so far.
Over the total tier, applyOnTier is apply.
Restricted to the tier, applyOnTier is apply on the tier projection of the input,
provided each block stays on the tier exactly when its input symbol is on it.
Over a finite output alphabet the rule run over a tier is left-subsequential, the bounded tier window being the state.
ISL and OSL are incomparable #
Chandlee, Eyraud and Heinz separate the two classes and place a subsequential function outside both. Over the residual characterizations each separation is one pair of inputs with the same window and different continuations.
Dissimilation of a to b after an input a (the function f₂ of
[CEH14], Theorem 5).
Equations
- Subregular.ISLRule.dissimilate a b = { windowOutput := fun (w : List α) (x : α) => if w = [a] ∧ x = a then [b] else [x] }
Instances For
Dissimilation is not OSL, since aa and ab have the same output ab but continue
differently on a.
Unbounded progressive spreading of a, under which every symbol after an a surfaces as
a.
Equations
- Subregular.OSLRule.spread a = { windowOutput := fun (w : List α) (x : α) => if w = [a] then [a] else [x] }
Instances For
Spreading is not ISL, since a bᵏ⁻¹ and bᵏ end in the same k - 1 input symbols while a
further b surfaces as a after the first and as b after the second.
Spreading is not right-OSL, since scanned right to left its output on b is not a prefix of
its output on ba.
The flag machine for long-distance assimilation of b to a, under which b surfaces as a
after an a however far back (the function f₁ of [CEH14], Theorem 4).
Equations
- Subregular.longDistanceAgree a b = Mealy.ofFlag (fun (x : α) => decide (x = a)) fun (s : Bool) (x : α) => if s = true ∧ x = b then a else x
Instances For
Long-distance assimilation is not ISL, since acᵏ⁻¹ and bcᵏ⁻¹ end alike while a further
b surfaces as a only after the first.
Long-distance assimilation is not OSL, since acᵏ⁻¹ and bcᵏ⁻¹ are output unchanged and
end alike while a further b surfaces as a only after the first.