Re-extract: full statement+proof, normalized schema, provenance
Browse files- README.md +132 -62
- data/train-00000-of-00001.parquet +2 -2
README.md
CHANGED
|
@@ -1,62 +1,132 @@
|
|
| 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 |
-
- batteries
|
| 13 |
-
- standard-library
|
| 14 |
-
size_categories:
|
| 15 |
-
- 1K<n<10K
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
-
|
| 25 |
-
-
|
| 26 |
-
-
|
| 27 |
-
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
- batteries
|
| 13 |
+
- standard-library
|
| 14 |
+
size_categories:
|
| 15 |
+
- 1K<n<10K
|
| 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: 3708}
|
| 37 |
+
config_name: default
|
| 38 |
+
configs:
|
| 39 |
+
- config_name: default
|
| 40 |
+
data_files:
|
| 41 |
+
- split: train
|
| 42 |
+
path: data/train-*
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
# Lean4-Batteries
|
| 46 |
+
|
| 47 |
+
Structured dataset from Lean 4 Batteries - the community standard library extensions.
|
| 48 |
+
|
| 49 |
+
## Source
|
| 50 |
+
|
| 51 |
+
- Repository: https://github.com/leanprover-community/batteries
|
| 52 |
+
- Commit: `41680f5d84023c7406c841d08ef83bf15a9782a6`
|
| 53 |
+
- Files: 187
|
| 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: 3,708
|
| 81 |
+
- With proof: 1,768 (47.7%)
|
| 82 |
+
- With docstring: 1,218 (32.8%)
|
| 83 |
+
- Libraries: 35
|
| 84 |
+
|
| 85 |
+
### By type
|
| 86 |
+
|
| 87 |
+
| Type | Count |
|
| 88 |
+
|---|---|
|
| 89 |
+
| theorem | 2,142 |
|
| 90 |
+
| def | 1,145 |
|
| 91 |
+
| instance | 193 |
|
| 92 |
+
| abbrev | 62 |
|
| 93 |
+
| structure | 39 |
|
| 94 |
+
| elab | 31 |
|
| 95 |
+
| class | 28 |
|
| 96 |
+
| inductive | 24 |
|
| 97 |
+
| macro | 13 |
|
| 98 |
+
| macro_rules | 13 |
|
| 99 |
+
| elab_rules | 9 |
|
| 100 |
+
| example | 7 |
|
| 101 |
+
| opaque | 2 |
|
| 102 |
+
|
| 103 |
+
## Example
|
| 104 |
+
|
| 105 |
+
```coq
|
| 106 |
+
theorem Function.id_def : @id α = fun x => x := rfl
|
| 107 |
+
|
| 108 |
+
/-! ## decidable -/
|
| 109 |
+
|
| 110 |
+
protected alias ⟨Decidable.exists_not_of_not_forall, _⟩ := Decidable.not_forall
|
| 111 |
+
|
| 112 |
+
/-! ## classical logic -/
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
- kind: theorem | symbolic_name: `Function.id_def` | Batteries/Logic.lean:17
|
| 116 |
+
|
| 117 |
+
## Use
|
| 118 |
+
|
| 119 |
+
Statement and proof are available both joined (`fact`) and split (`statement`, `proof`) for
|
| 120 |
+
proof-term modeling, autoformalization, retrieval, and dependency analysis via `deps`.
|
| 121 |
+
|
| 122 |
+
## Citation
|
| 123 |
+
|
| 124 |
+
```bibtex
|
| 125 |
+
@misc{lean4_batteries_dataset,
|
| 126 |
+
title = {Lean4-Batteries},
|
| 127 |
+
author = {Norton, Charles},
|
| 128 |
+
year = {2026},
|
| 129 |
+
note = {Extracted from https://github.com/leanprover-community/batteries, commit 41680f5d8402},
|
| 130 |
+
url = {https://huggingface.co/datasets/phanerozoic/Lean4-Batteries}
|
| 131 |
+
}
|
| 132 |
+
```
|
data/train-00000-of-00001.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e144685e861c2fa93e7a337f788f4fefb88f40942809e52330fef2407f2623f8
|
| 3 |
+
size 925388
|