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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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)
Alvarado, C., Nguyen, Q.-H.: ELAN for Equational Reasoning in Coq. In: Proc. LFM 2000. INRIA (2000) ISBN 2-7261-1166-1
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)
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)
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)
Boudet, A., Jouannaud, J.-P., Schmidt-Schauß, M.: Unification in Boolean Rings and Abelian groups. J. Symb. Comput. 8(5), 449–477 (1989)
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)
Boyer, R.S., Moore, J.S. (eds.): The Correctness Problem in Computer Science. Academic Press (1981)
Braibant, T., Pous, D.: Tactics for working modulo AC in Coq. Coq library (June 2010), http://sardes.inrialpes.fr/~braibant/aac_tactics/
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)
Contejean, E.: A Certified AC Matching Algorithm. In: van Oostrom, V. (ed.) RTA 2004. LNCS, vol. 3091, pp. 70–84. Springer, Heidelberg (2004)
Eker, S.: Single Elementary Associative-Commutative Matching. J. Autom. Reasoning 28(1), 35–51 (2002)
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)
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)
Hullot, J.M.: Associative Commutative pattern matching. In: Proc. IJCAI, pp. 406–412. Morgan Kaufmann Publishers Inc. (1979)
Nguyen, Q.H., Kirchner, C., Kirchner, H.: External Rewriting for Skeptical Proof Assistants. J. Autom. Reasoning 29(3-4), 309–336 (2002)
Nipkow, T.: Equational reasoning in Isabelle. Sci. Comp. Prg. 12(2), 123–149 (1989)
Nipkow, T.: Proof transformations for equational theories. In: Proc. LICS, pp. 278–288. IEEE Computer Society (1990)
Peterson, G., Stickel, M.: Complete sets of reductions for some equational theories. J. ACM 28(2), 233–264 (1981)
Plotkin, G.: Building in equational theories. Machine Intelligence 7 (1972)
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)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Braibant, T., Pous, D. (2011). Tactics for Reasoning Modulo AC in Coq. In: Jouannaud, JP., Shao, Z. (eds) Certified Programs and Proofs. CPP 2011. Lecture Notes in Computer Science, vol 7086. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-25379-9_14
Download citation
DOI: https://doi.org/10.1007/978-3-642-25379-9_14
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-25378-2
Online ISBN: 978-3-642-25379-9
eBook Packages: Computer ScienceComputer Science (R0)