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.ReducedGeometry.ReducedLength.Geometry.MinimizingStability |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Exponential.ExponentialLocalInverse |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Geometry.UniqueMinimizingVectors |
| 4 | |
| 5 | /-! |
| 6 | # Openness of the canonical minimizing regular domain |
| 7 | |
| 8 | Compact minimizing stability puts all nearby minimizers in one actual |
| 9 | inverse chart. Injectivity there proves unique minimality of every |
| 10 | nearby nonconjugate family member. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option maxSynthPendingDepth 3 |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.ReducedLength |
| 21 | |
| 22 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 24 | [IsManifold (𝓡 n) ∞ M] [ConnectedSpace M] [T3Space M] [SecondCountableTopology M] |
| 25 | |
| 26 | theorem lExponentialFamily_regularDomain_isOpen {J : Set ℝ} |
| 27 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 28 | (T τmax : ℝ) (hτmax : 0 < τmax) (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 29 | (hcurvature : CompleteBoundedCurvatureOn F (Set.Icc (T - τmax) T)) |
| 30 | (hL : LGeodesicTheory F T τmax) (p : M) (A : LExponentialFamily F T τmax p) : |
| 31 | IsOpen A.regularDomain := by |
| 32 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 33 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 34 | let Φ : TangentSpace (𝓡 n) p × ℝ → M × ℝ := fun z ↦ (A.gamma z.1 z.2, z.2) |
| 35 | have hΦ : ContinuousOn Φ (Set.univ ×ˢ Set.Ioo 0 τmax) := |
| 36 | A.gamma_smooth.continuousOn.prodMk continuous_snd.continuousOn |
| 37 | apply isOpen_iff_mem_nhds.mpr |
| 38 | intro z hz |
| 39 | have hu := hz.1 |
| 40 | have hb := hz.2 |
| 41 | have ht : 0 < z.2 := by obtain ⟨ht, _, _⟩ := hu; exact ht |
| 42 | have hm : z.2 < τmax := by obtain ⟨_, hm, _⟩ := hu; exact hm |
| 43 | obtain ⟨e, hze, hsub, he, _, hderiv⟩ := lExponentialFamily_exists_local_inverse A z ht hm hb |
| 44 | obtain ⟨N, hN, hzN, _, hstable⟩ := lExponentialFamily_minimizing_stability F hM04 T τmax |
| 45 | hτmax hwindow hcurvature hL p A z.1 z.2 hu e.source e.open_source hze |
| 46 | let V := e.source ∩ Φ ⁻¹' N |
| 47 | have hV : IsOpen V := (hΦ.mono hsub).isOpen_inter_preimage e.open_source hN |
| 48 | have hzV : z ∈ V := ⟨hze, hzN⟩ |
| 49 | apply Filter.mem_of_superset (hV.mem_nhds hzV) |
| 50 | intro w hw |
| 51 | have hwt := (hsub hw.1).2 |
| 52 | have hvec (Y : TangentSpace (𝓡 n) p) (hend : A.gamma Y w.2 = A.gamma w.1 w.2) |
| 53 | (hmin : IsMinimizingBackwardLPath F T 0 w.2 (A.path Y w.2 hwt.1 hwt.2)) : Y = w.1 := by |
| 54 | have hYN : (A.gamma Y w.2, w.2) ∈ N := by rw [hend]; exact hw.2 |
| 55 | have hYe : (Y, w.2) ∈ e.source := hstable Y w.2 hwt.1 hwt.2 hYN hmin |
| 56 | have heq : e (Y, w.2) = e w := by |
| 57 | rw [he hYe, he hw.1] |
| 58 | exact Prod.ext hend rfl |
| 59 | exact congrArg Prod.fst (e.injOn hYe hw.1 heq) |
| 60 | obtain ⟨Y, hend, hYmin⟩ := lExponentialFamily_exists_minimizing_initialVector hM04 hL |
| 61 | hτmax hwindow A w.2 hwt.1 hwt.2 (A.gamma w.1 w.2) |
| 62 | have hmin : IsMinimizingBackwardLPath F T 0 w.2 (A.path w.1 w.2 hwt.1 hwt.2) := by |
| 63 | simpa only [hvec Y hend hYmin] using hYmin |
| 64 | exact ⟨(lExponentialFamily_uniqueMinimizing_iff hM04 hL hτmax hwindow A w.1 w.2 |
| 65 | hwt.1 hwt.2).mpr ⟨hmin, hvec⟩, hderiv w hw.1⟩ |
| 66 | |
| 67 | theorem lExponentialFamily_regularDomain_eq_local {J : Set ℝ} |
| 68 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 69 | (T τmax : ℝ) (hτmax : 0 < τmax) (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 70 | (hcurvature : CompleteBoundedCurvatureOn F (Set.Icc (T - τmax) T)) |
| 71 | (hL : LGeodesicTheory F T τmax) (p : M) (A : LExponentialFamily F T τmax p) : |
| 72 | A.regularDomain = A.localRegularDomain := by |
| 73 | have hopen := lExponentialFamily_regularDomain_isOpen F hM04 T τmax hτmax hwindow |
| 74 | hcurvature hL p A |
| 75 | ext z |
| 76 | constructor |
| 77 | · intro hz |
| 78 | obtain ⟨ht, hm, _⟩ := hz.1 |
| 79 | refine ⟨ht, hm, hz.2, (fun W : TangentSpace (𝓡 n) p ↦ (W, z.2)) ⁻¹' A.regularDomain, |
| 80 | hopen.preimage (continuous_id.prodMk continuous_const), hz, ?_⟩ |
| 81 | intro W hW |
| 82 | exact hW.1 |
| 83 | · rintro ⟨_, _, hb, N, _, hzN, hN⟩ |
| 84 | exact ⟨hN z.1 hzN, hb⟩ |
| 85 | |
| 86 | end PoincareMT.ReducedLength |