Myhill–Nerode theorems for transducers #
This file characterizes the Mealy-computable (sequential) and bimachine-computable
functions by their residuals, in the style of Mathlib.Computability.MyhillNerode
(which treats the language case).
Given f : List α → List β and a word u, the residual of f by u is the
function v ↦ (f (u ++ v)).drop u.length — what f appends after reading u — and
the coresidual of f by a suffix y is u ↦ (f (u ++ y)).take u.length — what f
emits before reaching y. A function is Mealy-computable if and only if it is
length-preserving, prefix-preserving, and has finitely many residuals — the Nerode
criterion for sequential functions ([Eil74] [Hol82]). A
function is bimachine-computable if and only if it is length-preserving with finitely
many residuals and finitely many coresiduals: residual classes are the left states,
coresidual classes the right states, and the two-step exchange through representatives
makes the cell output well-defined — the length-preserving stratum of the canonical
bimachine of [RS91], surveyed in [FR16].
Main definitions #
residual f u: the residual offby the worducoresidual f y: the coresidual offby the suffixy
Main theorems #
isMealyComputable_of_stateSummary: a finite left-congruent state summary determining the output yields a machineisMealyComputable_iff_residual:fis Mealy-computable if and only if it is length-preserving, prefix-preserving, andSet.range (residual f)is finiteisLengthPreservingBimachineComputable_iff_residual:fis bimachine-computable if and only if it is length-preserving and bothSet.range (residual f)andSet.range (coresidual f)are finite
[UPSTREAM] candidate: Mathlib.Computability.MyhillNerode (as transducer sections of
the existing file, with residual beside Language.leftQuotient).
Necessity #
Sufficiency #
A length-preserving f with a finite state : List α → σ that is left-congruent
(hδ) and determines f's output at each position (hout) is Mealy-computable.
A length-preserving, prefix-preserving function with finitely many residuals is Mealy-computable: the residuals themselves are the states.
Myhill–Nerode for Mealy machines: a function is Mealy-computable if and only if it is length-preserving, prefix-preserving, and has finitely many residuals.
Coresiduals #
The coresidual of f by the suffix y is what f emits before reaching y —
the right-context dual of residual.
Equations
- coresidual f y u = List.take u.length (f (u ++ y))
Instances For
Coresiduals step by prepending a letter — the right-to-left congruence.
The cell at the seam, read through the residual.
The cell at the seam, read through the coresidual.
Myhill–Nerode for bimachines #
Scanning past a prefix reseeds the left state.
Dropping a scanned prefix of a letter-to-letter bimachine run reseeds the left state.
Taking the unscanned prefix of a bimachine run reseeds the right state.
Coresiduals of a bimachine's run reseed the right automaton.
Necessity #
Sufficiency #
A length-preserving f with finite left and right summaries, congruent in their
respective scan directions and jointly determining each output cell, is
bimachine-computable.
A length-preserving function with finitely many residuals and coresiduals is bimachine-computable: residual classes are the left states, coresidual classes the right states, and the cell output is read off representatives — well-defined by exchanging one context at a time.
Myhill–Nerode for bimachines: a function is bimachine-computable if and only if it is length-preserving with finitely many residuals and finitely many coresiduals.