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.ReducedGeometry.Exponential.Domain.JointInverse |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Domain.JointBranches |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Measure.Jacobian.MetricBases |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Measure.Transport.BasisCoordinateVolume |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.ExponentialTheory |
| 6 | |
| 7 | /-! |
| 8 | # The complete actual joint-map record |
| 9 | |
| 10 | The exact joint-domain endpoint map has an open image and a smooth |
| 11 | inverse expressed in a fixed horizontal basis and the actual backward |
| 12 | square clock. Its minimizing action branches and invertible spatial |
| 13 | differentials are retained. Morgan-Tian Proposition 6.28, p. 117. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff Bundle |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M14 |
| 24 | |
| 25 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 26 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 27 | {T : ℝ} {x : G.Point} |
| 28 | |
| 29 | private theorem horizontal_t2Space : T2Space (G.Horizontal x) := |
| 30 | FiberBundle.t2Space (EuclideanSpace ℝ (Fin n)) G.Horizontal x |
| 31 | |
| 32 | attribute [local instance] horizontal_t2Space |
| 33 | |
| 34 | /-- The frozen M14JointMapData record for every supplied exponential |
| 35 | family, including empty joint domains and physical endpoint images, |
| 36 | Proposition 6.28, p. 117. -/ |
| 37 | noncomputable def jointMapData (E : M14ExponentialFamily G T x) : M14JointMapData G T x E := by |
| 38 | let metric := G.spacetime.horizontalMetric.toRiemannianMetric |
| 39 | let : NormedAddCommGroup (G.Horizontal x) := |
| 40 | (metric.toCore x).toNormedAddCommGroupOfTopology |
| 41 | (metric.continuousAt x) (metric.isVonNBounded x) |
| 42 | let : InnerProductSpace ℝ (G.Horizontal x) := |
| 43 | .ofCoreOfTopology (metric.toCore x) (metric.continuousAt x) (metric.isVonNBounded x) |
| 44 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := ⟨metric⟩ |
| 45 | let b := (exists_orthonormal_horizontalBasis G x).choose |
| 46 | let D := range (fun z : M14JointDomain G E => E.gamma z.1.1 z.1.2) |
| 47 | have hsm : ContMDiffOn (spacetimeModel n) (𝓘(ℝ, G.Horizontal x × ℝ)) ∞ |
| 48 | (jointEndpointInverse E) D := jointEndpointInverse_smooth E |
| 49 | refine { |
| 50 | image := D |
| 51 | image_eq := rfl |
| 52 | injective := (jointMap_injective E).injOn |
| 53 | image_relative_open := ⟨D, jointMap_range_isOpen E, rfl⟩ |
| 54 | map_continuous := jointMap_continuous E |
| 55 | map_open := jointMap_isOpenMap E |
| 56 | inverse := jointEndpointInverse E |
| 57 | inverse_mem := fun _ hq => (jointEndpointInverse_spec E hq).1 |
| 58 | inverse_on_image := fun _ hq => (jointEndpointInverse_spec E hq).2 |
| 59 | inverse_left := jointEndpointInverse_left E |
| 60 | inverse_continuous := jointEndpointInverse_continuous E |
| 61 | coordinate_basis := b |
| 62 | inverse_vector_smooth := ?_ |
| 63 | inverse_time_smooth := ?_ |
| 64 | differential_bijective := ?_ |
| 65 | time_component := jointMap_clock E |
| 66 | action_branch := fun z => jointDomain_action_branch E z.property } |
| 67 | · let A : (G.Horizontal x × ℝ) →L[ℝ] EuclideanSpace ℝ (Fin n) := |
| 68 | b.euclideanCoordinates.symm.toContinuousLinearMap.comp (ContinuousLinearMap.fst ℝ _ ℝ) |
| 69 | exact A.contMDiff.comp_contMDiffOn hsm |
| 70 | · exact (ContinuousLinearMap.snd ℝ (G.Horizontal x) ℝ).contMDiff.comp_contMDiffOn hsm |
| 71 | · intro z |
| 72 | obtain ⟨H, hZ⟩ := jointDomain_stableSet E z.property |
| 73 | exact ⟨H, hZ, H.endpoint_differential_bijective z.1.1 hZ⟩ |
| 74 | |
| 75 | /-- The actual joint-map conclusion exists for every supplied family, |
| 76 | Proposition 6.28, p. 117. -/ |
| 77 | theorem jointMapData_nonempty (E : M14ExponentialFamily G T x) : |
| 78 | Nonempty (M14JointMapData G T x E) := ⟨jointMapData E⟩ |
| 79 | |
| 80 | end PoincareMT.M14 |