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.OpenGeometry.OpenNeckRestriction |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Tensor.TensorTrace |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Formulas.ScalarEvolutionTransportRicci |
| 5 | import PoincareLib.Geometry.Riemannian.ScalarOperators.Divergence.Pullback |
| 6 | |
| 7 | /-! |
| 8 | # Exact cap curvature fields on the open ambient subtype |
| 9 | |
| 10 | The restricted metric is the literal inclusion pullback. Scalar suprema |
| 11 | and the frozen scalar-gradient norm are transported by equality of their |
| 12 | entire value ranges. Lower local-isometry identities give the Ricci norm |
| 13 | and scalar Laplacian. These exact identities retain every original strict |
| 14 | cap bound in the relative A.8 construction. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Bundle Topology |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M28 |
| 26 | |
| 27 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 28 | normedSpaceTangentSpaceVectorSpace |
| 29 | |
| 30 | variable {M : Type u} [TopologicalSpace M] |
| 31 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 32 | [IsManifold (𝓡 3) ∞ M] |
| 33 | |
| 34 | private theorem scalar_smooth {g : RiemannianMetric 3 M} (D : LeviCivitaData g) : |
| 35 | ContMDiff (𝓡 3) 𝓘(ℝ, ℝ) ∞ D.scalarCurvature := |
| 36 | Proofs.M09.tensorMetricTrace_smooth g D.ricciEvaluation |
| 37 | D.normalization_curvatureTensorCalculus.2.1 |
| 38 | |
| 39 | /-- The actual scalar value range is preserved on a carrier contained |
| 40 | in the open region, so its frozen supremum is unchanged. -/ |
| 41 | theorem intrinsicOpenMetric_scalarCurvatureSupOn (g : RiemannianMetric 3 M) |
| 42 | (V : TopologicalSpace.Opens M) (DV : LeviCivitaData (intrinsicOpenMetric g V)) |
| 43 | (D : LeviCivitaData g) {S : Set M} (hSV : S ⊆ (V : Set M)) : |
| 44 | scalarCurvatureSupOn (intrinsicOpenMetric g V) DV |
| 45 | ((Subtype.val : V → M) ⁻¹' S) = scalarCurvatureSupOn g D S := by |
| 46 | unfold scalarCurvatureSupOn |
| 47 | apply congrArg sSup |
| 48 | ext a |
| 49 | constructor |
| 50 | · rintro ⟨x, rfl⟩ |
| 51 | exact ⟨⟨(x : V), x.property⟩, |
| 52 | (intrinsicOpenMetric_scalarCurvature g V DV D x).symm⟩ |
| 53 | · rintro ⟨x, rfl⟩ |
| 54 | exact ⟨⟨⟨(x : M), hSV x.property⟩, x.property⟩, |
| 55 | intrinsicOpenMetric_scalarCurvature g V DV D _⟩ |
| 56 | |
| 57 | /-- The literal directional-derivative supremum in Definition 9.72 is |
| 58 | unchanged: the inclusion derivative bijects the two metric unit spheres. -/ |
| 59 | theorem intrinsicOpenMetric_scalarGradientNorm (g : RiemannianMetric 3 M) |
| 60 | (V : TopologicalSpace.Opens M) (DV : LeviCivitaData (intrinsicOpenMetric g V)) |
| 61 | (D : LeviCivitaData g) (x : V) : |
| 62 | scalarGradientNorm (intrinsicOpenMetric g V) DV x = |
| 63 | scalarGradientNorm g D (x : M) := by |
| 64 | let L : TangentSpace (𝓡 3) x ≃L[ℝ] TangentSpace (𝓡 3) (x : M) := |
| 65 | (openSubtype_isLocalDiffeomorph V).mfderivToContinuousLinearEquiv (by simp) x |
| 66 | have hscalar : DV.scalarCurvature = D.scalarCurvature ∘ (Subtype.val : V → M) := by |
| 67 | funext y |
| 68 | exact intrinsicOpenMetric_scalarCurvature g V DV D y |
| 69 | have hchain (v : TangentSpace (𝓡 3) x) : |
| 70 | mvfderiv (𝓡 3) DV.scalarCurvature x v = |
| 71 | mvfderiv (𝓡 3) D.scalarCurvature (x : M) (L v) := by |
| 72 | rw [hscalar, mvfderiv_comp x |
| 73 | ((scalar_smooth D).mdifferentiable (by simp) (x : M)) |
| 74 | ((openSubtype_isLocalDiffeomorph V).contMDiff.mdifferentiable (by simp) x)] |
| 75 | rfl |
| 76 | unfold scalarGradientNorm |
| 77 | apply congrArg sSup |
| 78 | ext a |
| 79 | constructor |
| 80 | · rintro ⟨v, rfl⟩ |
| 81 | refine ⟨⟨L v, v.property⟩, ?_⟩ |
| 82 | exact congrArg abs (hchain v).symm |
| 83 | · rintro ⟨v, rfl⟩ |
| 84 | have hunit : (intrinsicOpenMetric g V).inner x (L.symm v) (L.symm v) = 1 := by |
| 85 | change g.inner (x : M) (L (L.symm v)) (L (L.symm v)) = 1 |
| 86 | simpa only [L.apply_symm_apply] using v.property |
| 87 | refine ⟨⟨L.symm v, hunit⟩, ?_⟩ |
| 88 | change |mvfderiv (𝓡 3) DV.scalarCurvature x (L.symm v)| = |
| 89 | |mvfderiv (𝓡 3) D.scalarCurvature (x : M) v| |
| 90 | rw [hchain, L.apply_symm_apply] |
| 91 | |
| 92 | /-- The full actual Ricci squared contraction is invariant under open |
| 93 | restriction with any genuine compatible source and target connections. -/ |
| 94 | theorem intrinsicOpenMetric_ricciNormSq (g : RiemannianMetric 3 M) |
| 95 | (V : TopologicalSpace.Opens M) (DV : LeviCivitaData (intrinsicOpenMetric g V)) |
| 96 | (D : LeviCivitaData g) (x : V) : DV.ricciNormSq x = D.ricciNormSq (x : M) := by |
| 97 | exact M14.ricciNormSq_eq_of_local_isometry DV D isOpen_univ |
| 98 | (contMDiff_subtype_val (I := 𝓡 3) (U := V)).contMDiffOn |
| 99 | (fun _ _ _ _ => rfl) (mem_univ x) |
| 100 | |
| 101 | /-- The scalar Laplacian is transported from the same actual metric |
| 102 | pullback and the derived scalar-function identity. -/ |
| 103 | theorem intrinsicOpenMetric_scalarLaplacian (g : RiemannianMetric 3 M) |
| 104 | (V : TopologicalSpace.Opens M) (DV : LeviCivitaData (intrinsicOpenMetric g V)) |
| 105 | (D : LeviCivitaData g) (x : V) : |
| 106 | DV.laplacian DV.scalarCurvature x = D.laplacian D.scalarCurvature (x : M) := by |
| 107 | have hscalar : DV.scalarCurvature = D.scalarCurvature ∘ (Subtype.val : V → M) := by |
| 108 | funext y |
| 109 | exact intrinsicOpenMetric_scalarCurvature g V DV D y |
| 110 | have hinv (y : V) : |
| 111 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : V → M) y).IsInvertible := by |
| 112 | rw [← (openSubtype_isLocalDiffeomorph V).mfderivToContinuousLinearEquiv_coe |
| 113 | (by simp) y] |
| 114 | exact ContinuousLinearMap.isInvertible_equiv |
| 115 | rw [hscalar] |
| 116 | exact DV.laplacian_comp_of_metric_pullback D |
| 117 | ((openSubtype_isLocalDiffeomorph V).contMDiff x) |
| 118 | (Eventually.of_forall hinv) (Eventually.of_forall (fun _ _ _ => rfl)) |
| 119 | (scalar_smooth D (x : M)) |
| 120 | |
| 121 | end PoincareMT.M28 |