qinz1yang/differential-geometry

A general geometry library in LEAN 4.

Lean

32

10,760 commits

updated Sep 27, 2026

See the code

See what people are saying

README

Differential Geometry in Lean 4

An ongoing Lean 4 library for differential geometry and geometric analysis, currently focused on Ricci flow.

How to use

Use DifferentialGeometry as an upstream dependency and build on its geometric-analysis infrastructure:

[[require]]
name = "DifferentialGeometry"
git = "https://github.com/qinz1yang/differential-geometry.git"
rev = "v0.1.3"

Release v0.1.3 is pinned to Lean and Mathlib v4.33.1.

Import the full library with

import DifferentialGeometry

or a specific module, for example the scalar strong maximum principle:

import DifferentialGeometry.Analysis.Parabolic.MaximumPrinciple.Scalar.Strong

We aim to keep pace with Mathlib releases and update the pinned Mathlib version accordingly.

Formalized theorems

Each is sorry-free (axioms: propext, Classical.choice, Quot.sound).

These three are the standard axioms of Lean's core library — propositional extensionality, the axiom of choice, and quotient soundness — on which all of classical mathematics in Mathlib rests. #print axioms lists everything a theorem transitively assumes: a sorry would surface as sorryAx, and any ad-hoc axiom would be named. An output of exactly these three therefore certifies that the proof is fully kernel-checked, with no sorry and no assumptions beyond the classical foundations.

Verification

git clone https://github.com/qinz1yang/differential-geometry.git
cd differential-geometry
lake build DifferentialGeometry.Topology.ThreeManifold.Poincare

To inspect the Poincaré theorem's transitive axioms, temporarily add

#print axioms DifferentialGeometry.Topology.poincare_conjecture

to Poincare.lean, then run

lake build DifferentialGeometry.Topology.ThreeManifold.Poincare

PDE infrastructure

Underlying these results is a substantial geometric-analysis backbone:

  • Integration & the divergence theorem — Riemannian measures, integration by parts and surface measures, with and without boundary.
  • Elliptic regularity — the connection (rough) Laplacian, Green identities, Gårding / Caccioppoli estimates, Hölder–Schauder spaces, variable-coefficient estimates, and interior bootstrap.
  • Spectral theory — the scalar theory on closed manifolds (discrete Laplacian spectrum, compact resolvent, eigenbasis); an iterated covariant-gradient jet calculus for tensor fields with fibre-norm towers and Sobolev-scale spectral estimates; and the intrinsic heat-semigroup / Galerkin machinery driving the DeTurck flow.
  • Sobolev spaces — chart-based and intrinsic $H^k$ / $W^{k,p}$ spaces with completeness, embedding and compactness results; tensor-valued Hilbert–Sobolev towers; Moser-type tame product estimates; and Gagliardo–Nirenberg interpolation down to fibre-norm level.
  • Parabolic & heat equations — heat semigroups, Duhamel solutions, Schauder and maximal regularity, quasilinear local existence, strong maximum and Hopf principles, Harnack inequalities, and joint space-time smoothing.
  • ODE flows — $C^\infty$ dependence of flows on their initial data, and time-dependent flows on closed manifolds jointly smooth up to the initial time (via Seeley-type time extension of the vector field).

The classical De Giorgi–Nash–Moser regularity machinery is vendored under External/ from scottnarmstrong/DeGiorgi (Scott Armstrong and Julia Kempe, Apache-2.0).

Topology Infrastructure

The topology library supplies the constructions used by Moise smoothing, surgery, and the Poincaré endpoint:

Third-party foundations are preserved under CanonicalTopology, ClassificationOfSurfaces, Schoenflies, and selected Tau Ceti modules, together with their source, license and modification records. Native extensions and theorem assembly remain in the mathematical topic directories.

AI Disclaimer

Generative AI (ChatGPT, Claude, Deepseek, Gemini, GLM, etc.) was used in the development of this codebase. The high-level architecture is human-designed; AI agents assisted with formalizing individual proofs and writing boilerplate. All definitions and core theorem statements were human-verified for correctness. Since all proofs are verified by Lean's type checker, AI-generated and human-written code are held to the same standard of correctness.

Note: This library is under active development. Breaking changes to public APIs and file paths should be expected.

