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.Exponential.FamilyPhase |
| 2 | |
| 3 | /-! |
| 4 | # The actual smooth square-variation field |
| 5 | |
| 6 | Differentiate the second parameter of the supplied smooth square family, |
| 7 | then restrict its bundled tangent map to parameter zero. |
| 8 | -/ |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | set_option maxSynthPendingDepth 3 |
| 12 | |
| 13 | open scoped Manifold ContDiff Bundle |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT.ReducedLength |
| 18 | |
| 19 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 21 | [IsManifold (𝓡 n) ∞ M] |
| 22 | {J : Set ℝ} {F : RicciFlow n M J} {T a b : ℝ} {p : BackwardTimePath F T a b} |
| 23 | |
| 24 | set_option backward.isDefEq.respectTransparency false in |
| 25 | theorem squareVariationField_smooth (V : LVariation F T a b p) : |
| 26 | let U := (fun s : ℝ ↦ (s, (0 : ℝ))) ⁻¹' V.squareDomain |
| 27 | IsOpen U ∧ sqrtParameterInterval a b ⊆ U ∧ |
| 28 | ContMDiffOn (𝓘(ℝ, ℝ)) ((𝓡 n).prod (𝓡 n)) ∞ |
| 29 | (fun s ↦ (⟨V.baseSquareCurve s, squareVariationField V s⟩ : |
| 30 | TangentBundle (𝓡 n) M)) U := by |
| 31 | let U := (fun s : ℝ ↦ (s, (0 : ℝ))) ⁻¹' V.squareDomain |
| 32 | let f : ℝ × ℝ → M := fun z ↦ V.squareFamily z.1 z.2 |
| 33 | have hf : ContMDiffOn (𝓘(ℝ, ℝ × ℝ)) (𝓡 n) ∞ f V.squareDomain := by |
| 34 | convert! V.square_smooth using 1 <;> |
| 35 | simp only [f, modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 36 | have hi : ContMDiff (𝓘(ℝ, ℝ)) (𝓘(ℝ, ℝ × ℝ)) ∞ |
| 37 | (fun s : ℝ ↦ (s, (0 : ℝ))) := |
| 38 | (contDiff_id.prodMk contDiff_const).contMDiff |
| 39 | have hzero : (0 : ℝ) ∈ Set.Ioo (-V.radius) V.radius := |
| 40 | ⟨neg_lt_zero.mpr V.radius_pos, V.radius_pos⟩ |
| 41 | refine ⟨V.square_open.preimage (continuous_id.prodMk continuous_const), |
| 42 | fun s hs ↦ V.square_contains ⟨hs, hzero⟩, ?_⟩ |
| 43 | exact (familyPhase_contMDiffOn f V.squareDomain V.square_open hf).comp |
| 44 | hi.contMDiffOn (fun s (hs : s ∈ U) ↦ hs) |
| 45 | |
| 46 | end PoincareMT.ReducedLength |