PDEAtlas is our library of partial differential equations in Lean 4 and Mathlib. It follows Lawrence C. Evans's Partial Differential Equations, second edition, and formalizes selected results from every section of chapters 2 to 12 of the book: the four linear equations, first-order equations, Sobolev spaces, elliptic and evolution equations, the calculus of variations, Hamilton–Jacobi equations, conservation laws and nonlinear waves. Beyond the book, it also covers incompressible fluid mechanics.
- Blueprint: the book that goes with the library, with statements, proof ideas, worked examples and figures linked to the Lean declarations, and a map of the pages of Evans cited by the statement cards
- BlowupZoo: finite-time blowup and nonuniqueness theorems for fluid equations, built on PDEAtlas
- SymLean: the computer algebra system PDEAtlas computes with
I wanted to open Evans and be able to use the theorems from a graduate PDE course in a Lean proof, with all their hypotheses in view. PDEAtlas is also an exposition, and we'd really encourage you to read the Blueprint alongside the Lean: it puts proof ideas and worked examples next to selected Lean statements. Lawrence C. Evans gave us his full support in following his book.
- Smooth functions are dense in every Sobolev space
$W^{k,p}(U)$ ,$1 \le p < \infty$ , on every open set$U$ . Evans §5.3.2, Theorem 2, proves the result for bounded$U$ .OpenDomain.lean - Weak solutions of second-order parabolic equations exist and are unique under the assumptions
of §7.1.2, Theorems 3 and 4, with the symmetry assumption
$a^{ij} = a^{ji}$ dropped.MeasurableExistence.lean - Kaplan's lifespan bound for
$u_t - \Delta u = u^2$ (§9.4.1, Theorem 1) holds on a bounded open set whose boundary has no assumed regularity. The solution is$C^2$ inside the spacetime cylinder, continuous on its closure and zero on the lateral boundary. The theorem takes a Dirichlet eigenfunction$w \ge 0$ with eigenvalue$\lambda > 0$ and$\int w = 1$ that is$C^2$ inside and continuous up to the boundary, and nonnegative initial data$g$ with$\eta_0 = \int w g > \lambda$ . The solution then lives at most$\lambda^{-1} \log(\eta_0 / (\eta_0 - \lambda))$ .DirichletBlowup.lean
The regularity theory of Chapter 8 goes one step past the book. A local minimizer of Analytic.lean
import PDE
#cas [pdesolve u t x, u 0 x = sin x + 3 * sin (2 * x), u t 0 = 0, u t pi = 0] (u_t = 2 * u_xx)
-- u(t, x) = Real.exp (-(2 * t)) * Real.sin x + 3 * Real.exp (-(8 * t)) * Real.sin (2 * x)This is the heat equation sin (sin x) on cas
and cega to PDE operators.
In a proof, the cas tactic does this kind of calculation on your goal. Here it checks that the
Newtonian potential
example (p : ℝ^3) (hp : 0 < p 0 ^ 2 + p 1 ^ 2 + p 2 ^ 2) :
PDE.laplacian (fun q : ℝ^3 ↦ 1 / Real.sqrt (q 0 ^ 2 + q 1 ^ 2 + q 2 ^ 2)) p = 0 := by
cas| Evans | Topics | Where |
|---|---|---|
| Ch. 2 | Transport, Laplace's, heat and wave equations | Hyperbolic/Transport, Elliptic/PotentialTheory, Parabolic/Heat, Hyperbolic/Classical |
| Ch. 3 | Complete integrals, characteristics, Hamilton–Jacobi equations, conservation laws | Hyperbolic/FirstOrder, Hyperbolic/HamiltonJacobi, Hyperbolic/ConservationLaw |
| Ch. 4 | Separation of variables, similarity solutions, transforms, asymptotics, power series and Cauchy–Kovalevskaya | Representations, Cauchy |
| Ch. 5 | Hölder and Sobolev spaces, approximation, extension, traces, Sobolev inequalities, compactness | Spaces |
| Ch. 6 | Weak solutions, regularity, maximum principles, eigenvalues | Elliptic |
| Ch. 7 | Parabolic and hyperbolic equations, first-order hyperbolic systems, semigroups | Parabolic, Hyperbolic, Analysis/Evolution |
| Ch. 8 | Minimizers, regularity, constraints, critical points, Noether's theorem | CalculusOfVariations |
| Ch. 9 | Monotonicity, fixed points, sub- and supersolutions, nonexistence, gradient flows | Elliptic/Monotone, Elliptic/Semilinear, Analysis/Evolution/GradientFlow |
| Ch. 10 | Viscosity solutions, uniqueness, optimal control | Hyperbolic/HamiltonJacobi |
| Ch. 11 | Riemann's problem, systems of two conservation laws, entropy criteria | Hyperbolic/ConservationLaw |
| Ch. 12 | Energy, semilinear and critical-power waves, nonexistence | Hyperbolic/NonlinearWave |
| Beyond | Stokes, Euler, Navier–Stokes, Boussinesq, axisymmetric Euler, the De Gregorio model, transport systems in the half-plane with a general velocity law | Fluid |
Wherever we differ from the book, the module docs of the Evans results explain how.
PDE/Examples holds compiled examples, which no library module imports. The general
analysis that the equations share lives under Analysis.
Hilbert's problems on the calculus of variations have a folder of their own,
PDE/HilbertProblems. Each file quotes the problem as Hilbert asked it in
1900 and proves an answer for a stated class from the general theory.
- Problem 19, for one unknown function and integrands
$F(Du)$ whose second derivative is uniformly positive definite and bounded: when$F$ is real-analytic, a local minimizer in$W_{\mathrm{loc}}^{1,2}$ has a real-analytic representative, and a solution of the Euler–Lagrange equation with two continuous derivatives is real-analytic. Together with Problem 20: on a bounded open set, a minimizer with any boundary datum$g \in W^{1,2}$ ($u - g \in W^{1,2}_0$ ) exists and has a representative that is analytic inside.Nineteenth.lean - Problem 20, for convex integrands of growth
$p$ : on a bounded measurable set in$\mathbb{R}^n$ ,$n \ge 1$ , the integral$\int F(x, u, Du)\thinspace dx$ of any number of unknown functions has a minimizer with given boundary values in$W^{1,p}$ ,$1 < p < \infty$ . The integrand is jointly measurable and, for almost every$x$ , continuous in$u$ , convex in$Du$ , at least$c|Du|^p - b(x)$ and at most$a(x) + D|(u, Du)|^p$ , with$c > 0$ and$a, b$ integrable. If the derivative in$(u, Du)$ is jointly measurable and bounded in norm by$h(x) + C|(u, Du)|^{p-1}$ almost everywhere in$x$ , with$h \in L^{p/(p-1)}$ , every minimizer is a weak solution of the Euler–Lagrange system. Dirichlet's principle is the case$F = |Du|^2$ .Twentieth.lean - Problem 23, for the simple integral: suppose the slope function
$p$ solves Hilbert's first-order equation (1*) on a convex open region,$F$ is differentiable in the slope at$p$ , and the coefficients of Hilbert's one-form are differentiable there. Along continuous curves in the region that are differentiable off a countable set and along which the integrands are integrable,$J^\ast$ depends only on the endpoints. For curves with the same endpoints, Weierstrass's formula$J(y) - J(\bar y) = \int E(y_x, p)\thinspace dx$ follows, and$E \ge 0$ makes the curve$\bar y$ of the field a minimum. For a multiple integral on a bounded open set with$C^1$ boundary, let the extremal surfaces$Z_t$ form a family on an open parameter interval containing$0$ . The density and the family have continuous second-order jets up to the boundary. Then$J^\ast$ has the same value on two graphs$z = Z_{\theta(x)}(x)$ whose$C^1$ parameters take values in that interval on the closure and agree on the boundary. It therefore has the same value on two such graphs through one boundary curve when the surfaces of the family do not meet over the boundary. For$\theta = 0$ on the boundary this value is$J(Z_0)$ , and$J(z) - J(Z_0) = \int E\thinspace d\omega$ , Hilbert's formula (IV). Slope functions of the point are not used.TwentyThird.lean
- No proof uses
sorry. In the default build, Lean's kernel checks every proof, and every declaration of the library and its examples rests only on Lean's three standard axioms,propext,Classical.choiceandQuot.sound. - The library builds with Mathlib's standard set of linters and treats warnings as errors. The forty-two modules of NOTICE turn off the header linter: they aren't under our license, and their headers name their authors instead.
- Every theorem states all of its hypotheses, regularity included. This matters in Lean, where
fderivis zero at points where a function is not differentiable, so an equation written with derivatives is the classical PDE only together with the regularity hypotheses our solution classes carry. - Every module starts with a doc about its contents. For results taken from a source, the docs explain differences from it. Every public theorem, definition, instance, type and structure field written in the library's sources has a docstring.
- The duplicate check skips Lean's generated auxiliary declarations. Among the theorems it checks, no two in the library have the same statement as kernel terms, and none restates an imported theorem of Lean, Mathlib, SymLean or FloatLib.
- By default the kernel also checks the numerical certificates, instead of trusting compiled code.
If you'd like to check any of this yourself, TRUST.md says what a theorem of the library trusts, how to repeat these checks and what they can't see.
PDEAtlas builds with Lean v4.36.0 and Mathlib v4.36.0. Add it to your lakefile.lean:
require LeanPDE from git "https://github.com/lean-dojo/PDEAtlas.git" @ "main"The Lake package is LeanPDE and its modules live under PDE. Run lake update LeanPDE and
lake exe cache get, and SymLean and FloatLib come along. Then start a file with import PDE, or
import a single module for a smaller load. Mathlib comes from its cache, and Lake compiles
SymLean, FloatLib and the library modules of PDEAtlas.
We'd be very happy to get new PDE theory, better proofs, generalizations of the results already here, PDE routes for the computer algebra system or clearer documentation. CONTRIBUTING.md says how to go about it.
Other people are doing really nice PDE work in Lean too. The Blueprint's Related Work chapter compares PDEAtlas with Soto Franco and Marshall-Stevens's EllipticPDE, Armstrong and Kempe's De Giorgi–Nash–Moser theory in Lean (arXiv:2604.05984), Tomoki Uda's leray-hopf, and work on computer algebra and verified numerics. We coordinate work on general PDE lemmas with the Tau Ceti PDE roadmap.
@misc{pdeatlas,
author = {Robert Joseph George and Changhe Yang and Peicong Song and Thomas Y. Hou and Anima Anandkumar},
title = {{PDEAtlas}: Partial differential equations in {Lean}},
year = {2026},
howpublished = {\url{https://github.com/lean-dojo/PDEAtlas}},
note = {Lean v4.36.0}
}Our textbook reference is Lawrence C. Evans, Partial Differential Equations, second edition, Graduate Studies in Mathematics 19, American Mathematical Society, 2010, ISBN 978-0-8218-4974-3 (AMS record). The release metadata is in formalization.yaml.
PDEAtlas is written at Caltech by Robert Joseph George, Changhe Yang, Peicong Song, Thomas Y. Hou
and Anima Anandkumar. It is released under the Apache License 2.0, except for
forty-two modules of general lemmas under PDE/Analysis. These carry proofs by Levent Alpöge and
Tristan Buckmaster from the Lean package of their paper on the Navier–Stokes equations, and we're
very grateful that they let us include them. NOTICE lists them and explains where they
come from. No other module imports them, apart from the root PDE.lean, so the rest of the library
can be used without them.
Everything here starts from Mathlib. The Blueprint is written with Verso, VersoBlueprint and SubVerso.