Context-Free Non-Closure Under Intersection #
This file proves that context-free languages are not closed under intersection.
The witnesses are lang_eq_any = {aⁿbⁿcᵐ | n,m ∈ ℕ} and lang_any_eq = {aⁿbᵐcᵐ | n,m ∈ ℕ},
each context-free (CF_lang_eq_any / CF_lang_any_eq, in
Langlib.Classes.ContextFree.Examples.{AnBnCm,AnBmCm}). Their intersection is
lang_eq_eq = {aⁿbⁿcⁿ | n ∈ ℕ}, which is not context-free (notCF_lang_eq_eq, in
Langlib.Classes.ContextFree.Examples.AnBnCn).
This file supplies the intersection bookkeeping lang_eq_any ⊓ lang_any_eq = lang_eq_eq
and assembles the non-closure statements.
Main declarations #
nnyCF_of_CF_i_CF- if L₁ and L₂ are CF, then L₁ ∩ L₂ is not always CFCF_notClosedUnderIntersection— CF is not closed under intersection overFin 3
Context-free languages over Fin 3 are not closed under intersection.
Context-free languages are not closed under intersection for any type with at least
3 elements. That is, as long as α has at least 3 distinct elements, not all
intersections of context-free languages over α are context-free.
Context-free languages are not closed under intersection for any finite alphabet with at least three symbols.