A Formalisation of the Myhill-Nerode Theorem Based on Regular Expressions (Proof Pearl)

There are numerous textbooks on regular languages. Nearly all of them introduce the subject by describing finite automata and only mentioning on the side a connection with regular expressions. Unfortunately, automata are difficult to formalise in HOL-based theorem provers. The reason is that they need to be represented as graphs, matrices or functions, none of which are inductive datatypes. Also convenient operations for disjoint unions of graphs and functions are not easily formalisiable in HOL. In contrast, regular expressions can be defined conveniently as a datatype and a corresponding reasoning infrastructure comes for free. We show in this paper that a central result from formal language theory--the Myhill-Nerode theorem--can be recreated using only regular expressions.

[1]  Maribel Fernández,et al.  Curry-Style Types for Nominal Terms , 2006, TYPES.

[2]  Tobias Nipkow,et al.  Executing Higher Order Logic , 2000, TYPES.

[3]  Konrad Slind,et al.  Adapting functional programs to higher order logic , 2008, High. Order Symb. Comput..

[4]  Dexter Kozen,et al.  Automata and Computability , 1997, Undergraduate Texts in Computer Science.

[5]  Tobias Nipkow,et al.  Verified Lexical Analysis , 1998, TPHOLs.

[6]  Robert L. Constable,et al.  Constructively formalizing automata theory , 2000, Proof, Language, and Interaction.

[7]  Stefan Berghofer,et al.  Formalizing the Logic-Automaton Connection , 2009, TPHOLs.

[8]  Jeffrey D. Ullman,et al.  Formal languages and their relation to automata , 1969, Addison-Wesley series in computer science and information processing.

[9]  Janusz A. Brzozowski,et al.  Derivatives of Regular Expressions , 1964, JACM.

[10]  David Aspinall,et al.  Formalising Java's Data Race Free Guarantee , 2007, TPHOLs.

[11]  Aaron Turon,et al.  Regular-expression derivatives re-examined , 2009, Journal of Functional Programming.

[12]  Tobias Nipkow,et al.  Proof Pearl: Regular Expression Equivalence and Relation Algebra , 2011, Journal of Automated Reasoning.