Skip to main content

A search engine for Lean 4 declarations.

Project description

LeanExplore

A search engine for Lean 4 declarations

PyPI version Read the Paper last update license

A search engine for Lean 4 declarations. This project provides tools and resources for exploring the Lean 4 ecosystem.

For full documentation, please visit: https://www.leanexplore.com/docs

Installation

The base package connects to the remote API and does not require heavy ML dependencies:

pip install lean-explore

To run the local search backend (which uses on-device embedding and reranking models), install the extra ML dependencies:

pip install lean-explore[local]

Then fetch the data files and start the local MCP server:

lean-explore data fetch
lean-explore mcp serve --backend local

The current indexed projects include:

  • Batteries
  • CSLib
  • FLT (Fermat's Last Theorem)
  • FormalConjectures
  • Init
  • Lean
  • Mathlib
  • PhysLean
  • Std

This code is distributed under an Apache License (see LICENSE).

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines on code style, testing, and development setup.

Cite

If you use LeanExplore in your research or work, please cite it as follows:

General Citation:

Justin Asher. (2025). LeanExplore: A search engine for Lean 4 declarations. https://arxiv.org/abs/2506.11085

BibTeX Entry:

@software{Asher_LeanExplore_2025,
  author = {Asher, Justin},
  title = {{LeanExplore: A search engine for Lean 4 declarations}},
  year = {2025},
  url = {https://arxiv.org/abs/2506.11085}
}

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

lean_explore-1.2.1.tar.gz (65.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lean_explore-1.2.1-py3-none-any.whl (77.2 kB view details)

Uploaded Python 3

File details

Details for the file lean_explore-1.2.1.tar.gz.

File metadata

  • Download URL: lean_explore-1.2.1.tar.gz
  • Upload date:
  • Size: 65.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for lean_explore-1.2.1.tar.gz
Algorithm Hash digest
SHA256 d5bbf1f0a356a8380dba598b46ffd7db6bd90d235c7f0056edfdfe57e3e9e712
MD5 6a0a866db601c44eb1f0bab1b785e8a1
BLAKE2b-256 cc89addefb928d8af64a7e88a73014987c289776f61067e2c526880ff040508a

See more details on using hashes here.

File details

Details for the file lean_explore-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: lean_explore-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 77.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for lean_explore-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cbf0c1404b68ac57f33b6a5325bc5f4190af2b275af09038a58afcce118004de
MD5 e0d9f90535219a4f50e7a6b51d58fd55
BLAKE2b-256 5061802e3a907c9b8374d7679550bb05776db1d3630cc41df442657d00bc28a6

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