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

Lax132576.RationalOfWeightedPrecomposition

Functions that weighted automata can be pre-composed with are rational

concepts/Lax132576/RationalOfWeightedPrecomposition.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

    If pre-composition with a function f:ABf : A^* \to B^* preserves computability by weighted automata over every semiring, then ff is rational: the implication ⇐ of Theorem B.3.6 of Transducers, its content. The book applies the hypothesis to the weighted automaton over the semiring of regular languages that maps a string to the singleton language of itself — the rational relations are the weighted automata over that semiring — and reads a rational relation computing the graph of ff off the resulting automaton.

    Lean source view on GitHub

    1import Lax132576.RationalFunctions
    2import Lax132576.WeightedAutomata
    3
    4/-!
    5---
    6title: Functions that weighted automata can be pre-composed with are rational
    7type: theorem
    8---
    9If pre-composition with a function f:ABf : A^* \to B^* preserves computability by
    10weighted automata over every semiring, then ff is rational: the implication
    11⇐ of Theorem B.3.6 of *Transducers*, its content. The book applies the
    12hypothesis to the weighted automaton over the semiring of regular languages
    13that maps a string to the singleton language of itself — the rational relations
    14are the weighted automata over that semiring — and reads a rational relation
    15computing the graph of ff off the resulting automaton.
    16
    17# Formalization notes
    18
    19The hypothesis quantifies over all semirings `S : Type` in the same universe as
    20the alphabets, which is where the semiring of regular languages over `B` lives.
    21Both alphabets are assumed finite.
    22-/
    23
    24namespace Lax132576.RationalOfWeightedPrecomposition
    25
    26open Lax132576.RationalFunctions Lax132576.WeightedAutomata
    27
    28/-- A function with which every weighted automaton can be pre-composed is
    29rational. -/
    30axiom isRationalFun_of_weighted_precomp {A B : Type} [Finite A] [Finite B]
    31 (f : List A → List B)
    32 (h : ∀ (S : Type) (_ : Semiring S) (h : List B → S), IsWeighted h → IsWeighted (h ∘ f)) :
    33 IsRationalFun f
    34
    35end Lax132576.RationalOfWeightedPrecomposition
    36
    Show Proof

    Formalization notes

    The hypothesis quantifies over all semirings S:TypeS : Type in the same universe as the alphabets, which is where the semiring of regular languages over BB lives. Both alphabets are assumed finite.

    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…