• Lean 99.6%
  • Python 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Luigi Massacci 07ecc8b1c7 feat: the L matrix in the LDL decomposition is lower triangular (#43290)
The title. This closes an existing TODO in the file. I also updated one of the lemmas to use the predicate `IsLowerTriangular`instead of spelling out the definition.

Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
2026-09-01 23:21:41 +00:00
.devcontainer feat: install gh inside the devcontainer (#39745) 2026-06-09 01:05:31 +00:00
.docker chore: add missing tzdata dependency (fixes #31824) (#32268) 2025-11-30 14:26:52 +00:00
.github chore: don't open a bump branch PR while an earlier one is open (#43169) 2026-09-01 01:17:13 +00:00
.vscode chore: revert accidental change in .vscode/settings.json (#40122) 2026-06-01 17:20:46 +00:00
Archive chore: remove all remaining flexible linter exceptions (#43198) 2026-08-31 07:10:21 +00:00
Cache fix(cache): retry transport errors, improve transfer robustness (#43145) 2026-08-28 00:22:35 +00:00
Counterexamples chore: create a Basic top folder (#39703) 2026-08-26 17:51:11 +00:00
docs feat(combinatorics): pentagonal number theorem for normed ring (#42185) 2026-09-01 16:43:18 +00:00
DownstreamTest chore: cleanup .gitignore files (#20795) 2025-01-16 12:40:25 +00:00
Mathlib feat: the L matrix in the LDL decomposition is lower triangular (#43290) 2026-09-01 23:21:41 +00:00
MathlibTest perf(Tactic/Linter/Header): different implementation for header linter (#40347) 2026-09-01 18:09:40 +00:00
scripts chore: bench linters even if they fail (#42438) 2026-09-01 11:45:56 +00:00
Wanted feat(Analysis/Convex): convex functions are locally Lipschitz on the intrinsic interior (proof_wanted) (#42414) 2026-08-14 13:57:54 +00:00
widget/src/penrose chore: fix spelling mistakes in create-adaptation-pr.sh and commutative.sty (#16101) 2024-08-26 10:46:31 +00:00
.git-blame-ignore-revs chore: ignore more revisions in .git-blame-ignore-revs (#41681) 2026-07-17 09:57:55 +00:00
.gitignore feat(scripts): export wikidata/stacks/kerodon cross-references as JSON (#40701) 2026-07-04 02:49:56 +00:00
.gitpod.yml fix(gitpod.yml): force elan to self-update in gitpod (#13439) 2024-06-01 12:22:36 +00:00
.pre-commit-config.yaml ci(pre-commit): add hook mixed-line-endings --fix=lf (#37496) 2026-04-01 13:58:12 +00:00
Archive.lean chore(Archive): convert to the module system (#42242) 2026-08-26 20:09:38 +00:00
bors.toml ci: add Wanted/ to bors delegation (#42898) 2026-08-18 13:25:41 +00:00
CITATION.md chore: add CITATION.md (#34708) 2026-02-10 16:30:33 +00:00
CODE_OF_CONDUCT.md docs: port CODE_OF_CONDUCT.md (#5922) 2023-07-15 22:54:32 +00:00
Counterexamples.lean feat(Counterexamples): a finite free group scheme of order four not killed by four (#41748) 2026-08-03 11:34:52 +00:00
docs.lean docs: introduction and guide to conv mode (#5800) 2023-07-18 03:34:01 +00:00
lake-manifest.json chore: update Mathlib dependencies 2026-09-01 (#43317) 2026-09-01 21:13:06 +00:00
lakefile.lean feat: add new Wanted directory for proof_wanted. (#42284) 2026-08-11 09:31:14 +00:00
lean-toolchain chore: bump toolchain to v4.34.0-rc2 (#43012) 2026-08-21 15:44:32 +00:00
LICENSE Add a LICENSE 2021-05-09 20:58:23 +02:00
Mathlib.lean feat(Topology/InfiniteSum): applying the sum of functions (#42829) 2026-09-01 18:09:42 +00:00
README.md chore(README.md): fix bors logo 404 (#36761) 2026-03-17 14:09:13 +00:00
Wanted.lean feat(Analysis/Convex): convex functions are locally Lipschitz on the intrinsic interior (proof_wanted) (#42414) 2026-08-14 13:57:54 +00:00

mathlib4

GitHub CI Bors enabled project chat Gitpod Ready-to-Code

Mathlib is a user maintained library for the Lean theorem prover. It contains both programming infrastructure and mathematics, as well as tactics that use the former and allow to develop the latter.

Installation

You can find detailed instructions to install Lean, mathlib, and supporting tools on our website. Alternatively, click on one of the buttons below to open a GitHub Codespace or a Gitpod workspace containing the project.

Open in GitHub Codespaces

Open in Gitpod

Using mathlib4 as a dependency

Please refer to https://github.com/leanprover-community/mathlib4/wiki/Using-mathlib4-as-a-dependency

Experimenting

Got everything installed? Why not start with the tutorial project?

For more pointers, see Learning Lean.

Documentation

Besides the installation guides above and Lean's general documentation, the documentation of mathlib consists of:

Much of the discussion surrounding mathlib occurs in a Zulip chat room, and you are welcome to join, or read along without signing up. Questions from users at all levels of expertise are welcome! We also provide an archive of the public discussions, which is useful for quick reference.

Contributing

The complete documentation for contributing to mathlib is located on the community guide contribute to mathlib

You may want to subscribe to the mathlib4 channel on Zulip to introduce yourself and your plan to the community. Often you can find community members willing to help you get started and advise you on the fit and feasibility of your project.

  • To obtain precompiled olean files, run lake exe cache get. (Skipping this step means the next step will be very slow.)

  • To build mathlib4 run lake build.

  • To build and run all tests, run lake test.

  • You can use lake build Mathlib.Import.Path to build a particular file, e.g. lake build Mathlib.Algebra.Group.Defs.

  • If you added a new file, run the following command to update Mathlib.lean

    lake exe mk_all
    

Guidelines

Mathlib has the following guidelines and conventions that must be followed

Downloading cached build files

You can run lake exe cache get to download cached build files that are computed by mathlib4's automated workflow.

If something goes mysteriously wrong, you can try one of lake clean or rm -rf .lake before trying lake exe cache get again. In some circumstances you might try lake exe cache get! which re-downloads cached build files even if they are available locally.

Call lake exe cache to see its help menu.

Building HTML documentation

The mathlib4_docs repository is responsible for generating and publishing the mathlib4 docs.

That repo can be used to build the docs locally:

git clone https://github.com/leanprover-community/mathlib4_docs.git
cd mathlib4_docs
cp ../mathlib4/lean-toolchain .
lake exe cache get
lake build Mathlib:docs

The last step may take a while (>20 minutes). The HTML files can then be found in .lake/build/doc.

Transitioning from Lean 3

For users familiar with Lean 3 who want to get up to speed in Lean 4 and migrate their existing Lean 3 code we have:

Dependencies

If you are a mathlib contributor and want to update dependencies, use lake update, or lake update batteries aesop (or similar) to update a subset of the dependencies. This will update the lake-manifest.json file correctly. You will need to make a PR after committing the changes to this file.

Please do not run lake update -Kdoc=on as previously advised, as the documentation related dependencies should only be included when CI is building documentation.

Maintainers:

For a list containing more detailed information, see https://leanprover-community.github.io/teams/maintainers.html

  • Anne Baanen (@Vierkantor): algebra, number theory, tactics
  • Matthew Robert Ballard (@mattrobball): algebra, algebraic geometry, category theory
  • Riccardo Brasca (@riccardobrasca): algebra, number theory, algebraic geometry, category theory
  • Kevin Buzzard (@kbuzzard): algebra, number theory, algebraic geometry, category theory
  • Mario Carneiro (@digama0): lean formalization, tactics, type theory, proof engineering
  • Bryan Gin-ge Chen (@bryangingechen): documentation, infrastructure
  • Johan Commelin (@jcommelin): algebra, number theory, category theory, algebraic geometry
  • Anatole Dedecker (@ADedecker): topology, functional analysis, calculus
  • Rémy Degenne (@RemyDegenne): probability, measure theory, analysis
  • Floris van Doorn (@fpvandoorn): measure theory, model theory, tactics
  • Frédéric Dupuis (@dupuisf): linear algebra, functional analysis
  • Sébastien Gouëzel (@sgouezel): topology, calculus, geometry, analysis, measure theory
  • Markus Himmel (@TwoFX): category theory
  • Yury G. Kudryashov (@urkud): analysis, topology, measure theory
  • Robert Y. Lewis (@robertylewis): tactics, documentation
  • Jireh Loreaux (@j-loreaux): analysis, topology, operator algebras
  • Heather Macbeth (@hrmacbeth): geometry, analysis
  • Patrick Massot (@patrickmassot): documentation, topology, geometry
  • Bhavik Mehta (@b-mehta): category theory, combinatorics
  • Kyle Miller (@kmill): combinatorics, tactics, metaprogramming
  • Kim Morrison (@kim-em): category theory, tactics
  • Oliver Nash (@ocfnash): algebra, geometry, topology
  • Filippo A. E. Nuccio (@faenuccio): algebra, functional analysis, homology, number theory
  • Joël Riou (@joelriou): category theory, homology, algebraic geometry
  • Michael Rothgang (@grunweg): differential geometry, analysis, topology, linters
  • Damiano Testa (@adomani): algebra, algebraic geometry, number theory, tactics, linters
  • Adam Topaz (@adamtopaz): algebra, category theory, algebraic geometry
  • Eric Wieser (@eric-wieser): algebra, infrastructure

Past maintainers:

  • Jeremy Avigad (@avigad): analysis
  • Reid Barton (@rwbarton): category theory, topology
  • Gabriel Ebner (@gebner): tactics, infrastructure, core, formal languages
  • Johannes Hölzl (@johoelzl): measure theory, topology
  • Simon Hudon (@cipher1024): tactics
  • Chris Hughes (@ChrisHughes24): algebra