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.Barrier.SharpLowerContact |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.RegularLocus.RegularContactFormulas |
| 3 | |
| 4 | /-! |
| 5 | # Sharp tensor equality for the supplied regular representative |
| 6 | -/ |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | set_option maxSynthPendingDepth 3 |
| 10 | |
| 11 | open scoped Manifold ContDiff Bundle Topology |
| 12 | open Filter |
| 13 | |
| 14 | universe u |
| 15 | |
| 16 | namespace PoincareMT.ReducedLength |
| 17 | |
| 18 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 19 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 20 | [ConnectedSpace M] [T2Space M] |
| 21 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p q : M} {b : ℝ} |
| 22 | |
| 23 | set_option backward.isDefEq.respectTransparency false in |
| 24 | theorem regular_sharp_laplacian_tensor_eq |
| 25 | (hM04 : RicciFlowCurvatureTheory.{u}) (hL : LGeodesicTheory F T τmax) |
| 26 | (hτmax : 0 < τmax) (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 27 | (A : LExponentialFamily F T τmax p) (r : ReducedLengthRegularPoint F T τmax p q b) |
| 28 | (hsharp : reducedLengthLaplacian F T r.representative b q = |
| 29 | (n : ℝ) / (2 * b) - (F.connection (T - b)).scalarCurvature q - |
| 30 | reducedHarnackIntegral F T r.path.curve r.path_scalar_time_derivative b / |
| 31 | (2 * b * Real.sqrt b)) : |
| 32 | ∀ v w : TangentSpace (𝓡 n) q, |
| 33 | (F.connection (T - b)).ricci q v w + |
| 34 | (F.connection (T - b)).hessian (fun x ↦ r.representative (x, b)) q v w = |
| 35 | (F.metric (T - b)).inner q v w / (2 * b) := by |
| 36 | obtain ⟨Z, hpath, _⟩ := lExponentialFamily_minimizers_lift hM04 hL hτmax hwindow |
| 37 | A b r.tau_pos r.tau_lt r.path r.path_start r.minimizing |
| 38 | have hend : A.gamma Z b = q := (hpath ⟨r.tau_pos.le, le_rfl⟩).symm.trans r.path_end |
| 39 | have hselected : Set.EqOn r.path.curve (A.path Z b r.tau_pos r.tau_lt).curve (Set.Icc 0 b) := by |
| 40 | rw [A.path_eq] |
| 41 | exact hpath |
| 42 | have hmin := (isMinimizingBackwardLPath_iff_of_eqOn r.path |
| 43 | (A.path Z b r.tau_pos r.tau_lt) hselected).mp r.minimizing |
| 44 | let O : Set M := {x | (x, b) ∈ r.neighborhood} |
| 45 | have hO : IsOpen O := r.neighborhood_open.preimage (continuous_id.prodMk continuous_const) |
| 46 | have hqO : A.gamma Z b ∈ O := by rw [hend]; exact r.center_mem |
| 47 | have hvalue : r.representative (A.gamma Z b, b) = A.action Z b / (2 * Real.sqrt b) := by |
| 48 | rw [hend] |
| 49 | exact regular_representative_eq_family_action r A Z hpath |
| 50 | have hlow : ∀ᶠ x in 𝓝 (A.gamma Z b), r.representative (x, b) ≤ reducedLength F T p x b := by |
| 51 | filter_upwards [hO.mem_nhds hqO] with x hx |
| 52 | exact (r.representative_eq (x, b) hx).le |
| 53 | have hsharp' : (F.connection (T - b)).laplacian (fun x ↦ r.representative (x, b)) (A.gamma Z b) = |
| 54 | (n : ℝ) / (2 * b) - (F.connection (T - b)).scalarCurvature (A.gamma Z b) - |
| 55 | reducedHarnackIntegral F T (A.gamma Z) |
| 56 | (backwardScalarEvolutionAlong F T (A.gamma Z)) b / (2 * b * Real.sqrt b) := by |
| 57 | rw [hend, ← regular_harnackIntegral_eq_family hM04 hwindow r A Z hpath] |
| 58 | exact hsharp |
| 59 | have h := lExponentialFamily_tensor_eq_of_sharp_lower_contact hM04 hL hτmax hwindow |
| 60 | A Z b r.tau_pos r.tau_lt hmin (fun x ↦ r.representative (x, b)) O hO hqO |
| 61 | r.representative_space_smooth_on hvalue hlow hsharp' |
| 62 | rwa [hend] at h |
| 63 | |
| 64 | end PoincareMT.ReducedLength |