marcusm117 commited on
Commit
08d4c51
·
1 Parent(s): 474192c

bump to be compatible with Lean v4.34.0

Browse files
Files changed (2) hide show
  1. README.md +71 -28
  2. proofnet-verified.jsonl +0 -0
README.md CHANGED
@@ -19,7 +19,7 @@ tags:
19
  - HuggingFace: https://huggingface.co/datasets/marcusm117/ProofNet-Verified
20
  - Visualization: https://marcusm117.github.io/ProofNet-Verified/
21
 
22
- **ProofNet-Verified (ProofNet-V)** is an audited, corrected, and verified version of the [ProofNet](https://github.com/zhangir-azerbayev/ProofNet) dataset that is upgraded to be compatible with `Lean v4.28.0`. A visualization of all errors, error classifications, and our corrections can be found at [https://marcusm117.github.io/ProofNet-Verified](https://marcusm117.github.io/ProofNet-Verified).
23
 
24
  [ProofNet](https://github.com/zhangir-azerbayev/ProofNet) is a benchmark for theorem proving and autoformalization of undergraduate-level mathematics. It originally consists of **371** data points, each consisting of a formal theorem statement in `Lean 3`, a natural language theorem statement, and a natural language proof. The problems are primarily drawn from popular undergraduate pure mathematics textbooks and cover topics such as real and complex analysis, linear algebra, abstract algebra, and topology. We intend for ProofNet to be a challenging benchmark that will drive progress in autoformalization and automatic theorem proving
25
 
@@ -36,9 +36,9 @@ Based on ProofNet and ProofNet#, we made the following modifications:
36
  - Rudin|exercise_1_14
37
  - Rudin|exercise_1_19
38
 
39
- 2. Upgrade the formal statements to be compatible with `Lean v4.28.0`, so that more automated proof search tools like [Grind](https://lean-lang.org/doc/reference/latest/The--grind--tactic/), [Canonical](https://github.com/chasenorman/CanonicalLean), and [Lean-SMT](https://github.com/ufmg-smite/lean-smt) are available.
40
 
41
- 3. Audit the benchmark for both errors in the ground-truth formalizations and ambiguity in the informal statements, identifying **204/367 (55.6%)** errors in **ProofNet** and **97/367 (26.4%)** errors in **ProofNet#**.
42
 
43
  4. Confirm each error by proving the negation of incorrect formalizations, providing trivialized proofs of formalization that are provably true but unfaithful to the informal statement, or giving detailed reasoning for why a formalization is unfaithful or an informal statement is ambiguous.
44
 
@@ -72,30 +72,49 @@ If you find the **ProofNet-Verified** benchmark useful for your research, please
72
 
73
  | | ProofNet | ProofNet# |
74
  |---|---|---|
75
- | Faithful | 163 (44.4%) | 270 (73.6%) |
76
- | Unfaithful | 194 (52.9%) | 88 (24.0%) |
77
- | Ambiguous NL | 9 (2.5%) | 8 (2.2%) |
78
- | Wrong NL | 1 (0.3%) | 1 (0.3%) |
79
- | **Total Errors** | **204 (55.6%)** | **97 (26.4%)** |
80
  | **Total** | **367** | **367** |
81
 
82
- ### Unfaithful Error Type Breakdown
83
 
84
- | Unfaithful Error Type | ProofNet | ProofNet# |
 
 
 
 
85
  |---|---|---|
86
- | Misunderstanding of informal statement | 94 (25.6%) | 27 (7.4%) |
87
- | Missing premise | 30 (8.2%) | 3 (0.8%) |
88
- | Misunderstanding of Mathlib | 26 (7.1%) | 31 (8.4%) |
89
- | Missing implicit premise | 18 (4.9%) | 18 (4.9%) |
90
- | Misunderstanding of Lean | 10 (2.7%) | 8 (2.2%) |
91
- | Adding extra case | 9 (2.5%) | 0 (0.0%) |
92
- | Adding extra conclusion | 7 (1.9%) | 1 (0.3%) |
93
- | **Total Unfaithful** | **194 (52.9%)** | **88 (24.0%)** |
 
 
 
94
 
 
 
 
 
 
 
 
 
 
 
 
 
95
 
96
  ## Dataset Format
97
 
98
- Each entry in [proofnet-verified.jsonl](data/proofnet-verified.jsonl) contains:
99
 
100
  | Field | Description |
101
  |---|---|
@@ -105,9 +124,9 @@ Each entry in [proofnet-verified.jsonl](data/proofnet-verified.jsonl) contains:
105
  | `header` | Lean imports and `open` declarations |
106
  | `helper` | Auxiliary definitions needed by some problems |
107
  | `informal_stmt` | Natural language theorem statement |
108
- | `formal_stmt` | Lean 4 formal statement (ends with `sorry`) |
109
  | `informal_proof` | Natural language proof |
110
- | `formal_proof` | [Zipped](data/proofnet-verified_gt.zip) to avoid data contamination |
111
 
112
  ### Example Entry
113
 
@@ -131,12 +150,24 @@ theorem Artin_exercise_2_2_9 {G : Type*} [Group G] {a b : G}
131
 
132
  ## Getting Started
133
 
 
 
 
 
 
 
 
 
 
 
134
  ### Prerequisites
135
 
136
- - [Lean 4](https://lean-lang.org/lean4/doc/setup.html) (v4.28.0, managed via `elan`)
137
  - [Lake](https://github.com/leanprover/lean4/tree/master/src/lake) (bundled with Lean)
138
  - [uv](https://docs.astral.sh/uv/) (for Python scripts)
139
 
 
 
140
  ### Building
141
 
142
  ```bash
@@ -150,14 +181,26 @@ lake update
150
 
151
  ### Compiling All Statements
152
 
153
- To type-check all 367 formal statements in parallel:
154
 
155
  ```bash
156
  uv sync
157
  uv run python scripts/verify_compilation.py
158
  ```
159
 
160
- This runs `lake env lean` on each file with 48 parallel workers (configurable via `--jobs`).
 
 
 
 
 
 
 
 
 
 
 
 
161
 
162
  ### Python Environment
163
 
@@ -175,16 +218,16 @@ uv run python scripts/verify_compilation.py
175
 
176
  ### For Theorem Proving Evaluation
177
 
178
- The `proofnet-verified/` directory contains 367 Lean files, each with a single theorem statement ending in `sorry`. Replace `sorry` with a valid proof to solve the problem. We recommend using [Lean Comparator](https://github.com/leanprover/comparator) as a rigorous proof checker.
179
 
180
  ### For Autoformalization Evaluation
181
 
182
- Each entry in `proofnet-verified.jsonl` pairs an `informal_stmt` with a `formal_stmt`. We recommend using symbolic checkers like [BEq+](https://github.com/augustepoiroux/LeanInteract/blob/main/examples/beq_plus.py) over LLM-as-a-Judge to compare the ground truth `formal_stmt` with the generated candidate formalizations.
183
 
184
  ### For Error Analysis
185
 
186
- The `error_taxonomy/` directory provides detailed per-problem error classifications, useful for studying common failure modes in mathematical formalization (Lean syntax misunderstandings, Mathlib API misuse, missing premises, etc.).
187
 
188
  ## License
189
 
190
- This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.
 
19
  - HuggingFace: https://huggingface.co/datasets/marcusm117/ProofNet-Verified
20
  - Visualization: https://marcusm117.github.io/ProofNet-Verified/
21
 
22
+ **ProofNet-Verified (ProofNet-V)** is an audited, corrected, and verified version of the [ProofNet](https://github.com/zhangir-azerbayev/ProofNet) dataset. The latest project environment targets `Lean v4.34.0`; the verified Lean 4.28 snapshot remains available in [`data/archive/` on GitHub](https://github.com/marcusm117/ProofNet-Verified/tree/main/data/archive). A visualization of all errors, error classifications, and our corrections can be found at [https://marcusm117.github.io/ProofNet-Verified](https://marcusm117.github.io/ProofNet-Verified).
23
 
24
  [ProofNet](https://github.com/zhangir-azerbayev/ProofNet) is a benchmark for theorem proving and autoformalization of undergraduate-level mathematics. It originally consists of **371** data points, each consisting of a formal theorem statement in `Lean 3`, a natural language theorem statement, and a natural language proof. The problems are primarily drawn from popular undergraduate pure mathematics textbooks and cover topics such as real and complex analysis, linear algebra, abstract algebra, and topology. We intend for ProofNet to be a challenging benchmark that will drive progress in autoformalization and automatic theorem proving
25
 
 
36
  - Rudin|exercise_1_14
37
  - Rudin|exercise_1_19
38
 
39
+ 2. Upgrade the project environment to `Lean v4.34.0`, so that more automated proof search tools like [Grind](https://lean-lang.org/doc/reference/latest/The--grind--tactic/), [Canonical](https://github.com/chasenorman/CanonicalLean), and [Lean-SMT](https://github.com/ufmg-smite/lean-smt) are available.
40
 
41
+ 3. Audit the benchmark for both errors in the ground-truth formalizations and ambiguity in the informal statements, identifying **205/367 (55.9%)** errors in **ProofNet** and **99/367 (27.0%)** errors in **ProofNet#**.
42
 
43
  4. Confirm each error by proving the negation of incorrect formalizations, providing trivialized proofs of formalization that are provably true but unfaithful to the informal statement, or giving detailed reasoning for why a formalization is unfaithful or an informal statement is ambiguous.
44
 
 
72
 
73
  | | ProofNet | ProofNet# |
74
  |---|---|---|
75
+ | Faithful | 162 (44.1%) | 268 (73.0%) |
76
+ | Unfaithful | 195 (53.1%) | 90 (24.5%) |
77
+ | NL Source Ambiguous | 9 (2.5%) | 8 (2.2%) |
78
+ | NL Source Incorrect | 1 (0.3%) | 1 (0.3%) |
79
+ | **Total Errors** | **205 (55.9%)** | **99 (27.0%)** |
80
  | **Total** | **367** | **367** |
81
 
82
+ The **Unfaithful** row counts the `stronger`, `weaker`, and `incomparable` faithfulness labels; ambiguous and incorrect natural-language sources are counted separately. Percentages use all 367 problems in each benchmark.
83
 
84
+ The audit tracks three dimensions: **Provability**, **Faithfulness**, and **Root Cause**. Faithfulness compares logical structure with the relevant mathematical formulas treated as opaque, rather than identifying statements because they are mathematically provable.
85
+
86
+ ### Root Cause Breakdown
87
+
88
+ | Root Cause | ProofNet | ProofNet# |
89
  |---|---|---|
90
+ | NL Source Ambiguous | 9 (2.5%) | 8 (2.2%) |
91
+ | NL Source Incorrect | 1 (0.3%) | 1 (0.3%) |
92
+ | Implicit Premise | 18 (4.9%) | 17 (4.6%) |
93
+ | Missing Premise | 31 (8.4%) | 6 (1.6%) |
94
+ | Adding Extra Conclusion | 7 (1.9%) | 3 (0.8%) |
95
+ | Misunderstanding of Informal Math | 95 (25.9%) | 30 (8.2%) |
96
+ | Misunderstanding of Mathlib | 28 (7.6%) | 24 (6.5%) |
97
+ | Misunderstanding of Lean | 16 (4.4%) | 10 (2.7%) |
98
+ | **Total Errors** | **205 (55.9%)** | **99 (27.0%)** |
99
+
100
+ These are the eight root-cause categories. Faithful formalizations use `none`, meaning **no formalization error / not applicable**, not an unknown cause or a ninth error category.
101
 
102
+ ## Dataset Files
103
+
104
+ | Resource | Location |
105
+ |---|---|
106
+ | Latest JSONL dataset on Hugging Face | [`proofnet-verified.jsonl`](proofnet-verified.jsonl) |
107
+ | Canonical latest JSONL dataset on GitHub | [`data/proofnet-verified-latest.jsonl`](https://github.com/marcusm117/ProofNet-Verified/blob/main/data/proofnet-verified-latest.jsonl) |
108
+ | Latest Lean statements | [`proofnet-verified-latest/`](https://github.com/marcusm117/ProofNet-Verified/tree/main/proofnet-verified-latest) |
109
+ | Archived Lean 4.28 statements | [`data/archive/proofnet-verified-4.28/`](https://github.com/marcusm117/ProofNet-Verified/tree/main/data/archive/proofnet-verified-4.28) |
110
+ | Archived Lean 4.28 JSONL dataset | [`data/archive/proofnet-verified-4.28.jsonl`](https://github.com/marcusm117/ProofNet-Verified/blob/main/data/archive/proofnet-verified-4.28.jsonl) |
111
+ | Archived Lean 4.28 proofs | [`data/archive/proofnet-verified_gt-4.28.zip`](https://github.com/marcusm117/ProofNet-Verified/blob/main/data/archive/proofnet-verified_gt-4.28.zip) |
112
+
113
+ The Hugging Face JSONL is a byte-for-byte copy of the canonical latest GitHub export, including its existing proof metadata. Its filename remains `proofnet-verified.jsonl` for compatibility.
114
 
115
  ## Dataset Format
116
 
117
+ Each entry in [proofnet-verified.jsonl](proofnet-verified.jsonl) contains:
118
 
119
  | Field | Description |
120
  |---|---|
 
124
  | `header` | Lean imports and `open` declarations |
125
  | `helper` | Auxiliary definitions needed by some problems |
126
  | `informal_stmt` | Natural language theorem statement |
127
+ | `formal_stmt` | Lean 4 theorem declaration |
128
  | `informal_proof` | Natural language proof |
129
+ | `formal_proof` | Placeholder preserved from the canonical export; the Lean 4.28 proof snapshot is [available as a ZIP](https://github.com/marcusm117/ProofNet-Verified/blob/main/data/archive/proofnet-verified_gt-4.28.zip) |
130
 
131
  ### Example Entry
132
 
 
150
 
151
  ## Getting Started
152
 
153
+ ### Loading from Hugging Face
154
+
155
+ ```python
156
+ from datasets import load_dataset
157
+
158
+ dataset = load_dataset("marcusm117/ProofNet-Verified")
159
+ ```
160
+
161
+ The Lean statements, build configuration, and Python scripts live in the [GitHub repository](https://github.com/marcusm117/ProofNet-Verified), not this Hugging Face repository. Run the build, compilation, and regeneration commands below from the GitHub checkout.
162
+
163
  ### Prerequisites
164
 
165
+ - [Lean 4](https://lean-lang.org/lean4/doc/setup.html) (v4.34.0, managed via `elan`)
166
  - [Lake](https://github.com/leanprover/lean4/tree/master/src/lake) (bundled with Lean)
167
  - [uv](https://docs.astral.sh/uv/) (for Python scripts)
168
 
169
+ The latest statements use Mathlib and Canonical `v4.34.0`, with Lean-SMT pinned to [`2956f2966ff443b27a86fe2a4fb82dc56efafc51`](https://github.com/ufmg-smite/lean-smt/commit/2956f2966ff443b27a86fe2a4fb82dc56efafc51). The archived and original Lean 4.28 datasets remain unchanged.
170
+
171
  ### Building
172
 
173
  ```bash
 
181
 
182
  ### Compiling All Statements
183
 
184
+ To type-check all 367 formal statements in `proofnet-verified-latest/` in parallel:
185
 
186
  ```bash
187
  uv sync
188
  uv run python scripts/verify_compilation.py
189
  ```
190
 
191
+ This runs `lake env lean` on each file with 48 parallel workers (configurable via `--jobs`, e.g. `--jobs 64`). The latest statements use the repository's Lean 4.34 environment. For the archived statements (`--dir data/archive/proofnet-verified-4.28`) or original formalizations (`--dir data/proofnet/proofnet-4.28`), also pass `--cwd /path/to/lean-4.28-project` pointing to a Lake project with Lean and Mathlib 4.28; overriding `--lean-version` alone does not change the dependency versions.
192
+
193
+ ### Regenerating JSONL
194
+
195
+ Run these commands from the GitHub repository root to regenerate the latest dataset, the archived Lean 4.28 dataset, and the original ProofNet dataset:
196
+
197
+ ```bash
198
+ uv run python scripts/generate_jsonl.py --source-dir proofnet-verified-latest --output data/proofnet-verified-latest.jsonl
199
+ uv run python scripts/generate_jsonl.py --source-dir data/archive/proofnet-verified-4.28 --output data/archive/proofnet-verified-4.28.jsonl
200
+ uv run python scripts/generate_jsonl.py --source-dir data/proofnet/proofnet-4.28 --output data/proofnet/proofnet-4.28.jsonl
201
+ ```
202
+
203
+ The exporter preserves `informal_proof` and `formal_proof` from the existing output. For a new output file, pass `--metadata` with an existing corresponding JSONL dataset. Add `--check` to validate an export without rewriting it.
204
 
205
  ### Python Environment
206
 
 
218
 
219
  ### For Theorem Proving Evaluation
220
 
221
+ The [`proofnet-verified-latest/` directory on GitHub](https://github.com/marcusm117/ProofNet-Verified/tree/main/proofnet-verified-latest) contains 367 Lean files, each with a single theorem declaration. Replace `sorry` with a valid proof for entries with an admitted proof. We recommend using [Lean Comparator](https://github.com/leanprover/comparator) as a rigorous proof checker.
222
 
223
  ### For Autoformalization Evaluation
224
 
225
+ Each entry in [`proofnet-verified.jsonl`](proofnet-verified.jsonl) pairs an `informal_stmt` with a `formal_stmt`. We recommend using symbolic checkers like [BEq+](https://github.com/augustepoiroux/LeanInteract/blob/main/examples/beq_plus.py) over LLM-as-a-Judge to compare the ground truth `formal_stmt` with the generated candidate formalizations.
226
 
227
  ### For Error Analysis
228
 
229
+ The [`error_taxonomy/` directory on GitHub](https://github.com/marcusm117/ProofNet-Verified/tree/main/error_taxonomy) provides detailed per-problem error classifications, useful for studying common failure modes in mathematical formalization (Lean syntax misunderstandings, Mathlib API misuse, missing premises, etc.).
230
 
231
  ## License
232
 
233
+ This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.
proofnet-verified.jsonl CHANGED
The diff for this file is too large to render. See raw diff