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.Generalized.ReducedGeometry.SourceNames.LGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Families.ClosedEulerMomentum |
| 3 | |
| 4 | /-! |
| 5 | # Recovering actual momentum from a closed Euler phase |
| 6 | |
| 7 | Morgan-Tian equation (6.5) and Lemma 6.18, pp. 108-109, 113-114. |
| 8 | The phase's first equation identifies its velocity with the actual |
| 9 | within derivative. The positive metric then identifies its second |
| 10 | component with actual Riesz momentum on the same closed parameter set. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | -- Riesz momentum and the actual metric operator have the same tangent model. |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M14 |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 26 | {J C : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (x₀ : M) |
| 27 | (hC : UniqueDiffOn ℝ C) {q P : ℝ → EuclideanSpace ℝ (Fin n)} |
| 28 | (hmap : MapsTo q C (extChartAt (𝓡 n) x₀).target) |
| 29 | (hphase : ∀ s ∈ C, HasDerivWithinAt (fun r => (q r, P r)) |
| 30 | (M08.closedChartEulerPhase F T x₀ C s (q s, P s)) C s) |
| 31 | |
| 32 | include hC hmap hphase |
| 33 | |
| 34 | /-- A phase solution's second component is the actual momentum |
| 35 | of its spatial curve, including uniquely differentiable closed points, |
| 36 | equation (6.5) and Lemma 6.18, pp. 108-109, 113-114. -/ |
| 37 | theorem closedChartPhase_momentum : |
| 38 | EqOn (fun s => M08.chartMomentumVector (M08.chartActionMetric F T x₀ (s, q s)) |
| 39 | (derivWithin q C s)) P C := by |
| 40 | intro s hs |
| 41 | have hd : HasDerivWithinAt q |
| 42 | (Ring.inverse (M08.chartMetricOperator F T x₀ (s, q s)) (P s)) C s := (hphase s hs).fst |
| 43 | have hq : derivWithin q C s = |
| 44 | Ring.inverse (M08.chartMetricOperator F T x₀ (s, q s)) (P s) := |
| 45 | hd.derivWithin (hC s hs) |
| 46 | change M08.chartMetricOperator F T x₀ (s, q s) (derivWithin q C s) = P s |
| 47 | rw [hq] |
| 48 | exact congrArg (fun A : EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) => A (P s)) |
| 49 | (Ring.mul_inverse_cancel _ (M08.chartMetricOperator_isUnit_of_target F T x₀ (hmap hs))) |
| 50 | |
| 51 | /-- The actual momentum recovered from a phase solution satisfies |
| 52 | the actual force equation on its closed parameter set, |
| 53 | equation (6.5) and Lemma 6.18, pp. 108-109, 113-114. -/ |
| 54 | theorem closedChartPhase_momentum_equation : |
| 55 | ∀ s ∈ C, HasDerivWithinAt |
| 56 | (fun r => M08.chartMomentumVector (M08.chartActionMetric F T x₀ (r, q r)) |
| 57 | (derivWithin q C r)) |
| 58 | (M08.chartForceVector |
| 59 | (M08.spatialWithinFDeriv C (extChartAt (𝓡 n) x₀).target |
| 60 | (M08.chartActionMetric F T x₀) (s, q s)) |
| 61 | (M08.spatialWithinFDeriv C (extChartAt (𝓡 n) x₀).target |
| 62 | (M08.chartActionPotential F T x₀) (s, q s)) (derivWithin q C s)) C s := by |
| 63 | intro s hs |
| 64 | have hd : HasDerivWithinAt q |
| 65 | (Ring.inverse (M08.chartMetricOperator F T x₀ (s, q s)) (P s)) C s := (hphase s hs).fst |
| 66 | have hq : derivWithin q C s = |
| 67 | Ring.inverse (M08.chartMetricOperator F T x₀ (s, q s)) (P s) := |
| 68 | hd.derivWithin (hC s hs) |
| 69 | have hP : HasDerivWithinAt P |
| 70 | (M08.closedChartEulerPhase F T x₀ C s (q s, P s)).2 C s := (hphase s hs).snd |
| 71 | dsimp only [M08.closedChartEulerPhase] at hP |
| 72 | rw [← hq] at hP |
| 73 | exact hP.congr_of_mem (closedChartPhase_momentum F T x₀ hC hmap hphase) hs |
| 74 | |
| 75 | end PoincareMT.M14 |