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.Existence.Asymptotics.EndCylinderMetric |
| 2 | |
| 3 | /-! |
| 4 | # The auxiliary metric is the literal cylinder on the original end |
| 5 | |
| 6 | Differentiating the actual height identity above height two identifies |
| 7 | the height covector on the genuine end-coordinate differential. The |
| 8 | frozen initial pullback then gives the exact time-dependent cylinder. |
| 9 | This is Proposition 12.7, pp. 298-299 and canonical-cylinder-model.md. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | namespace PoincareMT.M34 |
| 19 | |
| 20 | variable {g : RiemannianMetric 3 StandardCapSpace} |
| 21 | |
| 22 | /-- The actual height differential reads the axial component through the |
| 23 | actual supplied cylinder-coordinate derivative |
| 24 | (Proposition 12.7, pp. 298-299). -/ |
| 25 | theorem endExhaustion_fderiv_coordinate (e : StandardCylindricalEnd g) |
| 26 | {z : StandardCylinderSpace} (hz : 2 < z.2) |
| 27 | (v : TangentSpace ((𝓡 2).prod 𝓘(ℝ, ℝ)) z) : |
| 28 | fderiv ℝ (endExhaustion e) (e.coordinate z) |
| 29 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) e.coordinate z v) = v.2 := by |
| 30 | have heq : endExhaustion e ∘ e.coordinate =ᶠ[𝓝 z] |
| 31 | (fun w : StandardCylinderSpace => w.2 + 1) := by |
| 32 | filter_upwards [(isOpen_univ.prod isOpen_Ioi).mem_nhds |
| 33 | (show z ∈ univ ×ˢ Ioi (2 : ℝ) from ⟨mem_univ _, hz⟩)] with w hw |
| 34 | dsimp only [Function.comp_apply] |
| 35 | rw [endExhaustion_coordinate_of_two_le e hw.2.le, add_comm] |
| 36 | have hc := (end_coordinate_contMDiffAt e (by linarith : 0 < z.2)).mdifferentiableAt |
| 37 | (by simp) |
| 38 | have hr := (endExhaustion_contMDiff e (e.coordinate z)).mdifferentiableAt (by simp) |
| 39 | have hd := heq.mfderiv_eq (I := (𝓡 2).prod 𝓘(ℝ, ℝ)) (I' := 𝓘(ℝ, ℝ)) |
| 40 | rw [mfderiv_comp _ hr hc, mfderiv_eq_fderiv] at hd |
| 41 | have hs : mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) 𝓘(ℝ, ℝ) |
| 42 | (fun w : StandardCylinderSpace => w.2 + 1) z = |
| 43 | ContinuousLinearMap.snd ℝ (EuclideanSpace ℝ (Fin 2)) ℝ := by |
| 44 | change mvfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) |
| 45 | (fun w : StandardCylinderSpace => w.2 + 1) z = _ |
| 46 | rw [mvfderiv_fun_add mdifferentiableAt_snd mdifferentiableAt_const, |
| 47 | mvfderiv_const, add_zero] |
| 48 | exact mfderiv_snd |
| 49 | rw [hs] at hd |
| 50 | exact congrArg (fun L => L v) hd |
| 51 | |
| 52 | /-- The ambient coefficients pull back to the exact frozen cylinder |
| 53 | formula at every real parameter, on heights strictly above two |
| 54 | (Proposition 12.7, pp. 298-299). -/ |
| 55 | theorem endCylinderCoefficients_coordinate (e : StandardCylindricalEnd g) (s : ℝ) |
| 56 | {z : StandardCylinderSpace} (hz : 2 < z.2) |
| 57 | (v w : TangentSpace ((𝓡 2).prod 𝓘(ℝ, ℝ)) z) : |
| 58 | endCylinderCoefficients e s (e.coordinate z) |
| 59 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) e.coordinate z v) |
| 60 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) e.coordinate z w) = |
| 61 | standardCylinderInner s z v w := by |
| 62 | rw [endCylinderCoefficients_apply, e.metric_pullback z (by linarith), |
| 63 | endExhaustion_fderiv_coordinate e hz, endExhaustion_fderiv_coordinate e hz] |
| 64 | simp only [standardCylinderInner] |
| 65 | ring |
| 66 | |
| 67 | /-- Each genuine auxiliary metric is exactly the cylinder at its total |
| 68 | positive parameter when pulled back by the supplied end coordinates |
| 69 | (Proposition 12.7, pp. 298-299). -/ |
| 70 | theorem endCylinderAuxMetric_coordinate (e : StandardCylindricalEnd g) (t : ℝ) |
| 71 | {z : StandardCylinderSpace} (hz : 2 < z.2) |
| 72 | (v w : TangentSpace ((𝓡 2).prod 𝓘(ℝ, ℝ)) z) : |
| 73 | (endCylinderAuxMetric e t).inner (e.coordinate z) |
| 74 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) e.coordinate z v) |
| 75 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) e.coordinate z w) = |
| 76 | standardCylinderInner (endCylinderParameter t) z v w := |
| 77 | endCylinderCoefficients_coordinate e (endCylinderParameter t) hz v w |
| 78 | |
| 79 | end PoincareMT.M34 |