RE Closure Under Substitution #
This file proves that recursively enumerable languages over finite alphabets are
closed under finite-alphabet substitution. The key result is
RE_closedUnderSubstitution: encode each substituted symbol as a block
inl a :: map inr u, take the Kleene star of the RE block language, restrict
the projected source word to the original RE language by inverse homomorphism
and intersection, then erase the source-symbol markers by homomorphism.
Main declarations #
Projection from encoded substitution blocks to the source alphabet.
Equations
- Language.substProj (Sum.inl a) = [a]
- Language.substProj (Sum.inr val) = []
Instances For
Erasure from encoded substitution blocks to the target alphabet.
Equations
- Language.substErase (Sum.inl a) = []
- Language.substErase (Sum.inr val) = [val]
Instances For
@[simp]
@[simp]
theorem
Language.mem_homomorphicImage_iff_flatMap
{α β : Type}
(L : Language α)
(h : α → List β)
(w : List β)
:
theorem
Language.subst_coding_eq_subst
{α β : Type}
(L : Language α)
(f : α → Language β)
:
(KStar.kstar (substBlock f) ⊓ {y : List (α ⊕ β) | List.flatMap substProj y ∈ L}).homomorphicImage substErase = L.subst f
The class of recursively enumerable languages is closed under substitution.