Langlib

Langlib.Classes.RecursivelyEnumerable.Closure.Quotient

RE Closure Under Right Quotient #

This file proves that recursively enumerable languages over finite alphabets are closed under right quotient, both by another RE language and by a regular language. The key result is RE_of_RE_rightQuotient_RE: a search witness consists of a suffix v, a derivation sequence for w ++ v in the grammar for L, and a derivation sequence for v in the grammar for R.

Main declarations #

def reRightQuotientTest {T : Type} [DecidableEq T] (g₁ g₂ : grammar T) [DecidableEq g₁.nt] [DecidableEq g₂.nt] (p : List T × List ( × ) × List ( × )) (w : List T) :

Search test for membership in the right quotient of two grammar languages.

Equations
Instances For

    The suffix-and-two-derivations search test for right quotient is computable.

    theorem RE_of_RE_rightQuotient_RE {T : Type} [DecidableEq T] [Fintype T] (L R : Language T) (hL : is_RE L) (hR : is_RE R) :
    is_RE (L / R)

    RE languages are closed under right quotient with RE languages.

    The class of RE languages is closed under right quotient.

    def reRightQuotientRegularTest {T σ : Type} [DecidableEq T] (g : grammar T) [DecidableEq g.nt] (M : DFA T σ) [DecidablePred fun (x : σ) => x M.accept] (p : List T × List ( × )) (w : List T) :

    Search test for membership in the right quotient of a grammar language by a DFA language.

    Equations
    Instances For

      The suffix-and-derivation search test for right quotient by a DFA language is computable.

      theorem RE_of_RE_rightQuotient_regular {T : Type} [DecidableEq T] [Fintype T] (L R : Language T) (hL : is_RE L) (hR : R.IsRegular) :
      is_RE (L / R)

      RE languages are closed under right quotient with regular languages.

      The class of RE languages is closed under right quotient with regular languages.