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.GlobalSchedule.Normalized.NormalizedStart |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.GlobalSchedule.Epoch.EpochControls |
| 3 | |
| 4 | /-! |
| 5 | # The actual normalized flow observed in its first epoch |
| 6 | |
| 7 | Morgan--Tian Claim 15.1, Corollary 15.10 and Section 17.2, pp. 353, 363, |
| 8 | 409-410. The first observation beyond 1/16 ends at the maximal singular |
| 9 | endpoint or at 1/8. The original flow is never truncated at that observation. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M51Initial |
| 20 | |
| 21 | /-- Observe the actual maximal initial flow, retaining its start-zero slab |
| 22 | whenever the observation is its excluded endpoint, including at 1/8. -/ |
| 23 | theorem firstObservation (F : SurgeryFlowData.{u}) |
| 24 | (standard_flow : MaximalStandardCapFlow F.standard_initial) |
| 25 | (hshape : F.time_domain = Ici 0 ∨ |
| 26 | ∃ T : ℝ, 1 / 16 < T ∧ F.time_domain = Ico 0 T ∧ |
| 27 | ∃ L : RepairedPreterminalSlab F T, L.start = 0) : |
| 28 | ∃ O : SurgeryObservation F, |
| 29 | 1 / 16 < O.H ∧ O.H ≤ 1 / 8 ∧ O.standard_flow = standard_flow ∧ |
| 30 | (O.H < 1 / 8 → F.time_domain = Ico 0 O.H ∧ |
| 31 | ∃ L : RepairedPreterminalSlab F O.H, L.start = 0) ∧ |
| 32 | (F.time_domain = Ico 0 O.H → |
| 33 | ∃ L : RepairedPreterminalSlab F O.H, L.start = 0) := by |
| 34 | rcases hshape with hJ | ⟨T, hT, hJ, L, hL⟩ |
| 35 | · let O : SurgeryObservation F := { |
| 36 | H := 1 / 8 |
| 37 | H_pos := by norm_num |
| 38 | interval_subset := by rw [hJ]; exact fun _ ht => ht.1 |
| 39 | standard_flow := standard_flow } |
| 40 | refine ⟨O, by norm_num [O], le_rfl, rfl, ?_, ?_⟩ |
| 41 | · intro hlt |
| 42 | exact (lt_irrefl _ hlt).elim |
| 43 | · intro h |
| 44 | have ht : O.H ∈ F.time_domain := hJ ▸ (show 0 ≤ O.H by norm_num [O]) |
| 45 | rw [h] at ht |
| 46 | exact (lt_irrefl _ ht.2).elim |
| 47 | · let O : SurgeryObservation F := { |
| 48 | H := min T (1 / 8) |
| 49 | H_pos := lt_min (lt_trans (by norm_num) hT) (by norm_num) |
| 50 | interval_subset := by |
| 51 | intro t ht |
| 52 | rw [hJ] |
| 53 | exact ⟨ht.1, ht.2.trans_le (min_le_left _ _)⟩ |
| 54 | standard_flow := standard_flow } |
| 55 | have hslab (h : F.time_domain = Ico 0 O.H) : |
| 56 | ∃ next : RepairedPreterminalSlab F O.H, next.start = 0 := by |
| 57 | have hTeq : T = O.H := by |
| 58 | refine le_antisymm ?_ (min_le_left _ _) |
| 59 | by_contra hn |
| 60 | have ht : O.H ∈ F.time_domain := |
| 61 | hJ ▸ ⟨O.H_pos.le, lt_of_not_ge hn⟩ |
| 62 | rw [h] at ht |
| 63 | exact lt_irrefl _ ht.2 |
| 64 | exact (congrArg (fun U : ℝ => ∃ next : RepairedPreterminalSlab F U, |
| 65 | next.start = 0) hTeq).mp ⟨L, hL⟩ |
| 66 | refine ⟨O, lt_min hT (by norm_num), min_le_right _ _, rfl, ?_, hslab⟩ |
| 67 | intro hlt |
| 68 | have hTH : T < (1 / 8 : ℝ) := |
| 69 | (min_lt_iff.mp hlt).resolve_right (lt_irrefl _) |
| 70 | have hdomain : F.time_domain = Ico 0 O.H := by |
| 71 | change F.time_domain = Ico 0 (min T (1 / 8)) |
| 72 | rw [min_eq_left hTH.le] |
| 73 | exact hJ |
| 74 | exact ⟨hdomain, hslab hdomain⟩ |
| 75 | |
| 76 | variable {M : Type u} [TopologicalSpace M] [MeasurableSpace M] [BorelSpace M] |
| 77 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 78 | [T2Space M] [T3Space M] [SecondCountableTopology M] [CompactSpace M] [Nonempty M] |
| 79 | |
| 80 | /-- From the normalized metric and prescribed control, construct the actual |
| 81 | initial flow and all M48 guards at its first singular frontier or the epoch |
| 82 | boundary. The selected Q/R, original metric and maximal domain are retained. -/ |
| 83 | theorem exists_first_epoch (S : RepairedControlledSchedulesData.{u}) |
| 84 | (N : RepairedNoncollapseInductionData S) (C : RepairedCanonicalInductionData S N) |
| 85 | (I : NormalizedInitialMetric (M := M)) |
| 86 | (hRP : NoTrivialNormalProjectivePlane (M := M)) |
| 87 | (delta : ℝ → ℝ) (hmono : AntitoneOn delta (Ici 0)) |
| 88 | (hpos : ∀ t, 0 ≤ t → 0 < delta t) |
| 89 | (hcut : ∀ j t, t ∈ surgeryEpochEntry j → 0 ≤ t → |
| 90 | delta t ≤ (M51Numerical.schedule S N C).Delta j) : |
| 91 | ∃ F : SurgeryFlowData.{u}, |
| 92 | F.standard_initial = S.setup.standard_initial ∧ |
| 93 | F.local_constants = S.constants ∧ |
| 94 | F.parameters = (M51Numerical.schedule S N C).parameters delta hmono hpos ∧ |
| 95 | F.slice = (fun _ => carrier M) ∧ F.surgery_times = ∅ ∧ |
| 96 | SurgeryFlowAdmissible F ∧ SurgeryFlowPinched F ∧ |
| 97 | (F.time_domain = Ici 0 ∨ ∃ T : ℝ, 1 / 16 < T ∧ F.time_domain = Ico 0 T ∧ |
| 98 | ∃ L : RepairedPreterminalSlab F T, L.start = 0) ∧ |
| 99 | (∃ e : Diffeomorph (𝓡 3) (𝓡 3) M (F.slice 0).carrier ∞, |
| 100 | ∀ x v w, (F.metric 0).inner (e x) |
| 101 | (mfderiv (𝓡 3) (𝓡 3) e x v) (mfderiv (𝓡 3) (𝓡 3) e x w) = |
| 102 | I.metric.inner x v w) ∧ |
| 103 | ∃ O : SurgeryObservation F, 1 / 16 < O.H ∧ O.H ≤ 1 / 8 ∧ |
| 104 | HEq O.standard_flow S.setup.standard_flow ∧ |
| 105 | SurgeryPrefixControls (M51Numerical.prefixAt S N C 0) F O ∧ |
| 106 | SurgeryEpochContinuationControls (M51Numerical.prefixAt S N C 0) F O |
| 107 | (M51Numerical.noncollapse S N C 0) (M51Numerical.canonical S N C 0) ∧ |
| 108 | SurgeryNoncollapsedOn F (surgeryObservationInterval O) |
| 109 | (M51Numerical.noncollapse S N C 0).kappaNew ∧ |
| 110 | (O.H < 1 / 8 → F.time_domain = Ico 0 O.H ∧ |
| 111 | ∃ L : RepairedPreterminalSlab F O.H, L.start = 0) ∧ |
| 112 | (F.time_domain = Ico 0 O.H → |
| 113 | ∃ L : RepairedPreterminalSlab F O.H, L.start = 0) := by |
| 114 | obtain ⟨F, hstd, hK, hP, hslice, hS, hAd, hPin, hshape, hinit, |
| 115 | O0, hH0, hStd0, hOld⟩ := exists_initial_flow S N C I hRP delta hmono hpos hcut |
| 116 | obtain ⟨O, hstart, hend, hStd, hfront, hslab⟩ := |
| 117 | firstObservation F O0.standard_flow hshape |
| 118 | have hprefix : SurgeryPrefixControls (M51Numerical.prefixAt S N C 0) F O := |
| 119 | hOld.observePastPrefix O (by norm_num [surgeryEpochStart, hH0]) hPin |
| 120 | have hdelta : ∀ t, 0 ≤ t → F.parameters.delta t = delta t := by |
| 121 | intro t _ |
| 122 | rw [hP] |
| 123 | rfl |
| 124 | have hprofiles : ∀ j t, t ∈ surgeryEpochEntry j → 0 ≤ t → |
| 125 | F.parameters.r t = (M51Numerical.schedule S N C).r j ∧ |
| 126 | F.parameters.kappa t = (M51Numerical.schedule S N C).kappa j ∧ |
| 127 | F.parameters.h t = S.setup.selector.h (delta t * F.parameters.r t) (delta t) := by |
| 128 | intro j t ht _ |
| 129 | rw [hP] |
| 130 | exact ⟨GlobalSurgerySchedule.parameters_r _ _ _ _ ht, |
| 131 | GlobalSurgerySchedule.parameters_kappa _ _ _ _ ht, rfl⟩ |
| 132 | have policy : SurgeryFlowTerminalPolicyOn F (surgeryObservationInterval O) := by |
| 133 | constructor |
| 134 | · intro t _ht hs |
| 135 | exact (Set.notMem_empty t (hS ▸ hs)).elim |
| 136 | · intro t _ht hs |
| 137 | exact (Set.notMem_empty t (hS ▸ hs)).elim |
| 138 | obtain ⟨hcontrols, hnoncollapsed⟩ := M51Numerical.continuationControls S N C |
| 139 | 0 F O delta hdelta hprofiles hcut hprefix hPin policy |
| 140 | (by norm_num [M51Numerical.prefix_index, surgeryEpochStart]; linarith only [hstart]) |
| 141 | (by norm_num [M51Numerical.prefix_index, surgeryEpochStart]; linarith only [hend]) |
| 142 | exact ⟨F, hstd, hK, hP, hslice, hS, hAd, hPin, hshape, hinit, |
| 143 | O, hstart, hend, hStd.heq.trans hStd0, hprefix, hcontrols, hnoncollapsed, hfront, hslab⟩ |
| 144 | |
| 145 | end PoincareMT.M51Initial |