Langlib

Langlib.Classes.Regular.Closure.Complement

Regular Closure Under Complement (Iff) #

This file proves that a language is regular if and only if its complement is regular.

Proof idea: use the same deterministic finite automaton and replace its accept set by the Boolean complement. Since every input has a unique final DFA state, flipping acceptance recognizes exactly the complement language.

Main declarations #

A language is regular if and only if its complement is regular.

The class of regular languages is closed under complement.