|
--- |
|
license: apache-2.0 |
|
|
|
configs: |
|
- config_name: hep |
|
data_files: |
|
- split: valid |
|
path: "minictx-valid/hep.jsonl" |
|
- split: test |
|
path: "minictx-test/hep.jsonl" |
|
- config_name: htpi |
|
data_files: |
|
- split: valid |
|
path: "minictx-valid/htpi.jsonl" |
|
- split: test |
|
path: "minictx-test/htpi.jsonl" |
|
- config_name: mathlib |
|
data_files: |
|
- split: valid |
|
path: "minictx-valid/mathlib.jsonl" |
|
- split: test |
|
path: "minictx-test/mathlib.jsonl" |
|
- config_name: pfr |
|
data_files: |
|
- split: valid |
|
path: "minictx-valid/pfr.jsonl" |
|
- split: test |
|
path: "minictx-test/pfr.jsonl" |
|
- config_name: pfr_cross |
|
data_files: |
|
- split: valid |
|
path: "minictx-valid/pfr_cross.jsonl" |
|
- split: test |
|
path: "minictx-test/pfr_cross.jsonl" |
|
- config_name: pnt |
|
data_files: |
|
- split: valid |
|
path: "minictx-valid/pnt.jsonl" |
|
- split: test |
|
path: "minictx-test/pnt.jsonl" |
|
- config_name: scilean |
|
data_files: |
|
- split: valid |
|
path: "minictx-valid/scilean.jsonl" |
|
- split: test |
|
path: "minictx-test/scilean.jsonl" |
|
--- |
|
|
|
|
|
## Example Entry |
|
An entry in the miniCTX dataset consists of the theorem statement, preceding file contents, and metadata information. For example, given the following theorem `s_eq_pow_two` in context: |
|
|
|
```lean |
|
import Mathlib.Data.Real.Basic |
|
|
|
/-! |
|
# Square function |
|
We define the squaring function `s : ℝ → ℝ` to be `s x := x * x`. |
|
-/ |
|
|
|
def s (x : ℝ) : ℝ := x * x |
|
|
|
lemma s_eq_pow_two {x : ℝ} : s x = x ^ 2 := by |
|
rw [s, pow_two] |
|
``` |
|
|
|
The problem is formatted in JSON as follows: |
|
|
|
```json |
|
{ |
|
# Preceding file content |
|
"srcContext": "import Mathlib.Data.Real.Basic\n\n/-!\n# Square function\nWe define the squaring function `s : ℝ → ℝ` to be `s x := x * x`.\n-/\n\ndef s (x : ℝ) : ℝ := x * x\n\n", |
|
|
|
# Theorem statement |
|
"theoremStatement": "lemma s_eq_pow_two {x : ℝ} : s x = x ^ 2", |
|
|
|
# Fully qualified theorem name |
|
"theoremName": "s_eq_pow_two", |
|
|
|
# Temporal metadata |
|
"fileCreated": {"commit":"(git commit)", "date":"(date the commit is updated)"}, |
|
"theoremCreated": {"commit":"(git commit)", "date":"(date the commit is updated)"}, |
|
|
|
# Source metadata |
|
"file": "MyProject/Square.lean", |
|
"module": "MyProject.Square", |
|
"positionMetadata": { |
|
# Line number the theorem is on |
|
"lineInFile": 10, |
|
# Number of tokens before the theorem |
|
"tokenPositionInFile": 152, |
|
# Number of premises (definitions, theorems) before the theorem |
|
"theoremPositionInFile": 1 |
|
}, |
|
|
|
# Dependency metadata |
|
"dependencyMetadata": { |
|
# Number of definitions or lemmas defined in this file that the theorem uses |
|
"inFilePremises": true, |
|
"numInFilePremises": 1, |
|
# Number of definitions or lemmas defined in this repository that the theorem uses (including in-file ones) |
|
"repositoryPremises": true |
|
"numRepositoryPremises": 1, |
|
# Number of total premises (in file, repository, or otherwise) |
|
"numPremises": 2, |
|
# Modules imported in the current file |
|
"importedModules": ["Mathlib.Data.Real.Basic", ...] |
|
}, |
|
|
|
# Proof metadata |
|
"proofMetadata": { |
|
"hasProof": true, |
|
"proof": "by\n rw [s, pow_two]", |
|
"proofType": "tactic", |
|
"proofLengthLines": 2, |
|
"proofLengthTokens": 20 |
|
} |
|
} |
|
``` |
|
|
|
### Description of Each Entry |
|
|
|
- **srcContext**: The context of the source file preceding the theorem, including imports and relevant definitions. This provides necessary background to understand the theorem. |
|
- **theoremStatement**: The statement of the theorem being proved. |
|
- **theoremName**: The name of the theorem. |
|
- **fileCreated**: The git commit hash indicating when the file was created. |
|
- **theoremCreated**: The git commit hash indicating when the theorem was added. |
|
- **file**: The name of the file containing the theorem. |
|
- **positionMetadata**: |
|
- **lineInFile**: The line number in the file where the theorem is located. |
|
- **tokenPositionInFile**: The number of tokens in the file before the theorem starts. |
|
- **theoremPositionInFile**: The number of premises (definitions, theorems) before the theorem in the file. |
|
- **dependencyMetadata**: |
|
- **inFilePremises**: Indicates whether the theorem uses definitions or lemmas defined in the same file. |
|
- **numInFilePremises**: The number of definitions or lemmas from the same file that the theorem relies on. |
|
- **repositoryPremises**: Indicates whether the theorem uses definitions or lemmas defined in another file within the same repository. |
|
- **numRepositoryPremises**: The total number of definitions or lemmas from the repository (including the current file) that the theorem depends on. |
|
- **numPremises**: The total number of premises the theorem depends on, regardless of whether they are from the same file, the repository, or external sources. |
|
- **importedModules**: Lists the modules imported in the current file. |
|
- **proofMetadata**: |
|
- **hasProof**: Indicates whether the theorem has a proof. |
|
- **proof**: The proof of the theorem. |
|
- **proofType**: The type of proof, term proof or tactic proof. |
|
- **proofLengthLines**: The length of the proof in lines. |
|
- **proofLengthTokens**: The length of the proof in tokens. |
|
|
|
In addition to individual entries, we also provide the link and git commit version of each split for evaluation: |
|
- PrimeNumberTheoremAnd: https://github.com/AlexKontorovich/PrimeNumberTheoremAnd, commit 23650db830a45c227bd85d25d520725545192333 |
|
- PFR: https://github.com/teorth/pfr, commit 6aeed6ddf7dd02470b3196e44527a6f3d32e54cf |
|
- Mathlib: https://github.com/leanprover-community/mathlib4, commit f4b4298bd76b82f7b28f0fb6b5ab92bdf5e5634d |
|
- HTPI: We use the fork https://github.com/hanwenzhu/HTPILeanPackage4.7, commit 8eeebaec8d7fa17b5fe9d97589839ca2560e3ce2 |
|
- HEP: We use the fork https://github.com/hanwenzhu/HepLean-v4.7, commit 7448822afced644bd61f0bdcf4dc438f455f9890 |
|
- SciLean: https://github.com/lecopivo/SciLean, commit e03a8e439a558840118319a6c8a47106e1445e53 |
|
|
|
## Citation |
|
|
|
Please cite: |
|
``` |
|
@article{hu2024minictx, |
|
title={miniCTX: Neural Theorem Proving with (Long-) Contexts}, |
|
author={Hu, Jiewen and Zhu, Thomas and Welleck, Sean}, |
|
journal={arXiv preprint arXiv:2408.03350}, |
|
year={2024} |
|
} |
|
``` |
|
|