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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.Ends.SourceTubeCriticalRegion |
| 3 | import PoincareLib.Geometry.Riemannian.Coordinates.Coefficients |
| 4 | |
| 5 | /-! |
| 6 | # The literal critical-region pullback coefficients |
| 7 | |
| 8 | Morgan--Tian Proposition 10.7, p. 253; M28 derivation 102. Apply the |
| 9 | manifold chain rule to both actual open inclusions. The only metric |
| 10 | factor is the original whole-slice normalization Q. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M28 |
| 23 | |
| 24 | variable {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 26 | [IsManifold (𝓡 3) ∞ M] |
| 27 | |
| 28 | /-- Coefficients on an open subtype are the actual inclusion pullback. -/ |
| 29 | theorem intrinsicOpenMetric_pullbackCoefficients (g : RiemannianMetric 3 M) |
| 30 | (U : TopologicalSpace.Opens M) |
| 31 | {f : EuclideanSpace ℝ (Fin 3) → U} {x : EuclideanSpace ℝ (Fin 3)} |
| 32 | (hf : MDifferentiableAt (𝓡 3) (𝓡 3) f x) : |
| 33 | (intrinsicOpenMetric g U).pullbackCoefficients f x = |
| 34 | g.pullbackCoefficients (Subtype.val ∘ f) x := by |
| 35 | have hi : MDifferentiableAt (𝓡 3) (𝓡 3) (Subtype.val : U → M) (f x) := |
| 36 | (contMDiff_subtype_val (I := 𝓡 3) (U := U) (n := 1)).mdifferentiable |
| 37 | one_ne_zero (f x) |
| 38 | ext v w |
| 39 | change g.inner (f x : M) |
| 40 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U → M) (f x) |
| 41 | (mfderiv (𝓡 3) (𝓡 3) f x v)) |
| 42 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U → M) (f x) |
| 43 | (mfderiv (𝓡 3) (𝓡 3) f x w)) = |
| 44 | g.inner (f x : M) |
| 45 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val ∘ f) x v) |
| 46 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val ∘ f) x w) |
| 47 | rw [mfderiv_comp x hi hf] |
| 48 | rfl |
| 49 | |
| 50 | namespace CounterexampleNeckFamily |
| 51 | |
| 52 | variable {epsilon C A : ℝ} |
| 53 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 54 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 55 | |
| 56 | /-- Two actual restrictions retain exactly one original normalization. -/ |
| 57 | theorem tubeCriticalMetric_pullbackCoefficients (H : CounterexampleNeckFamily E) |
| 58 | (T : ∀ k, SourceTubeData (H.segment k)) (Acrit : ℝ) (k : ℕ) |
| 59 | {f : EuclideanSpace ℝ (Fin 3) → H.tubeCriticalRegion T Acrit k} |
| 60 | {x : EuclideanSpace ℝ (Fin 3)} |
| 61 | (hf : MDifferentiableAt (𝓡 3) (𝓡 3) f x) : |
| 62 | (H.tubeCriticalMetric T Acrit k).pullbackCoefficients f x = |
| 63 | (E (k + H.shift)).flow.scalar |
| 64 | ⟨(E (k + H.shift)).time, (E (k + H.shift)).basepoint⟩ • |
| 65 | ((E (k + H.shift)).flow.metric (E (k + H.shift)).time).pullbackCoefficients |
| 66 | (fun y => (f y).val.val) x := by |
| 67 | have hi : MDifferentiableAt (𝓡 3) (𝓡 3) |
| 68 | (Subtype.val : H.tubeCriticalRegion T Acrit k → (T k).carrierOpen) (f x) := |
| 69 | (contMDiff_subtype_val (I := 𝓡 3) (U := H.tubeCriticalRegion T Acrit k) |
| 70 | (n := 1)).mdifferentiable one_ne_zero (f x) |
| 71 | change (intrinsicOpenMetric (H.tubeMetric T k) |
| 72 | (H.tubeCriticalRegion T Acrit k)).pullbackCoefficients f x = _ |
| 73 | rw [intrinsicOpenMetric_pullbackCoefficients _ _ hf] |
| 74 | change (intrinsicOpenMetric (H.normalizedSliceMetric k) |
| 75 | (T k).carrierOpen).pullbackCoefficients (Subtype.val ∘ f) x = _ |
| 76 | rw [intrinsicOpenMetric_pullbackCoefficients _ _ (hi.comp x hf)] |
| 77 | ext v w |
| 78 | rfl |
| 79 | |
| 80 | end CounterexampleNeckFamily |
| 81 | end PoincareMT.M28 |