A formalisation of the Myhill-Nerode theorem based on regular expressions (proof pearl)

  • Authors:
  • Chunhan Wu;Xingyuan Zhang;Christian Urban

  • Affiliations:
  • PLA University of Science and Technology, China;PLA University of Science and Technology, China;TU Munich, Germany

  • Venue:
  • ITP'11 Proceedings of the Second international conference on Interactive theorem proving
  • Year:
  • 2011

Quantified Score

Hi-index 0.01

Visualization

Abstract

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.