--- license: apache-2.0 task_categories: - text-ranking tags: - math - formalization - lean library_name: datasets --- # Premise Retrieval Dataset for Mathematical Formalization This dataset is used in the paper [Learning an Effective Premise Retrieval Model for Efficient Mathematical Formalization](https://huggingface.co/papers/2501.13959). It contains data for training and evaluating a lightweight and effective premise retrieval model for the Lean theorem prover. ## About the Dataset The dataset consists of proof states (acting as queries) and corresponding premises extracted from the Mathlib library. It is designed to facilitate the training of models using a contrastive learning framework to embed queries and premises in a latent space. This process aims to enhance retrieval performance through fine-grained similarity calculation and a re-ranking module, ultimately assisting users in the mathematical formalization process. ## Links * **Paper:** [Learning an Effective Premise Retrieval Model for Efficient Mathematical Formalization](https://huggingface.co/papers/2501.13959) * **Project Page:** https://premise-search.com/ * **Code:** The source code and trained models can be found on the [GitHub repository](https://github.com/ruc-ai4math/Premise-Retrieval). ## Dataset Access This dataset is available for download at [this link](https://huggingface.co/datasets/ruc-ai4math/mathlib_handler_benchmark_410) on the Hugging Face Hub. ## Sample Usage You can load the dataset using the Hugging Face `datasets` library: ```python from datasets import load_dataset dataset = load_dataset("ruc-ai4math/mathlib_handler_benchmark_410") # To inspect the 'train' split print(dataset["train"][0]) ```