betaFeedback

WorksComputer Science

VeriBase: Automated Construction of Theorem Libraries for Software Verification

Abstract

Software verification is typically more challenging than coding. Software developers routinely build on mature libraries and APIs, but turning successful verification solutions into reusable libraries still requires substantial expert effort. In this paper, we propose VeriBase, a framework for automatically constructing software-verification libraries by jointly generalizing code and its associated theorems from successful verification solutions. The key challenge is to generalize implementations together with the theorem statements and proofs that depend on these implementations, and reconcile overlapping components across verification tasks. To this end, VeriBase treats code and its associated theorems as declaration families, and designs a three-phase pipeline, which proves seed tasks, generalizes code and associated theorems, and harvests the resulting families into shared interfaces. VeriBase updates dependent declarations as interface change and uses Lean to check the resulting code and proofs. We evaluate VeriBase across four benchmarks with three backend LLMs. The results show that the general-purpose library built from independent 4,191 programs increases the average task success rate by up to 17.0% and meanwhile reduces the proof completion time by up to 21.4%. When VeriBase constructs a benchmark-specific library, further improvement can be observed.

CCS Concepts: • Software and its engineering → Formal software verification.

Introduction

As coding tools and development practices based on a large language model (LLM)—such as vibe coding—gain widespread adoption, more software is being generated or modified by LLMs. While this trend can substantially increase software development productivity, it also amplifies a longstanding challenge of assuring that increasingly large volumes of software behave correctly. LLM-generated code may appear plausible and pass available tests while still containing subtle bugs. Testing remains essential, but it alone generally cannot establish correctness across all possible inputs and execution paths.

Formal verification offers a complementary approach to software quality assurance, providing rigorous guarantees about program behavior by expressing program specifications in formal languages and using machine-checked proofs to establish that programs satisfy the specifications. Interactive theorem provers (ITPs) such as Lean, Rocq (formerly Coq), and Isabelle provide environments for constructing and checking proofs of program correctness. Long before the recent rise of LLM-based code generation, ITPs had been successfully applied to high-assurance software, including seL4 [16], an operating-system kernel formally verified in Isabelle, and CompCert [20], a C compiler formally verified in Rocq.

Authors’ Contact Information: Zihao Zhang, [email protected], Nanjing University, Nanjing, China; Zenan Li, [email protected], Nanjing University, Nanjing, China; Taolue Chen, [email protected], Birkbeck, University of London, London, United Kingdom; Zhe Zhou, [email protected], Peking University, Beijing, China; Tao Xie, [email protected], Peking University, Beijing, China and Fudan University, Shanghai, China; Yuan Yao, [email protected], Nanjing University, Nanjing, China.

However, proof development is often substantially more expensive than software development for two main reasons: the complexity of verification tasks and the limited infrastructure for proof reuse. First, verification tasks are intrinsically demanding: implementing a program requires specifying how to perform a computation, whereas verifying the program additionally requires establishing that the implementation satisfies its specification across all relevant executions. Consequently, the proof artifact can be considerably larger than the code that the proof artifact verifies. For instance, the seL4 microkernel verification required over 200,000 lines of Isabelle proof scripts to verify about 7,500 lines of C code [16]. Recent advances in LLM-based formal reasoning, including neuro-symbolic proof search [14], proof planning [38], and hierarchical proof search [21], among others [29, 33, 36], have improved the automation of proof development, making software verification increasingly practical. Nevertheless, generating proofs remains substantially more costly than generating code.

Second, proof reuse has limited infrastructure, with library construction and maintenance relying heavily on expert effort. Modern code development benefits from a mature ecosystem of reusable libraries and APIs, such as the C++ Standard Library and Python’s standard library, reducing the need to implement common functionality from scratch. In contrast, theorem libraries for software verification remain comparatively scarce [3, 17]. Successful verification efforts do not automatically translate into reusable libraries: experts must identify reusable functionality, design general code interfaces and associated theorems, and integrate these declarations with existing libraries. This work requires expertise beyond completing an individual verification task and must be repeated as new library functionality is needed.

These limitations motivate a question: can we automatically turn successful software verification solutions into reusable theorem libraries, reducing the manual effort of library construction and allowing future tasks to benefit from previous verification work? Automating this process presents two main challenges. First, code and theorems must be generalized together. Successful solutions often contain task-specific implementations; generalizing these implementations requires adapting dependent theorem statements and proofs. For example, the theorems in Figure 1 refer to mergeSorted; changing its interface requires updating the theorems and their uses. Second, overlapping components must be integrated across tasks. Declarations from different solutions must be reconciled into shared interfaces with consistent dependencies, rather than merely collected into a library.

An example of a code snippet and its surrounding theoremsVector (PDF)
/-- Merge two sorted lists into one sorted list. -/
def mergeSorted {α : Type} [LinearOrder α] :
  List α → List α → List α
| [], l => l
| l, [] => l
| (h1 :: t1), (h2 :: t2) =>
    if h1 ≤ h2 then
      h1 :: mergeSorted t1 (h2 :: t2)
    else
      h2 :: mergeSorted (h1 :: t1) t2
theorem mem_mergeSorted
    (h : x ∈ mergeSorted l1 l2) :
    x ∈ l1 ∨ x ∈ l2

theorem mergeSorted_all_ge
    (h1 : ∀ x ∈ l1, a ≤ x)
    (h2 : ∀ x ∈ l2, a ≤ x) :
    ∀ x ∈ mergeSorted l1 l2, a ≤ x

theorem mergeSorted_sorted
    (h1 : List.Sorted (· ≤ ·) l1)
    (h2 : List.Sorted (· ≤ ·) l2) :
    List.Sorted (· ≤ ·) (mergeSorted l1 l2)

Figure 1. An example of a code snippet and its surrounding theorems. The three theorems (i.e., mem_mergeSorted, mergeSorted_all_ge, and mergeSorted_sorted) are all stated over mergeSorted.

Our work. To address these challenges, we propose VeriBase, a framework for automatically constructing theorem libraries from verification tasks expressed in Lean. It treats code and its associated theorems as a declaration family. Its code-first, theorems-second principle makes interface changes explicit: each operation first handles the code and then adapts the dependent theorem statements and proofs. The theorem prover (e.g., Lean) checks the resulting code and proofs. VeriBase constructs libraries in three phases. Proving produces successful solutions through multiple rounds of task solving. Generalization extracts computational components and intermediate proof facts, generalizes their interfaces, and updates dependent declarations. Harvesting integrates candidates across tasks by adding new functionality and properties, skipping covered candidates, and merging overlapping interfaces while updating affected declarations and imports.

We evaluate the effectiveness of the libraries constructed by VeriBase in improving task success rates and reducing completion time in Lean [23], with four benchmarks and three backend LLMs. On Verina [37], FVAPPS [9], and VeriContest [32], the general library, constructed from tasks outside these benchmarks, improves the average task success rate from 63.0% to 73.0% and reduces average completion time by 13.2%. These results demonstrate that the constructed library serves as a general-purpose library for software verification across benchmarks. When additional tasks from the target benchmark’s domain are available, VeriBase can construct a benchmark-specific library from these tasks. Combining the general and benchmark-specific libraries further increases the average task success rate to 78.5% and reduces average completion time by 27.9% relative to the no-library baseline. On the repository-scale benchmark VeriSoftBench [34], after removing human-developed supporting theorems (which serve a role analogous to our constructed library), our constructed library improves the average task success rate across three backend LLMs from 56.3% to 77.0%. This performance is close to that achieved with the original supporting theorems (e.g., with GLM 5.2, VeriBase library achieves 81.0% success rate versus 84.0% with the original supporting theorems), suggesting comparable quality between automatic and human-developed libraries for repository-level verification.

