A Lean 4 library for Theoretical Computer Science.
Official website at https://shilun-allan-li.github.io/tcslib/.
TCSlib formalizes results in Theoretical Computer Science using Lean 4 and Mathlib. Every theorem is machine-checked.
- Boolean Function Analysis — Fourier analysis over the Boolean hypercube, hypercontractivity, Arrow's theorem, and more.
- Error-Correcting Codes — Singleton, Hamming, Gilbert–Varshamov, and Johnson bounds; linear codes; list decoding; quantum codes.
To add TCSlib as a dependency, add the following to your lakefile.lean:
require TCSlib from git "https://github.com/Shilun-Allan-Li/tcslib" @ "main"Then run lake update to fetch the dependency.
Install Lean following the setup instructions, then run:
lake exe cache get
lake build
Contributions are welcome — please open an issue or pull request on GitHub.