Towards Pen-and-Paper-Style Equational Reasoning in Interactive Theorem Provers by Equality Saturation

Read full text
Authors: Marcus Rossel, Rudi Schneider, Thomas Kœhler, Michel Steuwer, Andrés Goens
Cited by: 1
References: 54

Abstract

Equations are ubiquitous in mathematical reasoning. Often, however, they only hold under certain conditions. As these conditions are usually clear from context, mathematicians regularly omit them when performing equational reasoning on paper. In contrast, interactive theorem provers pedantically insist on every detail to be convinced that a theorem holds, hindering equational reasoning at the more abstract level of pen-andpaper mathematics. In this paper, we address this issue by raising the level of equational reasoning to enable pen-and-paper style in interactive theorem provers. We achieve this by interpreting theorems as conditional rewrite rules, and use equality saturation to automatically derive equational proofs. Conditions that cannot be automatically proven may be surfaced as proof obligations. Concretely, we present how to interpret theorems as conditional rewrite rules for a significant class of theorems. Handling these theorems goes beyond simple syntactic rewriting, and deals with aspects like propositional conditions and type classes. We evaluate our approach by implementing it as a tactic in Lean, using the egg library for equality saturation with e-graphs. We show four use cases demonstrating the efficacy of this higher level of abstraction for equational reasoning.

Fields of Study & Subjects

Constraint Satisfaction and Optimization Logic Reasoning and Knowledge Polynomial and algebraic computation

Publication details

Journal / source
Proceedings of the ACM on Programming Languages
Publisher
Association for Computing Machinery (ACM)
Volume
10
Issue
POPL
Pages
718–747
Publication date
8 January 2026
Language
EN