In summary, this paper makes the following main contributions.

  • Automated construction of code and theorem libraries. We propose VeriBase, a framework for jointly generalizing implementations and their associated theorems from successful verification solutions, updating dependent declarations, and consolidating overlapping families across tasks into reusable interfaces.

  • New Lean 4 libraries for software verification. We construct a general library containing 1,609 code declarations and 3,239 theorems, together with benchmark-specific libraries that provide additional code and theorems for their task distributions and repositories.

  • An empirical evaluation of downstream reuse. We evaluate the libraries across four benchmarks and three backend LLMs. Comparisons on VeriContest with raw-solution retrieval and ablated variants examine the benefits of retaining code with its associated theorems, generalization, and library integration.

Background

Software Verification

Software verification aims to check whether software satisfies specified requirements or properties typically described as a specification. For example, a sorting function must return an ordered permutation of its input. Verification tools vary in how proof obligations are discharged and in the degree of automation that these tools provide. Tools such as Dafny [19], Verus [18], Frama-C/WP [4], and Viper [24] emphasize automated deductive verification: they generate verification conditions from programs and specifications, and rely heavily on automated solvers, particularly SMT solvers, to discharge verification conditions. This approach can provide a high degree of automation when the resulting verification conditions fall within the capabilities of the underlying solvers.

Interactive theorem provers (ITPs), such as Lean [23], Rocq [6], and Isabelle [25], instead provide expressive logical frameworks in which users can construct and check proofs, while also incorporating substantial proof automation. This flexibility supports specifications and proofs that require reasoning beyond what can be discharged automatically, at the cost of greater proof-development effort. In Lean, a software verification task typically includes code to be implemented, a specification describing its intended behavior, and a target theorem stating that the code satisfies the specification. Completing the task requires both an implementation and a correctness proof. Constructing this proof often involves establishing intermediate properties of individual computational steps or helper functions, and using these properties to prove the target theorem. Lean’s kernel type-checks the resulting proof term. A successful solution may therefore contain not only code and its final correctness proof, but also intermediate theorems about the code.

Theorem Libraries for Software Verification

Theorem libraries organize reusable definitions and theorems to support new proofs. In software verification, theorems typically state properties of code, naturally giving rise to a code-centered structure where code and its associated theorems form declaration families. When code is reused in a new verification task, these associated theorems provide reusable reasoning about its behavior without requiring the same properties to be established from scratch. Representative verification libraries include Rocq’s std++ [28], the Isabelle Collections Framework [17], Verus’s vstd [18], Dafny’s standard libraries [22], and Lean’s CSLib [3].

Software verification can significantly benefit from theorem libraries, especially in the context of LLM-based software verification. Libraries provide code that LLMs can incorporate into implementations and theorems that they can invoke in correctness proofs. This reuse reduces the need to generate code from scratch or to reestablish properties already captured by the library, allowing LLMs to focus on adapting reusable components and proving the remaining task-specific properties. In addition, existing libraries can also serve as valuable corpora for training theorem-proving models, exposing them to formal syntax, proof patterns, and declaration usage. For example, Lean 4’s Mathlib [30] has been used as training data for neural theorem-proving systems [33, 36].

Despite useful, turning successful task-level solutions into library components typically requires substantial manual effort. For given verification projects that contain useful code and theorems, one must separate task-specific details, generalize interfaces, and organize dependencies. Completed verification tasks provide valuable material for library construction, but knowledge reuse requires transforming task-specific code and theorems into coherent library components.

Methodology of VeriBase

VeriBase is guided by the observation that reusable knowledge in software verification is rarely an isolated theorem. Code provides the computational semantics, while its associated theorems provide an interface for reasoning about the code’s behavior without repeatedly unfolding the implementation. VeriBase therefore treats code and its associated theorems as a code-centered declaration family, rather than as independent library items. Since code forms the backbone of each family, VeriBase follows a code-first, theorems-second principle: each operation first handles the code and then its associated theorems.

Transforming completed tasks into such families requires abstraction at two levels: within each task and across tasks. Within each task, VeriBase generalizes a successful proof by removing task-specific structure while preserving the essential specification and verification goal. Across tasks, VeriBase compares candidate families against the growing library, consolidates overlapping interfaces, and organizes the retained knowledge into coherent modules.

An overview of VeriBase is shown in Figure 2, which demonstrates how VeriBase realizes this two-level abstraction in three phases: proving produces Lean-validated seed solutions; generalization turns each successful solution into reusable code and associated theorems; and harvesting integrates the resulting declaration families into a coherent library.

Overview of VeriBase

Figure 2. Overview of VeriBase. VeriBase proves software-verification tasks to obtain Lean-validated solutions, generalizes them into code-centered declaration families, and integrates these families into a coherent library through addition, skipping, merging, and library-level refactoring.

Proving Phase

The proving phase produces the raw material. For each code-verification task, a formal specification written in Lean is given as input, and the goal is two-fold: implementing the code according to the formal specification and proving the theorem that the resulting code satisfies the formal specification. VeriBase uses a multi-round strategy to solve as many tasks as possible: failed tasks are retried in subsequent rounds until they succeed or the budget is exhausted. Successful tasks are collected and passed to the next phase.

For each task in a round, VeriBase follows a code-first, proof-second workflow. The agent used by VeriBase first implements the code according to the formal specification and invokes Lean to check the implementation. If the check fails, the agent revises the code based on Lean’s diagnostics, forming a generate-check-repair loop that continues until the implementation is accepted by Lean. The agent then proves the target theorem using the same iterative generate-check-repair process until the entire task is verified by Lean. If the proof process becomes stuck, VeriBase prompts the agent to revisit and modify the implementation and reconstruct the proof accordingly. After the agent finishes processing a task in a round, VeriBase performs a final verification of the complete task file using Lean. A task is considered successful only if the file compiles successfully and contains no unproved placeholders or unauthorized assumptions. A task that times out or fails validation is considered failed. § 5.1 details the validation criteria used to determine task success.

Generalization Phase

The generalization phase produces reusable code and theorems as candidates for harvesting through two stages: code generalization and theorem generalization.

Code Generalization

Code generalization transforms task-specific implementations into reusable code. This step is necessary: if the code remains tied to one specific task, the theorems stated over the code remain difficult to reuse. VeriBase applies two mechanisms for code generalization: code refactoring and code refinement. Throughout code generalization, VeriBase keeps the original code specification unchanged and re-verifies that the generalized implementation satisfies the specification. Doing so ensures that the generalized code continues to satisfy the requirements of the original specification.

Code refactoring splits a complex task implementation into smaller, potentially reusable computational components while preserving the properties required by the original specification. VeriBase instructs the agent to read the complete successful solution and identify computational steps (within large functions) that can be called independently and composed to implement the original functionality. For each selected step, the agent turns its external data dependencies into explicit parameters, extracts it as a named def, and replaces the original code fragment with a call to that function. After refactoring, VeriBase invokes Lean to verify the refactored implementation still satisfies the original specification; only refactored code that successfully passes this verification proceeds to subsequent processing.

Code refinement further abstracts each refactored function into a more reusable form. The core principle is to abstract away task-specific details while preserving the original semantics, thereby making the function applicable to a broader class of problems. Specifically, VeriBase instructs the agent to inspect the refactored function and identify task-specific details in its interface and implementation, such as fixed types or operations. The agent turns these details into explicit parameters and generalizes the function signature and body accordingly. A refinement is accepted only if the refined code subsumes the original functionality: instantiating its parameters with the original types and operations must recover the original behavior. The agent then updates dependent declarations and proofs to use the generalized interface and invokes Lean to validate the refined implementation and updated proofs.

Example 3.1. Figure Figure 3 illustrates how refactoring extracts insertion and sorting functions from sort_by_last_digit. Refinement then generalizes the insertion function to arbitrary element types and key functions. Instantiating these parameters with integers and the last-digit operation recovers the original behavior.

Code refactoring and refinement examples

