Skip to main content

Open-source implementation of HyperTree Proof Search

Project description

Open HTPS

Open HTPS is an open-source implementation of HyperTreeProofSearch (HTPS), an efficient proof search algorithm introduced by Lample et al. (2022). This repository addresses a gap in the Automated Theorem Proving community: the need for a fast, open-source, and easy-to-use proof search tool.

Unlike the sadly non-functional available part of the original implementation, Open HTPS provides a complete and reliable version implemented efficiently in C++, combined with Python bindings for easy integration into your research workflows.

Why Open HTPS?

  • Efficiency: Fast C++ implementation ensures high-performance proof searches.
  • Usability: Python bindings simplify integration, allowing researchers to easily incorporate it into existing pipelines.
  • Research-Focused: Abstracts away complex tree-search mechanics, enabling researchers to concentrate on tactic generation, critics, environments, and conjecture generation.
  • Open Source: Available for customization and extension by the research community.

Key Features

  • Fast and Efficient Proof Search
  • Proof Assistant Agnostic: Works seamlessly with various proof assistants.
  • User-Friendly Python Interface
  • Training Data Generation: Training samples for tactic generators, critics, and dynamics models.

Quick Start

Installation

Open HTPS is available on PyPI. Before installation, ensure you have a C++ compiler and Python development headers (Python-dev) installed. Afterward, run the following:

pip3 install htps

Example Usage

The overall workflow is detailed below. Since this implementation does not rely on any environments, the code below is missing the environment-specific expansion.

from htps import HTPS

# Initialize proof search with a theorem
search = HTPS(thm)

# Retrieve theorems ready for expansion
theorems = search.theorems_to_expand()

# -----Expand here-----

# Generate and apply tactics to expand theorems
search.expand_and_backup(expansions)

# Retrieve search result
result = search.get_result()

# Access generated training samples
tactic_samples = result.tactic_samples
critic_samples = result.critic_samples
effect_samples = result.effect_samples

The full information can be found in the documentation.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests. I will make sure to address any issues as soon as possible.

Rationale

This project is based on one belief: more search is beneficial, but the exact search algorithm does not significantly impact the research outcome.

Currently, every research team has to implement their own proof search algorithm, which is a significant waste of time and resources. This repository is meant to address that, ideally leading to faster prototyping on tactic generation, critics, dynamic models and conjecture generation. Less time wasted on debugging tree search implementations (which is quite painful, as I am now very much aware), more time spent on the meaningful research.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

htps-0.0.2.tar.gz (188.6 kB view details)

Uploaded Source

File details

Details for the file htps-0.0.2.tar.gz.

File metadata

  • Download URL: htps-0.0.2.tar.gz
  • Upload date:
  • Size: 188.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for htps-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ebddd4e1f9a72fc661b191d137fef001a0f19f3e26b93cfc85e9ff25d4cda72f
MD5 923abdd7ef9ac727446992c8d6e19258
BLAKE2b-256 e999d913423ab1b40157c1965ffd3eb284a9e38428305b170068ccab1407ea46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page