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.ReducedGeometry.ReducedVolume.Minimum.Compactness.SquarePathCompact |
| 2 | |
| 3 | /-! |
| 4 | # Compact confinement of low reduced-length sublevels |
| 5 | |
| 6 | Morgan-Tian Claim 7.11. The actual minimizing action, scalar-curvature |
| 7 | bound and uniform metric comparison bound the square-path energy. |
| 8 | The complete terminal metric then provides one compact endpoint set |
| 9 | for all positive times up to a fixed strict interior time. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set MeasureTheory |
| 15 | open scoped Manifold ContDiff Bundle |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.ReducedVolume |
| 20 | |
| 21 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 23 | [ConnectedSpace M] [T3Space M] |
| 24 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 25 | |
| 26 | /-- One compact set contains all low reduced-length sublevels up to a fixed interior time. -/ |
| 27 | theorem exists_compact_reducedLength_sublevel |
| 28 | (hL : LGeodesicTheory F T τmax) (G : LExponentialGeometry F T τmax p) |
| 29 | (hwindow : Icc (T - τmax) T ⊆ J) |
| 30 | (hcurvature : CompleteBoundedCurvatureOn F (Icc (T - τmax) T)) |
| 31 | {b : ℝ} (hb : 0 < b) (hbmax : b < τmax) (L : ℝ) : |
| 32 | ∃ C : Set M, IsCompact C ∧ ∀ τ : ℝ, 0 < τ → τ ≤ b → ∀ q : M, |
| 33 | reducedLength F T p q τ ≤ L → q ∈ C := by |
| 34 | classical |
| 35 | obtain ⟨R, hR, hscalar⟩ := exists_uniform_scalarCurvature_bound F hcurvature |
| 36 | obtain ⟨Q, hQ, hmetric⟩ := exists_uniform_backward_metric_comparison |
| 37 | (hb.trans hbmax) hwindow hcurvature |
| 38 | let K : ℝ := 2 * Q * (2 * Real.sqrt b * max L 0 + (2 * R / 3) * b * Real.sqrt b) |
| 39 | have hK : 0 ≤ K := by dsimp only [K]; positivity |
| 40 | let A := {w : TangentSpace (𝓡 n) p × ℝ | |
| 41 | 0 < w.2 ∧ w.2 ≤ b ∧ |
| 42 | G.toLExponentialFamily.action w.1 w.2 ≤ 2 * Real.sqrt w.2 * L} |
| 43 | have henergy (i : A) : |
| 44 | (∫ s in 0..Real.sqrt i.val.2, terminalSquareEnergy G i.val.1 s) ≤ K := by |
| 45 | have ht := i.property.1 |
| 46 | have htb := i.property.2.1 |
| 47 | have htmax := htb.trans_lt hbmax |
| 48 | have hsqrt : Real.sqrt i.val.2 ≤ Real.sqrt b := Real.sqrt_le_sqrt htb |
| 49 | have ha : G.toLExponentialFamily.action i.val.1 i.val.2 ≤ |
| 50 | 2 * Real.sqrt b * max L 0 := by |
| 51 | calc |
| 52 | _ ≤ 2 * Real.sqrt i.val.2 * L := i.property.2.2 |
| 53 | _ ≤ 2 * Real.sqrt i.val.2 * max L 0 := |
| 54 | mul_le_mul_of_nonneg_left (le_max_left _ _) (by positivity) |
| 55 | _ ≤ _ := mul_le_mul_of_nonneg_right |
| 56 | (mul_le_mul_of_nonneg_left hsqrt (by norm_num)) (le_max_right _ _) |
| 57 | have hcorr : (2 * R / 3) * i.val.2 * Real.sqrt i.val.2 ≤ |
| 58 | (2 * R / 3) * b * Real.sqrt b := by |
| 59 | apply mul_le_mul |
| 60 | (mul_le_mul_of_nonneg_left htb (by positivity)) hsqrt (Real.sqrt_nonneg _) |
| 61 | positivity |
| 62 | apply (integral_terminalSquareEnergy_le G i.val.1 ht htmax hQ ?_ ?_).trans |
| 63 | (mul_le_mul_of_nonneg_left (add_le_add ha hcorr) (by positivity)) |
| 64 | · intro r hr q |
| 65 | exact (abs_le.mp (hscalar (T - r) |
| 66 | ⟨by linarith [hr.2], by linarith [hr.1]⟩ q)).1 |
| 67 | · intro r hr q v |
| 68 | exact hmetric r ⟨hr.1, hr.2.trans htmax.le⟩ q v |
| 69 | obtain ⟨C, hC, hend⟩ := exists_compact_square_endpoints G |
| 70 | (hcurvature.1 T ⟨by linarith [hb.trans hbmax], le_rfl⟩) |
| 71 | (fun i : A ↦ i.val.1) (fun i : A ↦ i.val.2) hb hbmax |
| 72 | (fun i ↦ i.property.1) (fun i ↦ i.property.2.1) hK henergy |
| 73 | refine ⟨C, hC, ?_⟩ |
| 74 | intro τ hτ hτb q hq |
| 75 | obtain ⟨Z, hZend, _, hval⟩ := exists_minimizing_lift hL G q τ hτ (hτb.trans_lt hbmax) |
| 76 | have haction : G.toLExponentialFamily.action Z τ ≤ 2 * Real.sqrt τ * L := by |
| 77 | rw [hval] at hq |
| 78 | simpa only [mul_comm L] using |
| 79 | (div_le_iff₀ (mul_pos (by norm_num) (Real.sqrt_pos.mpr hτ))).mp hq |
| 80 | have hend' := hend (⟨(Z, τ), hτ, hτb, haction⟩ : A) |
| 81 | simpa only [hZend] using hend' |
| 82 | |
| 83 | end PoincareMT.ReducedVolume |