Regular Closure Under Prefix #
Proof idea: a word is a prefix of some word in L exactly when the DFA state
reached after reading it can still reach an accepting state. Mark those
co-reachable states as accepting in a new DFA.
Regular Closure Under Prefix #
This file proves that regular languages are closed under the prefix operation and shows that the converse fails over any nontrivial alphabet.
Main declarations #
The prefix DFA accepts exactly the prefix language of the original DFA.
Regular languages are closed under the prefix operation.
The converse of prefix closure fails over any nontrivial alphabet.