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.StandardCap.Persistence.Limit.Retained.RetainedBilinearLimit |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Limit.Coordinates.RicciTimeGluing |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Collar.Coordinates.ClosedTimeJets |
| 4 | |
| 5 | /-! |
| 6 | # Actual spatial jets across a retained surgery time |
| 7 | |
| 8 | The preterminal and future ordinary metrics, joined using the actual |
| 9 | retention map, have continuous spatial jets of every order. The value |
| 10 | at surgery is the actual post-surgery metric, not a chosen extension. |
| 11 | Morgan--Tian, Proposition 16.5, pp. 374-375; see M44 derivation 51. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M44 |
| 23 | |
| 24 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 25 | local notation "Bilin" => E →L[ℝ] E →L[ℝ] ℝ |
| 26 | |
| 27 | noncomputable local instance retainedTimeBilinearNorm : NormedAddCommGroup Bilin := |
| 28 | ContinuousLinearMap.toNormedAddCommGroup |
| 29 | |
| 30 | noncomputable local instance retainedTimeBilinearSpace : NormedSpace ℝ Bilin := |
| 31 | ContinuousLinearMap.toNormedSpace |
| 32 | |
| 33 | variable {g0 : StandardInitialMetric} {K : MetricSurgeryConstants} {P : SurgeryParameters} |
| 34 | {slice : ℝ → GeneralizedSliceCarrier.{u}} |
| 35 | {metric : ∀ t, RiemannianMetric 3 (slice t).carrier} {T b : ℝ} |
| 36 | |
| 37 | /-- The actual coordinate metric family before and after one |
| 38 | retained surgery. Source: Proposition 16.5, pp. 374-375; |
| 39 | M44 derivation 51. -/ |
| 40 | noncomputable def retainedChartCoefficients |
| 41 | (event : SurgeryEventData g0 K P slice metric T) |
| 42 | (G : RicciFlow 3 (slice T).carrier (Icc T b)) |
| 43 | (q : (slice event.tMinus).carrier) (p : ℝ × E) : Bilin := |
| 44 | if p.1 < T then |
| 45 | (event.pre_flow.metric p.1).pullbackCoefficients (extChartAt (𝓡 3) q).symm p.2 |
| 46 | else |
| 47 | (G.metric p.1).pullbackCoefficients |
| 48 | (event.retention.map ∘ (extChartAt (𝓡 3) q).symm) p.2 |
| 49 | |
| 50 | /-- Retained inverse coordinates are smooth on precisely the |
| 51 | displayed retained coordinate domain. Source: Proposition 16.5; |
| 52 | M44 derivation 51. -/ |
| 53 | theorem retained_inverse_coordinates_smooth |
| 54 | (event : SurgeryEventData g0 K P slice metric T) |
| 55 | (q : (slice event.tMinus).carrier) {U : Set E} |
| 56 | (hchart : U ⊆ (extChartAt (𝓡 3) q).target) |
| 57 | (hret : (extChartAt (𝓡 3) q).symm '' U ⊆ interior event.retained_pre) : |
| 58 | ContMDiffOn (𝓡 3) (𝓡 3) ∞ |
| 59 | (event.retention.map ∘ (extChartAt (𝓡 3) q).symm) U := |
| 60 | (event.retention.map_smooth.mono interior_subset).comp |
| 61 | ((contMDiffOn_extChartAt_symm q).mono hchart) |
| 62 | (fun _x hx => hret (mem_image_of_mem _ hx)) |
| 63 | |
| 64 | /-- The actual retained family is jointly smooth before the |
| 65 | exceptional time. Source: Proposition 16.5; M44 derivation 51. -/ |
| 66 | theorem retainedChartCoefficients_smooth_before |
| 67 | (event : SurgeryEventData g0 K P slice metric T) |
| 68 | (G : RicciFlow 3 (slice T).carrier (Icc T b)) |
| 69 | (q : (slice event.tMinus).carrier) {U : Set E} (hU : IsOpen U) |
| 70 | (hchart : U ⊆ (extChartAt (𝓡 3) q).target) : |
| 71 | ContDiffOn ℝ ∞ (retainedChartCoefficients event G q) (Ioo event.tMinus T ×ˢ U) := by |
| 72 | have hs := (contDiffOn_pullbackCoefficients_within event.pre_flow hU |
| 73 | ((contMDiffOn_extChartAt_symm q).mono hchart)).mono |
| 74 | (prod_mono Ioo_subset_Ico_self Subset.rfl) |
| 75 | apply hs.congr |
| 76 | intro p hp |
| 77 | simp only [retainedChartCoefficients, if_pos hp.1.2] |
| 78 | |
| 79 | /-- The actual retained family keeps future within-interval |
| 80 | smoothness, including the surgery time. Source: Proposition 16.5; |
| 81 | M44 derivation 51. -/ |
| 82 | theorem retainedChartCoefficients_smooth_after |
| 83 | (event : SurgeryEventData g0 K P slice metric T) |
| 84 | (G : RicciFlow 3 (slice T).carrier (Icc T b)) |
| 85 | (q : (slice event.tMinus).carrier) {U : Set E} (hU : IsOpen U) |
| 86 | (hchart : U ⊆ (extChartAt (𝓡 3) q).target) |
| 87 | (hret : (extChartAt (𝓡 3) q).symm '' U ⊆ interior event.retained_pre) : |
| 88 | ContDiffOn ℝ ∞ (retainedChartCoefficients event G q) (Ico T b ×ˢ U) := by |
| 89 | have hs := (contDiffOn_pullbackCoefficients_within G hU |
| 90 | (retained_inverse_coordinates_smooth event q hchart hret)).mono |
| 91 | (prod_mono Ico_subset_Icc_self Subset.rfl) |
| 92 | apply hs.congr |
| 93 | intro p hp |
| 94 | simp only [retainedChartCoefficients, if_neg (not_lt_of_ge hp.1.1)] |
| 95 | |
| 96 | /-- Every actual spatial jet of the joined retained metric is |
| 97 | jointly continuous across the event. Source: Proposition 16.5, |
| 98 | pp. 374-375; M44 derivation 51. -/ |
| 99 | theorem retainedChartCoefficients_continuous_spatialJets |
| 100 | (event : SurgeryEventData g0 K P slice metric T) |
| 101 | (G : RicciFlow 3 (slice T).carrier (Icc T b)) (hTb : T < b) |
| 102 | (hbirth : G.metric T = metric T) |
| 103 | (q : (slice event.tMinus).carrier) (hq : q ∈ interior event.retained_pre) |
| 104 | {U : Set E} (hU : IsOpen U) (hchart : U ⊆ (extChartAt (𝓡 3) q).target) |
| 105 | (hret : (extChartAt (𝓡 3) q).symm '' U ⊆ interior event.retained_pre) : |
| 106 | ∀ m : ℕ, ContinuousOn (fun p : ℝ × E => |
| 107 | iteratedFDeriv ℝ m (fun x => retainedChartCoefficients event G q (p.1, x)) p.2) |
| 108 | (Ioo event.tMinus b ×ˢ U) := by |
| 109 | apply continuousOn_spatialJets_of_compact_uniform hU hTb |
| 110 | (retainedChartCoefficients_smooth_before event G q hU hchart) |
| 111 | (retainedChartCoefficients_smooth_after event G q hU hchart hret) |
| 112 | intro m L hL hLU eta heta |
| 113 | obtain ⟨d, hd, hbound⟩ := retained_bilinear_jet_limit event q hq hU hchart hret |
| 114 | m hL hLU heta |
| 115 | refine ⟨d, hd, ?_⟩ |
| 116 | intro t ht hT x hx |
| 117 | simpa only [retainedChartCoefficients, if_pos hT, lt_self_iff_false, if_false, hbirth] |
| 118 | using hbound t ht hT x hx |
| 119 | |
| 120 | /-- Each individual slice of the actual retained family is |
| 121 | smooth on its full retained coordinate domain, even at surgery. |
| 122 | Source: Proposition 16.5; M44 derivation 51. -/ |
| 123 | theorem retainedChartCoefficients_spatial_smooth |
| 124 | (event : SurgeryEventData g0 K P slice metric T) |
| 125 | (G : RicciFlow 3 (slice T).carrier (Icc T b)) |
| 126 | (q : (slice event.tMinus).carrier) {U : Set E} (hU : IsOpen U) |
| 127 | (hchart : U ⊆ (extChartAt (𝓡 3) q).target) |
| 128 | (hret : (extChartAt (𝓡 3) q).symm '' U ⊆ interior event.retained_pre) (t : ℝ) : |
| 129 | ContDiffOn ℝ ∞ (fun x => retainedChartCoefficients event G q (t, x)) U := by |
| 130 | by_cases ht : t < T |
| 131 | · simpa only [retainedChartCoefficients, if_pos ht] using |
| 132 | ((event.pre_flow.metric t).contDiffOn_chartCoefficients q).mono hchart |
| 133 | · simp only [retainedChartCoefficients, if_neg ht] |
| 134 | intro x hx |
| 135 | exact ((G.metric t).contDiffAt_pullbackCoefficients |
| 136 | ((retained_inverse_coordinates_smooth event q hchart hret).contMDiffAt |
| 137 | (hU.mem_nhds hx))).contDiffWithinAt |
| 138 | |
| 139 | end PoincareMT.M44 |