Context-Free Non-Closure Under Complement #
This file derives failure of closure under complement from the corresponding intersection result.
Counterexample idea: if CFLs were closed under complement, then together with closure under union they would also be closed under intersection by De Morgan's law. This contradicts the explicit non-closure result for intersection.
Main declarations #
Context-free languages over Fin 3 are not closed under complement.
theorem
CF_notClosedUnderComplement_of_three
{α : Type}
(a b c : α)
(hab : a ≠ b)
(hac : a ≠ c)
(hbc : b ≠ c)
:
Context-free languages are not closed under complement for any type with at least
3 elements. That is, as long as α has at least 3 distinct elements, not all
complements of context-free languages over α are context-free.
Context-free languages are not closed under complement for any finite alphabet with at least three symbols.