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.Surgery.CanonicalInduction.Limit.Finite.LimitFiniteEndpointMetric |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Limit.Noncollapse.LimitNoncollapseFiniteHarnackDomain |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Curvature.NonnegativeRicciMetric |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.RawFlow.Completeness |
| 5 | |
| 6 | /-! |
| 7 | # Completeness at the included finite endpoint |
| 8 | |
| 9 | The actual old flow decreases its quadratic metric pairings. Local |
| 10 | right continuity transfers the complete zero-slice metric floor to |
| 11 | the metric constructed at the missing time. |
| 12 | MT Proposition 17.1; limit-finite-endpoint-metric.md, AJ3. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Filter Set |
| 19 | open scoped ENNReal Manifold ContDiff Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M47 |
| 24 | |
| 25 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 26 | |
| 27 | variable {S : GeneralizedBlowupSequence.{u}} {H : ℝ≥0∞} |
| 28 | (G : GeneralizedBlowupConvergence S (blowupBackwardInterval H)) |
| 29 | |
| 30 | private local instance finiteEndpointCompleteTopology : |
| 31 | TopologicalSpace G.limit.carrier.carrier := G.limit.carrier.topologicalSpace |
| 32 | private local instance finiteEndpointCompleteCharts : |
| 33 | ChartedSpace E G.limit.carrier.carrier := G.limit.carrier.chartedSpace |
| 34 | private local instance finiteEndpointCompleteManifold : |
| 35 | IsManifold (𝓡 3) ∞ G.limit.carrier.carrier := G.limit.carrier.isManifold |
| 36 | private local instance finiteEndpointCompleteT3 : |
| 37 | T3Space G.limit.carrier.carrier := G.limit.carrier.t3Space |
| 38 | |
| 39 | local notation "U" => (fun m : ℕ => TopologicalSpace.Opens.mk |
| 40 | (G.exhaustion.space m) (G.exhaustion.space_open m)) |
| 41 | |
| 42 | /-- The actual zero-slice metric is a floor for every included old slice. -/ |
| 43 | theorem limitFinite_original_metric_floor (h04 : RicciFlowCurvatureTheory.{u}) |
| 44 | (t : ℝ) (ht : t ∈ blowupBackwardInterval H) |
| 45 | (x : G.limit.sliceCarrier.carrier) (v : E) : |
| 46 | (G.limit.flow.metric 0).inner x v v ≤ (G.limit.flow.metric t).inner x v v := by |
| 47 | have hJ : Icc t 0 ⊆ blowupBackwardInterval H := |
| 48 | G.limit.flow.interval.out ht G.limit.zero_mem |
| 49 | have hanti := G.limit.flow.inner_self_antitoneOn_of_nonnegative_ricci |
| 50 | (convex_Icc t 0) hJ x v |
| 51 | (fun s hs => (limitFinite_ricci_bounds h04 G.limit s (hJ hs) x v).1) |
| 52 | exact hanti ⟨le_rfl, ht.1⟩ ⟨ht.1, le_rfl⟩ ht.1 |
| 53 | |
| 54 | /-- Actual local old-time readouts and right continuity give a complete |
| 55 | metric at the missing time on the unchanged limit carrier. -/ |
| 56 | theorem limitFinite_endpoint_complete (h04 : RicciFlowCurvatureTheory.{u}) |
| 57 | (hfinite : H ≠ ⊤) (d : ℕ → ℝ) (hd : ∀ m, 0 < d m) |
| 58 | (A : ∀ m, RicciFlow 3 (U m) (Ioo (-H.toReal - d m / 8) (-H.toReal + d m / 4))) |
| 59 | (gE : RiemannianMetric 3 G.limit.sliceCarrier.carrier) |
| 60 | (hendpoint : ∀ m (x : U m) (v w : E), |
| 61 | ((A m).metric (-H.toReal)).inner x v w = |
| 62 | gE.inner x.val |
| 63 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U m → G.limit.sliceCarrier.carrier) x v) |
| 64 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U m → G.limit.sliceCarrier.carrier) x w)) |
| 65 | (hold : ∀ m t, t ∈ Ioo (-H.toReal - d m / 8) (-H.toReal + d m / 4) → |
| 66 | t ∈ blowupBackwardInterval H → ∀ (x : U m) (v w : E), |
| 67 | ((A m).metric t).inner x v w = |
| 68 | (G.limit.flow.metric t).inner x.val |
| 69 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U m → G.limit.sliceCarrier.carrier) x v) |
| 70 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U m → G.limit.sliceCarrier.carrier) x w)) : |
| 71 | (∀ (x : G.limit.sliceCarrier.carrier) (v : E), |
| 72 | (G.limit.flow.metric 0).inner x v v ≤ gE.inner x v v) ∧ MetricComplete gE := by |
| 73 | have hH : 0 < H := by simpa using G.limit.zero_mem.2 |
| 74 | have hT := limitFinite_horizon_pos hH hfinite |
| 75 | have hquad (x : G.limit.sliceCarrier.carrier) (v : E) : |
| 76 | (G.limit.flow.metric 0).inner x v v ≤ gE.inner x v v := by |
| 77 | have hx : x ∈ ⋃ m, G.exhaustion.space m := by |
| 78 | rw [G.exhaustion.space_covers] |
| 79 | exact mem_univ x |
| 80 | obtain ⟨m, hm⟩ := mem_iUnion.mp hx |
| 81 | let y : U m := ⟨x, hm⟩ |
| 82 | have ht0 : -H.toReal ∈ Ioo (-H.toReal - d m / 8) (-H.toReal + d m / 4) := |
| 83 | ⟨by linarith [hd m], by linarith [hd m]⟩ |
| 84 | have hcont := ((A m).equation (-H.toReal) ht0 y v v).hasDerivAt |
| 85 | (isOpen_Ioo.mem_nhds ht0) |
| 86 | have hlim : Tendsto (fun t => ((A m).metric t).inner y v v) (𝓝[>] (-H.toReal)) |
| 87 | (𝓝 (((A m).metric (-H.toReal)).inner y v v)) := |
| 88 | hcont.continuousAt.mono_left nhdsWithin_le_nhds |
| 89 | have hbound : ∀ᶠ t in 𝓝[>] (-H.toReal), |
| 90 | (G.limit.flow.metric 0).inner x v v ≤ ((A m).metric t).inner y v v := by |
| 91 | filter_upwards [mem_nhdsWithin_of_mem_nhds (isOpen_Ioo.mem_nhds ht0), |
| 92 | mem_nhdsWithin_of_mem_nhds (Iio_mem_nhds (neg_lt_zero.mpr hT)), |
| 93 | self_mem_nhdsWithin] with t htJ htneg htright |
| 94 | have htold : t ∈ blowupBackwardInterval H := by |
| 95 | rw [limitFinite_domain_eq hfinite] |
| 96 | exact ⟨htright, htneg.le⟩ |
| 97 | have hread := hold m t htJ htold y v v |
| 98 | simp only [Poincare.Geometry.Manifold.RegularLevel.mfderiv_opens_subtypeVal_apply] |
| 99 | at hread |
| 100 | rw [hread] |
| 101 | exact limitFinite_original_metric_floor G h04 t htold x v |
| 102 | have h := ge_of_tendsto hlim hbound |
| 103 | have hread := hendpoint m y v v |
| 104 | simp only [Poincare.Geometry.Manifold.RegularLevel.mfderiv_opens_subtypeVal_apply] |
| 105 | at hread |
| 106 | exact h.trans_eq hread |
| 107 | refine ⟨hquad, RiemannianMetric.metricComplete_of_tangentNorm_le |
| 108 | (G.limit.flow.metric 0) gE (G.limit.complete 0 G.limit.zero_mem) |
| 109 | (C := 1) zero_lt_one ?_⟩ |
| 110 | intro x v |
| 111 | change Real.sqrt ((G.limit.flow.metric 0).inner x v v) ≤ |
| 112 | 1 * Real.sqrt (gE.inner x v v) |
| 113 | simpa only [one_mul] using Real.sqrt_le_sqrt (hquad x v) |
| 114 | |
| 115 | end PoincareMT.M47 |