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.Surgery.StandardCap.Persistence.SourceNames.Metric |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Limit.Exponential.InitialExponential |
| 3 | import PoincareLib.Geometry.Riemannian.Coordinates.Exponential.Gauss.Manifold |
| 4 | |
| 5 | /-! |
| 6 | # Initial frames of the actual comparison-coordinate exponentials |
| 7 | |
| 8 | Differentiating the actual composition gives an orthonormal frame for |
| 9 | the normalized pullback metric at zero. Morgan--Tian, Claim 16.6, |
| 10 | pp. 371-372; see `derivations/19-normalized-exponential-family.md`. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M44.NormalizedCapExponential |
| 22 | |
| 23 | local notation "E" => StandardCapSpace |
| 24 | |
| 25 | variable {g₀ : StandardInitialMetric} {S : GeneralizedSliceCarrier.{u}} |
| 26 | {g : RiemannianMetric 3 S.carrier} {tip : S.carrier} {scale eta R : ℝ} |
| 27 | {Q : SurgeryCapClose g₀ S g tip scale eta} |
| 28 | |
| 29 | /-- The physical differential of the actual exponential is its supplied |
| 30 | initial chart frame, since the centered chart has identity differential. |
| 31 | Source: Claim 16.6, pp. 371-372. -/ |
| 32 | theorem map_mfderiv_zero (D : NormalizedCapExponential Q R) : |
| 33 | mfderiv (𝓡 3) (𝓡 3) D.map 0 = D.frame.toContinuousLinearMap := by |
| 34 | have h0 : (0 : E) ∈ Metric.ball 0 R := Metric.mem_ball_self D.radius_pos |
| 35 | have hm := (D.smooth.contMDiffAt (Metric.isOpen_ball.mem_nhds h0)).mdifferentiableAt (by simp) |
| 36 | have hchart : MDifferentiableAt (𝓡 3) (𝓡 3) (extChartAt (𝓡 3) tip) (D.map 0) := by |
| 37 | rw [D.map_zero] |
| 38 | exact mdifferentiableAt_extChartAt (mem_chart_source _ tip) |
| 39 | have hd := mfderiv_comp (I := 𝓡 3) (I' := 𝓡 3) (I'' := 𝓡 3) 0 hchart hm |
| 40 | rw [mfderiv_eq_fderiv] at hd |
| 41 | change fderiv ℝ (fun v => extChartAt (𝓡 3) tip (D.map v)) 0 = |
| 42 | (mfderiv (𝓡 3) (𝓡 3) (extChartAt (𝓡 3) tip) (D.map 0)).comp |
| 43 | (mfderiv (𝓡 3) (𝓡 3) D.map 0) at hd |
| 44 | rw [D.initial_derivative.fderiv, D.map_zero, mfderiv_extChartAt_self, |
| 45 | ContinuousLinearMap.id_comp] at hd |
| 46 | exact hd.symm |
| 47 | |
| 48 | /-- The actual comparison-coordinate initial frame is the inverse-chart |
| 49 | differential applied to the physical frame. Source: Claim 16.6, pp. 371-372. -/ |
| 50 | theorem coordinateMap_fderiv_zero (D : NormalizedCapExponential Q R) : |
| 51 | fderiv ℝ D.coordinateMap 0 = |
| 52 | (mfderiv (𝓡 3) (𝓡 3) Q.inverse tip).comp D.frame.toContinuousLinearMap := by |
| 53 | have h0 : (0 : E) ∈ Metric.ball 0 R := Metric.mem_ball_self D.radius_pos |
| 54 | have hm := (D.smooth.contMDiffAt (Metric.isOpen_ball.mem_nhds h0)).mdifferentiableAt (by simp) |
| 55 | have hi := (Q.inverse_smooth.contMDiffAt |
| 56 | (Q.toPartialDiffeomorph.open_target.mem_nhds (D.map_mem 0 h0))).mdifferentiableAt (by simp) |
| 57 | have hd := mfderiv_comp (I := 𝓡 3) (I' := 𝓡 3) (I'' := 𝓡 3) 0 hi hm |
| 58 | rw [mfderiv_eq_fderiv] at hd |
| 59 | change fderiv ℝ D.coordinateMap 0 = |
| 60 | (mfderiv (𝓡 3) (𝓡 3) Q.inverse (D.map 0)).comp |
| 61 | (mfderiv (𝓡 3) (𝓡 3) D.map 0) at hd |
| 62 | rw [D.map_mfderiv_zero] at hd |
| 63 | let invD : S.carrier → E →L[ℝ] E := fun p => mfderiv (𝓡 3) (𝓡 3) Q.inverse p |
| 64 | have hpoint : (mfderiv (𝓡 3) (𝓡 3) Q.inverse (D.map 0) : E →L[ℝ] E) = |
| 65 | mfderiv (𝓡 3) (𝓡 3) Q.inverse tip := |
| 66 | congrArg invD D.map_zero |
| 67 | exact hd.trans (congrArg (fun A : E →L[ℝ] E => A.comp D.frame.toContinuousLinearMap) hpoint) |
| 68 | |
| 69 | /-- The initial derivative of the actual inverse-chart exponential is |
| 70 | orthonormal for the actual normalized coefficients at zero. |
| 71 | Source: Claim 16.6, pp. 371-372. -/ |
| 72 | theorem coordinate_frame_inner (D : NormalizedCapExponential Q R) (v w : E) : |
| 73 | Q.normalizedCoefficients 0 (fderiv ℝ D.coordinateMap 0 v) (fderiv ℝ D.coordinateMap 0 w) = |
| 74 | inner ℝ v w := by |
| 75 | have h0 : (0 : E) ∈ g₀.metric.ball 0 eta⁻¹ := by |
| 76 | rw [M36.standard_ball_eq_euclidean g₀ (inv_pos.mpr Q.eta_pos)] |
| 77 | exact Metric.mem_ball_self ((M36.radialEuclideanRadius_pos_iff g₀ _).mpr |
| 78 | (inv_pos.mpr Q.eta_pos)) |
| 79 | let e := Q.toPartialDiffeomorph |
| 80 | have heD : e.toOpenPartialHomeomorph.MDifferentiable (𝓡 3) (𝓡 3) := |
| 81 | ⟨e.mdifferentiableOn (by simp), e.symm.mdifferentiableOn (by simp)⟩ |
| 82 | have hcancel := heD.comp_symm_deriv (e.map_source h0) |
| 83 | change (mfderiv (𝓡 3) (𝓡 3) Q.map (Q.inverse (Q.map 0))).comp |
| 84 | (mfderiv (𝓡 3) (𝓡 3) Q.inverse (Q.map 0)) = ContinuousLinearMap.id ℝ E at hcancel |
| 85 | rw [Q.left_inverse h0, Q.map_tip] at hcancel |
| 86 | have hframe (a : E) : mfderiv (𝓡 3) (𝓡 3) Q.map 0 |
| 87 | (fderiv ℝ D.coordinateMap 0 a) = D.frame a := by |
| 88 | rw [D.coordinateMap_fderiv_zero] |
| 89 | exact congrArg (fun L => L (D.frame a)) hcancel |
| 90 | rw [Q.normalizedCoefficients_apply, hframe v, hframe w] |
| 91 | have hphysical := D.frame_inner v w |
| 92 | rw [Q.normalizedMetric.chartCoefficients_self] at hphysical |
| 93 | have hpoint := congrArg |
| 94 | (fun p : S.carrier => scale⁻¹ ^ 2 * g.inner p (D.frame v) (D.frame w)) Q.map_tip |
| 95 | exact hpoint.trans hphysical |
| 96 | |
| 97 | end PoincareMT.M44.NormalizedCapExponential |