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.Exponential.SmoothFamilyRestart |
| 2 | |
| 3 | /-! |
| 4 | # Joint smoothness throughout the strict forward window |
| 5 | |
| 6 | At a limit of smooth times, an actual restart around the central phase |
| 7 | propagates a nearby smooth neighborhood to that time. Connectedness then |
| 8 | extends the constructed zero-time neighborhood across each compact segment. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option maxSynthPendingDepth 3 |
| 13 | set_option maxHeartbeats 800000 |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.ReducedLength |
| 20 | |
| 21 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 23 | [IsManifold (𝓡 n) ∞ M] [ConnectedSpace M] [T3Space M] [SecondCountableTopology M] |
| 24 | |
| 25 | local notation "V" => EuclideanSpace ℝ (Fin n) |
| 26 | local notation "Q" => ℝ × (V × V) |
| 27 | |
| 28 | set_option backward.isDefEq.respectTransparency false in |
| 29 | theorem univ_Ico_subset_normalizedSquareFamily_smoothFamilyDomain {J : Set ℝ} |
| 30 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 31 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 32 | (hcurvature : CompleteBoundedCurvatureOn F (Set.Icc (T - b) T)) (p0 : M) : |
| 33 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 34 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 35 | Set.univ ×ˢ Set.Ico 0 (Real.sqrt b) ⊆ smoothFamilyDomain (n := n) |
| 36 | (fun z ↦ normalizedSquareFamily F T b p0 z.1 z.2) := by |
| 37 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 38 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 39 | rintro ⟨Z0, S⟩ ⟨_, hS⟩ |
| 40 | let f : TangentSpace (𝓡 n) p0 × ℝ → M := |
| 41 | fun z ↦ normalizedSquareFamily F T b p0 z.1 z.2 |
| 42 | let B := {s : ℝ | (Z0, s) ∈ smoothFamilyDomain (n := n) f} |
| 43 | have hB : IsOpen B := (isOpen_smoothFamilyDomain (n := n) f).preimage |
| 44 | (continuous_const.prodMk continuous_id) |
| 45 | have h0 : (0 : ℝ) ∈ B := |
| 46 | normalizedSquareFamily_zero_mem_smoothFamilyDomain F hM04 T b hb hwindow p0 Z0 |
| 47 | have hclosed : closure B ∩ Set.Icc 0 S ⊆ B := by |
| 48 | rintro t ⟨htcl, htS⟩ |
| 49 | rcases eq_or_lt_of_le htS.1 with heq | htpos |
| 50 | · simpa only [← heq] using h0 |
| 51 | have htb : t < Real.sqrt b := htS.2.trans_lt hS.2 |
| 52 | let q0 : TangentBundle (𝓡 n) M := ⟨p0, (2 : ℝ) • Z0⟩ |
| 53 | let γ := normalizedSquareFamily F T b p0 Z0 |
| 54 | let D := maximalRegularizedDomain F T b 0 q0 |
| 55 | have hD : IsOpen D := isOpen_maximalRegularizedDomain F T b 0 q0 |
| 56 | have hγ : IsLocalRegularizedCurveOn F T γ D := |
| 57 | maximalRegularizedCurve_isLocal F hM04 T b hb hwindow 0 q0 |
| 58 | have htD : t ∈ D := |
| 59 | Ico_subset_maximalRegularizedDomain F hM04 T b hb hwindow hcurvature q0 ⟨htS.1, htb⟩ |
| 60 | let p := γ t |
| 61 | let phase := curvePhase (n := n) γ |
| 62 | let psi : ℝ → Q := fun r ↦ (r, tangentChartPhase p (phase r)) |
| 63 | have htime : t ∈ Set.Ioo (-Real.sqrt b) (Real.sqrt b) := |
| 64 | ⟨(neg_lt_zero.mpr (Real.sqrt_pos.mpr hb)).trans htpos, htb⟩ |
| 65 | obtain ⟨A⟩ := nonempty_localRegularizedRestartFamily F hM04 T b hb hwindow p (psi t) |
| 66 | ⟨htime, (chartAt V p).map_source (mem_chart_source V p)⟩ |
| 67 | let C := D ∩ γ ⁻¹' (chartAt V p).source |
| 68 | have hC : IsOpen C := |
| 69 | hγ.smooth.continuousOn.isOpen_inter_preimage hD (chartAt V p).open_source |
| 70 | have htC : t ∈ C := ⟨htD, mem_chart_source V p⟩ |
| 71 | have hphase : ContMDiffOn (𝓘(ℝ, ℝ)) ((𝓡 n).prod (𝓡 n)) ∞ phase C := |
| 72 | (curvePhase_contMDiffOn γ D hD hγ.smooth).mono Set.inter_subset_left |
| 73 | have hcoord : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓘(ℝ, V × V)) ∞ |
| 74 | (fun r ↦ tangentChartPhase p (phase r)) C := |
| 75 | (tangentChartPhase_contMDiffOn p).comp hphase (fun r hr ↦ hr.2) |
| 76 | have hpsi : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓘(ℝ, Q)) ∞ psi C := |
| 77 | (contMDiffOn_prod_module_iff psi).mpr ⟨contMDiffOn_id, hcoord⟩ |
| 78 | let N := (C ∩ psi ⁻¹' A.neighborhood) ∩ |
| 79 | (Set.Ioo (t - A.radius) (t + A.radius) ∩ Set.Ioo 0 (Real.sqrt b)) |
| 80 | have hN : IsOpen N := |
| 81 | (hpsi.continuousOn.isOpen_inter_preimage hC A.neighborhood_open).inter |
| 82 | (isOpen_Ioo.inter isOpen_Ioo) |
| 83 | have htN : t ∈ N := ⟨⟨htC, A.center_mem⟩, |
| 84 | ⟨by linarith [A.radius_pos], by linarith [A.radius_pos]⟩, htpos, htb⟩ |
| 85 | obtain ⟨r, hrN, hrB⟩ := mem_closure_iff.mp htcl N hN htN |
| 86 | have hrt : t ∈ Set.Ioo (r - A.radius) (r + A.radius) := by |
| 87 | constructor <;> linarith [hrN.2.1.1, hrN.2.1.2] |
| 88 | exact normalizedSquareFamily_mem_smoothFamilyDomain_of_restart F hM04 T b hb hwindow |
| 89 | hcurvature p0 p (psi t) A Z0 r t ⟨hrN.2.2.1.le, hrN.2.2.2⟩ htpos hrt |
| 90 | hrN.1.1.2 hrN.1.2 hrB |
| 91 | have hsub : Set.Icc 0 S ⊆ B := |
| 92 | isPreconnected_Icc.subset_of_closure_inter_subset hB ⟨0, ⟨le_rfl, hS.1⟩, h0⟩ hclosed |
| 93 | exact hsub ⟨hS.1, le_rfl⟩ |
| 94 | |
| 95 | end PoincareMT.ReducedLength |