Advertisement

Tactics for Reasoning Modulo AC in Coq

  • Thomas Braibant
  • Damien Pous
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7086)

Abstract

We present a set of tools for rewriting modulo associativity and commutativity (AC) in Coq, solving a long-standing practical problem. We use two building blocks: first, an extensible reflexive decision procedure for equality modulo AC; second, an OCaml plug-in for pattern matching modulo AC. We handle associative only operations, neutral elements, uninterpreted function symbols, and user-defined equivalence relations. By relying on type-classes for the reification phase, we can infer these properties automatically, so that end-users do not need to specify which operation is A or AC, or which constant is a neutral element.

Keywords

Pattern Match Binary Operation Decision Procedure Function Symbol Neutral Element 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Allen, S.F., Constable, R.L., Howe, D.J., Aitken, W.E.: The Semantics of Reflected Proof. In: Proc. LICS, pp. 95–105. IEEE Computer Society (1990)Google Scholar
  2. 2.
    Alvarado, C., Nguyen, Q.-H.: ELAN for Equational Reasoning in Coq. In: Proc. LFM 2000. INRIA (2000) ISBN 2-7261-1166-1Google Scholar
  3. 3.
    Armand, M., Faure, G., Grégoire, B., Keller, C., Théry, L., Werner, B.: A Modular Integration of SAT/SMT Solvers to Coq Through Proof Witnesses. In: Jouannaud, J.-P., Shao, Z. (eds.) CPP 2011. LNCS, vol. 7086, pp. 135–150. Springer, Heidelberg (2011)Google Scholar
  4. 4.
    Barthe, G., Ruys, M., Barendregt, H.: A Two-Level Approach Towards Lean Proof-Checking. In: Berardi, S., Coppo, M. (eds.) TYPES 1995. LNCS, vol. 1158, pp. 16–35. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  5. 5.
    Besson, F.: Fast Reflexive Arithmetic Tactics the Linear Case and Beyond. In: Altenkirch, T., McBride, C. (eds.) TYPES 2006. LNCS, vol. 4502, pp. 48–62. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  6. 6.
    Boudet, A., Jouannaud, J.-P., Schmidt-Schauß, M.: Unification in Boolean Rings and Abelian groups. J. Symb. Comput. 8(5), 449–477 (1989)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Boutin, S.: Using Reflection to Build Efficient and Certified Decision Procedures. In: Ito, T., Abadi, M. (eds.) TACS 1997. LNCS, vol. 1281, pp. 515–529. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  8. 8.
    Boyer, R.S., Moore, J.S. (eds.): The Correctness Problem in Computer Science. Academic Press (1981)Google Scholar
  9. 9.
    Braibant, T., Pous, D.: Tactics for working modulo AC in Coq. Coq library (June 2010), http://sardes.inrialpes.fr/~braibant/aac_tactics/
  10. 10.
    Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: The Maude 2.0 system. In: Nieuwenhuis, R. (ed.) RTA 2003. LNCS, vol. 2706, pp. 76–87. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  11. 11.
    Contejean, E.: A Certified AC Matching Algorithm. In: van Oostrom, V. (ed.) RTA 2004. LNCS, vol. 3091, pp. 70–84. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  12. 12.
    Eker, S.: Single Elementary Associative-Commutative Matching. J. Autom. Reasoning 28(1), 35–51 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Gonthier, G., Ziliani, B., Nanevski, A., Dreyer, D.: How to make ad hoc proof automation less ad hoc. In: Proc. ICFP, ACM (to appear, 2011)Google Scholar
  14. 14.
    Grégoire, B., Mahboubi, A.: Proving Equalities in a Commutative Ring Done Right in Coq. In: Hurd, J., Melham, T. (eds.) TPHOLs 2005. LNCS, vol. 3603, pp. 98–113. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  15. 15.
    Hullot, J.M.: Associative Commutative pattern matching. In: Proc. IJCAI, pp. 406–412. Morgan Kaufmann Publishers Inc. (1979)Google Scholar
  16. 16.
    Nguyen, Q.H., Kirchner, C., Kirchner, H.: External Rewriting for Skeptical Proof Assistants. J. Autom. Reasoning 29(3-4), 309–336 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  17. 17.
    Nipkow, T.: Equational reasoning in Isabelle. Sci. Comp. Prg. 12(2), 123–149 (1989)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Nipkow, T.: Proof transformations for equational theories. In: Proc. LICS, pp. 278–288. IEEE Computer Society (1990)Google Scholar
  19. 19.
    Peterson, G., Stickel, M.: Complete sets of reductions for some equational theories. J. ACM 28(2), 233–264 (1981)MathSciNetCrossRefzbMATHGoogle Scholar
  20. 20.
    Plotkin, G.: Building in equational theories. Machine Intelligence 7 (1972)Google Scholar
  21. 21.
    Slind, K.: AC Unification in HOL90. In: Joyce, J.J., Seger, C.-J.H. (eds.) HUG 1993. LNCS, vol. 780, pp. 436–449. Springer, Heidelberg (1994)CrossRefGoogle Scholar
  22. 22.
    Sozeau, M., Oury, N.: First-Class Type Classes. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 278–293. Springer, Heidelberg (2008)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Thomas Braibant
    • 1
  • Damien Pous
    • 1
  1. 1.LIG, UMR 5217, CNRSINRIAGrenobleFrance

Personalised recommendations