Lax132576.RationalFunctions
Rational functions
concepts/Lax132576/RationalFunctions.lean · lax-132576
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
In the paper
- page 44 of the paper of lax-157538, Transducers
Definition
A rational function (Definition B.2.1 of Transducers) is the special case of a rational relation in which each input string is related to exactly one output string. The definition is semantic: the underlying automaton is nondeterministic and merely happens to have a unique output for every input, possibly through several runs; Theorem B.2.3 gives the deterministic model, the bimachine, that computes exactly these functions. Rational functions inherit closure under composition and continuity from rational relations, and every Mealy machine is a rational function.
Lean source view on GitHub
| 1 | import Lax132576.RationalRelations |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Rational functions |
| 6 | type: definition |
| 7 | --- |
| 8 | A *rational function* (Definition B.2.1 of *Transducers*) is the special case |
| 9 | of a rational relation in which each input string is related to exactly one |
| 10 | output string. The definition is semantic: the underlying automaton is |
| 11 | nondeterministic and merely happens to have a unique output for every input, |
| 12 | possibly through several runs; Theorem B.2.3 gives the deterministic model, the |
| 13 | bimachine, that computes exactly these functions. Rational functions inherit |
| 14 | closure under composition and continuity from rational relations, and every |
| 15 | Mealy machine is a rational function. |
| 16 | |
| 17 | # Formalization notes |
| 18 | |
| 19 | A function is rational if its graph `fun w v => v = f w` is a rational |
| 20 | relation. Since `f` is a total function, this is exactly "a rational relation |
| 21 | in which each input has exactly one output"; partial rational functions do not |
| 22 | occur in the book's statements. |
| 23 | -/ |
| 24 | |
| 25 | namespace Lax132576.RationalFunctions |
| 26 | |
| 27 | open Lax132576.RationalRelations |
| 28 | |
| 29 | /-- A string-to-string function is rational if its graph is a rational relation. |
| 30 | -/ |
| 31 | def IsRationalFun {A B : Type} (f : List A → List B) : Prop := |
| 32 | IsRationalRel (fun w v => v = f w) |
| 33 | |
| 34 | end Lax132576.RationalFunctions |
| 35 |
Formalization notes
A function is rational if its graph is a rational relation. Since is a total function, this is exactly "a rational relation in which each input has exactly one output"; partial rational functions do not occur in the book's statements.
Builds on
Used by
Lax132576.BimachineOfRationalLax132576.LengthPreservingNormalFormLax132576.PrimesOfRationalLax132576.RationalMachineIndependentLax132576.RationalMealyCharacterisationLax132576.RationalOfBimachineLax132576.RationalOfPrimesLax132576.RationalOfWeightedPrecompositionLax132576.RationalPrimesLax132576.RationalUnambiguousBimachineLax132576.RationalViaWeightedLax132576.UnambiguousOfRationalLax132576.WeightedPrecompositionLax314295.LogicPrecomputationLax314295.RationalIffRelabellingLax314295.RationalOfRelabellingLax314295.RelabellingOfRationalLax709149.RegularUnderRepresentationLax916827.ConfigurationGraphRationalLax916827.RegularFunctionsLax916827.TwoWayRationalPrecomposition
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