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.ReducedVolume.Exponential.Dynamics.BranchODE |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Exponential.Dynamics.CoordinateAction |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Metric.Coordinates.MetricPositive |
| 4 | |
| 5 | /-! |
| 6 | # The phase ODE of the actual L-exponential family |
| 7 | |
| 8 | Both action identities, the coordinate metric, and the scalar potential |
| 9 | come from the supplied family and flow. Noncriticality produces every |
| 10 | regularity premise of the common autonomous phase equation. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.ReducedVolume |
| 21 | |
| 22 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 24 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 25 | |
| 26 | set_option backward.isDefEq.respectTransparency false in |
| 27 | /-- Every noncritical actual branch solves the one coordinate phase field near its endpoint. -/ |
| 28 | theorem noncritical_branch_solves |
| 29 | (hwindow : Icc (T - τmax) T ⊆ J) (G : LExponentialGeometry F T τmax p) |
| 30 | (q₀ : M) (z : TangentSpace (𝓡 n) p × ℝ) |
| 31 | (hz : z ∈ univ ×ˢ Ioo 0 τmax) (hend : G.gamma z.1 z.2 = q₀) |
| 32 | (hcrit : Function.Bijective (G.toLExponentialFamily.sliceDifferential z.1 z.2)) : |
| 33 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 34 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 35 | ∀ᶠ t in 𝓝 z.2, |
| 36 | HasDerivAt |
| 37 | (actionBranchPhase (endpointCoordinates G q₀) (coordinateBackwardMetric F T q₀) z.1) |
| 38 | (phaseField (coordinateBackwardMetric F T q₀) (coordinateScalarCurvature F T q₀) |
| 39 | (actionBranchPhase (endpointCoordinates G q₀) |
| 40 | (coordinateBackwardMetric F T q₀) z.1 t)) t := by |
| 41 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 42 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 43 | let : FiniteDimensional ℝ (TangentSpace (𝓡 n) p) := |
| 44 | inferInstanceAs (FiniteDimensional ℝ (EuclideanSpace ℝ (Fin n))) |
| 45 | subst q₀ |
| 46 | let q := G.gamma z.1 z.2 |
| 47 | have hq : G.gamma z.1 z.2 ∈ (chartAt (EuclideanSpace ℝ (Fin n)) q).source := |
| 48 | mem_chart_source _ _ |
| 49 | have htarget : extChartAt (𝓡 n) q q ∈ (extChartAt (𝓡 n) q).target := |
| 50 | (extChartAt (𝓡 n) q).map_source (mem_extChartAt_source q) |
| 51 | have hB := coordinateBackwardMetric_contDiffAt (F := F) hwindow q hz.2.1 hz.2.2 |
| 52 | have hR := coordinateScalarCurvature_contDiffAt_of_noncritical hwindow G z hz hcrit |
| 53 | have hγ := (G.gamma_smooth.contMDiffAt |
| 54 | ((isOpen_univ.prod isOpen_Ioo).mem_nhds hz)).continuousAt |
| 55 | have hnear : ∀ᶠ w in 𝓝 z, w ∈ univ ×ˢ Ioo 0 τmax ∧ |
| 56 | G.gamma w.1 w.2 ∈ (chartAt (EuclideanSpace ℝ (Fin n)) q).source := by |
| 57 | filter_upwards [(isOpen_univ.prod isOpen_Ioo).mem_nhds hz, |
| 58 | hγ ((chartAt (EuclideanSpace ℝ (Fin n)) q).open_source.mem_nhds hq)] |
| 59 | with w hw hwq |
| 60 | exact ⟨hw, hwq⟩ |
| 61 | apply eventually_hasDerivAt_actionBranchPhase |
| 62 | (A := fun w ↦ G.toLExponentialFamily.action w.1 w.2) |
| 63 | (endpointCoordinates_contDiffAt G q z hz hq) |
| 64 | (G.action_smooth.contDiffAt ((isOpen_univ.prod isOpen_Ioo).mem_nhds hz)) |
| 65 | hB hR hz.2.1 (coordinateBackwardMetric_isInvertible q _ htarget) |
| 66 | · filter_upwards [continuous_fst.continuousAt |
| 67 | (extChartAt_target_mem_nhds (I := 𝓡 n) q)] with w hw |
| 68 | exact coordinateBackwardMetric_symm q w hw |
| 69 | · filter_upwards [hnear] with w hw |
| 70 | exact coordinate_action_horizontal G q w hw.1 hw.2 |
| 71 | · filter_upwards [hnear] with w hw |
| 72 | exact coordinate_action_time G q w hw.1 hw.2 |
| 73 | · exact endpointCoordinates_horizontal_bijective G q z hz hq hcrit |
| 74 | |
| 75 | end PoincareMT.ReducedVolume |