Figure 3. An example of code generalization (§ 3.3). Code refactoring extracts the insertion and sorting functions as separate declarations. Code refinement replaces the fixed last-digit sorting criterion with a key-function parameter.

3.2.2 Theorem Generalization. Theorem generalization transforms task-specific proofs into reusable theorems. This step is necessary because useful proof knowledge is often buried inside a long proof of a single target theorem. If these intermediate facts remain local to that proof, other tasks cannot invoke them directly. VeriBase therefore applies two mechanisms for theorem generalization: proof refactoring and theorem refinement. Throughout theorem generalization, VeriBase keeps the original target theorem statement unchanged. Doing so ensures that the original verification goal remains satisfied after generalization.

Proof refactoring extracts intermediate facts from a long task proof into reusable theorems. Specifically, VeriBase instructs the agent to inspect local have statements and other steps in the main proof. It selects intermediate facts that can be stated using explicit parameters and hypotheses, and applied without relying on the original task’s surrounding proof context, rather than extracting every proof step. For each selected fact, the agent makes the variables and premises on which the fact depends explicit in a named theorem and reconstructs its proof. The agent then replaces the original proof fragment with an application of that theorem, supplying the corresponding arguments and hypotheses. Finally, VeriBase invokes Lean to check the refactored proof.

Theorem refinement further rewrites extracted theorems into more reusable forms. Theorem refinement is also performed by the agent. VeriBase instructs the agent to inspect the hypotheses and conclusion of each auxiliary theorem, and identify task-specific elements that restrict the theorem’s applicability. Based on the structure and meaning of the theorem, the agent may remove unnecessary hypotheses or replace overly restrictive hypotheses with weaker conditions; lift concrete types, constants, functions, and relations into parameters; restate properties expressed through task-specific preconditions or postconditions as direct properties of the code; or adapt the theorem to a generalized code interface. The agent reconstructs the proofs of the refined auxiliary theorems and updates any dependent proofs, and then invokes Lean to verify both the refined theorems and their dependent proofs.

Example 3.2. As shown in Figure 4, the original correctness proof for the code in Figure 3 establishes permutation and pairwise-ordering properties inline through h_perm and h_pairwise. VeriBase extracts these properties into two auxiliary theorems: sortByLastDigit_perm and sortByLastDigit_pairwise. This step of theorem refactoring is not limited to declarative proof steps (such as have statements); reusable properties within procedural proof fragments can also be extracted into theorems. Theorem refinement then generalizes the extracted theorems. Namely, insertByLastDigit_perm is refined into insertByKey_perm, replacing the task-specific insertion function with the generalized key-based insertion function.

Theorem generalization proof refactoring and theorem refinement examples

Figure 4. An example of theorem generalization (§3.2.2). Proof refactoring extracts local permutation and ordering facts into theorems. Theorem refinement then generalizes the permutation theorem from last-digit insertion to insertion based on an arbitrary key function.

Connecting Code and Theorems

Following the principle that code forms the backbone and theorems are organized around it, VeriBase first generalizes the code and then generalizes the theorems, preserving their dependency relationships. The association between code and theorem is determined by references to code declarations in theorem statements: a function may have multiple associated theorems, and a theorem may describe properties of several functions composed together. Standalone theorems reference no code in the VeriBase library; instead, they rely on only declarations from Mathlib and Lean’s standard libraries.

Harvesting Phase

The harvesting phase incrementally integrates generalized candidates into a coherent Lean library. It starts by extracting and filtering candidate declarations. For each task file produced by the generalization phase, VeriBase invokes the custom Lean executable extract_decls through lake exe to extract code and theorem declarations, while excluding declarations that encode the task specification. For each extracted declaration, VeriBase generates a short description and embeds it using all-MiniLM-L6-v2 [27]. We define the cross-task frequency of a candidate as the number of distinct task files containing a declaration whose description embedding has similarity above a predefined threshold to the candidate. Candidates below a minimum frequency are removed before library integration.

The remaining candidates are then integrated into the library in source-task batches. Grouping candidates by their source tasks preserves the context needed to integrate mutually dependent code and theorems together. For each batch, the harvester reads the complete source declarations, identifies their dependency groups, and processes code before the theorems that depend on the code. The harvester then inspects the current library by traversing its module hierarchy and searching declaration names and contents to locate potentially overlapping interfaces. Batches are processed sequentially, so each batch is compared against the library resulting from all previously integrated batches.

When integrating a candidate group, the harvester applies three types of actions to its declarations, i.e., Add, Skip, and Merge.

  • Add is used when the candidate provides functionality or a property not already represented in the library. The harvester may generalize the candidate’s interface with respect to existing declarations, rename the candidate, and place it in the appropriate namespace and module together with its dependencies.

  • Skip is used when an existing declaration is equivalent to or more general than the candidate. A candidate is also skipped if it remains tied to its source task and cannot be generalized without changing its behavior, or if it captures only a trivial property.

  • Merge is used when existing declarations overlap with the candidate but do not subsume it. The harvester compares code by its computational behavior and theorems by their statements,and then incorporates the functionality or properties into the existing interface and updates dependent declarations.

Figure Figure 5 shows a typical example. A task produces a one-sided inclusive-range definition, together with theorems about membership and duplicate freeness. Since the library already contains a more general two-sided interval abstraction, the harvester does not add a parallel one-sided API. Instead, the harvester skips the narrower definition and generalizes the reusable theorems to the two-sided intervals before merging them into the existing declaration family.

Example of merging during harvesting

Figure 5. An example of merging during harvesting. Since the library already contains code for a two-sided range, the harvester skips the narrower one-sided range code and generalizes its surrounding theorems to the existing two-sided range code.

Adding or merging a candidate may also trigger library-level refactoring. For example, the harvester may extract code shared by several declarations, rewrite existing declarations against a more general interface, or move related declarations into a common module. The harvester updates affected dependencies and imports whenever an interface or module changes. After processing a batch, the harvester compiles the affected modules; unsuccessful edits are repaired or rolled back before processing continues. Finally, VeriBase compiles the complete library and checks that it contains no unproved placeholders or unauthorized axioms. Thus, only successfully integrated batches contribute to the resulting library.

Generated Libraries

The general library is constructed from 4,191 code-verification tasks from LeetCode and Open-CodeInstruct [1], translated into Lean 4. The proving phase verifies 3,835 tasks. Generalization and frequency filtering produce 6,064 code implementations and 6,359 theorem candidates; harvesting yields 1,609 code declarations and 3,239 theorems, totaling 4,848 declarations. Counts include only explicit source declarations, excluding compiler-generated ones.

Harvesting uses a similarity threshold of 0.8 and a minimum frequency of 3. We use Claude Code as the agent harness, which manages tool use and interaction with the verification environment, and DeepSeek V4 Pro [35] as the backend LLM. All proving, generalization, and harvesting decisions are automated. VeriBase is implemented in Python and Lean 4.

The general library supports reuse across tasks; benchmark-specific libraries use the same pipeline with subsets of each benchmark, as detailed in § 5.1, and are tailored to the benchmark’s task distribution. Each library is compiled as a single Lean project and automatically checked for unresolved proof placeholders (sorry or admit) and new axioms.

General Library

The general library contains 10 top-level categories, each further divided into topic-specific modules, for a total of 74 modules. For example, the List category includes Sort, Count, and Range, while the String category includes Substrings, NumericConversion, and Normalization. The library contains about 54K lines of Lean 4 code. Figure 6(a) shows that the distribution is highly skewed: List accounts for 53.6% of all declarations, followed by String with 13.6% and Nat with 11.5%. This distribution reflects the prevalence of list processing in software-verification tasks, while the remaining categories provide reusable support for trees, arrays, characters, finite collections, grids, integers, and others.

Figure 6. Organization and code-centered structure of the general VeriBase library. (a) The proportion of declarations in each top-level category. (b) The reusable code List.isPalindrome and four representative theorems in its declaration family.

