Journal of Automated Reasoning

, Volume 49, Issue 1, pp 95–106 | Cite as

Proof Pearl: Regular Expression Equivalence and Relation Algebra

  • Alexander Krauss
  • Tobias Nipkow


We describe and verify an elegant equivalence checker for regular expressions. It works by constructing a bisimulation relation between (derivatives of) regular expressions. By mapping regular expressions to binary relations, an automatic and complete proof method for (in)equalities of binary relations over union, composition and (reflexive) transitive closure is obtained. The verification is carried out in the theorem prover Isabelle/HOL, yielding a practically useful decision procedure.


Isabelle/HOL Decision procedure Regular expressions 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Berghofer, S., Nipkow, T.: Executing higher order logic. In: Callaghan, P., Luo, Z., McKinna, J., Pollack, R. (eds.) Types for Proofs and Programs (TYPES 2000). Lect. Notes in Comp. Sci., vol. 2277, pp. 24–40. Springer (2000)Google Scholar
  2. 2.
    Bonsangue, M.M., Caltais, G., Goriac, E., Lucanu, D., J.Rutten, J.M.M., Silva, A.: A decision procedure for bisimilarity of generalized regular expressions. In: Brazilian Symposium on Formal Methods (SBMF 2010). Lect. Notes in Comp. Sci. Springer (2010)Google Scholar
  3. 3.
    Boyer, R.S., Moore, J S.: Metafunctions: proving them correct and using them efficiently as new proof procedures. In Boyer, R., Moore, J S. (eds.) The Correctness Problem in Computer Science, pp. 103–184. Academic Press (1981)Google Scholar
  4. 4.
    Braibant, T., Pous, D.: An efficient Coq tactic for deciding Kleene algebras. In: Kaufmann, M., Paulson, L. (eds.) Interactive Theorem Proving (ITP 2010). Lect. Notes in Comp. Sci., vol. 6172, pp. 163–178. Springer (2010)Google Scholar
  5. 5.
    Brzozowski, J.: Derivatives of regular expressions. J. ACM 11, 481–494 (1964)MathSciNetzbMATHCrossRefGoogle Scholar
  6. 6.
    Haftmann, F., Nipkow, T.: Code generation via higher-order rewrite systems. In: Blume, M., Kobayashi, N., Vidal, G. (eds.) Functional and Logic Programming (FLOPS 2010). Lect. Notes in Comp. Sci., vol. 6009, pp. 103–117. Springer (2010)Google Scholar
  7. 7.
    Kozen, D.: A completeness theorem for Kleene algebras and the algebra of regular events. Inf. Comput. 110, 366–390 (1994)MathSciNetzbMATHCrossRefGoogle Scholar
  8. 8.
    Kozen, D.: On the coalgebraic theory of Kleene algebra with tests. Technical Report, Computing and Information Science, Cornell University. (2008)
  9. 9.
    Krauss, A., Nipkow, T.: Regular sets and expressions. In: Klein, G., Nipkow, T., Paulson, L.C. (eds.) The Archive of Formal Proofs. Formal proof development. (2010)
  10. 10.
    Owens, S., Reppy, J., Turon, A.: Regular-expression derivatives re-examined. J. Funct. Program. 19, 173–190 (2009)MathSciNetzbMATHCrossRefGoogle Scholar
  11. 11.
    Rutten, J.J.M.M.: Automata and coinduction (an exercise in coalgebra). In: Sangiorgi, D., de Simone, R. (eds.) Concurrency Theory (CONCUR’98). Lect. Notes in Comp. Sci., vol. 1466, pp. 194–218. Springer (1998)Google Scholar
  12. 12.
    Thiemann, R., Sternagel, C.: Certification of termination proofs using CeTA. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) Theorem Proving in Higher Order Logics (TPHOLs 2009). Lect. Notes in Comp. Sci., vol. 5674, pp. 452–468. Springer (2009)Google Scholar

Copyright information

© Springer Science+Business Media B.V. 2011

Authors and Affiliations

  1. 1.Institut für InformatikTechnische Universität MünchenMunichGermany

Personalised recommendations