Mathlib
Hacker ApprovedFormal math library in Developer tools
Free, community-built Lean library of formalized mathematics, praised for its broad coverage, reusable proofs and well-designed API. Critics say it is slow and cumbersome for newcomers.
Free, community-built Lean library of formalized mathematics, praised for its broad coverage, reusable proofs and well-designed API. Critics say it is slow and cumbersome for newcomers.
29 people gave an opinion
- recommend it
- 21
- criticize it
- 8
- approval share
- 72%
Recommended in 9 of 13 months
- November 2025: recommended
- December 2025: recommended
- January 2026: recommended
- February 2026: not recommended
- March 2026: not recommended
- April 2026: not recommended
- May 2026: recommended
- June 2026: recommended
- July 2026: recommended
- August 2026: recommended
- September 2026: recommended
- October 2026: recommended
- November 2026: not recommended (month in progress)
Why it carries the badge
- 21 people recommend itNeeds 10 or more, met.
- 2.6 recommenders for every criticNeeds 2 to 1 or better, met.
- Recommended in 9 of 13 monthsNeeds 4 or more, met.
The same three rules apply to every product, and the badge can’t be bought. How the badge works
What people say about it
The reasons people give, with the number of comments that give each one. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Broad library of formalized mathematics
“Mathlib, the dominant Lean library, is a human-curated formalization of an ever-growing fraction of existing human mathematics.”
Comment from 27 Jun 2026 in “AI in Mathematics Is Forcing Big Questions” “Lean's mathlib has done most of the underlying work so that you have its axioms and necessary lemmas baked in.”
Comment from 10 Sep 2026 in “OpenAI’s Navier-Stokes release included a Lean 4 formal proof” “mathlib is only 2.3 million lines of code, and took nine years to write.”
Comment from 30 Jul 2026 in “Are We Stuck with Lean?” Reusable proofs and lemmas
“Having a library of idiomatic proofs available in a formal system capable of checking your work is Really Cool!”
Comment from 2 Aug 2026 in “Postmortem for Kernel Soundness Bug #14576” “Lean's mathlib has done most of the underlying work so that you have its axioms and necessary lemmas baked in.”
Comment from 10 Sep 2026 in “OpenAI’s Navier-Stokes release included a Lean 4 formal proof” “I generally rather rely on someone else getting the category theory and algebraic structures right”
Comment from 26 Jul 2026 in “We have proof automation now” Flexible proof style, good API
“Whatever style of proof you're used to, you can write in that style with mathlib.”
Comment from 3 Oct 2026 in “Anatomy of a Lean proof for software engineers” “mathlib is very well-designed and has a very good API”
Comment from 16 Aug 2026 in “MathCode, Mathematical Coding Agent” Open source community project
“is organized like an open source community with pull requests”
Comment from 2 Nov 2025 in “Why don't you use dependent types?” “Mathlib for instance is of course a phenomenal project”
Comment from 30 Jul 2026 in “Are We Stuck with Lean?”
What people warn about
Each mark is one comment
Slow builds and checks
“Lean4 with a mathlib project seems really slow”
Comment from 14 Jan 2026 in “Running Lean at Scale” “so slow with the main math package”
Comment from 21 Feb 2026 in “Lean 4: How the theorem prover works and why it's the new competitive edge in AI” Cumbersome for researchers and newcomers
“mathlib and lean are currently too cumbersome for many researchers to use in say algebraic geometry”
Comment from 11 Jun 2026 in “Terry Tao Became an Evangelist for AI in Math” “the default Mathlib4 style is really unapproachable without the tooling”
Comment from 5 Jul 2026 in “Leanstral 1.5: Proof Abundance for All” Some formal statements are wrong
“Mathlib is not perfect, and it's not hard at all to have a Lean statement that isn't what you think it is.”
Comment from 10 Oct 2026 in “Navier–Stokes Lost in Translation” “the Lean formalization of the Riemann Hypothesis in Mathlib was incorrect”
Comment from 8 Oct 2026 in “OpenAI withdraws three mathematical results” Monolithic package, heavy dependency
“having a mathlib dependency just to build a programming language is a big ask for people”
Comment from 17 Oct 2026 in “I built the RealWorld app in Lean 4” “they like sticking everything into Mathlib and not splitting off smaller packages”
Comment from 17 Aug 2026 in “The Case Against Formal Verification, 50 Years Later”
What people said
26 of the 30 comments that mention it, newest first. Each links to the original comment.
“Mathlib gleefully postulates impredicative propositions with the axiom of choice, quotient types, etc.”
“Mathlib PRs spiked at the release of Opus 4.6”
“having a mathlib dependency just to build a programming language is a big ask for people”
“such proofs definitely belong into MathLib”
“Mathlib is not perfect, and it's not hard at all to have a Lean statement that isn't what you think it is.”
“the Lean formalization of the Riemann Hypothesis in Mathlib was incorrect”
“Mathlib coalesced as a side-effect of it's capability”
“it'll be a frustrating experience”
“Whatever style of proof you're used to, you can write in that style with mathlib.”
“Lean's mathlib has done most of the underlying work so that you have its axioms and necessary lemmas baked in.”
“that feels very safe to me”
“they like sticking everything into Mathlib and not splitting off smaller packages”
“mathlib is very well-designed and has a very good API”
“Having a library of idiomatic proofs available in a formal system capable of checking your work is Really Cool!”
“mathlib is only 2.3 million lines of code, and took nine years to write.”
“Mathlib for instance is of course a phenomenal project”
“I generally rather rely on someone else getting the category theory and algebraic structures right”
“the default Mathlib4 style is really unapproachable without the tooling”
“Mathlib, the dominant Lean library, is a human-curated formalization of an ever-growing fraction of existing human mathematics.”
“mathlib and lean are currently too cumbersome for many researchers to use in say algebraic geometry”
“most of the time it does work quite well”
“so slow with the main math package”
“Lean4 with a mathlib project seems really slow”
“working with Mathlib is the best long term solution”
“Some libraries go heavy on the dependent types, and some like mathlib try to avoid them”
“is organized like an open source community with pull requests”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.