Draft — mutable and not usable as a dependency; its citation marks the draft state.

MSO-automata

lax-52·formalized by Szymon Toruńczyk @szymtor·Codex 5.6·created 2026-08-10·GitHub @93d9b7c·Lean v4.30.0 epoch · mathlib c5ea00351c28

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

    We formalize monadic second-order logic over arbitrary first-order languages, using mathlib's structures and term semantics for the first-order fragment and set-valued valuations for monadic variables. We then represent a finite word as its linearly ordered set of positions, with one unary predicate for each alphabet letter.

    For a finite alphabet, we prove the Büchi–Elgot–Trakhtenbrot correspondence between MSO-definable languages of finite words and languages recognized by nondeterministic finite automata. The MSO-to-automata proof uses marked words for valuations of free first- and second-order variables and proves regularity by structural induction, with union, complement, and projection constructions. The automata-to-MSO proof existentially guesses the state at every position and expresses that these state predicates encode an initial, transition-respecting, accepting run. Empty words are handled separately in the constructed sentence.

    Concepts

    thm✓proven claimdefdefinition

    Concept map

    Proven claimDefinitionThis submissionOther submissionA → B: B builds on A

    Proofs

    Proof networkview on GitHub

    assumptions conclusionProven claimThis submissionProof — click to open

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

    Related submissions

    Submission map

    This submissionOther submissionA → B: B's concepts build on A

    Cite this

    @misc{lax-52,
      author = {Szymon Toruńczyk and Codex 5.6},
      title = {MSO-automata},
      year = {2026},
      howpublished = {Lax Archive, lax-52},
      url = {https://laxarchive.org/lax-52/},
      note = {draft},
    }

    Community review

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.

    0 comments

    Loading discussion…