| --- |
| language: |
| - en |
| - code |
| license: cc-by-4.0 |
| task_categories: |
| - translation |
| tags: |
| - formal-verification |
| - theorem-proving |
| - interactive-theorem-provers |
| - lean4 |
| - rocq |
| - coq |
| - isabelle |
| - hol-light |
| - code-translation |
| pretty_name: ITPEval |
| size_categories: |
| - 1K<n<10K |
| --- |
| |
| # ITPEval: Benchmarking Formal Translation Across Interactive Theorem Provers |
|
|
| ITPEval is a benchmark for evaluating automated formal proof translation across four major interactive theorem provers (ITPs) spanning two logical foundations. It accompanies the paper *ITPEval: Benchmarking Formal Translation Across Interactive Theorem Provers*. |
|
|
| ## Dataset Summary |
|
|
| The benchmark comprises **390 aligned files** spanning over 1,700 theorems and lemmas, each formalized in all four ITPs: |
|
|
| | ITP | Foundation | File Extension | |
| |---|---|---| |
| | Lean 4 | Calculus of Inductive Constructions | `.lean` | |
| | Rocq (Coq) | Calculus of Inductive Constructions | `.v` | |
| | Isabelle/HOL | Higher-order logic | `.thy` | |
| | HOL Light | Higher-order logic | `.ml` | |
|
|
| Every theorem is present in all four ITPs (4-way intersection), yielding **12 balanced directed translation pairs** per file. |
|
|
| ## Data Files |
|
|
| | File | Records | Description | |
| |---|---|---| |
| | `stmts.json` | 1,560 | Sorry-stripped theorem statements (390 theorems × 4 ITPs) | |
| | `proofs.json` | 296 | Full proof files (74 theorems × 4 ITPs) | |
|
|
| ## Record Schema |
|
|
| Each record is a JSON object with the following fields: |
|
|
| | Field | Type | Description | |
| |---|---|---| |
| | `theorem_id` | int | Globally unique theorem identifier (1–390) | |
| | `title` | string | Theorem name (e.g., `"circle_average"`, `"aime_1983_p1"`) | |
| | `source` | string | Benchmark source: `"babel-formal"`, `"hundred-theorems"`, or `"minif2f"` | |
| | `tier` | string | `"a"` (controlled/axiomatized) or `"b"` (ecosystem/library-dependent) | |
| | `prover` | string | ITP system: `"lean4"`, `"rocq"`, `"isabelle"`, or `"hol-light"` | |
| | `content` | string | Full file text (statement-only for `stmts.json`, complete proof for `proofs.json`) | |
| | `split` | string | *(miniF2F only)* `"test"` or `"valid"` | |
|
|
| ## Benchmark Structure |
|
|
| The benchmark is organized into two tiers: |
|
|
| | Tier | Source | Files | Lemmas | Description | |
| |---|---|---|---|---| |
| | A (Controlled) | Babel-formal | 16 | 165 | Self-contained, axiomatized theorems. Isolates foundational translation difficulty. | |
| | B (Ecosystem) | Hundred Theorems | 58 | 1,231 | Classical theorems from real ITP libraries. Tests library API and tactic translation. | |
| | B (Ecosystem) | miniF2F | 316 | 316 | Competition math statements. Tests pure statement translation. | |
|
|
| **Translation modes:** |
|
|
| - **Statement translation** (`stmts.json`): All 390 files. Source file has proof bodies replaced by placeholders (`sorry`, `Admitted`, etc.). Yields 4,680 directed pairs per model (390 × 12 directions). |
| - **Proof translation** (`proofs.json`): Babel-formal + Hundred Theorems (74 files). Source file contains the complete proof. Yields 888 directed pairs per model (74 × 12 directions). |
|
|
| ## Usage |
|
|
| ```python |
| import json |
| |
| # Load data |
| stmts = json.load(open("stmts.json")) # 1,560 records |
| proofs = json.load(open("proofs.json")) # 296 records |
| |
| # All Lean 4 statements |
| lean4_stmts = [r for r in stmts if r["prover"] == "lean4"] |
| |
| # All 4 ITP variants of one theorem |
| theorem_1 = [r for r in stmts if r["theorem_id"] == 1] |
| |
| # Generate all directed translation pairs for a theorem |
| def translation_pairs(records, theorem_id): |
| variants = [r for r in records if r["theorem_id"] == theorem_id] |
| pairs = [] |
| for src in variants: |
| for tgt in variants: |
| if src["prover"] != tgt["prover"]: |
| pairs.append({"src": src, "tgt_prover": tgt["prover"]}) |
| return pairs |
| |
| # Tier A only (controlled) |
| tier_a = [r for r in stmts if r["tier"] == "a"] |
| |
| # miniF2F test split |
| minif2f_test = [r for r in stmts if r["source"] == "minif2f" and r.get("split") == "test"] |
| ``` |
|
|
| ## Evaluation Protocol |
|
|
| For each (source file, target ITP) pair: |
|
|
| 1. Prompt an LLM with the source file and the target ITP name |
| 2. The LLM generates a complete file in the target ITP |
| 3. Run the generated file through the target ITP binary |
| 4. Mark as **verified** if and only if the ITP exits with code 0 (no errors, no partial credit) |
|
|
| Per-prover timeouts: Lean 4 and Rocq at 60s, Isabelle at 120s, HOL Light at 300s. |
|
|
| ## Key Results |
|
|
| With five LLMs (GPT-5.5, Claude Sonnet 4.6, Gemini 3.1 Pro, DeepSeek-V4-Pro, Qwen3-235B), evaluated zero-shot at temperature 0: |
|
|
| - Statement translation peaks at **29.1%** pass@1; proof translation peaks at **10.5%** |
| - Tier A (controlled) reaches **29.7%** proof pass@1 vs. **5.2%** for Tier B (ecosystem) |
| - Translation direction matters sharply: e.g., Lean 4 → Isabelle (19.8%) vs. Isabelle → Lean 4 (1.9%) |
|
|
|
|
| ## License |
|
|
| This dataset is released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Individual formalizations may inherit licenses from their upstream sources (Mathlib, Archive of Formal Proofs, HOL Light core, MathComp, miniF2F). |