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

Lax132576.SequentialCharacterisation

Machine-independent characterisation of sequential functions

concepts/Lax132576/SequentialCharacterisation.lean · lax-132576

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

    A function f:ABf : A^* \to B^* is sequential if and only if it (a) is continuous, (b) is prefix preserving, (c) outputs ε\varepsilon on the input ε\varepsilon, and (d) has the bounded increase property: the increase of output length caused by extending the input by one letter,

    supwA,aAf(wa)f(w),\sup_{w \in A^*,\, a \in A} |f(wa)| - |f(w)|,

    is finite (Theorem B.4.6 of Transducers, Ginsburg and Rose). The derivative waf(w)1f(wa)wa \mapsto f(w)^{-1} f(wa), well defined by prefix preservation and of finite image by bounded increase, is shown to be computed by a finite automaton — its length by continuity modulo a large enough number, and then its value by continuity again.

    Lean source view on GitHub

    1import Lax765601.Continuity
    2import Lax765601.ElementaryProperties
    3import Lax132576.SequentialTransducers
    4
    5/-!
    6---
    7title: Machine-independent characterisation of sequential functions
    8type: theorem
    9---
    10A function f:ABf : A^* \to B^* is sequential if and only if it (a) is continuous,
    11(b) is prefix preserving, (c) outputs ε\varepsilon on the input ε\varepsilon,
    12and (d) has the *bounded increase* property: the increase of output length
    13caused by extending the input by one letter,
    14supwA,aAf(wa)f(w),\sup_{w \in A^*,\, a \in A} |f(wa)| - |f(w)|,
    15is finite (Theorem B.4.6 of *Transducers*, Ginsburg and Rose). The derivative
    16waf(w)1f(wa)wa \mapsto f(w)^{-1} f(wa), well defined by prefix preservation and of
    17finite image by bounded increase, is shown to be computed by a finite
    18automaton — its length by continuity modulo a large enough number, and then
    19its value by continuity again.
    20
    21# Formalization notes
    22
    23Item (c) is the conjunct `f [] = []`. An earlier edition of the book omitted
    24it, and without it the statement is false: a sequential transducer produces no
    25output before reading any input, while anan+1a^n \mapsto a^{n+1} has the three
    26other properties. Bounded increase is stated with an explicit bound `K`. Both
    27alphabets are assumed finite.
    28-/
    29
    30namespace Lax132576.SequentialCharacterisation
    31
    32open Lax765601.Continuity Lax765601.ElementaryProperties Lax132576.SequentialTransducers
    33
    34/-- A function is sequential if and only if it maps `ε` to `ε`, is continuous,
    35prefix preserving, and has bounded increase. -/
    36axiom isSequential_iff {A B : Type} [Finite A] [Finite B] (f : List A → List B) :
    37 IsSequential f ↔
    38 f [] = [] ∧ Continuous f ∧ PrefixPreserving f ∧
    39 ∃ K : ℕ, ∀ (w : List A) (a : A), (f (w ++ [a])).length ≤ (f w).length + K
    40
    41end Lax132576.SequentialCharacterisation
    42
    Show Proof

    Formalization notes

    Item (c) is the conjunct f[]=[]f [] = []. An earlier edition of the book omitted it, and without it the statement is false: a sequential transducer produces no output before reading any input, while anan+1a^n \mapsto a^{n+1} has the three other properties. Bounded increase is stated with an explicit bound KK. Both alphabets are assumed finite.

    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…