Langlib

Langlib.Classes.RecursivelyEnumerable.Closure.InverseHomomorphism

RE Closure Under Inverse Homomorphism #

This file proves that recursively enumerable languages over finite alphabets are closed under inverse string homomorphism. The key result is RE_of_inverseHomomorphism_RE: for a fixed finite-alphabet homomorphism h : α → List β, the preprocessing map w ↦ w.flatMap h is primitive recursive, so a grammar-membership search for L can be reused as a search for the preimage {w | w.flatMap h ∈ L}.

Main declarations #

def reInverseHomomorphismTest {α β : Type} [DecidableEq β] (g : grammar β) [DecidableEq g.nt] (h : αList β) (seq : List ( × )) (w : List α) :

Search test for the inverse homomorphic image of a grammar language.

Equations
Instances For

    The inverse-homomorphism grammar search test is computable.

    theorem RE_of_inverseHomomorphism_RE {α β : Type} [Fintype α] [Fintype β] (L : Language β) (h : αList β) :
    is_RE Lis_RE {w : List α | List.flatMap h w L}

    RE languages over finite alphabets are closed under inverse string homomorphism.

    The class of RE languages is closed under inverse string homomorphism.