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

Lax916827.RegularEquivalenceDecidable

Decidable equivalence of regular functions

concepts/Lax916827/RegularEquivalenceDecidable.lean · lax-916827

proven

Loading review…

Sign in with ORCID

Community review

Flags

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

No flags have been submitted.

    Community review

    Flag this concept

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

    No source line selected.

    Concept map

    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Evidence

    Each proof establishes this claim relative to its assumptions.

    In the paper

    Theorem

    Equivalence is decidable for regular functions (Theorem C.1.4 of Transducers), the functions being given by two-way transducers, which compute exactly the regular functions (Theorem C.2.9). The book reduces to equivalence of weighted automata over the rationals, as for rational functions: the class of functions that can be post-composed with weighted automata is closed under composition, contains the rational functions (Theorem B.3.6), and contains map reverse and map duplicate by two constructions with triples of states.

    Lean source view on GitHub

    1import Lax132576.TransducerCodes
    2import Lax916827.TwoWayCodes
    3
    4/-!
    5---
    6title: Decidable equivalence of regular functions
    7type: theorem
    8---
    9Equivalence is decidable for regular functions (Theorem C.1.4 of
    10*Transducers*), the functions being given by two-way transducers, which compute
    11exactly the regular functions (Theorem C.2.9). The book reduces to equivalence
    12of weighted automata over the rationals, as for rational functions: the class of
    13functions that can be post-composed with weighted automata is closed under
    14composition, contains the rational functions (Theorem B.3.6), and contains map
    15reverse and map duplicate by two constructions with triples of states.
    16
    17# Formalization notes
    18
    19The two transducers are given by codes (`TwoWayCodes`), under the promise that
    20both are total, and the decided property is equality of the coded relations.
    21The proof does not follow the book's reduction to the letter: the bound on the
    22length of a shortest distinguishing input is obtained from the
    23crossing-sequence decomposition of a two-way run and Schützenberger's rank
    24criterion, which gives an explicit arithmetic bound in the sizes of the codes,
    25and the two coded transducers are compared on all inputs up to that bound over
    26the letters of the codes and one fresh letter.
    27-/
    28
    29namespace Lax916827.RegularEquivalenceDecidable
    30
    31open Lax132576.TransducerCodes Lax916827.TwoWayCodes
    32
    33/-- Equivalence of two total coded two-way transducers is decidable. -/
    34axiom decidable_twoWayCodeRel_eq :
    35 DecidableUnderPromise
    36 (fun p : TwoWayCode × TwoWayCode => TwoWayCodeTotal p.1TwoWayCodeTotal p.2)
    37 (fun p => twoWayCodeRel p.1 = twoWayCodeRel p.2)
    38
    39end Lax916827.RegularEquivalenceDecidable
    40
    Show Proof

    Formalization notes

    The two transducers are given by codes (TwoWayCodesTwoWayCodes), under the promise that both are total, and the decided property is equality of the coded relations. The proof does not follow the book's reduction to the letter: the bound on the length of a shortest distinguishing input is obtained from the crossing-sequence decomposition of a two-way run and Schützenberger's rank criterion, which gives an explicit arithmetic bound in the sizes of the codes, and the two coded transducers are compared on all inputs up to that bound over the letters of the codes and one fresh letter.

    Used by

    none

    From Mathlib

    none

    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…