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.Variation.Adapted.AdaptedFieldUniqueness |
| 2 | import Mathlib.Topology.Order.IntermediateValue |
| 3 | |
| 4 | /-! |
| 5 | # Interval solutions of adapted transport |
| 6 | |
| 7 | The initial vector lies in the actual fiber of one fixed curve. |
| 8 | Local existence provides the interval; uniqueness gives compatibility. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped Manifold ContDiff Bundle Topology |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT.ReducedLength |
| 18 | |
| 19 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 21 | [IsManifold (𝓡 n) ∞ M] |
| 22 | |
| 23 | structure AdaptedIntervalSolution {J : Set ℝ} (F : RicciFlow n M J) |
| 24 | (T : ℝ) (γ : ℝ → M) (U : Set ℝ) (s0 : ℝ) (v0 : TangentSpace (𝓡 n) (γ s0)) where |
| 25 | domain : Set ℝ |
| 26 | open_domain : IsOpen domain |
| 27 | preconnected_domain : IsPreconnected domain |
| 28 | initial_mem : s0 ∈ domain |
| 29 | domain_subset : domain ⊆ U |
| 30 | field : ∀ t, TangentSpace (𝓡 n) (γ t) |
| 31 | adapted : IsAdaptedFieldOn F T γ field domain |
| 32 | initial_value : field s0 = v0 |
| 33 | |
| 34 | theorem nonempty_adaptedIntervalSolution {J : Set ℝ} (F : RicciFlow n M J) |
| 35 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 36 | (γ : ℝ → M) (U : Set ℝ) (hU : IsOpen U) |
| 37 | (htime : U ⊆ Set.Ioo (-Real.sqrt b) (Real.sqrt b)) |
| 38 | (hγ : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) ∞ γ U) |
| 39 | (s0 : ℝ) (hs0 : s0 ∈ U) (v0 : TangentSpace (𝓡 n) (γ s0)) : |
| 40 | Nonempty (AdaptedIntervalSolution F T γ U s0 v0) := by |
| 41 | obtain ⟨W, d, _, hsW, _, hd, hsolve⟩ := |
| 42 | exists_uniform_local_isAdaptedFieldOn F T b hb hwindow γ U hU htime hγ s0 hs0 |
| 43 | obtain ⟨P, hPU, hP0, hP⟩ := hsolve s0 hsW v0 |
| 44 | exact ⟨{ |
| 45 | domain := Set.Ioo (s0 - d) (s0 + d) |
| 46 | open_domain := isOpen_Ioo |
| 47 | preconnected_domain := isPreconnected_Ioo |
| 48 | initial_mem := ⟨by linarith, by linarith⟩ |
| 49 | domain_subset := hPU |
| 50 | field := P |
| 51 | adapted := hP |
| 52 | initial_value := hP0 |
| 53 | }⟩ |
| 54 | |
| 55 | theorem AdaptedIntervalSolution.eqOn {J : Set ℝ} [T2Space M] {F : RicciFlow n M J} |
| 56 | {T : ℝ} {γ : ℝ → M} {U : Set ℝ} {s0 : ℝ} {v0 : TangentSpace (𝓡 n) (γ s0)} |
| 57 | (A B : AdaptedIntervalSolution F T γ U s0 v0) |
| 58 | (b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 59 | (htime : U ⊆ Set.Ioo (-Real.sqrt b) (Real.sqrt b)) |
| 60 | (hγ : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) ∞ γ U) : |
| 61 | ∀ t ∈ A.domain ∩ B.domain, A.field t = B.field t := by |
| 62 | exact adaptedField_eqOn F T b hb hwindow γ A.field B.field (A.domain ∩ B.domain) |
| 63 | (A.open_domain.inter B.open_domain) |
| 64 | (A.preconnected_domain.ordConnected.inter B.preconnected_domain.ordConnected).isPreconnected |
| 65 | (fun _ ht ↦ htime (A.domain_subset ht.1)) |
| 66 | (hγ.mono (fun _ ht ↦ A.domain_subset ht.1)) |
| 67 | (A.adapted.mono Set.inter_subset_left) (B.adapted.mono Set.inter_subset_right) |
| 68 | s0 ⟨A.initial_mem, B.initial_mem⟩ (A.initial_value.trans B.initial_value.symm) |
| 69 | |
| 70 | end PoincareMT.ReducedLength |