Computing correctly with inductive relations
Zoe Paraskevopoulou, Aaron Eline, Leonidas Lampropoulos
Abstract
Inductive relations are the predominant way of writing specifications in mechanized proof developments. Compared to purely functional specifications, they enjoy increased expressive power and facilitate more compositional reasoning. However, inductive relations also come with a significant drawback: they can't be used for computation.
In this paper, we present a unifying framework for extracting three different kinds of computational content from inductively defined relations: semi-decision procedures, enumerators, and random generators. We show how three different instantiations of the same algorithm can be used to generate all three classes of computational definitions inside the logic of the Coq proof assistant. For each derived computation, we also derive mechanized proofs that it is sound and complete with respect to the original inductive relation, using Ltac2, Coq's new metaprogramming facility.
We implement our framework on top of the QuickChick testing tool for Coq, and demonstrate that it covers most cases of interest by extracting computations for the inductive relations found in the Software Foundations series. Finally, we evaluate the practicality and the efficiency of our approach with small case studies in randomized property-based testing and proof by computational reflection.
• Software and its engineering → Software testing and debugging.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f6605e54-c0a4-4bc8-ac2f-0e84ed4c5ad6Cited by top-tier papers9
- Property-Based Testing in PracticeHarrison Goldstein, Joseph W. Cutler, Daniel Dickstein, Benjamin C. Pierce et al.ICSE 2024 · 21 citations
- Data-driven lemma synthesis for interactive proofsAishwarya Sivaraman, Alex Sanchez-Stern, Bretton Chen, Sorin Lerner et al.OOPSLA 2022 · 8 citations
- Bennet: Randomized Specification Testing for Heap-Manipulating ProgramsZain K. Aamer, Benjamin C. PierceOOPSLA 2025 · 4 citations
- Merging Inductive RelationsJacob Prinz, Leonidas LampropoulosPLDI 2023 · 3 citations
- Finite-Choice Logic ProgrammingChris Martens, Robert J. Simmons, Michael ArntzeniusPOPL 2025 · 3 citations
Related papers
- Coq Coq correct! verification of type checking and erasure for Coq, in CoqMatthieu Sozeau, Simon Boulier, Yannick Forster, Nicolas Tabareau et al.POPL 2020 · 67 citations
- Verified Extraction from Coq to OCamlYannick Forster, Matthieu Sozeau, Nicolas TabareauPLDI 2024 · 13 citations
- Testing Theorems, Fully AutomaticallySegev Elazar Mittelman, Harrison Goldstein, Leonidas LampropoulosOOPSLA 2026
- Relational compilation for performance-critical applications: extensible proof-producing translation of functional models into low-level codeClément Pit-Claudel, Jade Philipoom, Dustin Jamner, Andres Erbsen et al.PLDI 2022 · 26 citations
- Nested Inductive Types: Justified and Usable Nested Inductive Types in Lean and RocqThomas Lamiaux, Yannick Forster, Matthieu Sozeau, Nicolas TabareauPLDI 2026