The library has a code-centered structure, comprising 918 theorem families in which a code declaration is accompanied by one or more theorems that directly reference it. These theorem families capture reusable properties such as membership preservation, output length, permutation, ordering, and bounds. Figure 6(b) illustrates this structure through List.isPalindrome. The code is accompanied by theorems that characterize the code’s Boolean result, establish a base case, construct new palindromes, and show invariance under reversal. These interfaces allow subsequent proofs to reason about isPalindrome without repeatedly unfolding its implementation.

Benchmark-Specific Libraries

VeriBase constructs four benchmark-specific libraries from the construction subsets of Verina [37], FVAPPS [9], VeriContest [32], and VeriSoftBench [34]. Table 1 summarizes their sizes and representative contents. These libraries provide code and theorems tailored to the operations and properties encountered in their source benchmarks.

LibraryDefinitionsTheoremsRepresentative content
Verina49114Sorting, aggregation, extremum selection
FVAPPS188451Counting, list windows, string processing
VeriContest433659Prefix sums, contiguous segments, arithmetic
VeriSoftBench0811Evaluation semantics, program execution

Table 1. Contents of the four benchmark-specific libraries, including the numbers of definitions and theorems and representative content.

Like the general library, the Verina, FVAPPS, and VeriContest libraries are organized into top-level categories by data type, each further divided into topic-specific modules stored in separate files. These libraries also have a code-centered structure, with related theorems organized around code.

The VeriSoftBench library is organized into top-level categories by referenced repositories, each further divided into topic-specific modules stored in separate files. VeriSoftBench requires only proof generation. Its generated library provides 811 theorems but no executable code. The code to be verified is fixed by the referenced repositories, so these tasks benefit from additional theorems about that code rather than alternative code implementations. These theorems are still organized around code in the referenced libraries, so the VeriSoftBench library also has a code-centered structure. The four libraries can be used independently or combined with the general library to provide additional code and theorems relevant to a particular benchmark.

Construction Cost and Ecosystem Position

Construction Cost. The estimated API cost of constructing the general library is approximately $431; the corresponding costs for the Verina, FVAPPS, VeriContest, and VeriSoftBench libraries are approximately $11, $103, $87, and $19, respectively. These estimates cover all three construction phases, including failed attempts and retries. Excluding the proving phase, as when successful solutions are already available, the estimated construction costs are approximately $62 for the general library, and $2, $15, $12, and $3 for the Verina, FVAPPS, VeriContest, and VeriSoftBench libraries, respectively.

Position in the Verification-Library Ecosystem. Across verification ecosystems, reusable libraries provide software components with the specifications, lemmas, theorems, and other artifacts that support reasoning about the software components. Building such shared infrastructure, however, requires substantial expert effort. Library developers must identify recurring abstractions, design stable interfaces, prove the associated properties, reconcile overlapping components, and organize the results into maintainable modules. Even when individual projects or tasks already contain many successful verifications, turning these verification artifacts into a coherent library remains costly, especially in a new domain. VeriBase automates library construction for verification within Lean. The generated code can be reused directly in Lean programs, while the associated theorems support proofs about these implementations and repository-specific formalizations. For software written in other languages, such as C and Rust, reuse additionally requires establishing a semantic connection between the source programs and their Lean representations. This automation can also complement manual curation: VeriBase can bootstrap an initial library whose interfaces, organization, and coverage are subsequently refined by experts. This bootstrapping provides an automated starting point for building and extending verification libraries while retaining a role for expert review and maintenance.

Evaluation

We conduct extensive experiments to evaluate the effectiveness of the VeriBase libraries (including the general library and benchmark-specific libraries). Specifically, we focus on the following research questions (RQs):

  • RQ1: How effectively do the VeriBase libraries improve task success rates?

  • RQ2: How do the VeriBase libraries affect task completion time and API cost?

  • RQ3: How does general-library size affect task success rates?

  • RQ4: How do the VeriBase libraries compare with retrieving raw successful solutions directly, and how do code, theorems, generalization, and harvesting contribute to their effectiveness?

Experimental Setup

Datasets. We consider four software verification benchmarks. The first three contain single-file tasks requiring both code generation and proof generation, whereas the last contains repository-level tasks requiring proof generation only.

  • Verina: Verina [37] contains 189 manually curated Lean coding tasks at basic and advanced difficulty levels. To make the test split more challenging, we use the 108 basic tasks to construct the benchmark-specific library and the 81 advanced tasks as the test set.

  • FVAPPS: FVAPPS [9] contains 4,715 Lean formalizations of general-purpose coding-interview problems from APPS [15]. We randomly select 100 problems as the test set and select 1,000 other tasks to construct the benchmark-specific library. When selecting test tasks, we exclude those sharing an identifier with any of the 4,191 tasks in the general library’s construction corpus.

  • VeriContest: VeriContest [32] contains 946 competitive-programming problems. We randomly select 100 problems as the test set and use the remaining 846 tasks to construct the benchmark-specific library. When selecting test tasks, we exclude those sharing an original LeetCode problem identifier with any of the 4,191 tasks in the general library’s construction corpus.

  • VeriSoftBench: VeriSoftBench [34] contains 500 repository-level Lean 4 proof obligations spanning compiler correctness, programming-language semantics and type systems, verification frameworks, and applied verification. After aligning the Lean versions, we retain 283 tasks. We randomly select 183 tasks to construct the benchmark-specific library and use the remaining 100 as the test set.

Metrics. We use the following three metrics.

  • Task success rate: The fraction of tasks for which the agent produces all artifacts required by the benchmark within the inference budget.

  • Average completion time: The average wall-clock time spent by the agent on each task, with timed-out attempts counted as 1,800 seconds.

  • Average API cost: The average inference cost in USD over all tasks, computed from recorded uncached-input, cache-hit, cache-creation, and output token counts using public API prices.

Settings. We use Claude Code as the agent harness, which manages tool use and interaction with the verification environment, with three backend LLMs: DeepSeek V4 Pro [35], GLM 5.2 [12], and Qwen 3.7 Max [26]. For each test task, the agent follows the code-first, proof-second workflow of the proving Phase, iteratively revising the generated code and proof based on feedback from Lean. Each task has a time budget of 1,800 seconds. The general library is shared across benchmarks, whereas each benchmark-specific library is used for its corresponding benchmark. In settings with library access, we provide a simple search program that retrieves relevant declarations by combining semantic similarity with keyword matching for agent-generated queries. All libraries remain fixed during evaluation; no declarations are added, modified, or removed.

Validation Protocol. A task is considered successful only if its final artifact preserves the original task components used for evaluation. These components include the code specifications (preconditions, postconditions, and their supporting definitions) and the statement of the target theorem. The final artifact must also compile in Lean, and the proof and its transitive dependencies must contain no unproved placeholders or unauthorized axioms.

RQ1: Effectiveness of VeriBase Libraries

We compare three settings. Baseline uses no library; +Gen. allows the agent to retrieve declarations from the general library; and +Gen. & Spec. allows the agent to retrieve declarations from both the general and benchmark-specific libraries.

Effectiveness of the General Library. As shown in Table 2, the general library improves task success rates in all nine benchmark–backend combinations. Overall, the macro-average increases from 63.0% to 73.0%. These results show that the general library provides reusable code and theorems that transfer across task distributions and backend LLMs.

BenchmarkBackend LLMBaseline+Gen.+Gen. & Spec.
VerinaDeepSeek V4 Pro66.780.2 (+13.6)77.8 (+11.1)
GLM 5.258.074.1 (+16.0)88.9 (+30.9)
Qwen 3.7 Max64.274.1 (+9.9)71.6 (+7.4)
FVAPPSDeepSeek V4 Pro54.071.0 (+17.0)74.0 (+20.0)
GLM 5.259.066.0 (+7.0)76.0 (+17.0)
Qwen 3.7 Max57.063.0 (+6.0)66.0 (+9.0)
VeriContestDeepSeek V4 Pro70.076.0 (+6.0)85.0 (+15.0)
GLM 5.269.078.0 (+9.0)85.0 (+16.0)
Qwen 3.7 Max69.075.0 (+6.0)82.0 (+13.0)

