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

Lax132576.EpsilonFreeAutomata

Extended transitions and the elimination of ε-transitions

concepts/Lax132576/EpsilonFreeAutomata.lean · lax-132576

definition

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

    In the paper

    Definition

    Transitions with empty input (ε\varepsilon-transitions) are essential to automata with output in two roles: producing an output for the empty input, and producing infinitely many outputs for one input. Lemma B.2.4 of Transducers shows that, up to these two caveats, they can be eliminated. An automaton with extended transitions carries, instead of an output string, a regular language of output strings on every transition; the relation it computes takes as outputs all strings in the concatenation of the languages along an accepting run. An automaton (with ordinary or extended transitions) is in the ε-free normal form of the lemma if in every accepting run, either the input is nonempty and each transition reads exactly one letter, or the input is empty and the run consists of exactly one transition.

    Lean source view on GitHub

    1import Mathlib.Computability.DFA
    2import Lax132576.RationalRelations
    3
    4/-!
    5---
    6title: Extended transitions and the elimination of ε-transitions
    7type: definition
    8---
    9Transitions with empty input (ε\varepsilon-transitions) are essential to
    10automata with output in two roles: producing an output for the empty input, and
    11producing infinitely many outputs for one input. Lemma B.2.4 of *Transducers*
    12shows that, up to these two caveats, they can be eliminated. An automaton with
    13*extended transitions* carries, instead of an output string, a regular language
    14of output strings on every transition; the relation it computes takes as
    15outputs all strings in the concatenation of the languages along an accepting
    16run. An automaton (with ordinary or extended transitions) is in the
    17*ε-free normal form* of the lemma if in every accepting run, either the input
    18is nonempty and each transition reads exactly one letter, or the input is empty
    19and the run consists of exactly one transition.
    20
    21# Formalization notes
    22
    23An automaton with extended transitions is a labelled automaton whose labels are
    24languages over `B`; `IsExtendedNFAO` asks that every label be regular, and
    25`extRel` is its relation, `v` ranging over the product of the languages of the
    26run. `EpsilonFree` is the normal form, stated for any labelled automaton so that
    27both halves of Lemma B.2.4 can use it.
    28-/
    29
    30namespace Lax132576.EpsilonFreeAutomata
    31
    32open Lax132576.LabelledAutomata
    33
    34/-- An automaton with extended transitions: transitions are labelled by an input
    35string and a regular language of output strings. -/
    36def IsExtendedNFAO {A B Q : Type} (M : LabAut A (Language B) Q) : Prop :=
    37 ∀ t ∈ M.δ, Language.IsRegular t.2.2.1
    38
    39/-- The relation computed by an automaton with extended transitions: the output
    40is any string in the concatenation of the languages along an accepting run. -/
    41def extRel {A B Q : Type} (M : LabAut A (Language B) Q) (w : List A) (v : List B) : Prop :=
    42 ∃ ts, M.Accepting ts ∧ LabAut.inputOf ts = w ∧ v ∈ (LabAut.labelsOf ts).prod
    43
    44/-- The normal form of Lemma B.2.4: in every accepting run, either the input is
    45nonempty and each transition reads exactly one letter, or the input is empty and
    46the run has exactly one transition. -/
    47def EpsilonFree {A L Q : Type} (M : LabAut A L Q) : Prop :=
    48 ∀ ts, M.Accepting ts →
    49 (LabAut.inputOf ts ≠ [] → ∀ t ∈ ts, t.2.1.length = 1) ∧
    50 (LabAut.inputOf ts = [] → ts.length = 1)
    51
    52end Lax132576.EpsilonFreeAutomata
    53

    Formalization notes

    An automaton with extended transitions is a labelled automaton whose labels are languages over BB; IsExtendedNFAOIsExtendedNFAO asks that every label be regular, and extRelextRel is its relation, vv ranging over the product of the languages of the run. EpsilonFreeEpsilonFree is the normal form, stated for any labelled automaton so that both halves of Lemma B.2.4 can use it.

    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…