Hysen Labs
Open-source project
LionSR/TNLean avatar
LionSR

TNLean

Lean 4 formalization of the Fundamental Theorem of Matrix Product States (arXiv:2011.12127)

33 stars2 forksLeanApache-2.0
DEEP OPEN-SOURCE ANALYSIS

TNLean: Lean 4 formalization of the Fundamental Theorem of Matrix Product States (arXiv:2011.12127)

Lean 4 formalization of the Fundamental Theorem of Matrix Product States (arXiv:2011.12127)

What the project is

TNLean is a Lean project hosted on GitHub. Lean 4 formalization of the Fundamental Theorem of Matrix Product States (arXiv:2011.12127) TNLean is a Lean 4 library, built on Mathlib, that formalizes the mathematics of tensor networks: matrix product states (MPS), the quantum channels and transfer operators that govern them, and the theorems relating the two. Every result is checked by Lean down to the axioms it assumes. The repository is maintained by LionSR and tracks activity through its public issue tracker and commit history. Readers who want a working example rather than a bare library will find the documentation and the linked resources useful for getting a first build running.

What it offers

The TNLean repository documents several concrete capabilities that shape how people use it. Parent Hamiltonians. Local Hamiltonians whose ground space is the MPS, Matrix-product density operators. Mixed-state analogues of MPS, their Projected entangled pair states (PEPS). The two-dimensional Entropy. Von Neumann entropy, strong subadditivity, and quantum Markov Examples. Concrete states such as AKLT, GHZ, even parity, and the These points are taken from the project README, so they reflect what the maintainers actually ship rather than marketing claims. Checking the file list and the example directories gives a fuller picture of how each piece fits together.

How to set it up

The TNLean repository points users to https://github.com/LionSR/TNLean for the source and the setup notes. Although the README does not embed a single copy paste command block, it describes the prerequisites and the workflow needed to use the project. Reading the installation section and the example files is the reliable path to a working environment. The maintainers keep the documentation in the repository so it stays in step with the code.

License and project status

TNLean is written primarily in Lean and is released under the Apache-2.0 license, which sets the terms for reuse and redistribution. The project reports around 33 stars on GitHub, a signal of how many developers have bookmarked it. The source was last updated on 2026-08-21. The canonical location is https://github.com/LionSR/TNLean, where the license file, the changelog and the open issues give the most current state of the work. Anyone planning to depend on it should read the license text directly before shipping it inside another product.

Editorial conclusion

The TNLean source lives at https://github.com/LionSR/TNLean under the Apache-2.0 license and is mainly written in Lean. The README and the linked examples remain the place to confirm the current behaviour before adopting the project.

DEEP OPEN-SOURCE ANALYSIS

Official sources

Community notes

Community notes