RTA 2005: Term Rewriting and Applications pp 469-483

# The Algebra of Equality Proofs

• Aaron Stump
• Li-Yang Tan
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3467)

## Abstract

Proofs of equalities may be built from assumptions using proof rules for reflexivity, symmetry, and transitivity. Reflexivity is an axiom proving x=x for any x; symmetry is a 1-premise rule taking a proof of x=y and returning a proof of y=x; and transitivity is a 2-premise rule taking proofs of x=y and y=z, and returning a proof of x=z. Define an equivalence relation to hold between proofs iff they prove a theorem in common. The main theoretical result of the paper is that if all assumptions are independent, this equivalence relation is axiomatized by the standard axioms of group theory: reflexivity is the unit of the group, symmetry is the inverse, and transitivity is the multiplication. Using a standard completion of the group axioms, we obtain a rewrite system which puts equality proofs into canonical form. Proofs in this canonical form use the fewest possible assumptions, and a proof can be canonized in linear time using a simple strategy. This result is applied to obtain a simple extension of the union-find algorithm for ground equational reasoning which produces minimal proofs. The time complexity of the original union-find operations is preserved, and minimal proofs are produced in worst-case time $$O(n^{\textit{log}_2 3})$$, where n is the number of expressions being equated. As a second application, the approach is used to achieve significant performance improvements for the CVC cooperating decision procedure.

## References

1. 1.
Barrett, C., Dill, D., Stump, A.: Checking Satisfiability of First-Order Formulas by Incremental Translation to SAT. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, p. 236. Springer, Heidelberg (2002)
2. 2.
Barrett, C., Berezin, S.: CVC Lite: A new implementation of the cooperating validity checker. In: Alur, R., Peled, D.A. (eds.) CAV 2004. LNCS, vol. 3114, pp. 515–518. Springer, Heidelberg (2004)
3. 3.
Burch, J.R., Dill, D.L.: Automatic verification of pipelined microprocessor control. In: Dill, D.L. (ed.) CAV 1994. LNCS, vol. 818, pp. 68–80. Springer, Heidelberg (1994)Google Scholar
4. 4.
Cormen, T., Leiserson, C., Rivest, R.: Introduction to Algorithms. MIT Press, Cambridge (1992)Google Scholar
5. 5.
de Moura, L., Rueß, H., Shankar, N.: Justifying Equality. In: Ranise, S., Tinelli, C. (eds.) 2nd International Workshop on Pragmatics of Decision Procedures in Automated Reasoning (2004)Google Scholar
6. 6.
Filliâtre, J., Owre, S., Rueß, H., Shankar, N.: ICS: integrated canonizer and solver. In: Berry, G., Comon, H., Finkel, A. (eds.) CAV 2001. LNCS, vol. 2102, p. 246. Springer, Heidelberg (2001)
7. 7.
Knuth, D., Bendix, P.: SimpleWord Problems in Universal Algebras. In: Leech, J. (ed.) Computational Problems in Abstract Algebra, pp. 263–297. Pergamon Press, Oxford (1970)Google Scholar
8. 8.
Lahiri, S., Bryant, R., Goel, A., Talupur, M.: Revisiting Positive Equality. In: Jensen, K., Podelski, A. (eds.) TACAS 2004. LNCS, vol. 2988, pp. 1–15. Springer, Heidelberg (2004)
9. 9.
Nelson, G., Oppen, D.: Fast decision procedures based on congruence closure. Journal of the Association for Computing Machinery 27(2), 356–364 (1980)
10. 10.
Nieuwenhuis, R., Oliveras, A.: Union-Find and Congruence Closure Algorithms that Produce Proofs. In: Ranise, S., Tinelli, C. (eds.) 2nd International Workshop on Pragmatics of Decision Procedures in Automated Reasoning (2004) (short paper)Google Scholar
11. 11.
Nieuwenhuis, R., Oliveras, A.: Proof-producing Congruence Closure. In: Giesl, J. (ed.) 16th International Conference on Rewriting Techniques and Applications (2005) (under review)Google Scholar
12. 12.
Pnueli, A., Rodeh, Y., Shtrichman, O., Siegel, M.: Deciding Equality Formulas by Small Domains Instantiations. In: Halbwachs, N., Peled, D.A. (eds.) CAV 1999. LNCS, vol. 1633, pp. 455–469. Springer, Heidelberg (1999)
13. 13.
Ruess, H., Shankar, N.: Deconstructing Shostak. In: 16th IEEE Symposium on Logic in Computer Science (2001)Google Scholar
14. 14.
Shostak, R.: Deciding combinations of theories. Journal of the Association for Computing Machinery 31(1), 1–12 (1984)
15. 15.
Stump, A.: Checking Validities and Proofs with CVC and flea. PhD thesis, Stanford University (2002), available from http://www.cs.wustl.edu/~stump/
16. 16.
Stump, A., Barrett, C., Dill, D.: CVC: a Cooperating Validity Checker. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, p. 500. Springer, Heidelberg (2002)
17. 17.
Velev, M., Bryant, R.: Superscalar Processor Verification Using Efficient Reductions of the Logic of Equality with Uninterpreted Functions. In: Pierre, L., Kropf, T. (eds.) CHARME 1999. LNCS, vol. 1703, pp. 37–53. Springer, Heidelberg (1999)