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.Spacetime.Rescaling.Interval |
| 2 | import PoincareLib.Geometry.Spacetime.Rescaling.Interval.Smooth |
| 3 | import Mathlib.Analysis.Calculus.Deriv.Mul |
| 4 | |
| 5 | /-! Adapted from Mapher06/Poincare-MorganTian, `PoincareMT/Proofs/M13/IntervalTransport.lean`, |
| 6 | revision `0c5d5c4e1ecbc12703b1994e226df1b15d2e8d39`. See `references/ricci-flow/mapher/rescaling-import.json`. -/ |
| 7 | |
| 8 | /-! |
| 9 | # Affine transport of selected interval realizations |
| 10 | |
| 11 | The two interval realizations may be selected independently. Derivative |
| 12 | factors are measured by their retained positive actual time tangents. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | namespace PoincareMT.ParabolicRescaling |
| 21 | |
| 22 | theorem interval_map_derivative {I J : SpacetimeInterval} |
| 23 | (D : SmoothSpacetimeInterval I) (E : SmoothSpacetimeInterval J) |
| 24 | (f : D.Point → E.Point) (hf : ContMDiff (𝓡∂ 1) (𝓡∂ 1) ∞ f) |
| 25 | (φ : ℝ → ℝ) (hval : ∀ x, (f x : ℝ) = φ (x : ℝ)) |
| 26 | (x : D.Point) (c : ℝ) (hφ : HasDerivAt φ c (x : ℝ)) : |
| 27 | mfderiv (𝓡∂ 1) (𝓡∂ 1) f x (D.positiveTangent x) = |
| 28 | c • E.positiveTangent (f x) := by |
| 29 | let : ChartedSpace (EuclideanHalfSpace 1) D.Point := D.chartedSpace |
| 30 | let : IsManifold (𝓡∂ 1) ∞ D.Point := D.isManifold |
| 31 | let : ChartedSpace (EuclideanHalfSpace 1) E.Point := E.chartedSpace |
| 32 | let : IsManifold (𝓡∂ 1) ∞ E.Point := E.isManifold |
| 33 | apply (E.inclusionDerivative (f x)).injective |
| 34 | have houter := mfderiv_comp x |
| 35 | (E.inclusion_smooth.mdifferentiable (by simp) (f x)) |
| 36 | (hf.mdifferentiable (by simp) x) |
| 37 | have hscalar := hφ.hasFDerivAt.hasMFDerivAt.comp x |
| 38 | (D.inclusion_smooth.mdifferentiable (by simp) x).hasMFDerivAt |
| 39 | have hfun : (Subtype.val : E.Point → ℝ) ∘ f = |
| 40 | φ ∘ (Subtype.val : D.Point → ℝ) := funext hval |
| 41 | have hderiv := hscalar.mfderiv |
| 42 | rw [← hfun, houter, ← E.inclusionDerivative_eq, |
| 43 | ← D.inclusionDerivative_eq] at hderiv |
| 44 | have hvalue := congrArg |
| 45 | (fun L : TangentSpace (𝓡∂ 1) x →L[ℝ] ℝ ↦ L (D.positiveTangent x)) hderiv |
| 46 | change (E.inclusionDerivative (f x)) |
| 47 | (mfderiv (𝓡∂ 1) (𝓡∂ 1) f x (D.positiveTangent x)) = |
| 48 | (ContinuousLinearMap.toSpanSingleton ℝ c) |
| 49 | (D.inclusionDerivative x (D.positiveTangent x)) at hvalue |
| 50 | simpa only [ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, |
| 51 | SmoothSpacetimeInterval.positiveTangent, ContinuousLinearEquiv.apply_symm_apply, |
| 52 | ContinuousLinearMap.toSpanSingleton_apply_one, map_smul, smul_eq_mul, mul_one] using hvalue |
| 53 | |
| 54 | noncomputable def affineIntervalDiffeomorph |
| 55 | (I : SpacetimeInterval) (Q : ℝ) (hQ : 0 < Q) (a : ℝ) |
| 56 | (D : SmoothSpacetimeInterval I) |
| 57 | (E : SmoothSpacetimeInterval (parabolicInterval Q hQ a I)) : |
| 58 | Diffeomorph (𝓡∂ 1) (𝓡∂ 1) D.Point E.Point ∞ where |
| 59 | toFun := parabolicTimePoint Q hQ a I |
| 60 | invFun := parabolicTimePointInv Q hQ a I |
| 61 | left_inv := by |
| 62 | intro t |
| 63 | apply Subtype.ext |
| 64 | exact parabolicTimeInv_parabolicTime Q hQ a t.val |
| 65 | right_inv := by |
| 66 | intro s |
| 67 | apply Subtype.ext |
| 68 | exact parabolicTime_parabolicTimeInv Q hQ a s.val |
| 69 | contMDiff_toFun := by |
| 70 | apply interval_map_smooth D E |
| 71 | have hclock : ContDiff ℝ ∞ (parabolicTime Q a) := |
| 72 | contDiff_const.mul (contDiff_id.sub contDiff_const) |
| 73 | exact hclock.contMDiff.comp D.inclusion_smooth |
| 74 | contMDiff_invFun := by |
| 75 | apply interval_map_smooth E D |
| 76 | have hclock : ContDiff ℝ ∞ (parabolicTimeInv Q a) := |
| 77 | contDiff_const.add (contDiff_id.div_const Q) |
| 78 | exact hclock.contMDiff.comp E.inclusion_smooth |
| 79 | |
| 80 | theorem affineIntervalDiffeomorph_derivative |
| 81 | (I : SpacetimeInterval) (Q : ℝ) (hQ : 0 < Q) (a : ℝ) |
| 82 | (D : SmoothSpacetimeInterval I) |
| 83 | (E : SmoothSpacetimeInterval (parabolicInterval Q hQ a I)) (t : D.Point) : |
| 84 | mfderiv (𝓡∂ 1) (𝓡∂ 1) (affineIntervalDiffeomorph I Q hQ a D E) t |
| 85 | (D.positiveTangent t) = |
| 86 | Q • E.positiveTangent (affineIntervalDiffeomorph I Q hQ a D E t) := by |
| 87 | apply interval_map_derivative D E _ (Diffeomorph.contMDiff _) (parabolicTime Q a) |
| 88 | (fun _ ↦ rfl) |
| 89 | convert! ((hasDerivAt_id (t : ℝ)).sub_const a).const_mul Q using 1 |
| 90 | simp |
| 91 | |
| 92 | theorem affineIntervalDiffeomorph_inverse_derivative |
| 93 | (I : SpacetimeInterval) (Q : ℝ) (hQ : 0 < Q) (a : ℝ) |
| 94 | (D : SmoothSpacetimeInterval I) |
| 95 | (E : SmoothSpacetimeInterval (parabolicInterval Q hQ a I)) (s : E.Point) : |
| 96 | mfderiv (𝓡∂ 1) (𝓡∂ 1) (affineIntervalDiffeomorph I Q hQ a D E).symm s |
| 97 | (E.positiveTangent s) = |
| 98 | (1 / Q : ℝ) • D.positiveTangent ((affineIntervalDiffeomorph I Q hQ a D E).symm s) := by |
| 99 | apply interval_map_derivative E D _ (Diffeomorph.contMDiff _) (parabolicTimeInv Q a) |
| 100 | (fun _ ↦ rfl) |
| 101 | convert! ((hasDerivAt_id (s : ℝ)).div_const Q).const_add a using 1 |
| 102 | |
| 103 | noncomputable def parabolicIntervalTransport (T : SpacetimeIntervalSystem) |
| 104 | (Q : ℝ) (hQ : 0 < Q) (a : ℝ) : ParabolicIntervalTransport T Q hQ a where |
| 105 | diffeomorph I := affineIntervalDiffeomorph I Q hQ a |
| 106 | (T.interval I) (T.interval (parabolicInterval Q hQ a I)) |
| 107 | forward_eq _ _ := rfl |
| 108 | inverse_eq _ _ := rfl |
| 109 | derivative I := affineIntervalDiffeomorph_derivative I Q hQ a |
| 110 | (T.interval I) (T.interval (parabolicInterval Q hQ a I)) |
| 111 | inverse_derivative I := affineIntervalDiffeomorph_inverse_derivative I Q hQ a |
| 112 | (T.interval I) (T.interval (parabolicInterval Q hQ a I)) |
| 113 | |
| 114 | end PoincareMT.ParabolicRescaling |