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.Action.ActionCongruence |
| 2 | |
| 3 | /-! |
| 4 | # Minimality depends on the actual geometric path |
| 5 | |
| 6 | Equality on the closed interval preserves endpoints, while interior |
| 7 | velocity germs preserve the action. |
| 8 | -/ |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | |
| 12 | open scoped Manifold ContDiff Bundle |
| 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] |
| 21 | {J : Set ℝ} {F : RicciFlow n M J} {T a b : ℝ} |
| 22 | |
| 23 | theorem isMinimizingBackwardLPath_iff_of_eqOn (q r : BackwardTimePath F T a b) |
| 24 | (heq : Set.EqOn q.curve r.curve (Set.Icc a b)) : |
| 25 | IsMinimizingBackwardLPath F T a b q ↔ IsMinimizingBackwardLPath F T a b r := by |
| 26 | have hleft := heq (show a ∈ Set.Icc a b from ⟨le_rfl, q.ordered.le⟩) |
| 27 | have hright := heq (show b ∈ Set.Icc a b from ⟨q.ordered.le, le_rfl⟩) |
| 28 | have haction := backwardLLength_congr_Ioo F T a b q.ordered.le q.curve r.curve |
| 29 | (heq.mono Set.Ioo_subset_Icc_self) |
| 30 | constructor |
| 31 | · intro hq c hca hcb |
| 32 | rw [← haction] |
| 33 | exact hq c (hca.trans hleft.symm) (hcb.trans hright.symm) |
| 34 | · intro hr c hca hcb |
| 35 | rw [haction] |
| 36 | exact hr c (hca.trans hleft) (hcb.trans hright) |
| 37 | |
| 38 | end PoincareMT.ReducedLength |