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.Existence.RotationInvariance.IndexedEnergyBounds |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.RotationInvariance.IndexedEnergyZero |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Analysis.Energy.FiniteNeighborEnergyZero |
| 4 | |
| 5 | /-! |
| 6 | # Uniqueness of the actual partial standard-cap metrics |
| 7 | |
| 8 | On a common compact time interval, actual local energies have uniform |
| 9 | values and neighboring one-sided rates. Finite geometric prefixes force |
| 10 | every energy to vanish, and the actual plateau cover detects equality of |
| 11 | the metrics everywhere. No compactness of the cap or derivative of an |
| 12 | infinite sum is used. This is Morgan-Tian Section 12.5, pp. 309-319 and |
| 13 | finite-neighbor-energy-closure.md. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | -- Actual curvature takes values in three nested Hom spaces. |
| 19 | set_option maxSynthPendingDepth 8 |
| 20 | |
| 21 | open Set |
| 22 | open scoped Manifold ContDiff |
| 23 | |
| 24 | namespace PoincareMT.M34 |
| 25 | |
| 26 | open DifferenceEnergy |
| 27 | |
| 28 | /-- Any two partial standard-cap flows with the same prescribed initial |
| 29 | metric have equal metrics at every common included time |
| 30 | (Section 12.5, pp. 309-319). -/ |
| 31 | theorem partialStandardCapFlow_metric_unique (P : RicciFlowCurvatureTheory.{0}) |
| 32 | {g0 : StandardInitialMetric} (E0 : StandardCapEstimate g0) |
| 33 | (F F' : PartialStandardCapFlow g0) (e : StandardCylindricalEnd g0.metric) |
| 34 | {t : ℝ} (ht : t ∈ Ico 0 F.lifetime ∩ Ico 0 F'.lifetime) : |
| 35 | F.flow.metric t = F'.flow.metric t := by |
| 36 | classical |
| 37 | obtain ⟨S, htS, hSmin⟩ := exists_between (lt_min ht.1.2 ht.2.2) |
| 38 | have hS : 0 < S := ht.1.1.trans_lt htS |
| 39 | have hSF : S < F.lifetime := hSmin.trans_le (min_le_left _ _) |
| 40 | have hSF' : S < F'.lifetime := hSmin.trans_le (min_le_right _ _) |
| 41 | obtain ⟨B0, _hB0, hb0⟩ := F.curvature_locally_bounded S hS.le hSF |
| 42 | obtain ⟨B1, _hB1, hb1⟩ := F'.curvature_locally_bounded S hS.le hSF' |
| 43 | let B := max 1 (max B0 B1) |
| 44 | have hB : 0 < B := zero_lt_one.trans_le (le_max_left _ _) |
| 45 | have hf (s) (hs : s ∈ Ico 0 S) (x) : (F.flow.connection s).curvatureTensorNorm x ≤ B := |
| 46 | (le_abs_self _).trans ((hb0 s ⟨hs.1, hs.2.le⟩ x).trans |
| 47 | ((le_max_left _ _).trans (le_max_right _ _))) |
| 48 | have hf' (s) (hs : s ∈ Ico 0 S) (x) : (F'.flow.connection s).curvatureTensorNorm x ≤ B := |
| 49 | (le_abs_self _).trans ((hb1 s ⟨hs.1, hs.2.le⟩ x).trans |
| 50 | ((le_max_right _ _).trans (le_max_right _ _))) |
| 51 | let qH : FH 3 ≃L[ℝ] EuclideanSpace ℝ (Fin (Module.finrank ℝ (FH 3))) := |
| 52 | ContinuousLinearEquiv.ofFinrankEq (by simp) |
| 53 | let qA : FA 3 ≃L[ℝ] EuclideanSpace ℝ (Fin (Module.finrank ℝ (FA 3))) := |
| 54 | ContinuousLinearEquiv.ofFinrankEq (by simp) |
| 55 | let qS : FS 3 ≃L[ℝ] EuclideanSpace ℝ (Fin (Module.finrank ℝ (FS 3))) := |
| 56 | ContinuousLinearEquiv.ofFinrankEq (by simp) |
| 57 | let p : endReferenceRegion e := Classical.choice inferInstance |
| 58 | let E := capDifferenceEnergy e qH qA qS F.flow F'.flow p |
| 59 | let D := capDifferenceSupportIntegral e qH qA qS F.flow F'.flow p |
| 60 | obtain ⟨M, L, _hM, hL, hvalue, hrate⟩ := partialFlows_capDifferenceEnergy_bounds |
| 61 | P E0 F F' e qH qA qS hS hSF.le hSF'.le hB hf hf' p |
| 62 | obtain ⟨C, hC, hsupport⟩ := exists_capDifferenceSupportIntegral_bound e qH qA qS |
| 63 | have hclosed (s) (hs : s ∈ Icc 0 t) : s ∈ Ico 0 S := ⟨hs.1, hs.2.trans_lt htS⟩ |
| 64 | have hcommon (s) (hs : s ∈ Icc 0 t) : s ∈ Ico 0 F.lifetime ∩ Ico 0 F'.lifetime := |
| 65 | ⟨⟨hs.1, hs.2.trans_lt ht.1.2⟩, ⟨hs.1, hs.2.trans_lt ht.2.2⟩⟩ |
| 66 | have hinterior (s) (hs : s ∈ Ioo 0 t) : |
| 67 | s ∈ interior (Ico 0 F.lifetime ∩ Ico 0 F'.lifetime) := by |
| 68 | rw [interior_inter, interior_Ico, interior_Ico] |
| 69 | exact ⟨⟨hs.1, hs.2.trans ht.1.2⟩, ⟨hs.1, hs.2.trans ht.2.2⟩⟩ |
| 70 | have hr (i a b c : ℕ) (s : ℝ) (hs : s ∈ Ioo 0 t) |
| 71 | (hD : D i s ≤ C * (E a s + E b s + E c s)) : |
| 72 | deriv (E i) s ≤ (L * C) * (E a s + E b s + E c s) := by |
| 73 | calc |
| 74 | _ ≤ L * D i s := hrate i s (hclosed s ⟨hs.1.le, hs.2.le⟩) (hinterior s hs) |
| 75 | _ ≤ L * (C * (E a s + E b s + E c s)) := mul_le_mul_of_nonneg_left hD hL |
| 76 | _ = _ := (mul_assoc _ _ _).symm |
| 77 | have hzero : ∀ i, EqOn (E i) (fun _ => 0) (Icc 0 t) := |
| 78 | eq_zero_of_uniformly_bounded_neighbor_energy_rates (mul_nonneg hL hC) |
| 79 | (fun i => capDifferenceEnergy_continuousOn e qH qA qS F.flow F'.flow p |
| 80 | isCompact_Icc (fun s hs => hcommon s hs) i) |
| 81 | (fun i s hs => capDifferenceEnergy_differentiableAt e qH qA qS F.flow F'.flow p |
| 82 | (hinterior s hs) i) |
| 83 | (fun i => capDifferenceEnergy_eq_zero_of_metric_eq e qH qA qS F.flow F'.flow p |
| 84 | (F.initial_metric.trans F'.initial_metric.symm) i) |
| 85 | (fun i s _ => capDifferenceEnergy_nonneg e qH qA qS F.flow F'.flow p i s) |
| 86 | (fun i s hs => hvalue i s (hclosed s hs)) |
| 87 | (fun s hs => hr 0 0 1 2 s hs |
| 88 | (hsupport F.flow F'.flow p (hcommon s ⟨hs.1.le, hs.2.le⟩)).1) |
| 89 | (fun s hs => hr 1 0 1 2 s hs |
| 90 | (hsupport F.flow F'.flow p (hcommon s ⟨hs.1.le, hs.2.le⟩)).2.1) |
| 91 | (fun j s hs => hr (j + 2) (j + 1) (j + 2) (j + 3) s hs |
| 92 | ((hsupport F.flow F'.flow p (hcommon s ⟨hs.1.le, hs.2.le⟩)).2.2 j)) |
| 93 | exact metric_eq_of_capDifferenceEnergy_zero e qH qA qS F.flow F'.flow p ht |
| 94 | (fun i => hzero i ⟨ht.1.1, le_rfl⟩) |
| 95 | |
| 96 | end PoincareMT.M34 |