Add dataset card
Browse files
README.md
CHANGED
|
@@ -1,29 +1,94 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
|
| 12 |
-
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
- name: docstring
|
| 17 |
-
dtype: string
|
| 18 |
-
splits:
|
| 19 |
-
- name: train
|
| 20 |
-
num_bytes: 111483726
|
| 21 |
-
num_examples: 193047
|
| 22 |
-
download_size: 26854373
|
| 23 |
-
dataset_size: 111483726
|
| 24 |
-
configs:
|
| 25 |
-
- config_name: default
|
| 26 |
-
data_files:
|
| 27 |
-
- split: train
|
| 28 |
-
path: data/train-*
|
| 29 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
- lean4
|
| 12 |
+
- mathlib
|
| 13 |
+
- mathematics
|
| 14 |
+
size_categories:
|
| 15 |
+
- 100K<n<1M
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
---
|
| 17 |
+
|
| 18 |
+
# Mathlib4
|
| 19 |
+
|
| 20 |
+
Structured dataset of mathematical formalizations from the Mathlib4 library for Lean 4.
|
| 21 |
+
|
| 22 |
+
## Dataset Description
|
| 23 |
+
|
| 24 |
+
- **Source:** [leanprover-community/mathlib4](https://github.com/leanprover-community/mathlib4)
|
| 25 |
+
- **Entries:** 193,047
|
| 26 |
+
- **Files processed:** 6,943
|
| 27 |
+
- **License:** Apache 2.0
|
| 28 |
+
|
| 29 |
+
## Schema
|
| 30 |
+
|
| 31 |
+
| Column | Type | Description |
|
| 32 |
+
|--------|------|-------------|
|
| 33 |
+
| fact | string | Full declaration body |
|
| 34 |
+
| type | string | theorem, lemma, def, class, structure, instance, inductive, abbrev, axiom |
|
| 35 |
+
| library | string | Top-level Mathlib module (Algebra, Analysis, Topology, etc.) |
|
| 36 |
+
| imports | list | Import statements from source file |
|
| 37 |
+
| filename | string | Source file path within Mathlib |
|
| 38 |
+
| symbolic_name | string | Declaration identifier |
|
| 39 |
+
| docstring | string | Documentation comment (30% coverage) |
|
| 40 |
+
|
| 41 |
+
## Statistics
|
| 42 |
+
|
| 43 |
+
### By Type
|
| 44 |
+
| Type | Count | Percentage |
|
| 45 |
+
|------|-------|------------|
|
| 46 |
+
| theorem | 111,804 | 57% |
|
| 47 |
+
| lemma | 36,970 | 19% |
|
| 48 |
+
| def | 27,965 | 14% |
|
| 49 |
+
| instance | 10,322 | 5% |
|
| 50 |
+
| abbrev | 2,570 | 1% |
|
| 51 |
+
| class | 1,710 | 1% |
|
| 52 |
+
| structure | 1,387 | 1% |
|
| 53 |
+
| inductive | 310 | <1% |
|
| 54 |
+
|
| 55 |
+
### By Library (Top 10)
|
| 56 |
+
| Library | Count |
|
| 57 |
+
|---------|-------|
|
| 58 |
+
| Algebra | 30,936 |
|
| 59 |
+
| Analysis | 20,343 |
|
| 60 |
+
| Data | 20,327 |
|
| 61 |
+
| CategoryTheory | 18,553 |
|
| 62 |
+
| Topology | 16,800 |
|
| 63 |
+
| Order | 13,686 |
|
| 64 |
+
| RingTheory | 12,566 |
|
| 65 |
+
| LinearAlgebra | 9,279 |
|
| 66 |
+
| MeasureTheory | 8,927 |
|
| 67 |
+
| Combinatorics | 4,949 |
|
| 68 |
+
|
| 69 |
+
### Docstring Coverage
|
| 70 |
+
| Type | With Docstring |
|
| 71 |
+
|------|----------------|
|
| 72 |
+
| def | 98% |
|
| 73 |
+
| class | 98% |
|
| 74 |
+
| structure | 93% |
|
| 75 |
+
| theorem | 15% |
|
| 76 |
+
| lemma | 14% |
|
| 77 |
+
|
| 78 |
+
## Use Cases
|
| 79 |
+
|
| 80 |
+
- Retrieval / RAG for Lean 4 theorem proving
|
| 81 |
+
- Mathematical content search and exploration
|
| 82 |
+
- Training embeddings for formal mathematics
|
| 83 |
+
- Documentation generation
|
| 84 |
+
- Semantic search over mathematical definitions
|
| 85 |
+
|
| 86 |
+
## Example Entry
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
## Citation
|
| 91 |
+
|
| 92 |
+
If you use this dataset, please cite Mathlib:
|
| 93 |
+
|
| 94 |
+
|