Bridging Syntax and Semantics of Lean Expressions in E-Graphs (2405.10188v1)
Abstract: Interactive theorem provers, like Isabelle/HOL, Coq and Lean, have expressive languages that allow the formalization of general mathematical objects and proofs. In this context, an important goal is to reduce the time and effort needed to prove theorems. A significant means of achieving this is by improving proof automation. We have implemented an early prototype of proof automation for equational reasoning in Lean by using equality saturation. To achieve this, we need to bridge the gap between Lean's expression semantics and the syntactically driven e-graphs in equality saturation. This involves handling bound variables, implicit typing, as well as Lean's definitional equality, which is more general than syntactic equality and involves notions like $\alpha$-equivalence, $\beta$-reduction, and $\eta$-reduction. In this extended abstract, we highlight how we attempt to bridge this gap, and which challenges remain to be solved. Notably, while our techniques are partially unsound, the resulting proof automation remains sound by virtue of Lean's proof checking.
- Carneiro, M. Lean4lean: Towards a formalized metatheory for the lean theorem prover. arXiv preprint arXiv:2403.14064 (2024).
- The calculus of constructions. Information And Computation 76, 2-3 (1988).
- The lean 4 theorem prover and programming language. In Automated Deduction–CADE 28: 28th International Conference on Automated Deduction, Virtual Event, July 12–15, 2021, Proceedings 28 (2021), Springer, pp. 625–635.
- Koehler, T. A domain-extensible compiler with controllable automation of optimisations. PhD thesis, University of Glasgow, UK, 2022.
- Guided equality saturation. Proc. ACM Program. Lang. 8, POPL (2024), 1727–1758.
- Milner, R. Implementation and applications of scott’s logic for computable functions. In Proceedings of ACM Conference on Proving Assertions About Programs, Las Cruces, New Mexico, USA, January 6-7, 1972 (1972), ACM, pp. 1–6.
- Parks, T. M. Bounded scheduling of process networks. PhD thesis, 1995.
- Equality saturation: a new approach to optimization. In Proceedings of the 36th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2009, Savannah, GA, USA, January 21-23, 2009 (2009), Z. Shao and B. C. Pierce, Eds., ACM, pp. 264–276.
- egg: Fast and extensible equality saturation. Proc. ACM Program. Lang. 5, POPL (2021), 1–29.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.