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.ParametricComparisonAction |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.LocalParametricBounds |
| 3 | |
| 4 | /-! |
| 5 | # Bounded upper barriers near minimizing initial data |
| 6 | |
| 7 | The center graph restricts one smooth comparison action and its actual |
| 8 | geometric derivative bounds to nearby minimizing members of the family. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option maxSynthPendingDepth 3 |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle Topology |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedLength |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 22 | [IsManifold (𝓡 n) ∞ M] [ConnectedSpace M] |
| 23 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 24 | |
| 25 | local notation "E" => EuclideanSpace ℝ (Fin n) |
| 26 | local notation "P" => TangentSpace (𝓡 n) p × ℝ |
| 27 | |
| 28 | set_option maxHeartbeats 1200000 in |
| 29 | -- The graph uses the actual endpoint chart, whose source contains each retained endpoint. |
| 30 | set_option backward.isDefEq.respectTransparency false in |
| 31 | theorem lExponentialFamily_local_minimizing_barrier_bounds |
| 32 | (hM04 : RicciFlowCurvatureTheory.{u}) (hL : LGeodesicTheory F T τmax) |
| 33 | (hτmax : 0 < τmax) (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 34 | (A : LExponentialFamily F T τmax p) (Z0 : TangentSpace (𝓡 n) p) |
| 35 | (b0 : ℝ) (hb0 : 0 < b0) (hmax0 : b0 < τmax) : |
| 36 | ∃ N : Set P, IsOpen N ∧ (Z0, b0) ∈ N ∧ N ⊆ Set.univ ×ˢ Set.Ioo 0 τmax ∧ |
| 37 | ∃ D : ℝ, 0 ≤ D ∧ ∀ a ∈ N, ∀ (ha : 0 < a.2) (hm : a.2 < τmax), |
| 38 | IsMinimizingBackwardLPath F T 0 a.2 (A.path a.1 a.2 ha hm) → |
| 39 | ∃ B : ReducedLengthUpperBarrier F T p (A.gamma a.1 a.2) a.2, |
| 40 | |deriv (fun s ↦ B.representative (A.gamma a.1 a.2, s)) a.2| ≤ D ∧ |
| 41 | reducedLengthGradientNormSq F T B.representative a.2 (A.gamma a.1 a.2) ≤ D ∧ |
| 42 | ∀ v : TangentSpace (𝓡 n) (A.gamma a.1 a.2), |
| 43 | (F.connection (T - a.2)).hessian (fun q ↦ B.representative (q, a.2)) |
| 44 | (A.gamma a.1 a.2) v v ≤ D * (F.metric (T - a.2)).inner (A.gamma a.1 a.2) v v := by |
| 45 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 46 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 47 | let e := chartAt E (A.gamma Z0 b0) |
| 48 | obtain ⟨W, V, C, hW, haW, hWt, hV, hVe, hC, hcenters⟩ := |
| 49 | lExponentialFamily_exists_parametric_comparison_action hM04 hL hτmax hwindow A Z0 b0 hb0 hmax0 |
| 50 | let Ψ : P → (P × E) × ℝ := fun a ↦ ((a, e (A.gamma a.1 a.2)), a.2) |
| 51 | have hcenter := hcenters (Z0, b0) haW |
| 52 | obtain ⟨U, hU, hzU, hUsub, D, hD, hbound⟩ := exists_local_parametric_derivative_bounds |
| 53 | F T τmax hτmax hwindow (A.gamma Z0 b0) C (V ×ˢ Set.Ioo 0 τmax) |
| 54 | (hV.prod isOpen_Ioo) hC (Ψ (Z0, b0)) ⟨hcenter.2.1, hb0, hmax0⟩ |
| 55 | (e.map_source hcenter.1) hb0 hmax0 |
| 56 | have hγ : ContMDiffOn (𝓘(ℝ, P)) (𝓡 n) ∞ (fun a : P ↦ A.gamma a.1 a.2) W := by |
| 57 | convert! A.gamma_smooth.mono hWt using 1 <;> |
| 58 | simp only [modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 59 | have heγ : ContDiffOn ℝ ∞ (fun a : P ↦ e (A.gamma a.1 a.2)) W := |
| 60 | (contMDiffOn_chart.comp hγ (fun a ha ↦ (hcenters a ha).1)).contDiffOn |
| 61 | have hΨ : ContinuousOn Ψ W := |
| 62 | ((contDiffOn_id.prodMk heγ).prodMk contDiff_snd.contDiffOn).continuousOn |
| 63 | let N := W ∩ Ψ ⁻¹' U |
| 64 | have hN : IsOpen N := hΨ.isOpen_inter_preimage hW hU |
| 65 | refine ⟨N, hN, ⟨haW, hzU⟩, fun a ha ↦ hWt ha.1, D, hD, ?_⟩ |
| 66 | intro a ha hat hmax hmin |
| 67 | obtain ⟨B, hB⟩ := (hcenters a ha.1).2.2 hat hmax hmin |
| 68 | have h := hbound (Ψ a) ha.2 |
| 69 | have hsource := (hcenters a ha.1).1 |
| 70 | dsimp only [Ψ, e] at h |
| 71 | change _ ∧ _ ∧ ∀ v : E, _ at h |
| 72 | rw [(chartAt E (A.gamma Z0 b0)).left_inv hsource] at h |
| 73 | refine ⟨B, ?_⟩ |
| 74 | rw [hB] |
| 75 | exact h |
| 76 | |
| 77 | end PoincareMT.ReducedLength |