ai4math-lean
收藏资源简介:
ai4math-lean 是一个包含21个Lean 4形式化数学数据集的集合,所有问题都经过lean-server v4.21.0的机器验证。数据集总量为3,394,310个数学问题,其中1,273,472个包含证明,352,065个在v4.21.0版本下验证有效。数据集包含多个子集,如deepseek_prover、goedel_pset、nemotron_proofs等,每个子集都有不同数量的问题和验证状态。每个数据条目包含丰富的信息,如唯一标识符(id)、形式化陈述(formal_statement)、完整的Lean 4代码(lean4_code)、是否包含证明(has_proof)、证明内容(proof_body)、自然语言描述(natural_language)等。特别地,数据集还包含详细的验证信息,如验证状态(v4210_is_valid)、编译状态(v4210_compiles)、是否包含占位证明(v4210_has_sorry)和验证延迟(v4210_latency_s)。该数据集适用于文本生成任务,特别适合形式化数学、定理证明和数学验证相关的研究与应用。数据集采用Apache 2.0许可证发布。
ai4math-lean is a collection of 21 Lean 4 formalized mathematics datasets, where all problems have been machine-verified by lean-server v4.21.0. The dataset contains a total of 3,394,310 mathematical problems, among which 1,273,472 have associated proofs, and 352,065 are valid under the v4.21.0 version. The dataset includes multiple subsets such as deepseek_prover, goedel_pset, nemotron_proofs, etc., each with varying numbers of problems and validation statuses. Each data entry contains rich information, including unique identifier (id), formal_statement, complete Lean 4 code (lean4_code), has_proof flag, proof_body, natural_language description, and more. Specifically, the dataset also includes detailed validation information, such as validation status (v4210_is_valid), compilation status (v4210_compiles), whether it contains placeholder proofs (v4210_has_sorry), and validation latency (v4210_latency_s). This dataset is applicable to text generation tasks, and is particularly well-suited for research and applications related to formalized mathematics, theorem proving, and mathematical verification. The dataset is released under the Apache 2.0 license.
ai4math-lean 数据集概述
数据集基本信息
- 数据集名称: ai4math-lean
- 许可证: Apache 2.0
- 主要任务类别: 文本生成
- 主要语言: 英语
- 标签: lean4, theorem-proving, formal-mathematics, verification, math
- 规模类别: 1M<n<10M
数据集构成与规模
- 总问题数量: 3,394,310
- 包含证明的问题数量: 1,273,472
- 在 Lean v4.21.0 上验证有效的问题数量: 352,065
- 包含的子数据集数量: 21 个
子数据集详情
| 数据集名称 | 问题数量 | 包含证明的数量 | 在 v4.21.0 上有效的数量 |
|---|---|---|---|
| compfiles | 297 | 259 | 67 |
| deepseek_prover | 27,503 | 27,503 | 27,126 |
| deepseek_proverbench | 325 | 0 | 0 |
| formal_conjectures | 618 | 13 | 13 |
| formalmath | 5,560 | 5,556 | 2 |
| goedel_minif2f | 244 | 0 | 0 |
| goedel_mobench | 360 | 0 | 0 |
| goedel_pset | 1,732,594 | 263,589 | 9,755 |
| goedel_test | 8 | 0 | 0 |
| hf_lean_workbook | 29,750 | 29,750 | 29,208 |
| hf_minif2f_lean4 | 231 | 0 | 0 |
| hf_minif2f_v2 | 488 | 0 | 0 |
| hf_tonic_minif2f | 488 | 0 | 0 |
| lean_proofs | 98 | 97 | 15 |
| lean_workbook_full | 140,214 | 0 | 0 |
| matholympiadbench | 360 | 0 | 0 |
| nemotron_proofs | 1,349,950 | 915,078 | 285,867 |
| numinamath_lean | 104,155 | 31,615 | 0 |
| proofnet | 371 | 0 | 0 |
| putnam2025 | 24 | 12 | 12 |
| putnam_bench | 672 | 0 | 0 |
数据模式与特征
每个数据行包含以下字段:
| 字段名 | 类型 | 描述 |
|---|---|---|
id |
字符串 | 唯一问题标识符 |
source |
字符串 | 数据集源名称 |
formal_statement |
字符串 | Lean 4 定理陈述(无证明体) |
header |
字符串 | 导入/设置代码 |
lean4_code |
字符串 | 完整可运行的 Lean 4 代码 |
has_proof |
布尔值 | 如果包含真实证明(非 sorry)则为 True |
proof_body |
字符串(可选) | 证明策略块(如果 has_proof 为真) |
natural_language |
字符串(可选) | 自然语言问题陈述(如果可用) |
lean_version |
字符串(可选) | 原始 Lean 工具链版本 |
split |
字符串(可选) | train/test/val 分割 |
tags |
字符串列表 | 标签(主题、难度等) |
category |
字符串(可选) | 数学类别 |
verification |
字符串(JSON) | 每个 Lean 版本的完整验证结果 |
v4210_is_valid |
布尔值(可选) | True=有效, False=错误/sorry, None=超时 |
v4210_compiles |
布尔值 | 代码是否编译(is_valid 不为 None) |
v4210_has_sorry |
布尔值(可选) | 是否检测到 sorry |
v4210_latency_s |
浮点数(可选) | 验证挂钟时间(秒) |
验证信息
- 所有问题均已针对 Lean-server v4.21.0 在 UVA 的 HPC 集群上进行了验证。
- 验证结果以结构化的
verificationJSON 列和平坦化的便捷列形式嵌入每一行。 verification列包含一个 JSON 字符串,映射 Lean 版本到结果。




