Langlib

Langlib.Classes.RecursivelyEnumerable.Closure.Intersection

RE Closure Under Intersection #

This file proves the search-level closure theorem for recursively enumerable languages under intersection. The key result is RE_of_RE_i_RE: after replacing both grammar witnesses by finite-nonterminal equivalents, a single computable test checks both derivation witnesses and the existing search-to-TM compiler turns that test back into an RE witness.

Main declarations #

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

Search test for membership in the intersection of two grammar languages.

Equations
Instances For

    The two-witness intersection search test is computable.

    theorem RE_of_RE_i_RE {T : Type} [DecidableEq T] [Fintype T] (L₁ L₂ : Language T) :
    is_RE L₁ is_RE L₂is_RE (L₁L₂)

    Recursively enumerable languages over a finite alphabet are closed under intersection.

    The class of recursively enumerable languages is closed under intersection.

    theorem RE_of_RE_i_regular {T : Type} [DecidableEq T] [Fintype T] (L R : Language T) :
    is_RE LR.IsRegularis_RE (LR)

    RE languages are closed under intersection with a Mathlib-regular language.

    The class of RE languages is closed under intersection with regular languages.