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.Cutoff.PreparedCounterexamples |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Comparison.Evolution.StandardIdentification |
| 3 | |
| 4 | /-! |
| 5 | # Identifying the actual observation metric |
| 6 | |
| 7 | The fixed initial metric and recorded heterogeneous model equality |
| 8 | identify the observation lifetime and metric. M35 then compares with |
| 9 | the selected standard solution without equating connection records. |
| 10 | Morgan--Tian, Corollary 16.9 and Proposition 16.5, pp. 373-374; |
| 11 | M44 derivation 111. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M44 |
| 21 | |
| 22 | private theorem maximal_metric_eq_of_heq |
| 23 | {g0 g1 : StandardInitialMetric} (hg : g0 = g1) |
| 24 | (S : MaximalStandardCapFlow g0) (T : MaximalStandardCapFlow g1) |
| 25 | (h : HEq S T) : S.metric = T.metric := by |
| 26 | cases hg |
| 27 | exact congrArg MaximalStandardCapFlow.metric (eq_of_heq h) |
| 28 | |
| 29 | private theorem maximal_lifetime_eq_of_heq |
| 30 | {g0 g1 : StandardInitialMetric} (hg : g0 = g1) |
| 31 | (S : MaximalStandardCapFlow g0) (T : MaximalStandardCapFlow g1) |
| 32 | (h : HEq S T) : S.base.lifetime = T.base.lifetime := by |
| 33 | cases hg |
| 34 | exact congrArg (fun F => F.base.lifetime) (eq_of_heq h) |
| 35 | |
| 36 | namespace CapPersistenceCounterexample |
| 37 | |
| 38 | variable {constants : MetricSurgeryConstants} {setup : SurgeryControlSetup constants} |
| 39 | {start rNext A eta theta cutoff : ℝ} |
| 40 | |
| 41 | /-- The actual observation decoration has the unit model lifetime |
| 42 | required by the frozen family comparison. Source: Proposition 16.5, |
| 43 | pp. 370-371; M44 derivation 111. -/ |
| 44 | theorem observation_lifetime_one |
| 45 | (X : CapPersistenceCounterexample.{u} setup start rNext A eta theta cutoff) : |
| 46 | X.observation.standard_flow.base.lifetime = 1 := |
| 47 | (maximal_lifetime_eq_of_heq X.fixed_scales.standard_initial_eq |
| 48 | X.observation.standard_flow setup.standard_flow X.standard_flow_eq).trans |
| 49 | setup.standard_lifetime_one |
| 50 | |
| 51 | /-- M35 identifies the actual observation metric at each meaningful |
| 52 | standard time; its own connection record is retained. Source: |
| 53 | Corollary 16.9, p. 373; M44 derivation 111. -/ |
| 54 | theorem observation_metric_eq |
| 55 | (X : CapPersistenceCounterexample.{u} setup start rNext A eta theta cutoff) |
| 56 | (standard : RepairedStandardCapExistenceData setup.standard_initial) |
| 57 | (unique : RepairedStandardCapUniquenessData setup.standard_initial standard) |
| 58 | {t : ℝ} (ht : t ∈ Ico (0 : ℝ) 1) : |
| 59 | X.observation.standard_flow.metric t = standard.flow.metric t := |
| 60 | (congrFun (maximal_metric_eq_of_heq X.fixed_scales.standard_initial_eq |
| 61 | X.observation.standard_flow setup.standard_flow X.standard_flow_eq) t).trans |
| 62 | (unique.model_metric_eq setup.standard_flow ht).symm |
| 63 | |
| 64 | end CapPersistenceCounterexample |
| 65 | |
| 66 | end PoincareMT.M44 |