Further closure properties of regular languages #
Regular languages are closed under images along letter maps (Language.map), the projection
step of the translation of monadic second-order logic into automata
Thomas, Section 3. The alphabet may be infinite. Three families of languages defined
by the positions of letters are regular for every pair of letter predicates p, q: the words
all of whose letters satisfy p, the words with some letter satisfying p, and the words with a
letter satisfying p strictly before a letter satisfying q. They are the atomic languages of
the same translation; the first two are also stated over positions w[i].
Languages given by conditions on words, {w | P w}, are closed under the connectives through
the existing CSLib closures, with no set-builder restatement: hP.inf hQ proves regularity of
{w | P w ∧ Q w}, and likewise IsRegular.add for ∨, IsRegular.compl for ¬, and
IsRegular.top/IsRegular.zero for True/False. Finite conjunctions over an index type are
IsRegular.setOf_forall.
Main results #
Cslib.Language.IsRegular.map: the image of a regular language along a letter map is regular.Cslib.Language.IsRegular.setOf_forall_mem,Cslib.Language.IsRegular.setOf_exists_mem,Cslib.Language.IsRegular.setOf_exists_lt,Cslib.Language.IsRegular.setOf_forall_getElem,Cslib.Language.IsRegular.setOf_exists_getElem: regularity of the positional languages.Cslib.Language.IsRegular.setOf_forall: regularity of a finite conjunction of regular conditions.
References #
The image of a regular language along a letter map is regular.
The words all of whose letters satisfy p form a regular language.
The words with some letter satisfying p form a regular language.
The words with a letter satisfying p strictly before a letter satisfying q form a regular
language.