Table 2. Task success rates (%) across three benchmarks and three backend LLMs. Baseline means the standalone proving, +Gen. means when the general library is available, and +Gen. & Spec. means both the general library and the benchmark-specific library are available. Absolute changes compared to Baseline are shown in the brackets.

Extra Benefits of Benchmark-specific Library. As shown in Table 2, composing the general and benchmark-specific libraries raises the overall macro-average from 73.0% to 78.5%. This combined setting improves seven of the nine benchmark–backend combinations; the remaining two combinations show only minor regressions of 2.4 and 2.5 points. GLM 5.2 shows particularly large gains. These results show that benchmark-specific libraries can complement the general library with reusable code and theorems from the target domain, further improving verification performance.

Effectiveness on Repository-level Tasks. VeriSoftBench references software repositories with extensive human-developed supporting theorems, which serve a role analogous to our constructed libraries. We assess whether an automatically constructed library can provide comparable verification support. We remove human-developed supporting theorems, primarily those tagged by VeriSoftBench as repo_lemmas and used_local_lemmas. We then use VeriBase to construct a library from the 183 construction tasks in this modified environment. Baseline uses the modified environment alone; + Specific adds this constructed library; and + Original Lemmas uses the original environment without adding the constructed library. The general library is not used. Figure 7(a) shows that + Specific improves success rates across all three backends, raising the average from 56.3% to 77.0%. For GLM 5.2, Figure 7(b) shows that + Specific raises the success rate from 62.0% to 81.0%, close to 84.0% under + Original Lemmas, suggesting comparable quality between automatic and human-developed libraries for repository-level verification.

Figure 7. Repository knowledge recovery on VeriSoftBench. Baseline uses the environment with theorems removed; Specific adds the VeriBase-constructed library; Original Lemmas restores the original lemmas instead. (a) Task success rates and their macro-average across three backends. (b) Task success rates over time for GLM 5.2.

Summary. The general VeriBase library consistently improves task success rates, with a macro-average absolute gain of 10.0% over baseline. Adding benchmark-specific libraries increases the gain to 15.5%. On VeriSoftBench, the constructed library provides verification support close to that of the original human-developed theorems, suggesting comparable library quality.

RQ2: Inference Efficiency of VeriBase Libraries

We evaluate how the general library and benchmark-specific libraries affect average completion time and API cost on the three single-file benchmarks.

Completion Time. We average over all test tasks, counting timeouts as 1,800 seconds. As shown in Table 3, the general library reduces average completion time in all nine benchmark–backend combinations, from 1,116.9 to 969.6 seconds on average, a 13.2% reduction. Composing the library with benchmark-specific libraries further reduces completion time in all nine combinations, to 805.3 seconds on average, an overall 27.9% reduction relative to the baseline. These consistent reductions across all nine combinations show that library access improves verification efficiency alongside task success rates. Benchmark-specific libraries further accelerate verification beyond the gains provided by the general library.

BenchmarkBackend LLMTime (s)Cost ($) | |
Baseline+Gen.+Gen. & Spec.Baseline+Gen.+Gen. & Spec.
VerinaDeepSeek V4 Pro1123.7883.5 (-21.4%)771.2 (-31.4%)0.0710.084 (+18.3%)0.102 (+43.7%)
GLM 5.21274.01020.3 (-19.9%)597.5 (-53.1%)1.2041.084 (-10.0%)0.807 (-33.0%)
Qwen 3.7 Max1213.61005.7 (-17.1%)978.3 (-19.4%)1.1530.927 (-19.6%)0.955 (-17.2%)
FVAPPSDeepSeek V4 Pro1150.11008.1 (-12.3%)895.6 (-22.1%)0.0720.096 (+33.3%)0.114 (+58.3%)
GLM 5.21229.01109.2 (-9.7%)837.0 (-31.9%)1.0891.211 (+11.2%)0.888 (-18.5%)
Qwen 3.7 Max1223.71126.3 (-8.0%)1103.9 (-9.8%)1.1861.057 (-10.9%)1.287 (+8.5%)
VeriContestDeepSeek V4 Pro893.6815.9 (-8.7%)606.0 (-32.2%)0.0600.073 (+21.7%)0.076 (+26.7%)
GLM 5.21012.7919.7 (-9.2%)680.7 (-32.8%)0.8720.864 (-0.9%)0.751 (-13.9%)
Qwen 3.7 Max931.6837.7 (-10.1%)777.9 (-16.5%)0.7230.775 (+7.2%)0.929 (+28.5%)

Table 3. Average completion time (seconds) and API cost (USD) across three benchmarks and three backend LLMs. Performance changes compared to Baseline are shown in the brackets.

API Cost. In Table 3, the API cost varies across backend LLMs. Under + Gen., costs increase by 18.3–33.3% for DeepSeek V4 Pro, and show mixed changes for GLM 5.2 and Qwen 3.7 Max. Under +Gen. & Spec., costs decrease by 13.9–33.0% for GLM 5.2, increase by 26.7–58.3% for DeepSeek V4 Pro, and remain mixed for Qwen 3.7 Max. Library retrieval adds input context, whereas reusing library declarations can reduce subsequent generation and revision costs. GLM 5.2 shows reductions in both input and output token consumption. For Qwen and DeepSeek, lower output consumption is sometimes accompanied by increased input consumption, which can offset the savings. This trade-off, together with model-specific token prices, helps explain the differing cost trends.

Summary

VeriBase libraries consistently and substantially reduce completion time, with benchmark-specific libraries providing further reductions beyond the general library. However, these efficiency gains do not always translate into lower API cost, wich varies across backend LLMs.

RQ3: Impact of General-Library Size

We evaluate how general-library size influences task performance by constructing general libraries from nested subsets of 100, 500, and all 4,191 construction tasks. We evaluate these libraries, together with a no-library baseline, on Verina using DeepSeek V4 Pro under the same inference budget. Figure 8(a) shows task success rates, indicating extra but diminishing returns as the corpus grows. In Figure 8(b), the 500-task and full libraries follow similar trajectories, outperforming the 100-task library and then the baseline. Efficiency thus largely saturates beyond 500 construction tasks, while final task coverage continues to improve.

Impact of construction-corpus size on the effectiveness of the general library

Figure 8. (a) Final task success rate. (b) Task success rate over time. Impact of construction-corpus size on the effectiveness of the general library, evaluated on Verina using DeepSeek V4 Pro. (a) Final task success rates for the no-library baseline and libraries built from 100, 500, and 4,191 library-construction tasks. (b) Task success rates over time under the same settings.

A larger corpus exposes VeriBase to more reusable code and theorems, increasing the chance of finding declarations that match a task. Reuse reduces generation from scratch and subsequent repair, improving both task success rates and efficiency. Diminishing returns reflect the limited range of common data types, such as lists, strings, and natural numbers, and operations within each type, such as counting, folding, and sorting. Once these type–operation families are covered, further harvesting tends to yield narrower code and theorems with fewer reuse opportunities. This coverage pattern suggests a long-tail distribution: common families are harvested early, while later additions serve more specialized tasks.

Summary

Increasing the general-library size improves the task success rate, but with diminishing returns. Inference efficiency improves substantially at smaller scales and begins to saturate as the number of library-construction tasks grows beyond 500.

RQ4: Ablation Study