qinz1yang/differential-geometry

A general geometry library in LEAN 4.

Lean

32

10,760 commits

updated Sep 27, 2026

See the code

See what people are saying

README

Differential Geometry in Lean 4

An ongoing Lean 4 library for differential geometry and geometric analysis, currently focused on Ricci flow.

How to use

Use DifferentialGeometry as an upstream dependency and build on its geometric-analysis infrastructure:

[[require]]
name = "DifferentialGeometry"
git = "https://github.com/qinz1yang/differential-geometry.git"
rev = "v0.1.3"

Release v0.1.3 is pinned to Lean and Mathlib v4.33.1.

Import the full library with

import DifferentialGeometry

or a specific module, for example the scalar strong maximum principle:

import DifferentialGeometry.Analysis.Parabolic.MaximumPrinciple.Scalar.Strong

We aim to keep pace with Mathlib releases and update the pinned Mathlib version accordingly.

Formalized theorems

Each is sorry-free (axioms: propext, Classical.choice, Quot.sound).

These three are the standard axioms of Lean's core library — propositional extensionality, the axiom of choice, and quotient soundness — on which all of classical mathematics in Mathlib rests. #print axioms lists everything a theorem transitively assumes: a sorry would surface as sorryAx, and any ad-hoc axiom would be named. An output of exactly these three therefore certifies that the proof is fully kernel-checked, with no sorry and no assumptions beyond the classical foundations.

Verification

git clone https://github.com/qinz1yang/differential-geometry.git
cd differential-geometry
lake build DifferentialGeometry.Topology.ThreeManifold.Poincare

To inspect the Poincaré theorem's transitive axioms, temporarily add

#print axioms DifferentialGeometry.Topology.poincare_conjecture

to Poincare.lean, then run

lake build DifferentialGeometry.Topology.ThreeManifold.Poincare

PDE infrastructure

Underlying these results is a substantial geometric-analysis backbone:

  • Integration & the divergence theorem — Riemannian measures, integration by parts and surface measures, with and without boundary.
  • Elliptic regularity — the connection (rough) Laplacian, Green identities, Gårding / Caccioppoli estimates, Hölder–Schauder spaces, variable-coefficient estimates, and interior bootstrap.
  • Spectral theory — the scalar theory on closed manifolds (discrete Laplacian spectrum, compact resolvent, eigenbasis); an iterated covariant-gradient jet calculus for tensor fields with fibre-norm towers and Sobolev-scale spectral estimates; and the intrinsic heat-semigroup / Galerkin machinery driving the DeTurck flow.
  • Sobolev spaces — chart-based and intrinsic $H^k$ / $W^{k,p}$ spaces with completeness, embedding and compactness results; tensor-valued Hilbert–Sobolev towers; Moser-type tame product estimates; and Gagliardo–Nirenberg interpolation down to fibre-norm level.
  • Parabolic & heat equations — heat semigroups, Duhamel solutions, Schauder and maximal regularity, quasilinear local existence, strong maximum and Hopf principles, Harnack inequalities, and joint space-time smoothing.
  • ODE flows — $C^\infty$ dependence of flows on their initial data, and time-dependent flows on closed manifolds jointly smooth up to the initial time (via Seeley-type time extension of the vector field).

The classical De Giorgi–Nash–Moser regularity machinery is vendored under External/ from scottnarmstrong/DeGiorgi (Scott Armstrong and Julia Kempe, Apache-2.0).

Topology Infrastructure

The topology library supplies the constructions used by Moise smoothing, surgery, and the Poincaré endpoint:

Third-party foundations are preserved under CanonicalTopology, ClassificationOfSurfaces, Schoenflies, and selected Tau Ceti modules, together with their source, license and modification records. Native extensions and theorem assembly remain in the mathematical topic directories.

AI Disclaimer

Generative AI (ChatGPT, Claude, Deepseek, Gemini, GLM, etc.) was used in the development of this codebase. The high-level architecture is human-designed; AI agents assisted with formalizing individual proofs and writing boilerplate. All definitions and core theorem statements were human-verified for correctness. Since all proofs are verified by Lean's type checker, AI-generated and human-written code are held to the same standard of correctness.

Note: This library is under active development. Breaking changes to public APIs and file paths should be expected.

Languages

Lean

100.0%