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.FullSourceContinuity |
| 2 | import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic |
| 3 | |
| 4 | /-! |
| 5 | # The actual weighted regular rays extended by zero |
| 6 | |
| 7 | The canonical regular source is open and backward nested. Its weighted |
| 8 | Jacobian is continuous on the source, so extending by zero is measurable. |
| 9 | Initial coverage and pointwise monotonicity retain the exact source domain. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter MeasureTheory |
| 15 | open scoped Manifold ContDiff Bundle Topology |
| 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 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 24 | |
| 25 | /-- The actual weighted Jacobian on its canonical regular source, zero elsewhere. -/ |
| 26 | noncomputable def regularWeightedJacobian (G : LExponentialGeometry F T τmax p) |
| 27 | (τ : ℝ) (x : EuclideanSpace ℝ (Fin n)) : ℝ := |
| 28 | (exponentialSliceChart G τ).source.indicator (weightedExponentialJacobian G τ) x |
| 29 | |
| 30 | /-- Extending the actual weight by zero preserves nonnegativity. -/ |
| 31 | theorem regularWeightedJacobian_nonneg (G : LExponentialGeometry F T τmax p) |
| 32 | {τ : ℝ} (hτ : 0 < τ) (x : EuclideanSpace ℝ (Fin n)) : |
| 33 | 0 ≤ regularWeightedJacobian G τ x := by |
| 34 | classical |
| 35 | by_cases hx : x ∈ (exponentialSliceChart G τ).source |
| 36 | · simpa only [regularWeightedJacobian, indicator_of_mem hx] using |
| 37 | weightedExponentialJacobian_nonneg G hτ x |
| 38 | · simp only [regularWeightedJacobian, indicator_of_notMem hx, le_refl] |
| 39 | |
| 40 | /-- The actual action and Jacobian make the weight continuous on its regular source. -/ |
| 41 | theorem weightedExponentialJacobian_continuousOn |
| 42 | (G : LExponentialGeometry F T τmax p) {τ : ℝ} (hτ : 0 < τ) (hmax : τ < τmax) : |
| 43 | ContinuousOn (weightedExponentialJacobian G τ) (exponentialSliceChart G τ).source := |
| 44 | (weightedExponentialJacobian_continuous G hτ hmax).continuousOn |
| 45 | |
| 46 | /-- The zero extension is measurable without any assertion of continuity at the cut locus. -/ |
| 47 | theorem regularWeightedJacobian_measurable |
| 48 | (G : LExponentialGeometry F T τmax p) {τ : ℝ} (hτ : 0 < τ) (hmax : τ < τmax) : |
| 49 | Measurable (regularWeightedJacobian G τ) := by |
| 50 | classical |
| 51 | exact (weightedExponentialJacobian_continuousOn G hτ hmax).measurable_piecewise |
| 52 | continuousOn_const (exponentialSliceChart G τ).open_source.measurableSet |
| 53 | |
| 54 | /-- Each fixed vector belongs to the canonical regular source at all sufficiently small times. -/ |
| 55 | theorem eventually_mem_exponentialSlice_source |
| 56 | (G : LExponentialGeometry F T τmax p) (x : EuclideanSpace ℝ (Fin n)) : |
| 57 | ∀ᶠ τ in 𝓝[>] (0 : ℝ), x ∈ (exponentialSliceChart G τ).source := by |
| 58 | obtain ⟨δ, hδ, _, hcover⟩ := G.bounded_initial_coverage ‖x‖ (norm_nonneg _) |
| 59 | filter_upwards [Ioo_mem_nhdsGT hδ] with τ hτ |
| 60 | rw [exponentialSliceChart_source] |
| 61 | exact hcover (metricCoordinates (F.metric T) p x) |
| 62 | (by rw [metricCoordinates_tangentNorm]) τ hτ.1 hτ.2 |
| 63 | |
| 64 | /-- Initial coverage makes the zero extension eventually equal to the actual smooth ray. -/ |
| 65 | theorem regularWeightedJacobian_eventually_eq |
| 66 | (G : LExponentialGeometry F T τmax p) (x : EuclideanSpace ℝ (Fin n)) : |
| 67 | (fun τ ↦ regularWeightedJacobian G τ x) =ᶠ[𝓝[>] (0 : ℝ)] |
| 68 | (fun τ ↦ weightedExponentialJacobian G τ x) := by |
| 69 | filter_upwards [eventually_mem_exponentialSlice_source G x] with τ hτ |
| 70 | exact indicator_of_mem hτ _ |
| 71 | |
| 72 | variable [ConnectedSpace M] |
| 73 | |
| 74 | /-- Backward nesting and the actual ray derivative give monotonicity of the zero extension. -/ |
| 75 | theorem regularWeightedJacobian_antitoneOn |
| 76 | (hwindow : Icc (T - τmax) T ⊆ J) (hL : LGeodesicTheory F T τmax) |
| 77 | (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 78 | (G : LExponentialGeometry F T τmax p) (x : EuclideanSpace ℝ (Fin n)) : |
| 79 | AntitoneOn (fun τ ↦ regularWeightedJacobian G τ x) (Ioo 0 τmax) := by |
| 80 | classical |
| 81 | intro a ha b hb hab |
| 82 | by_cases hx : x ∈ (exponentialSliceChart G b).source |
| 83 | · have hreg : (metricCoordinates (F.metric T) p x, b) ∈ |
| 84 | G.toLExponentialFamily.regularDomain := by |
| 85 | rwa [exponentialSliceChart_source] at hx |
| 86 | have hrega := G.backward_nesting _ b hreg a ha.1 hab |
| 87 | have hxa : x ∈ (exponentialSliceChart G a).source := by |
| 88 | rwa [exponentialSliceChart_source] |
| 89 | simp only [regularWeightedJacobian, indicator_of_mem hx, indicator_of_mem hxa] |
| 90 | exact weightedExponentialJacobian_antitoneOn hwindow hL hDifferential G x hrega hreg hab |
| 91 | · simpa only [regularWeightedJacobian, indicator_of_notMem hx] using |
| 92 | regularWeightedJacobian_nonneg G ha.1 x |
| 93 | |
| 94 | end PoincareMT.ReducedVolume |