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.Comparison.RegularWeights |
| 2 | |
| 3 | /-! |
| 4 | # Actual regular rays in backward L-star-shaped domains |
| 5 | |
| 6 | Morgan-Tian Proposition 6.81. The source is intersected with the actual |
| 7 | preimage of the open domain. Unique minimality identifies the path in the |
| 8 | domain predicate with the same exponential ray used by the Jacobian. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open Set MeasureTheory |
| 14 | open scoped Manifold ContDiff Bundle Topology |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedVolume |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 22 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 23 | |
| 24 | /-- The canonical source restricted to the actual spacetime domain. -/ |
| 25 | def restrictedRegularSource (G : LExponentialGeometry F T τmax p) |
| 26 | (A : Set (M × ℝ)) (τ : ℝ) : Set (EuclideanSpace ℝ (Fin n)) := |
| 27 | (exponentialSliceChart G τ).source ∩ |
| 28 | (fun x ↦ (exponentialSliceChart G τ x, τ)) ⁻¹' A |
| 29 | |
| 30 | /-- Intersecting with the genuine chart source makes the domain preimage open. -/ |
| 31 | theorem restrictedRegularSource_isOpen (G : LExponentialGeometry F T τmax p) |
| 32 | {A : Set (M × ℝ)} (hA : IsOpen A) (τ : ℝ) : |
| 33 | IsOpen (restrictedRegularSource G A τ) := |
| 34 | ((exponentialSliceChart G τ).continuousOn.prodMk continuousOn_const).isOpen_inter_preimage |
| 35 | (exponentialSliceChart G τ).open_source hA |
| 36 | |
| 37 | /-- The actual weighted source restricted to a spacetime domain, extended by zero. -/ |
| 38 | noncomputable def restrictedWeightedJacobian (G : LExponentialGeometry F T τmax p) |
| 39 | (A : Set (M × ℝ)) (τ : ℝ) (x : EuclideanSpace ℝ (Fin n)) : ℝ := |
| 40 | (restrictedRegularSource G A τ).indicator (weightedExponentialJacobian G τ) x |
| 41 | |
| 42 | /-- The restricted weight is nonnegative at every positive time. -/ |
| 43 | theorem restrictedWeightedJacobian_nonneg (G : LExponentialGeometry F T τmax p) |
| 44 | (A : Set (M × ℝ)) {τ : ℝ} (hτ : 0 < τ) (x : EuclideanSpace ℝ (Fin n)) : |
| 45 | 0 ≤ restrictedWeightedJacobian G A τ x := by |
| 46 | classical |
| 47 | by_cases hx : x ∈ restrictedRegularSource G A τ |
| 48 | · simpa only [restrictedWeightedJacobian, indicator_of_mem hx] using |
| 49 | weightedExponentialJacobian_nonneg G hτ x |
| 50 | · simp only [restrictedWeightedJacobian, indicator_of_notMem hx, le_refl] |
| 51 | |
| 52 | /-- The measurable restricted weight retains the exact open source. -/ |
| 53 | theorem restrictedWeightedJacobian_measurable (G : LExponentialGeometry F T τmax p) |
| 54 | {A : Set (M × ℝ)} (hA : IsOpen A) {τ : ℝ} (hτ : 0 < τ) (hmax : τ < τmax) : |
| 55 | Measurable (restrictedWeightedJacobian G A τ) := by |
| 56 | classical |
| 57 | have hc : ContinuousOn (weightedExponentialJacobian G τ) |
| 58 | (restrictedRegularSource G A τ) := |
| 59 | (weightedExponentialJacobian_continuous G hτ hmax).continuousOn |
| 60 | exact hc.measurable_piecewise continuousOn_const |
| 61 | (restrictedRegularSource_isOpen G hA τ).measurableSet |
| 62 | |
| 63 | /-- Restricting the domain can only decrease the nonnegative regular weight. -/ |
| 64 | theorem restrictedWeightedJacobian_le_regular (G : LExponentialGeometry F T τmax p) |
| 65 | (A : Set (M × ℝ)) {τ : ℝ} (hτ : 0 < τ) (x : EuclideanSpace ℝ (Fin n)) : |
| 66 | restrictedWeightedJacobian G A τ x ≤ regularWeightedJacobian G τ x := by |
| 67 | classical |
| 68 | by_cases hx : x ∈ restrictedRegularSource G A τ |
| 69 | · simp only [restrictedWeightedJacobian, regularWeightedJacobian, |
| 70 | indicator_of_mem hx, indicator_of_mem hx.1, le_refl] |
| 71 | · simpa only [restrictedWeightedJacobian, indicator_of_notMem hx] using |
| 72 | regularWeightedJacobian_nonneg G hτ x |
| 73 | |
| 74 | /-- Unique minimality transfers backward domain nesting to the actual canonical source. -/ |
| 75 | theorem restrictedRegularSource_backward_nested (G : LExponentialGeometry F T τmax p) |
| 76 | {A : Set (M × ℝ)} (hA : IsBackwardLStarShaped F T τmax p A) |
| 77 | {a b : ℝ} (ha : 0 < a) (hab : a ≤ b) : |
| 78 | restrictedRegularSource G A b ⊆ restrictedRegularSource G A a := by |
| 79 | intro x hx |
| 80 | have hreg : (metricCoordinates (F.metric T) p x, b) ∈ |
| 81 | G.toLExponentialFamily.regularDomain := by |
| 82 | simpa only [exponentialSliceChart_source, mem_ofPred_eq] using hx.1 |
| 83 | have hrega := G.backward_nesting _ b hreg a ha hab |
| 84 | refine ⟨?_, ?_⟩ |
| 85 | · simpa only [exponentialSliceChart_source, mem_ofPred_eq] using hrega |
| 86 | · obtain ⟨r, hr⟩ := hA.2.2 (exponentialSliceChart G b x, b) hx.2 |
| 87 | obtain ⟨_, _, _, huniq⟩ := hreg.1 |
| 88 | have heq := huniq r.path r.path_start |
| 89 | (by simpa only [exponentialSliceChart_apply] using r.path_end) r.minimizing |
| 90 | have hpath := hr a ⟨ha, hab⟩ |
| 91 | rw [heq ⟨ha.le, hab⟩] at hpath |
| 92 | simpa only [mem_preimage, exponentialSliceChart_apply] using hpath |
| 93 | |
| 94 | variable [ConnectedSpace M] |
| 95 | |
| 96 | /-- The restricted actual weight is antitone on every backward L-star-shaped domain. -/ |
| 97 | theorem restrictedWeightedJacobian_antitoneOn |
| 98 | (hwindow : Icc (T - τmax) T ⊆ J) (hL : LGeodesicTheory F T τmax) |
| 99 | (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 100 | (G : LExponentialGeometry F T τmax p) {A : Set (M × ℝ)} |
| 101 | (hA : IsBackwardLStarShaped F T τmax p A) (x : EuclideanSpace ℝ (Fin n)) : |
| 102 | AntitoneOn (fun τ ↦ restrictedWeightedJacobian G A τ x) (Ioo 0 τmax) := by |
| 103 | classical |
| 104 | intro a ha b hb hab |
| 105 | by_cases hx : x ∈ restrictedRegularSource G A b |
| 106 | · have hxa := restrictedRegularSource_backward_nested G hA ha.1 hab hx |
| 107 | have hreg : (metricCoordinates (F.metric T) p x, b) ∈ |
| 108 | G.toLExponentialFamily.regularDomain := by |
| 109 | simpa only [exponentialSliceChart_source, mem_ofPred_eq] using hx.1 |
| 110 | have hrega := G.backward_nesting _ b hreg a ha.1 hab |
| 111 | simp only [restrictedWeightedJacobian, indicator_of_mem hx, indicator_of_mem hxa] |
| 112 | exact weightedExponentialJacobian_antitoneOn hwindow hL hDifferential G x hrega hreg hab |
| 113 | · simpa only [restrictedWeightedJacobian, indicator_of_notMem hx] using |
| 114 | restrictedWeightedJacobian_nonneg G A ha.1 x |
| 115 | |
| 116 | end PoincareMT.ReducedVolume |