We compare the combined general and VeriContest-specific library with five alternative settings on VeriContest using GLM 5.2. Raw Solution Retrieval retrieves original successful solutions from both construction corpora. w/o Code removes code and associated theorems; w/o Theorems removes theorems while preserving code. w/o Generalization disables generalization both before and during harvesting. w/o Harvesting mechanically assembles the frequency-filtered generalized candidates and their dependencies into a compilable library. Only the processing and presentation of construction material differ; test tasks, backend LLM, retrieval scoring, and per-task inference budget remain fixed across settings.

Comparison with Raw Solution Retrieval. Retrieving raw successful solutions achieves a task success rate of 72.0%, compared with 85.0% for the full library. Raw solutions retain task-specific interfaces and assumptions, and thus require more adaptation, showing that direct access to original code and proofs does not match a generalized and organized library.

Effect of Joint Code-Theorem Harvesting. In Table 4, w/o Code and w/o Theorems achieve 74.0% and 75.0%, respectively, versus 69.0% for Baseline and 85.0% for Full. Code alone leaves properties to be proved; standalone theorems omit code-dependent knowledge. Both gaps support retaining code and associated theorems together.

ConfigurationDefinitionsTheoremsTask success rate (%)
Baseline––69.0
Raw Solution Retrieval24,79012,81372.0
w/o Code01,39974.0
w/o Theorems2,042075.0
w/o Generalization7,0062,95871.0
w/o Harvesting10,0567,08965.0
Full VeriBase2,0423,89885.0

Table 4. Library composition and task success rates (%) of different variants on VeriContest using GLM 5.2. Counts for Raw Solution Retrieval denote indexed source declarations rather than a compiled library.

Effect of Generalization. Removing generalization reduces the task success rate from 85.0% to 71.0%, despite retaining 9,964 declarations versus 5,940 in the full library. This result shows that generalization improves applicability and that library effectiveness depends on more than the number of declarations in the library.

Effect of Harvesting. Mechanical aggregation causes the largest reduction, from 85.0% to 65.0%, despite retaining 17,145 declarations versus 5,940 in the full library. Harvesting filters covered or low-value candidates, merges overlapping interfaces, and organizes the library, producing a smaller library with less retrieval noise.

Summary

Direct retrieval of raw successful solutions is less effective than using the constructed library. Retaining code together with its associated theorems is more effective than retaining either alone. Generalization broadens the applicability of the code and its associated theorems, and harvesting curates and consolidates the library; removing either reduces task success rates.

Library Reuse Analysis

Across three single-file benchmarks and three LLM backends, we analyze 661 successful task–backend pairs under +Gen. & Spec.: 117 explicitly reference harvested code, 173 reference harvested theorems, and 83 reference code together with its associated theorems, providing direct evidence of joint reuse. We count only fully qualified references in generated implementations and proofs, excluding comments, imports, given specifications, and local declarations. These counts are conservative lower bounds because they omit unqualified references, dot notation, and implicit uses of library declarations by tactics.

Case Study of Cross-task Reuse. The construction task LeetCode_3168 computes the maximum occupancy of a waiting room. Through generalization and Harvesting, its solution contributes to the List.listMax declaration family, including the two theorems shown in Figure 9. Verina’s advanced_38 instead maximizes interval coverage after removing one interval; its generated solution reuses List.listMax and both associated theorems to prove attainment and optimality. GLM 5.2 times out without library access but completes the task in 213 seconds with access to the combined general and Verina-specific library.

Code and theorems derived from a chair-allocation task are reused for interval-coverage verification

Figure 9. Code and theorems derived from a chair-allocation task (left) are reused for interval-coverage verification (right).

Threats to Validity

Overlap between Construction and Test Tasks. Task overlap could inflate the measured library benefits. We separate test tasks from both construction corpora and, for FVAPPS and VeriContest, exclude test tasks sharing source identifiers with the general construction corpus. These controls reduce overlap risk, so we expect its impact on the reported gains to be limited.

Variability in LLM Performance. Generation randomness and service load can affect success rates and efficiency independently of library use. We evaluate three backends and, for each model, use the same inference budget and concurrency across settings while avoiding rate-limit errors. These measures reduce model dependence and variation in execution conditions. Although fluctuations remain, we expect their impact on our overall conclusions to be limited.

Dependence on the Retrieval Setup. Retrieval quality affects whether agents find relevant declarations. We fix the scoring technique and number of results returned per library across settings; additional checks show that retrieval can effectively identify relevant declarations. Although this setup may not make optimal use of the libraries, its consistency across settings leads us to expect only a small impact on their comparison.

Related Work

Library Learning

Library learning has been studied extensively in program synthesis, where reusable abstractions can both simplify existing programs and accelerate the synthesis of new ones. DreamCoder [10] iteratively builds a library of reusable program components by solving tasks, refactoring successful programs, and training a neural search policy in a wake–sleep loop. Stitch [7] uses corpus-guided top-down synthesis to identify shared abstractions efficiently. LILO [13] combines LLM-guided synthesis, Stitch-based compression, and automatic documentation to construct interpretable, domain-specific libraries. These approaches learn reusable code abstractions, whereas software verification additionally requires reusable theorems that specify and reason about the behavior of reusable code components.

Library learning has also been explored in formal theorem proving. LEGO-Prover [31] maintains a growing library of verified lemmas as reusable skills that can be retrieved, created, and evolved during proof construction. However, a subsequent study [5] reports limited lemma reuse and no measurable performance improvement under controlled computational budgets. Seed-Prover [8] adopts lemma-style proving and maintains a lemma pool for each difficult problem, allowing verified lemmas from different inference runs to be retrieved, refined, and combined. DreamProver [39] uses a wake–sleep process to prove training theorems and abstract, refine, and consolidate candidate lemmas into a transferable library. Together, these lines of work establish library learning for reusable program abstractions and proof lemmas. In contrast, VeriBase focuses on the coordinated transformation of executable code and its associated theorems into software-verification libraries. It generalizes implementation interfaces, adapts theorem statements and proofs to those interfaces, and consolidates overlapping declaration families across tasks while updating their dependencies. The resulting libraries support reuse in both implementation generation and correctness proofs.

Reusable Libraries for Software Verification

Formal verification ecosystems provide reusable code, specifications, and theorems. Why3 [11] provides logical theories and basic program data structures, while Dafny [22] offers pre-verified standard libraries for common programming operations. Verus’s vstd [18] combines proof utilities with specified runtime functionality, and the Isabelle Collections Framework [17] provides verified collection data structures through data refinement. Rocq’s std++ [28] extends its standard library with definitions and theorems for common data structures, including lists, finite maps, finite sets, and finite multisets. VSTlib [2] specifies standard C components such as memory allocation, atomics, locks, and threads; some implementations are verified, while others are axiomatized system-library interfaces. Together, these libraries allow users to invoke standard library components under formal specifications rather than reimplement and reverify them.

In Lean 4, Std, Batteries, and Mathlib [23, 30] provide foundational data structures and supporting theorems. However, these libraries primarily provide basic, general-purpose infrastructure and are not sufficiently tailored to diverse software-verification tasks, which require domain-specific implementations and surrounding theorem families. CSLib [3] aims to address this gap with a Mathlib-like repository of Computer Science concepts, algorithms, data structures, and verified properties. It also targets Lean-based reasoning about everyday imperative code and the composition of reliable systems from pre-verified components. However, CSLib remains at an early stage of building this shared infrastructure.

These previous efforts demonstrate the value of reusable verification libraries, but their contents are primarily designed and maintained manually by domain experts. In contrast, VeriBase automates part of this library-development process by extracting code and associated theorems from completed verification tasks, generalizing their interfaces together, and integrating overlapping families into a compiled library. These libraries can serve as starting points for further expert curation.

Conclusion

