formal-mathfin-theorems
收藏资源简介:
Formally Verified Mathematical Finance (Lean 4)是一个包含261个经过机器验证的数学金融定理的数据集,这些定理使用Lean 4定理证明器在Mathlib和BrownianMotion包中进行了形式化。每个数据样本代表一个定理,包括其Lean陈述和证明、所属领域(如数学金融、布朗运动、随机微积分),以及一个记录Lean陈述与数学声明匹配程度的保真度等级。该数据集从formal-mathfin库中提取,专门用于自动形式化和基于大语言模型的定理证明任务的评估与训练,填补了现有数学基准在量化金融领域覆盖不足的空白。数据集中包含221个完全保真度的定理(Lean陈述即为数学声明),18个库包装器定理(上游Mathlib结果的薄重新导出),以及22个简化核心定理(教科书声明的诚实特例或结构规范)。数据集采用Apache-2.0许可证,使用时需要引用原始库和配套论文。
Formally Verified Mathematical Finance (Lean 4) is a dataset containing 261 machine-verified theorems in mathematical finance, formalized using the Lean 4 theorem prover on the Mathlib and BrownianMotion packages. Each data sample represents a theorem, including its Lean statement and proof, domain (e.g., mathematical finance, Brownian motion, stochastic calculus), and a fidelity level recording how closely the Lean statement matches the mathematical claim. The dataset is extracted from the formal-mathfin repository and is specifically designed for evaluation and training of automated formalization and large language model-based theorem proving tasks, addressing the gap in existing mathematical benchmarks for quantitative finance. It includes 221 full fidelity theorems (where the Lean statement is the mathematical claim), 18 library wrapper theorems (thin re-exports of upstream Mathlib results), and 22 simplified core theorems (faithful special cases or structural specifications of textbook claims). The dataset is licensed under Apache-2.0 and requires citation of the original repository and accompanying paper when used.
数据集概述
数据集名称:Formally Verified Mathematical Finance (Lean 4)
数据集地址:https://huggingface.co/datasets/raphaelrrcoelho/formal-mathfin-theorems
许可证:Apache-2.0
语言:英语
数据集大小:少于1000条(n<1K)
配置:默认配置,数据文件为 formal-mathfin-theorems.jsonl
内容描述
该数据集包含 261 个数学金融领域经过机器验证的定理,使用 Lean 4 形式化证明,构建于 Mathlib 和 Rémy Degenne 的 BrownianMotion 包之上。每条数据为一个定理,包含其 Lean 语句和证明、所属领域以及忠实度等级,用于衡量 Lean 语句与数学主张的匹配程度。
数据提取自 formal-mathfin 库,可作为自动形式化和基于 LLM 的定理证明领域的评估/训练材料,尤其适用于量化金融这一现有数学基准较少覆盖的领域。
创建者:Raphael Coelho(ORCID: 0009-0001-6601-1023)
字段说明
| 字段 | 描述 |
|---|---|
id |
稳定的定理标识符 |
name |
人类可读的定理名称 |
domain |
基准领域(如 mathematical_finance、brownian_motion、stochastic_calculus) |
formalization_status |
忠实度等级(详见下文) |
description |
定理的自然语言陈述 |
lean_code |
自包含的 Lean 4 代码片段(包括 import 和定理) |
source_file |
源自的基准文件 |
忠实度等级(Faithfulness Tiers)
| 等级 | 数量 | 含义 |
|---|---|---|
full |
221 | Lean 语句 就是 数学主张本身 |
library_wrapper |
18 | 对上游 Mathlib 结果的薄层再导出 |
reduced_core |
22 | 教科书陈述的诚实特例或结构规约(主要涉及连续时间) |
其中 full 和 library_wrapper 共 239 条,为可直接交付的结果。
使用与加载
-
加载数据集: python from datasets import load_dataset ds = load_dataset("raphaelrrcoelho/formal-mathfin-theorems")
-
编译 Lean 代码:每个
lean_code片段需依赖formal-mathfin库及其固定工具链(Leanv4.30.0-rc2、Mathlibc87cc97、BrownianMotionfa590b1),可重现构建环境为ghcr.io/raphaelrrcoelho/mathfin-verify。 -
注意事项:代码片段是指向库的指针,而非独立证明,应以库为真相源。
引用与许可
- 许可证:Apache-2.0
- 引用建议:使用该数据集时,请引用
formal-mathfin库(DOI: 10.5281/zenodo.20477782)及配套论文 arXiv:2606.01356。




