Skip to content
Open access

Testing Theorems, Fully Automatically

Oct 2026 · Proceedings of the ACM on Programming Languages · Vol 10, pp. 177 - 204 · 0 citations · 49 references

TL;DR

A novel strategy for testing theorems that is highly effective, fully automatic, and robust to equivalent formulations of theorem and definition statements is presented, and is implemented on top of the QuickChick framework for Rocq.

Abstract

While the ultimate goal of interactive theorem proving is to prove theorems, it can really help to test them first. Testing theorems, specifically using property-based testing, helps users identify incorrect definitions and theorem statements before they waste time on a proof that could never succeed. Unfortunately, the testing infrastructure provided by modern theorem provers has yet to reach its full potential. Even QuickChick, the state-of-the-art property-based testing framework for Rocq, which offers random generation for data satisfying inductively defined relations, often requires substantial effort and expertise to be used effectively. This is in part because this effectiveness is heavily sensitive to both the order that hypotheses appear within a theorem, and to the order that inductive constraints appear within the inductive relations involved. In this paper, we present a novel strategy for testing theorems that is highly effective, fully automatic, and robust to equivalent formulations of theorem and definition statements. To do so, we characterize the exponentially large space of possible QuickChick-style properties and generators as solutions to a constrained scheduling problem. To find the best property or generator in this space, we estimate effectiveness by introducing a notion of "density" for inductive relations, which approximates the tendency for a generator to succeed given arbitrary inputs. We implement our algorithm on top of the QuickChick framework for Rocq and evaluate it in a number of case studies from the literature, demonstrating that our push-button automation is on par with and in some cases even more effective at finding bugs than expertly handcrafted tests.

Read PDF

Similar papers

#artificial intelligence Preprint Aug 2026

MathAdv: What Theorem Provers Know, Reason, Formalize, and Generalize

This work introduces MathAdv, a diagnostic benchmark spanning 13 domains across undergraduate- and graduate-level mathematics, and shows how component-wise evaluation can reveal model capabilities and failure modes that aggregate theorem-proving accuracy obscures.

Jiajie Yuan, C. Lockhart, Xiao-Yun Liu et al. · 0 citations
Open access Aug 2026

QuickChecking Convergence of Rewriting Systems (Functional Pearl)

A QuickCheck testing method based on generating and shrinking random execution traces based on checking if the first and last terms of a generated trace share the same deterministic normal form that efficiently finds counterexamples and enables fast, robust shrinking.

Koen Claessen · 0 citations
Review Aug 2026

Does the Proof Prove It That Way? Faithful Formalization of Elements Proofs

Pistis is introduced, an agentic, oracle-guided proof search that produces formal Lean proofs that satisfy faithfulness conditions and can accept or refute natural language proofs written by humans or AI, demonstrating that faithful formalization is useful as a proof-checking tool.

Tadd Mao, Tianjun Zhong, Dhruva Arekar et al. · 1 citation
#artificial intelligence Preprint Sep 2026

TCSAlgBench: Benchmarking Automated Proving for Research-Level Theoretical Computer Science

TCSAlgBench provides a refreshable testbed for measuring progress in model reasoning and studying how agent workflows support research-level proof discovery, and evaluates ten model configurations from four families under direct inference and prover-verifier discussion, and compares four agent workflows under matched m...

Chu-Tong Yang, Xi-Yuan Zhang, Yu Huang et al. · 0 citations
Review Aug 2026

Combining Tests and Proofs with Contracts for Better Software Verification

Three applications, leveraging on the mechanisms of Eiffel and design by contract, hold significant promise to address some of the challenges of program testing, software maintenance, and automatic program repair.

Li Huang, Bertrand Meyer, M. Oriol · 0 citations

Polymorphic coverage types ∗

A new refinement type-based verification procedure for validating the coverage provided by input test generators, based on a novel interpretation of types that embeds “ must -style” underapproximate reasoning principles as a fundamental part of the type system.

Unknown authors · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.