In this paper, we have presented VeriBase, a framework for automatically constructing reusable software-verification libraries from successful task solutions. Its three-phase pipeline proves seed tasks, generalizes implementations together with their associated theorems, and consolidates overlapping declaration families across tasks. VeriBase updates dependent declarations as interface change and checks the resulting code and proofs in Lean. Using VeriBase, we have constructed a general theorem library for Lean 4 software verification, as well as benchmark-specific libraries. Experiments on Verina, FVAPPS, VeriContest, and VeriSoftBench demonstrate that the resulting libraries improve task success rates and consistently reduce completion time, while their effect on API cost varies across backend LLMs. These results support coordinated generalization and integration of code and theorems as an approach to turning task-level verification effort into reusable library interfaces for subsequent tasks.

Data Availability

The code and generated libraries are publicly available at https://github.com/zzhisthebest/Veribase.

References

  1. [1]Wasi Uddin Ahmad, Aleksander Ficek, Mehrzad Samadi, Jocelyn Huang, Vahid Noroozi, Somshubra Majumdar, and Boris Ginsburg. 2025. Opencodeinstruct: A large-scale instruction tuning dataset for code llms. arXiv preprint arXiv:2504.04030 (2025).arxiv.org/abs/2504.04030
  2. [2]Andrew W Appel. 2024. VSTlib: Library Components for Verified C Programs. Coq Workshop.
  3. [3]Clark Barrett, Swarat Chaudhuri, Fabrizio Montesi, Jim Grundy, Pushmeet Kohli, Leonardo de Moura, Alexandre Rademaker, and Sorrachai Yingchareonthawornchai. 2026. CSLib: The Lean computer science library. arXiv preprint arXiv:2602.04846 (2026).arxiv.org/abs/2602.04846
  4. [4]Patrick Baudin, François Bobot, Loïc Correnson, Zaynah Dargaye, and Allan Blanchard. 2020. WP plug-in manual. Frama-c.com (2020).
  5. [5]Ian Berlot-Attwell, Frank Rudicz, and Xujie Si. 2025. Llm library learning fails: A lego-prover case study. arXiv preprint arXiv:2504.03048 (2025).
  6. [6]Yves Bertot and Pierre Castéran. 2013. Interactive theorem proving and program development: Coq’Art: the calculus of inductive constructions. Springer Science & Business Media.
  7. [7]Matthew Bowers, Theo X Olausson, Lionel Wong, Gabriel Grand, Joshua B Tenenbaum, Kevin Ellis, and Armando Solar-Lezama. 2023. Top-down synthesis for library learning. Proceedings of the ACM on Programming Languages 7, POPL (2023), 1182–1213.DOI
  8. [8]Luoxin Chen, Jinming Gu, Liankai Huang, Wenhao Huang, Zhicheng Jiang, Allan Jie, Xiaoran Jin, Xing Jin, Chenggang Li, Kaijing Ma, et al. 2025. Seed-prover: Deep and broad reasoning for automated theorem proving. arXiv preprint arXiv:2507.23726 (2025).arxiv.org/abs/2507.23726
  9. [9]Quinn Doughty and Ronak Mehta. 2025. Proving the coding interview: A benchmark for formally verified code generation. In 2025 IEEE/ACM International Workshop on Large Language Models for Code (LLM4Code). IEEE, 72–79.
  10. [10]Kevin Ellis, Catherine Wong, Maxwell Nye, Mathias Sablé-Meyer, Lucas Morales, Luke Hewitt, Luc Cary, Armando Solar-Lezama, and Joshua B Tenenbaum. 2021. Dreamcoder: Bootstrapping inductive program synthesis with wake-sleep library learning. In Proceedings of the 42nd acm sigplan international conference on programming language design and implementation. 835–850.DOI
  11. [11]Jean-Christophe Filliâtre and Andrei Paskevich. 2013. Why3—where programs meet provers. In European symposium on programming. Springer, 125–128.DOI
  12. [12]GLM-5-Team, Aohan Zeng, Xin Lv, Zhenyu Hou, Zhengxiao Du, Qinkai Zheng, Bin Chen, Da Yin, Chendi Ge, Chenghua Huang, Chengxing Xie, Chenzheng Zhu, Congfeng Yin, Qinxin Wang, Gengzheng Pan, Hao Zeng, Haohe Zhang, Haoran Wang, Huilong Chen, Jiajie Zhang, Jian Jiao, Jiaqi Guo, Jingsen Wang, Jingzhao Du, Jinzhu Wu, Kedong Wang, Lei Li, Lin Fan, Lucen Zhong, Mingdao Liu, Mingming Zhao, Pengfan Du, Qian Dong, Rui Lu, Shuang-Ji, Shulin Cao, Song Liu, Ting Jiang, Xiaodong Chen, Xiaohan Zhang, Xuancheng Huang, Xuezhen Dong, Yabo Xu, Yao Wei, Yifan An, Yilin Niu, Yitong Zhu, Yuanhao Wen, Yukuo Cen, Yushi Bai, Zhongpei Qiao, Zihan Wang, Zikang Wang, Zilin Zhu, Ziqiang Liu, Zixuan Li, Bojie Wang, Bosi Wen, Can Huang, Changpeng Cai, Chao Yu, Chen Li, Chengwei Hu, Chenhui Zhang, Dan Zhang, Daoyan Lin, Dayong Yang, Di Wang, Ding Ai, Erle Zhu, Fangzhou Yi, Feiyu Chen, Guohong Wen, Hailong Sun, Haisha Zhao, Haiyi Hu, Hanchen Zhang, Hanrui Liu, Hanyu Zhang, Hao Peng, Hao Tai, Haobo Zhang, He Liu, Hongwei Wang, Hongxi Yan, Hongyu Ge, Huan Liu, Huanpeng Chu, Jia’ni Zhao, Jiachen Wang, Jiajing Zhao, Jiamin Ren, Jiapeng Wang, Jiaxin Zhang, Jiayi Gui, Jiayue Zhao, Jijie Li, Jing An, Jing Li, Jingwei Yuan, Jinhua Du, Jinxin Liu, Junkai Zhi, Junwen Duan, Kaiyue Zhou, Kangjian Wei, Ke Wang, Keyun Luo, Laiqiang Zhang, Leigang Sha, Liang Xu, Lindong Wu, Lintao Ding, Lu Chen, Minghao Li, Nianyi Lin, Pan Ta, Qiang Zou, Rongjun Song, Ruiqi Yang, Shangqing Tu, Shangtong Yang, Shaoxiang Wu, Shengyan Zhang, Shijie Li, Shuang Li, Shuji Fan, Wei Qin, Wei Tian, Weining Zhang, Wenbo Yu, Wenjie Liang, Xiang Kuang, Xiangmeng Cheng, Xiangyang Li, Xiaoquan Yan, Xiaowei Hu, Xiaoying Ling, Xing Fan, Xingye Xia, Xinyuan Zhang, Xinze Zhang, Xirui Pan, Xu Zou, Xunkai Zhang, Yadi Liu, Yandong Wu, Yanfu Li, Yidong Wang, Yifan Zhu, Yijun Tan, Yilin Zhou, Yiming Pan, Ying Zhang, Yinpei Su, Yipeng Geng, Yong Yan, Yonglin Tan, Yuan Bi, Yuhan Shen, Yuhao Yang, Yujiang Li, Yunan Liu, Yunqing Wang, Yuntao Li, Yurong Wu, Yutao Zhang, Yuxi Duan, Yuxuan Zhang, Zhezhen Liu, Zhengtao Jiang, Zhenhe Yan, Zheyu Zhang, Zhixian Wei, Zhuo Chen, Zhuoer Feng, Zijun Yao, Ziwei Chai, Ziyuan Wang, Zuzhou Zhang, Bin Xu, Minlie Huang, Hongning Wang, Juanzi Li, Yuxiao Dong, and Jie Tang. 2026. GLM-5: from Vibe Coding to Agentic Engineering. arXiv:2602.15763 [cs.LG] https://arxiv.org/abs/2602.15763
  13. [13]Gabriel Grand, Lio Wong, Maddy Bowers, Theo X Olausson, Muxin Liu, Joshua B Tenenbaum, and Jacob Andreas. 2024. Lilo: Learning interpretable libraries by compressing and documenting code. In International Conference on Learning Representations, Vol. 2024. 3039–30446.arxiv.org/abs/2310.19791
  14. [14]Baoding He, Zenan Li, Wei Sun, Yuan Yao, Taolue Chen, Xiaoxing Ma, and Zhendong Su. 2026. Neuro-Symbolic Proof Generation for Scaling Systems Software Verification. In 20th USENIX Symposium on Operating Systems Design and Implementation (OSDI 26). USENIX Association, Seattle, WA, 2533–2550. https://www.usenix.org/conference/osdi26/presentation/he-baodingarxiv.org/abs/2603.19715
  15. [15]Dan Hendrycks, Steven Basart, Saurav Kadavath, Mantas Mazeika, Akul Arora, Ethan Guo, Collin Burns, Samir Puranik, Horace He, Dawn Xiaodong Song, and Jacob Steinhardt. 2021. Measuring Coding Challenge Competence With APPS. ArXiv abs/2105.09938 (2021). https://api.semanticscholar.org/CorpusID:234790100
  16. [16]Gerwin Klein, Kevin Elphinstone, Gernot Heiser, June Andronick, David Cock, Phillip Derrin, Dhammika Elkaduwe, Kai Engelhardt, Rafal Kolanski, Michael Norrish, et al. 2009. seL4: Formal verification of an OS kernel. In Proceedings of the ACM SIGOPS 22nd symposium on Operating systems principles. 207–220.
  17. [17]Peter Lammich and Andreas Lochbihler. 2010. The Isabelle collections framework. In International Conference on Interactive Theorem Proving. Springer, 339–354.DOI
  18. [18]Andrea Lattuada, Travis Hance, Chahnee Cho, Matthias Brun, Isitha Subasinghe, Yi Zhou, Jon Howell, Bryan Parno, and Chris Hawblitzel. 2023. Verifying rust programs using linear ghost types. Proceedings of the ACM on Programming Languages 7, OOPSLA1 (2023), 286–315.DOI
  19. [19]K Rustan M Leino. 2010. Dafny: An automatic program verifier for functional correctness. In International conference on logic for programming artificial intelligence and reasoning. Springer, 348–370.
  20. [20]Xavier Leroy, Sandrine Blazy, Daniel Kästner, Bernhard Schommer, Markus Pister, and Christian Ferdinand. 2016. CompCert-a formally verified optimizing compiler. In ERTS 2016: Embedded Real Time Software and Systems, 8th European Congress.
  21. [21]Zenan Li, Ziran Yang, Deyuan He, Haoyu Zhao, Andrew Zhao, Shange Tang, Kaiyu Yang, Aarti Gupta, Zhendong Su, and Chi Jin. 2026. Goedel-Code-Prover: Hierarchical Proof Search for Open State-of-the-Art Code Verification. arXiv:2603.19329 [cs.SE] https://arxiv.org/abs/2603.19329
  22. [22]Microsoft Corporation. [n. d.]. Dafny Standard Libraries. https://github.com/dafny-lang/dafny/tree/master/Source/DafnyStandardLibraries
  23. [23]Leonardo de Moura and Sebastian Ullrich. 2021. The lean 4 theorem prover and programming language. In International Conference on Automated Deduction. Springer, 625–635.DOI
  24. [24]Peter Müller, Malte Schwerhoff, and Alexander J Summers. 2015. Viper: A verification infrastructure for permission-based reasoning. In International conference on verification, model checking, and abstract interpretation. Springer, 41–62.
  25. [25]Tobias Nipkow, Markus Wenzel, and Lawrence C Paulson. 2002. Isabelle/HOL: a proof assistant for higher-order logic. Springer.DOI
  26. [26]Qwen Team. 2026. Qwen3.7: The Agent Frontier. https://qwen.ai/blog?id=qwen3.7
  27. [27]sentence-transformers [n. d.]. sentence-transformers/all-MiniLM-L6-v2. https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2
  28. [28]std++ team. [n. d.]. Iris / Stdpp. https://gitlab.mpi-sws.org/iris/stdpp
  29. [29]Amitayush Thakur, George Tsoukalas, Yiming Wen, Jimmy Xin, and Swarat Chaudhuri. 2023. An in-context learning agent for formal theorem-proving. arXiv preprint arXiv:2310.04353 (2023).arxiv.org/abs/2310.04353
  30. [30]The mathlib Community. 2020. The Lean Mathematical Library. In Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP 2020). ACM, New Orleans, LA, USA. doi:10.1145/3372885.3373824DOI
  31. [31]Haiming Wang, Huajian Xin, Chuangyang Zheng, Zhengying Liu, Qingxing Cao, Yinya Huang, Jing Xiong, Han Shi, Enze Xie, Jian Yin, et al. 2024. Lego-prover: Neural theorem proving with growing libraries. In International Conference on Learning Representations, Vol. 2024. 31566–31597.arxiv.org/abs/2310.00656
  32. [32]Zichen Xie, Mirganik Pawagi, Yuxin Liu, Aaditi Rai, Lize Shao, John Berberian Jr, Sicong Che, and Wenxi Wang. 2026. VeriContest: A Competitive-Programming Benchmark for Verifiable Code Generation. arXiv preprint arXiv:2605.08553 (2026).arxiv.org/abs/2605.08553
  33. [33]Huajian Xin, Daya Guo, Zhihong Shao, Zhizhou Ren, Qihao Zhu, Bo Liu, Chong Ruan, Wenda Li, and Xiaodan Liang. 2024. Deepseek-prover: Advancing theorem proving in llms through large-scale synthetic data. arXiv preprint arXiv:2405.14333 (2024).arxiv.org/abs/2405.14333
  34. [34]Yutong Xin, Qiaochen Chen, Greg Durrett, and Isil Dillig. 2026. Verisoftbench: Repository-scale formal verification benchmarks for lean. arXiv preprint arXiv:2602.18307 (2026).arxiv.org/abs/2602.18307
  35. [35]Anyi Xu, Bangcai Lin, Bing Xue, Bingxuan Wang, Bingzheng Xu, Bochao Wu, Bowei Zhang, Chaofan Lin, Chen Dong, Chenxun Ling, et al. 2026. Deepseek-v4: Towards highly efficient million-token context intelligence. arXiv preprint arXiv:2606.19348 (2026).arxiv.org/abs/2606.19348
  36. [36]Kaiyu Yang, Aidan Swope, Alex Gu, Rahul Chalamala, Peiyang Song, Shixing Yu, Saad Godil, Ryan J Prenger, and Animashree Anandakumar. 2023. LeanDojo: Theorem proving with retrieval-augmented language models. Advances in Neural Information Processing Systems 36 (2023), 21573–21612.arxiv.org/abs/2306.15626
  37. [37]Zhe Ye, Zhengxu Yan, Jingxuan He, Timothee Kasriel, Kaiyu Yang, and Dawn Song. 2025. VERINA: Benchmarking Verifiable Code Generation. arXiv preprint arXiv:2505.23135 (2025).arxiv.org/abs/2505.23135
  38. [38]Ning Zhang, Nongyu Di, Zenan Li, Yuan Yao, and Xiaoxing Ma. 2026. Planning to Hammer: Difficulty-Aware Decomposition for Automating Rocq Proofs. arXiv:2606.17981 [cs.SE] https://arxiv.org/abs/2606.17981
  39. [39]Youyuan Zhang, Jialiang Sun, Hangrui Bi, Chuqin Geng, Wenjie Ma, Zhaoyu Li, and Xujie Si. 2026. DreamProver: Evolving Transferable Lemma Libraries via a Wake-Sleep Theorem-Proving Agent. arXiv preprint arXiv:2604.26311 (2026).arxiv.org/abs/2604.26311

Paper details

vlnc:W_rpgts2zm
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents