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.Regularity.Continuity.MinimizingLifts |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Regularity.Continuity.CompactMinimum |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Regularity.Continuity.UpperSemicontinuity |
| 4 | |
| 5 | /-! |
| 6 | # Joint continuity of reduced length |
| 7 | |
| 8 | For Morgan-Tian Proposition 7.5, M09's bounded initial vectors and M08's |
| 9 | attained minimizers give compact minimizing lifts near every interior |
| 10 | spacetime point. Compact action sublevels give lower semicontinuity; |
| 11 | touching upper barriers give the other half of continuity. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.ReducedVolume |
| 21 | |
| 22 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 24 | [ConnectedSpace M] [T3Space M] |
| 25 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 26 | |
| 27 | /-- Compact minimizing lifts give lower semicontinuity at each interior point. -/ |
| 28 | theorem reducedLength_lowerSemicontinuousAt |
| 29 | (hL : LGeodesicTheory F T τmax) (G : LExponentialGeometry F T τmax p) |
| 30 | (z : M × ℝ) (hz : z ∈ Set.univ ×ˢ Set.Ioo 0 τmax) : |
| 31 | LowerSemicontinuousAt (fun w : M × ℝ ↦ reducedLength F T p w.1 w.2) z := by |
| 32 | let : LocallyCompactSpace M := Manifold.locallyCompact_of_finiteDimensional (𝓡 n) |
| 33 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 34 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 35 | let : FiniteDimensional ℝ (TangentSpace (𝓡 n) p) := |
| 36 | inferInstanceAs (FiniteDimensional ℝ (EuclideanSpace ℝ (Fin n))) |
| 37 | let : ProperSpace (TangentSpace (𝓡 n) p) := FiniteDimensional.proper ℝ _ |
| 38 | obtain ⟨Q, hQcompact, hzQ, hQtime⟩ := exists_compact_subset |
| 39 | (isOpen_univ.prod isOpen_Ioo) hz |
| 40 | obtain ⟨A, _hA, hAmin⟩ := G.minimizing_initial_bounded Q hQcompact hQtime |
| 41 | let I : Set ℝ := Prod.snd '' Q |
| 42 | have hItime : I ⊆ Set.Ioo 0 τmax := by |
| 43 | rintro s ⟨w, hw, rfl⟩ |
| 44 | exact (hQtime hw).2 |
| 45 | let K : Set (TangentSpace (𝓡 n) p × ℝ) := Metric.closedBall 0 A ×ˢ I |
| 46 | have hK : IsCompact K := |
| 47 | (isCompact_closedBall (0 : TangentSpace (𝓡 n) p) A).prod |
| 48 | (hQcompact.image continuous_snd) |
| 49 | have hKtime : K ⊆ Set.univ ×ˢ Set.Ioo 0 τmax := |
| 50 | fun _ hw ↦ ⟨Set.mem_univ _, hItime hw.2⟩ |
| 51 | let endpoint : TangentSpace (𝓡 n) p × ℝ → M × ℝ := |
| 52 | fun w ↦ (G.gamma w.1 w.2, w.2) |
| 53 | let cost : TangentSpace (𝓡 n) p × ℝ → ℝ := |
| 54 | fun w ↦ G.toLExponentialFamily.action w.1 w.2 / (2 * Real.sqrt w.2) |
| 55 | have hendpoint : ContinuousOn endpoint K := |
| 56 | (G.gamma_smooth.continuousOn.mono hKtime).prodMk continuous_snd.continuousOn |
| 57 | have hcost : ContinuousOn cost K := by |
| 58 | apply (G.action_smooth.continuousOn.mono hKtime).div |
| 59 | (continuous_const.mul (Real.continuous_sqrt.comp continuous_snd)).continuousOn |
| 60 | intro w hw |
| 61 | exact mul_ne_zero (by norm_num) (Real.sqrt_pos.mpr (hKtime hw).2.1).ne' |
| 62 | apply lowerSemicontinuousAt_of_compact_lifts |
| 63 | (mem_interior_iff_mem_nhds.mp hzQ) hK hendpoint hcost |
| 64 | · intro w hw |
| 65 | have hwtime := (hQtime hw).2 |
| 66 | obtain ⟨Z, hZend, hZmin, hZaction⟩ := |
| 67 | exists_minimizing_lift hL G w.1 w.2 hwtime.1 hwtime.2 |
| 68 | have hZbound : (F.metric T).tangentNorm p Z ≤ A := |
| 69 | hAmin Z w.2 hwtime.1 hwtime.2 (by simpa only [hZend] using hw) hZmin |
| 70 | have hZnorm : ‖Z‖ ≤ A := by |
| 71 | rw [norm_eq_sqrt_real_inner] |
| 72 | exact hZbound |
| 73 | refine ⟨(Z, w.2), ⟨?_, ⟨w, hw, rfl⟩⟩, ?_, hZaction.symm⟩ |
| 74 | · simpa only [Metric.mem_closedBall, dist_zero_right] using hZnorm |
| 75 | · exact Prod.ext hZend rfl |
| 76 | · intro w hw hwend |
| 77 | have htime := (hKtime hw).2 |
| 78 | have hbound := reducedLength_le_normalized_action hL G w.1 w.2 htime.1 htime.2 |
| 79 | have hfirst : G.gamma w.1 w.2 = z.1 := congrArg Prod.fst hwend |
| 80 | have hsecond : w.2 = z.2 := congrArg Prod.snd hwend |
| 81 | change reducedLength F T p z.1 z.2 ≤ |
| 82 | G.toLExponentialFamily.action w.1 w.2 / (2 * Real.sqrt w.2) |
| 83 | rw [hfirst, hsecond] at hbound |
| 84 | simpa only [hsecond] using hbound |
| 85 | |
| 86 | /-- The actual reduced length is jointly continuous on the whole strict time window. -/ |
| 87 | theorem reducedLength_continuousOn |
| 88 | (hL : LGeodesicTheory F T τmax) |
| 89 | (hDifferential : ReducedLengthDifferentialTheory F T τmax) (p : M) : |
| 90 | ContinuousOn (fun z : M × ℝ ↦ reducedLength F T p z.1 z.2) |
| 91 | (Set.univ ×ˢ Set.Ioo 0 τmax) := by |
| 92 | obtain ⟨G⟩ := hDifferential.exponential_geometry p |
| 93 | intro z hz |
| 94 | apply ContinuousAt.continuousWithinAt |
| 95 | exact continuousAt_iff_lower_upperSemicontinuousAt.mpr |
| 96 | ⟨reducedLength_lowerSemicontinuousAt hL G z hz, |
| 97 | reducedLength_upperSemicontinuousAt hDifferential hz.2.1 hz.2.2⟩ |
| 98 | |
| 99 | end PoincareMT.ReducedVolume |