Myhill-Nerode

A formalisation of the Myhill-Nerode theorem based on regular expressions. There are numerous textbooks on regular languages. Many of them focus on finite automata for proving properties. Unfortunately, automata are not so straightforward to formalise in theorem provers. The reason is that natural representations for automata are graphs, matrices or functions, none of which are inductive datatypes. Regular expressions can be defined straightforwardly as a datatype and a corresponding reasoning infrastructure comes for free in theorem provers. We show in this paper that a central result from formal language theory -- the Myhill-Nerode Theorem -- can be recreated using only regular expressions. From this theorem many closure properties of regular languages follow.