Add dataset Lean3-Mathlib
Browse files- README.md +126 -0
- data/train-00000-of-00001.parquet +3 -0
README.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-generation
|
| 5 |
+
- feature-extraction
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- theorem-proving
|
| 10 |
+
- formal-methods
|
| 11 |
+
- lean
|
| 12 |
+
- mathlib
|
| 13 |
+
- mathematics
|
| 14 |
+
size_categories:
|
| 15 |
+
- 10K<n<100K
|
| 16 |
+
dataset_info:
|
| 17 |
+
features:
|
| 18 |
+
- {name: fact, dtype: string}
|
| 19 |
+
- {name: statement, dtype: string}
|
| 20 |
+
- {name: proof, dtype: string}
|
| 21 |
+
- {name: type, dtype: string}
|
| 22 |
+
- {name: kind, dtype: string}
|
| 23 |
+
- {name: symbolic_name, dtype: string}
|
| 24 |
+
- {name: library, dtype: string}
|
| 25 |
+
- {name: filename, dtype: string}
|
| 26 |
+
- {name: imports, list: string}
|
| 27 |
+
- {name: deps, list: string}
|
| 28 |
+
- {name: docstring, dtype: string}
|
| 29 |
+
- {name: line_start, dtype: int64}
|
| 30 |
+
- {name: line_end, dtype: int64}
|
| 31 |
+
- {name: has_proof, dtype: bool}
|
| 32 |
+
- {name: source_url, dtype: string}
|
| 33 |
+
- {name: commit, dtype: string}
|
| 34 |
+
- {name: content_level, dtype: string}
|
| 35 |
+
splits:
|
| 36 |
+
- {name: train, num_examples: 143168}
|
| 37 |
+
config_name: default
|
| 38 |
+
configs:
|
| 39 |
+
- config_name: default
|
| 40 |
+
data_files:
|
| 41 |
+
- split: train
|
| 42 |
+
path: data/train-*
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
# Lean3-Mathlib
|
| 46 |
+
|
| 47 |
+
Declarations from mathlib3, the Lean 3 mathematical library (archived).
|
| 48 |
+
|
| 49 |
+
## Source
|
| 50 |
+
|
| 51 |
+
- Repository: https://github.com/leanprover-community/mathlib
|
| 52 |
+
- Commit: `65a1391a0106c9204fe45bc73a039f056558cb83`
|
| 53 |
+
- Files: 3220
|
| 54 |
+
- License: apache-2.0
|
| 55 |
+
|
| 56 |
+
## Schema
|
| 57 |
+
|
| 58 |
+
| Column | Type | Description |
|
| 59 |
+
|--------|------|-------------|
|
| 60 |
+
| fact | string | Verbatim declaration: statement followed by proof where present |
|
| 61 |
+
| statement | string | Verbatim statement (keyword through the closing period) |
|
| 62 |
+
| proof | string | Verbatim proof block (`Proof. ... Qed.`/`Defined.`), empty if none |
|
| 63 |
+
| type | string | Raw declaration keyword |
|
| 64 |
+
| kind | string | Normalized kind |
|
| 65 |
+
| symbolic_name | string | Declaration identifier |
|
| 66 |
+
| library | string | Sub-library |
|
| 67 |
+
| filename | string | Repository-relative source path |
|
| 68 |
+
| imports | list[string] | File-level `Require`/`Import` modules |
|
| 69 |
+
| deps | list[string] | Intra-corpus identifiers referenced |
|
| 70 |
+
| docstring | string | Preceding documentation comment, null if absent |
|
| 71 |
+
| line_start | int | First source line |
|
| 72 |
+
| line_end | int | Last source line |
|
| 73 |
+
| has_proof | bool | Whether a proof block was captured |
|
| 74 |
+
| source_url | string | Upstream repository |
|
| 75 |
+
| commit | string | Upstream commit extracted |
|
| 76 |
+
| content_level | string | `statement+proof` |
|
| 77 |
+
|
| 78 |
+
## Statistics
|
| 79 |
+
|
| 80 |
+
- Entries: 143,168
|
| 81 |
+
- With proof: 97,646 (68.2%)
|
| 82 |
+
- With docstring: 32,540 (22.7%)
|
| 83 |
+
- Libraries: 416
|
| 84 |
+
|
| 85 |
+
### By type
|
| 86 |
+
|
| 87 |
+
| Type | Count |
|
| 88 |
+
|---|---|
|
| 89 |
+
| lemma | 90,041 |
|
| 90 |
+
| def | 20,579 |
|
| 91 |
+
| instance | 15,202 |
|
| 92 |
+
| theorem | 14,762 |
|
| 93 |
+
| class | 1,205 |
|
| 94 |
+
| structure | 872 |
|
| 95 |
+
| inductive | 306 |
|
| 96 |
+
| example | 200 |
|
| 97 |
+
| macro | 1 |
|
| 98 |
+
|
| 99 |
+
## Example
|
| 100 |
+
|
| 101 |
+
```coq
|
| 102 |
+
@[simp] lemma vsub_vadd (p1 p2 : P) : p1 -ᵥ p2 +ᵥ p2 = p1 :=
|
| 103 |
+
add_torsor.vsub_vadd' p1 p2
|
| 104 |
+
|
| 105 |
+
/-- Adding a group element then subtracting the original point
|
| 106 |
+
produces that group element. -/
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
- kind: lemma | symbolic_name: `vsub_vadd` | src/algebra/add_torsor.lean:77
|
| 110 |
+
|
| 111 |
+
## Use
|
| 112 |
+
|
| 113 |
+
Statement and proof are available both joined (`fact`) and split (`statement`, `proof`) for
|
| 114 |
+
proof-term modeling, autoformalization, retrieval, and dependency analysis via `deps`.
|
| 115 |
+
|
| 116 |
+
## Citation
|
| 117 |
+
|
| 118 |
+
```bibtex
|
| 119 |
+
@misc{lean3_mathlib_dataset,
|
| 120 |
+
title = {Lean3-Mathlib},
|
| 121 |
+
author = {Norton, Charles},
|
| 122 |
+
year = {2026},
|
| 123 |
+
note = {Extracted from https://github.com/leanprover-community/mathlib, commit 65a1391a0106},
|
| 124 |
+
url = {https://huggingface.co/datasets/phanerozoic/Lean3-Mathlib}
|
| 125 |
+
}
|
| 126 |
+
```
|
data/train-00000-of-00001.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4f9b1066613f52c08b779f08cbd54650521e9112e869339d1e1919d7923cda10
|
| 3 |
+
size 33127549
|