tda-lib

tda-lib is a Lean 4 library for topological data analysis: persistent homology, certified finite F₂ persistence computation, diagram distances and representations, metric-space filtrations, multiparameter persistence, and Reeb and Mapper theory. The current published release is v0.4.0. Documentation on develop also describes unreleased work; use the versioned guides in the changelog when working with a release.

Scope and limitations

Most constructions are abstract theory. The certified executable reduction works over F₂ on valid finite graded simplex lists; arbitrary-field executable reduction and an executable Mapper package are outside its contract. Results have explicit finiteness, field, topological and cover hypotheses. General geometric persistence and infinite-dimensional persistence beyond the documented q-tame setting are outside the current scope. Start with the guide by subject and consult the API guide for exact assumptions and declaration names.

Use in a Lean project

For the published v0.4.0 release, use leanprover/lean4:v4.35.0 and add the dependency to your lakefile.toml:

[[require]]
name = "TDA"
git = "https://github.com/uda-lab/tda-lib.git"
rev = "v0.4.0"

Run lake update TDA, fetch the prebuilt mathlib dependencies with lake exe cache get, and run lake build TDA. Then import the area you need:

import TDA.Persistence
-- Or import TDA.Library for the seven ordinary library areas.

TDA.Library loads the seven library areas; import TDA also loads standalone examples. See the import guide for the current checkout and the v0.4.0 import guide for that release's module boundaries.

Documentation

Build and documentation

From a checkout, prepare cached dependencies and run the library check:

scripts/bootstrap.sh
scripts/check.sh

Use the checkout's lean-toolchain and lake-manifest.json pins. For generated API pages, run scripts/build-docs.sh from a checkout with no uncommitted changes. It writes docbuild/.lake/build/doc; the site is not hosted by this repository. See the documentation guide for its scope.

Citation

Identify the software release or exact commit used in your work. The root CITATION.cff gives metadata for the current published release; see the software citation guide for release and development revision links. Mathematical sources are listed separately in the source register.

Release results

See the changelog entries for v0.1.0, v0.2.0, v0.3.0 and v0.4.0, which link to the full published release notes. For current features, use the guide by subject.

Further directions

See the current boundaries and API review limits before extending a result. Issue #227 records the source-linked directions; the guides distinguish published results from later work.

License

The library is licensed under Apache-2.0.