Transducers, Part C: Regular Functions, Two-Way Transducers and Streaming String Transducers

lax-916827·formalized by Mikołaj Bojańczyk · Aristotle (Harmonic)·registered·created ·GitHub @2649bf2·Lean v4.33.0 epoch · mathlib db584cd6d46c

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this submission may be incorrect.

No flags have been submitted.

    Community review

    Flag this submission

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    Abstract

    Sections 1–3 of Part C of the book Transducers (M. Bojańczyk) as concepts and proofs: the regular functions, defined as the compositions of rational functions with map reverse and map duplicate, and their two machine models, deterministic two-way transducers and streaming string transducers. The Lean development is Aristotle's formalisation of the book, re-presented in the archive's form; it requires the Part A and Part B submissions.

    The definition-concepts are the regular functions (C.0.1), two-way transducers (C.2.1) with their run semantics, codes of two-way transducers, the string representation of the reachable configuration graph of a two-way transducer, streaming string transducers (C.3.1), and snake graphs with their outputs and widths.

    The theorem-concepts are the numbered results: continuity and closure under composition of the regular functions (C.1.1), continuity of reversal, duplication (C.1.2) and map lifting (C.1.3), decidable equivalence of regular functions given by two-way transducers (C.1.4), continuity of two-way transducers (C.2.2, Rabin–Scott and Shepherdson) with the two lemmas on the configuration graph (C.2.3, C.2.4), closure of two-way transducers under composition (C.2.5, Chytil–Jákl) and under pre-composition with Mealy machines and rational functions (C.2.6, C.2.7), the theorem that two-way transducers compute exactly the regular functions (C.2.8, C.2.9, as two implications and their conjunction), the closure properties of regular functions under map lifting, concatenation and conditionals (C.2.10), the sum of two regular functions (C.2.11, corrected on the empty input), the snake lemma (C.2.12, for every width), and the equivalence of streaming string transducers with the regular functions (C.3.2, Alur–Černý, as two implications and their conjunction). All are proved.

    The decidability of equivalence is proved not by the book's reduction to weighted automata but by an explicit bound from the crossing-sequence decomposition of a two-way run and Schützenberger's rank criterion; the book's reduction is formalised as well, and the two agree. Conjecture C.1.5 is not formalised. The exercises are not part of this submission.

    In the paper

    Concepts

    Concept map
    37 concepts; 10 descendants hidden
    100%
    Automata with labelled transitionsRational functionsNondeterministic automata with output andrational relationsCodes of automata with output, anddecidability under a promiseClosure of a family of functions undercompositionContinuous string-to-string functionsMap liftingMealy machinesChecking the output of a configuration graphagainst a regular languageComputing the reachable configuration graphis rationalThe string representation of the reachableconfiguration graphString duplication is continuousThe map lifting of a continuous function iscontinuousRegular functions are closed undercompositionRegular functions are closed underconcatenationRegular functions are closed underconditionals over regular languagesRegular functions are continuousDecidable equivalence of regular functionsRegular functionsRegular functions are closed under mapliftingEvery streaming string transducer computesa regular functionEvery two-way transducer computes aregular functionThe sum of two regular functions on disjointalphabetsString reversal is continuousStreaming string transducers computeexactly the regular functionsEvery regular function is computed by astreaming string transducerSnake graphs and their outputsThe snake lemma: the output of a snakegraph is a regular functionStreaming string transducersCodes of two-way transducersTwo-way transducers are closed undercompositionTwo-way transducers are continuousTwo-way transducers compute exactly theregular functionsTwo-way transducers are closed underpre-composition with Mealy machinesEvery regular function is computed by atwo-way transducerTwo-way transducers are closed underpre-composition with rational functionsTwo-way transducers
    Proven claimDefinitionThis submissionOther submissionA → B: B builds on A

    Proofs

    Proof networkview on GitHub

    100%
    assumptions conclusionProven claimClaim from this submissionProof — open large view for details
    Proof list

    Lean sources for these proofs: proofs/ on GitHub

    Proof code is not displayed; the archive records each proof's checked relationship between claims.

    Related submissions

    Submission map

    100%
    This submissionOther submissionA → B: B's concepts build on AA → B: only B's proofs build on A

    Cite this

    This is only the formalizers. The authors of the formalized results may be different (see References).

    @misc{lax-916827,
      author = {Mikołaj Bojańczyk and Aristotle (Harmonic)},
      title = {Transducers, Part C: Regular Functions, Two-Way Transducers and Streaming String Transducers},
      year = {2026},
      howpublished = {Lax Archive, lax-916827},
      url = {https://laxarchive.org/lax-916827/},
    }

    References

    1. John C. Shepherdson. The Reduction of Two-Way Automata to One-Way Automata. IBM Journal of Research and Development 3(2):198–200, 1959. doi:10.1147/rd.32.0198
    2. Michal P. Chytil and Vojtěch Jákl. Serial Composition of 2-Way Finite-State Transducers and Simple Programs on Strings. In Automata, Languages and Programming (ICALP 1977) 52:135–147, 1977. doi:10.1007/3-540-08342-1_11
    3. Rajeev Alur and Pavol Černý. Expressiveness of Streaming String Transducers. In IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2010) 8:1–12, 2010. doi:10.4230/LIPIcs.FSTTCS.2010.1
    4. Mikołaj Bojańczyk. Transducers. 2026. Book in preparation; sources at https://github.com/bojanczyk/transducer-book.

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…