The transition monoid of a DFA #
The transition monoid of an automaton is the monoid of state-transformations induced by input words — foundational algebraic automata theory (syntactic monoid, Schützenberger's theorem, Eilenberg variety theory), currently absent from mathlib.
A word w acts on a state s of M : DFA α σ by s ↦ M.evalFrom s w. Reading u then v
(evalFrom_of_append) makes this a right action — an anti-homomorphism into Function.End σ — so
as a MonoidHom its target is the opposite monoid (Function.End σ)ᵐᵒᵖ.
DFA.transitionHom M : FreeMonoid α →* (Function.End σ)ᵐᵒᵖ— the transition action.DFA.transitionMonoid M : Submonoid (Function.End σ)ᵐᵒᵖ— its range, the transition monoid.DFA.transitionMonoidEquiv M— the first iso theorem:(Con.ker M.transitionHom).Quotient ≃*the transition monoid.Finite (Function.End σ)/Finite M.transitionMonoidinstances (these do not auto-synthesize fromFinite σ, so we register them here once).
The transition action of M: word w sends state s to M.evalFrom s w.
Equations
- M.transitionHom = { toFun := fun (w : FreeMonoid α) => MulOpposite.op fun (s : σ) => M.evalFrom s (FreeMonoid.toList w), map_one' := ⋯, map_mul' := ⋯ }
Instances For
Two words induce the same transition iff evalFrom agrees from every state.
The transition monoid of M: the range of its transition action.
Equations
- M.transitionMonoid = MonoidHom.mrange M.transitionHom
Instances For
First isomorphism theorem: the transition monoid as a quotient of FreeMonoid α.
Equations
- M.transitionMonoidEquiv = Con.quotientKerEquivRange M.transitionHom
Instances For
Function.End σ is finite when σ is (not found automatically through the def).
(Function.End σ)ᵐᵒᵖ is finite when σ is (likewise not found automatically).