Regular Closure Under Inverse Homomorphism #
Proof idea: keep the DFA for the target language, but replace each input step on
a by the DFA transition over the whole word h a. After reading w, the new
automaton is in exactly the state the old automaton would reach on w.flatMap h.
Regular Closure Under Inverse String Homomorphism #
This file proves that regular languages are closed under inverse string
homomorphism. Given a DFA M recognising L and a string homomorphism
h : β → List α, we construct a DFA for h⁻¹(L) = {w ∈ β* | h*(w) ∈ L} by
composing h into the transition function.
Main results #
inverseHomDFA— the DFA for the preimage under a string homomorphism.inverseHomDFA_correct— correctness of the construction.Language.IsRegular.inverseStringHomomorphism— ifLis regular then{w | w.flatMap h ∈ L}is regular.
DFA for the inverse homomorphism h⁻¹(L).
Given a DFA M over α and a string homomorphism h : β → List α, the
new DFA has the same state set but transitions via M.evalFrom q (h b) — it
processes the entire image h(b) in one step.
Equations
Instances For
The class of regular languages is closed under inverse string homomorphism.