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.ODE.RegularizedIntervalSolution |
| 2 | import Mathlib.Topology.Order.IntermediateValue |
| 3 | |
| 4 | /-! |
| 5 | # The coherent maximal regularized curve |
| 6 | |
| 7 | Local uniqueness makes all interval solutions with one initial tangent phase |
| 8 | compatible. Their union carries a smooth curve, maximal inside the given |
| 9 | strict square-time window. Full-window continuation is a separate argument. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle Topology |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedLength |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 22 | [IsManifold (𝓡 n) ∞ M] |
| 23 | |
| 24 | def maximalRegularizedDomain {J : Set ℝ} (F : RicciFlow n M J) |
| 25 | (T b s0 : ℝ) (q0 : TangentBundle (𝓡 n) M) : Set ℝ := |
| 26 | ⋃ A : RegularizedIntervalSolution F T b s0 q0, A.domain |
| 27 | |
| 28 | noncomputable def maximalRegularizedCurve {J : Set ℝ} (F : RicciFlow n M J) |
| 29 | (T b s0 : ℝ) (q0 : TangentBundle (𝓡 n) M) (s : ℝ) : M := by |
| 30 | classical |
| 31 | exact if hs : s ∈ maximalRegularizedDomain F T b s0 q0 then |
| 32 | (Classical.choose (Set.mem_iUnion.mp hs)).curve s else q0.proj |
| 33 | |
| 34 | theorem isOpen_maximalRegularizedDomain {J : Set ℝ} (F : RicciFlow n M J) |
| 35 | (T b s0 : ℝ) (q0 : TangentBundle (𝓡 n) M) : |
| 36 | IsOpen (maximalRegularizedDomain F T b s0 q0) := |
| 37 | isOpen_iUnion (fun A ↦ A.open_domain) |
| 38 | |
| 39 | theorem isPreconnected_maximalRegularizedDomain {J : Set ℝ} (F : RicciFlow n M J) |
| 40 | (T b s0 : ℝ) (q0 : TangentBundle (𝓡 n) M) : |
| 41 | IsPreconnected (maximalRegularizedDomain F T b s0 q0) := |
| 42 | isPreconnected_iUnion ⟨s0, Set.mem_iInter.mpr (fun A ↦ A.initial_mem)⟩ |
| 43 | (fun A ↦ A.preconnected_domain) |
| 44 | |
| 45 | theorem maximalRegularizedDomain_subset {J : Set ℝ} (F : RicciFlow n M J) |
| 46 | (T b s0 : ℝ) (q0 : TangentBundle (𝓡 n) M) : |
| 47 | maximalRegularizedDomain F T b s0 q0 ⊆ Set.Ioo (-Real.sqrt b) (Real.sqrt b) := by |
| 48 | intro s hs |
| 49 | obtain ⟨A, hsA⟩ := Set.mem_iUnion.mp hs |
| 50 | exact A.time_mem hsA |
| 51 | |
| 52 | theorem RegularizedIntervalSolution.domain_subset_maximal {J : Set ℝ} |
| 53 | {F : RicciFlow n M J} {T b s0 : ℝ} {q0 : TangentBundle (𝓡 n) M} |
| 54 | (A : RegularizedIntervalSolution F T b s0 q0) : |
| 55 | A.domain ⊆ maximalRegularizedDomain F T b s0 q0 := |
| 56 | fun _ hs ↦ Set.mem_iUnion.mpr ⟨A, hs⟩ |
| 57 | |
| 58 | theorem RegularizedIntervalSolution.phase_eqOn {J : Set ℝ} [T2Space M] |
| 59 | {F : RicciFlow n M J} {T b s0 : ℝ} {q0 : TangentBundle (𝓡 n) M} |
| 60 | (A B : RegularizedIntervalSolution F T b s0 q0) |
| 61 | (hM04 : RicciFlowCurvatureTheory.{u}) (hb : 0 < b) |
| 62 | (hwindow : Set.Icc (T - b) T ⊆ J) : |
| 63 | Set.EqOn (curvePhase (n := n) A.curve) (curvePhase (n := n) B.curve) |
| 64 | (A.domain ∩ B.domain) := by |
| 65 | exact localRegularizedCurve_phase_eqOn F hM04 T b hb hwindow A.curve B.curve |
| 66 | (A.domain ∩ B.domain) (A.open_domain.inter B.open_domain) |
| 67 | (A.preconnected_domain.ordConnected.inter B.preconnected_domain.ordConnected).isPreconnected |
| 68 | (fun _ hs ↦ A.time_mem hs.1) (A.isLocal.mono Set.inter_subset_left) |
| 69 | (B.isLocal.mono Set.inter_subset_right) s0 ⟨A.initial_mem, B.initial_mem⟩ |
| 70 | (A.initial_phase.trans B.initial_phase.symm) |
| 71 | |
| 72 | theorem maximalRegularizedCurve_eqOn {J : Set ℝ} [T2Space M] |
| 73 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 74 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 75 | (s0 : ℝ) (q0 : TangentBundle (𝓡 n) M) |
| 76 | (A : RegularizedIntervalSolution F T b s0 q0) : |
| 77 | Set.EqOn (maximalRegularizedCurve F T b s0 q0) A.curve A.domain := by |
| 78 | intro s hs |
| 79 | have hsD := A.domain_subset_maximal hs |
| 80 | let B := Classical.choose (Set.mem_iUnion.mp hsD) |
| 81 | have hsB : s ∈ B.domain := Classical.choose_spec (Set.mem_iUnion.mp hsD) |
| 82 | have hp := B.phase_eqOn A hM04 hb hwindow ⟨hsB, hs⟩ |
| 83 | unfold maximalRegularizedCurve |
| 84 | rw [dif_pos hsD] |
| 85 | exact congrArg Bundle.TotalSpace.proj hp |
| 86 | |
| 87 | theorem maximalRegularizedCurve_eventuallyEq {J : Set ℝ} [T2Space M] |
| 88 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 89 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 90 | (s0 : ℝ) (q0 : TangentBundle (𝓡 n) M) |
| 91 | (A : RegularizedIntervalSolution F T b s0 q0) (s : ℝ) (hs : s ∈ A.domain) : |
| 92 | maximalRegularizedCurve F T b s0 q0 =ᶠ[𝓝 s] A.curve := by |
| 93 | filter_upwards [A.open_domain.mem_nhds hs] with t ht |
| 94 | exact maximalRegularizedCurve_eqOn F hM04 T b hb hwindow s0 q0 A ht |
| 95 | |
| 96 | theorem maximalRegularizedCurve_isLocal {J : Set ℝ} [T2Space M] |
| 97 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 98 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 99 | (s0 : ℝ) (q0 : TangentBundle (𝓡 n) M) : |
| 100 | IsLocalRegularizedCurveOn F T (maximalRegularizedCurve F T b s0 q0) |
| 101 | (maximalRegularizedDomain F T b s0 q0) := by |
| 102 | apply IsLocalRegularizedCurveOn.of_locally |
| 103 | intro s hs |
| 104 | obtain ⟨A, hsA⟩ := Set.mem_iUnion.mp hs |
| 105 | exact ⟨A.curve, A.domain, A.open_domain, hsA, A.isLocal, |
| 106 | maximalRegularizedCurve_eventuallyEq F hM04 T b hb hwindow s0 q0 A s hsA⟩ |
| 107 | |
| 108 | noncomputable def maximalRegularizedSolution {J : Set ℝ} [T2Space M] |
| 109 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 110 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 111 | (s0 : ℝ) (hs0 : s0 ∈ Set.Ioo (-Real.sqrt b) (Real.sqrt b)) |
| 112 | (q0 : TangentBundle (𝓡 n) M) : RegularizedIntervalSolution F T b s0 q0 where |
| 113 | domain := maximalRegularizedDomain F T b s0 q0 |
| 114 | open_domain := isOpen_maximalRegularizedDomain F T b s0 q0 |
| 115 | preconnected_domain := isPreconnected_maximalRegularizedDomain F T b s0 q0 |
| 116 | initial_mem := by |
| 117 | obtain ⟨A⟩ := nonempty_regularizedIntervalSolution F hM04 T b hb hwindow s0 hs0 q0 |
| 118 | exact A.domain_subset_maximal A.initial_mem |
| 119 | time_mem := maximalRegularizedDomain_subset F T b s0 q0 |
| 120 | curve := maximalRegularizedCurve F T b s0 q0 |
| 121 | isLocal := maximalRegularizedCurve_isLocal F hM04 T b hb hwindow s0 q0 |
| 122 | initial_phase := by |
| 123 | obtain ⟨A⟩ := nonempty_regularizedIntervalSolution F hM04 T b hb hwindow s0 hs0 q0 |
| 124 | exact (curvePhase_eventuallyEq (maximalRegularizedCurve_eventuallyEq F hM04 T b hb |
| 125 | hwindow s0 q0 A s0 A.initial_mem)).eq_of_nhds.trans A.initial_phase |
| 126 | |
| 127 | end PoincareMT.ReducedLength |