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.Completed.CompletedStageChain |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Extension.ExtensionNoncollapse |
| 3 | |
| 4 | /-! |
| 5 | # Whole-flow controls from the completed finite prefixes |
| 6 | |
| 7 | For each tested time, choose an observed stage whose prefix contains that |
| 8 | time's entry. Transport its actual controls along the constructed extension |
| 9 | and identify its finite-prefix scales with the target's parameter values. |
| 10 | Source: Morgan--Tian Section 17.2, printed pp. 409-411. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff ENNReal |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M51.CompletedStageChain |
| 21 | |
| 22 | open M51Numerical |
| 23 | |
| 24 | variable {S : RepairedControlledSchedulesData.{u}} |
| 25 | {N : RepairedNoncollapseInductionData S} |
| 26 | {C : RepairedCanonicalInductionData S N} |
| 27 | {F₀ : SurgeryFlowData.{u}} {k : ℕ} |
| 28 | (Q : CompletedStageChain S N C F₀ k) |
| 29 | |
| 30 | /-- Every nonnegative time has an observed stage whose finite prefix contains its entry. -/ |
| 31 | theorem exists_observed_entry (t : ℝ) (ht : 0 ≤ t) : |
| 32 | ∃ n, ∃ j : Fin ((prefixAt S N C (k + n)).i + 1), |
| 33 | t ∈ surgeryObservationInterval (Q.observation n) ∩ surgeryEpochEntry j.val := by |
| 34 | obtain ⟨n, hn, hH⟩ := Q.exists_later_horizon (epochIndex t) t |
| 35 | have hj : epochIndex t < (prefixAt S N C (k + n)).i + 1 := by |
| 36 | rw [prefix_index] |
| 37 | omega |
| 38 | exact ⟨n, ⟨epochIndex t, hj⟩, ⟨ht, hH⟩, mem_epochEntry_index ht⟩ |
| 39 | |
| 40 | /-- Actual extensions of all completed stages give canonical control on their common target. -/ |
| 41 | theorem canonical_of_extensions |
| 42 | (H13 : GeneralizedParabolicRescalingTheory.{u} 3) |
| 43 | (G : SurgeryFlowData.{u}) |
| 44 | (E : ∀ n, SurgeryFlowExtension (Q.flow n)) |
| 45 | (hE : ∀ n, (E n).extended = G) : SurgeryCanonicalAssumption G := by |
| 46 | intro t ht x hx |
| 47 | obtain ⟨n, j, hentry⟩ := Q.exists_observed_entry t (G.time_domain_nonnegative ht) |
| 48 | have hj : j.val ≤ (prefixAt S N C (k + n)).i := Nat.le_of_lt_succ j.isLt |
| 49 | have hJ : surgeryObservationInterval (Q.observation n) ∩ surgeryEpochEntry j.val ⊆ |
| 50 | (Q.flow n).time_domain := fun _ hs => (Q.observation n).interval_subset hs.1 |
| 51 | have hcanonical := (E n).canonical_on H13 hJ ((Q.old_controls n).canonical j hj) |
| 52 | rw [hE n] at hcanonical |
| 53 | have hr : G.parameters.r t = (prefixAt S N C (k + n)).r j := by |
| 54 | rw [← hE n, (E n).parameters_eq] |
| 55 | exact (Q.old_controls n).r_schedule j hj t hentry |
| 56 | rw [hr] at hx |
| 57 | exact hcanonical t hentry ht x hx |
| 58 | |
| 59 | /-- Actual extensions of all completed stages give noncollapse on their common target. -/ |
| 60 | theorem noncollapsed_of_extensions |
| 61 | (H13 : GeneralizedParabolicRescalingTheory.{u} 3) |
| 62 | (G : SurgeryFlowData.{u}) |
| 63 | (E : ∀ n, SurgeryFlowExtension (Q.flow n)) |
| 64 | (hE : ∀ n, (E n).extended = G) : SurgeryNoncollapsed G := by |
| 65 | intro t ht x hpositive r hr hrepsilon cylinder hterminal hcurvature |
| 66 | obtain ⟨n, j, hentry⟩ := Q.exists_observed_entry t (G.time_domain_nonnegative ht) |
| 67 | have hj : j.val ≤ (prefixAt S N C (k + n)).i := Nat.le_of_lt_succ j.isLt |
| 68 | have hJ : surgeryObservationInterval (Q.observation n) ∩ surgeryEpochEntry j.val ⊆ |
| 69 | (Q.flow n).time_domain := fun _ hs => (Q.observation n).interval_subset hs.1 |
| 70 | have hnoncollapsed := |
| 71 | (E n).noncollapsed_on H13 hJ ((Q.old_controls n).noncollapsed j hj) |
| 72 | rw [hE n] at hnoncollapsed |
| 73 | have hkappa : G.parameters.kappa t = (prefixAt S N C (k + n)).kappa j := by |
| 74 | rw [← hE n, (E n).parameters_eq] |
| 75 | exact (Q.old_controls n).kappa_schedule j hj t hentry |
| 76 | rw [hkappa] |
| 77 | exact hnoncollapsed t hentry ht x hpositive r hr hrepsilon cylinder hterminal hcurvature |
| 78 | |
| 79 | /-- Package the canonical and noncollapsing consequences of the actual stage extensions. -/ |
| 80 | theorem profile_controls_of_extensions |
| 81 | (H13 : GeneralizedParabolicRescalingTheory.{u} 3) |
| 82 | (G : SurgeryFlowData.{u}) |
| 83 | (E : ∀ n, SurgeryFlowExtension (Q.flow n)) |
| 84 | (hE : ∀ n, (E n).extended = G) : |
| 85 | SurgeryCanonicalAssumption G ∧ SurgeryNoncollapsed G := |
| 86 | ⟨Q.canonical_of_extensions H13 G E hE, Q.noncollapsed_of_extensions H13 G E hE⟩ |
| 87 | |
| 88 | end PoincareMT.M51.CompletedStageChain |