Poincaré conjecture: the Lean proof, cleaned up together
The 2026 Lean proof of the Poincaré conjecture after Morgan and Tian, 3 million lines, cleaned up together: smaller, faster to build, more readable, the theorems unchanged

| 1 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Geometry.GeometryAssembly |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Action.FixedTimeDensity |
| 3 | |
| 4 | /-! |
| 5 | # The open dense regular locus on a fixed time slice |
| 6 | -/ |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | set_option maxSynthPendingDepth 3 |
| 10 | set_option maxHeartbeats 800000 |
| 11 | |
| 12 | open scoped Manifold ContDiff Bundle Topology |
| 13 | |
| 14 | universe u |
| 15 | |
| 16 | namespace PoincareMT.ReducedLength |
| 17 | |
| 18 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 19 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 20 | [IsManifold (𝓡 n) ∞ M] [ConnectedSpace M] [T3Space M] |
| 21 | [SecondCountableTopology M] |
| 22 | |
| 23 | set_option backward.isDefEq.respectTransparency false in |
| 24 | theorem lExponentialGeometry_regular_locus {J : Set ℝ} |
| 25 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 26 | (T τmax : ℝ) (hτmax : 0 < τmax) (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 27 | (hcurvature : CompleteBoundedCurvatureOn F (Set.Icc (T - τmax) T)) |
| 28 | (hL : LGeodesicTheory F T τmax) (p : M) |
| 29 | (G : LExponentialGeometry F T τmax p) |
| 30 | (τ : ℝ) (hτ : 0 < τ) (hmax : τ < τmax) : |
| 31 | ∃ U : Set M, IsOpen U ∧ Dense U ∧ Set.Nonempty U ∧ |
| 32 | ∀ q ∈ U, Nonempty (ReducedLengthRegularPoint F T τmax p q τ) := by |
| 33 | let U : Set M := (fun q : M ↦ (q, τ)) ⁻¹' G.regularImage |
| 34 | have hUopen : IsOpen U := by |
| 35 | change IsOpen ((fun q : M ↦ (q, τ)) ⁻¹' G.regular_chart.target) |
| 36 | exact G.regular_chart.open_target.preimage (continuous_id.prodMk continuous_const) |
| 37 | let S : Set M := {q : M | ∃ Z : TangentSpace (𝓡 n) p, |
| 38 | (Z, τ) ∈ G.toLExponentialFamily.regularDomain ∧ |
| 39 | G.toLExponentialFamily.gamma Z τ = q} |
| 40 | have hSdense : Dense S := lExponentialFamily_dense_regular_endpoints F hM04 T τmax hτmax |
| 41 | hwindow hcurvature hL p G.toLExponentialFamily τ hτ hmax |
| 42 | have hSU : S ⊆ U := by |
| 43 | intro q hq |
| 44 | obtain ⟨Z, hreg, hend⟩ := hq |
| 45 | have hsrc : (Z, τ) ∈ G.regular_chart.source := by |
| 46 | rw [G.regular_source] |
| 47 | exact hreg |
| 48 | have htarget : G.regular_chart (Z, τ) ∈ G.regular_chart.target := |
| 49 | G.regular_chart.map_source hsrc |
| 50 | change (q, τ) ∈ G.regularImage |
| 51 | rw [← hend, ← G.regular_forward (Z, τ)] |
| 52 | exact htarget |
| 53 | have hUdense : Dense U := hSdense.mono hSU |
| 54 | have hUnonempty : U.Nonempty := by |
| 55 | obtain ⟨q, hq⟩ := hSdense.nonempty |
| 56 | exact ⟨q, hSU hq⟩ |
| 57 | refine ⟨U, hUopen, hUdense, hUnonempty, ?_⟩ |
| 58 | intro q hq |
| 59 | exact ⟨G.regular_point (q, τ) hq⟩ |
| 60 | |
| 61 | end PoincareMT.ReducedLength |