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.ODE.ScaledPicard |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.SmoothImplicit |
| 3 | |
| 4 | /-! |
| 5 | # The Picard family and its common uniqueness neighborhood |
| 6 | |
| 7 | The zero-scale identity derivative provides the invertibility needed by |
| 8 | the smooth implicit-family construction. Its neighborhood is retained for |
| 9 | comparing rescaled integral paths. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped ContDiff Topology |
| 15 | open Set |
| 16 | |
| 17 | namespace PoincareMT.ReducedLength |
| 18 | |
| 19 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 20 | [FiniteDimensional ℝ E] |
| 21 | |
| 22 | theorem exists_scaledPicard_neighborhood (f : C(E, E)) (hf : ContDiff ℝ ∞ f) (x0 : E) : |
| 23 | ∃ (sigma : E × ℝ → C(Set.Icc (-1 : ℝ) 1, E)) |
| 24 | (U : Set (E × ℝ)) (W : Set ((E × ℝ) × C(Set.Icc (-1 : ℝ) 1, E))), |
| 25 | IsOpen U ∧ (x0, 0) ∈ U ∧ IsOpen W ∧ ((x0, 0), ContinuousMap.const _ x0) ∈ W ∧ |
| 26 | sigma (x0, 0) = ContinuousMap.const _ x0 ∧ ContDiffOn ℝ ∞ sigma U ∧ |
| 27 | (∀ p ∈ U, (p, sigma p) ∈ W ∧ |
| 28 | sigma p = ContinuousMap.const _ p.1 + p.2 • pathPrimitive (f.comp (sigma p))) ∧ |
| 29 | ∀ z ∈ W, |
| 30 | (z.2 = ContinuousMap.const _ z.1.1 + z.1.2 • pathPrimitive (f.comp z.2)) ↔ |
| 31 | sigma z.1 = z.2 := by |
| 32 | have hi : ((fderiv ℝ (scaledPicardResidual f) |
| 33 | ((x0, 0), ContinuousMap.const _ x0)).comp |
| 34 | (ContinuousLinearMap.inr ℝ (E × ℝ) C(Set.Icc (-1 : ℝ) 1, E))).IsInvertible := by |
| 35 | rw [scaledPicardResidual_partial f hf x0] |
| 36 | exact ⟨ContinuousLinearEquiv.refl ℝ _, rfl⟩ |
| 37 | obtain ⟨sigma, U, W, hU, hxU, hW, hxW, hsigma, hsmooth, heq, huniq⟩ := |
| 38 | exists_smooth_implicit (scaledPicardResidual f) (scaledPicardResidual_smooth f hf) |
| 39 | ((x0, 0), ContinuousMap.const _ x0) hi |
| 40 | refine ⟨sigma, U, W, hU, hxU, hW, hxW, hsigma, hsmooth, ?_, ?_⟩ |
| 41 | · intro p hp |
| 42 | refine ⟨(heq p hp).1, ?_⟩ |
| 43 | have h := (heq p hp).2 |
| 44 | rw [scaledPicardResidual_at_zero] at h |
| 45 | exact sub_eq_zero.mp (by simpa only [scaledPicardResidual, sub_sub] using h) |
| 46 | · intro z hz |
| 47 | have h := huniq z hz |
| 48 | rw [scaledPicardResidual_at_zero] at h |
| 49 | simpa only [scaledPicardResidual, sub_sub, sub_eq_zero] using h |
| 50 | |
| 51 | end PoincareMT.ReducedLength |