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.Generalized.ReducedGeometry.Rescaling.Measure.RescalingStable |
| 2 | |
| 3 | /-! |
| 4 | # Qualified joint domains under parabolic rescaling |
| 5 | |
| 6 | Morgan-Tian Definition 6.25 and Corollary 6.74, pp. 116, 142. The |
| 7 | product of the normalized initial equivalence and square-time scaling |
| 8 | identifies both the stable graph and its relative interior in the |
| 9 | actual admissible spacetime parameters. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | -- Actual source and target spacetime point types agree. |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M14 |
| 22 | |
| 23 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] |
| 24 | {time : X → ℝ} {I : SpacetimeInterval} |
| 25 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 26 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 27 | (hM13 : GeneralizedParabolicRescalingTheory.{u} n) |
| 28 | (G : GeneralizedLGeometryTransport n X time I) (Q : ℝ) (hQ : 0 < Q) (a : ℝ) |
| 29 | |
| 30 | /-- The normalized initial-vector and square-time map is an actual |
| 31 | product homeomorphism. Remark 6.73, p. 141. -/ |
| 32 | noncomputable def rescalingParameterHomeomorph (x : G.Point) : |
| 33 | G.Horizontal x × ℝ ≃ₜ (rescalingTransport hM12 hM13 G Q hQ a).Horizontal x × ℝ := |
| 34 | (rescalingInitialEquiv G.spacetime Q hQ a x).toHomeomorph.prodCongr |
| 35 | (Homeomorph.mulLeft₀ (Real.sqrt Q) (Real.sqrt_pos.mpr hQ).ne') |
| 36 | |
| 37 | /-- The actual spacetime admissibility condition is carried by the |
| 38 | product rescaling homeomorphism. Remark 6.73, p. 141. -/ |
| 39 | theorem rescalingAdmissible_iff (T : ℝ) (x : G.Point) (z : G.Horizontal x × ℝ) : |
| 40 | z ∈ M14AdmissibleParameter G T x ↔ |
| 41 | rescalingParameterHomeomorph hM12 hM13 G Q hQ a x z ∈ |
| 42 | M14AdmissibleParameter (rescalingTransport hM12 hM13 G Q hQ a) |
| 43 | (parabolicTime Q a T) x := by |
| 44 | change (0 ≤ z.2 ∧ T - z.2 ^ 2 ∈ I.domain) ↔ |
| 45 | (0 ≤ Real.sqrt Q * z.2 ∧ parabolicTime Q a T - (Real.sqrt Q * z.2) ^ 2 ∈ |
| 46 | (parabolicInterval Q hQ a I).domain) |
| 47 | have he : parabolicTime Q a T - (Real.sqrt Q * z.2) ^ 2 = |
| 48 | parabolicTime Q a (T - z.2 ^ 2) := by |
| 49 | rw [mul_pow, Real.sq_sqrt hQ.le] |
| 50 | unfold parabolicTime |
| 51 | ring |
| 52 | rw [he, parabolicTime_mem_parabolicInterval_iff] |
| 53 | exact and_congr (mul_nonneg_iff_of_pos_left (Real.sqrt_pos.mpr hQ)).symm Iff.rfl |
| 54 | |
| 55 | /-- A supplied target stable record gives a source slice point and the |
| 56 | full source stable record. The construction includes empty carriers. |
| 57 | Definition 6.25 and Corollary 6.74, pp. 116, 142. -/ |
| 58 | noncomputable def rescalingStableSetInverse {T τ : ℝ} {x : G.Point} |
| 59 | (E : M14ExponentialFamily G T x) |
| 60 | (E' : M14ExponentialFamily (rescalingTransport hM12 hM13 G Q hQ a) |
| 61 | (parabolicTime Q a T) x) |
| 62 | (H' : M14StableSet (rescalingTransport hM12 hM13 G Q hQ a) |
| 63 | (parabolicTime Q a T) (Q * τ) x E') : M14StableSet G T τ x E := by |
| 64 | have hτ : 0 < τ := (mul_pos_iff_of_pos_left hQ).mp H'.tau_pos |
| 65 | let q₀' := H'.endpoint_slice_map 0 |
| 66 | let q₀ : (G.slices (T - τ)).Point := ⟨q₀'.val, by |
| 67 | have ht := q₀'.property |
| 68 | change parabolicTime Q a (G.spacetime.timeFunction q₀'.val) = |
| 69 | parabolicTime Q a T - Q * τ at ht |
| 70 | apply (mul_left_cancel₀ hQ.ne') |
| 71 | unfold parabolicTime at ht |
| 72 | linear_combination ht⟩ |
| 73 | exact stableSetOfSlicePoint E hτ q₀ |
| 74 | |
| 75 | include hCoordinates in |
| 76 | /-- The exact stable graph corresponds under the product homeomorphism. |
| 77 | Corollary 6.74, p. 142. -/ |
| 78 | theorem rescalingStableGraph_iff {T : ℝ} {x : G.Point} |
| 79 | (E : M14ExponentialFamily G T x) |
| 80 | (E' : M14ExponentialFamily (rescalingTransport hM12 hM13 G Q hQ a) |
| 81 | (parabolicTime Q a T) x) (z : G.Horizontal x × ℝ) : |
| 82 | z ∈ M14StableGraph G E ↔ |
| 83 | rescalingParameterHomeomorph hM12 hM13 G Q hQ a x z ∈ |
| 84 | M14StableGraph (rescalingTransport hM12 hM13 G Q hQ a) E' := by |
| 85 | let A := rescalingInitialEquiv G.spacetime Q hQ a x |
| 86 | change (∃ τ, ∃ H : M14StableSet G T τ x E, 0 < τ ∧ z.1 ∈ H.carrier ∧ z.2 = Real.sqrt τ) ↔ |
| 87 | ∃ τ', ∃ H' : M14StableSet (rescalingTransport hM12 hM13 G Q hQ a) |
| 88 | (parabolicTime Q a T) τ' x E', |
| 89 | 0 < τ' ∧ A z.1 ∈ H'.carrier ∧ Real.sqrt Q * z.2 = Real.sqrt τ' |
| 90 | constructor |
| 91 | · rintro ⟨τ, H, hτ, hZ, hs⟩ |
| 92 | let H' := rescalingStableSet hM12 hM13 G Q hQ a E E' H |
| 93 | refine ⟨Q * τ, H', mul_pos hQ hτ, |
| 94 | (rescalingStable_carrier_iff hCoordinates hM12 hM13 G Q hQ a E E' H H' z.1).mp hZ, ?_⟩ |
| 95 | rw [hs, Real.sqrt_mul hQ.le] |
| 96 | · rintro ⟨τ', H', hτ', hZ, hs⟩ |
| 97 | have hex : Nonempty (M14StableSet (rescalingTransport hM12 hM13 G Q hQ a) |
| 98 | (parabolicTime Q a T) (Q * (τ' / Q)) x E') := by |
| 99 | rw [mul_div_cancel₀ _ hQ.ne'] |
| 100 | exact ⟨H'⟩ |
| 101 | obtain ⟨H''⟩ := hex |
| 102 | let H := rescalingStableSetInverse hM12 hM13 G Q hQ a E E' H'' |
| 103 | have hZ' : A z.1 ∈ H''.carrier := by |
| 104 | rw [H''.carrier_exact, mul_div_cancel₀ _ hQ.ne'] |
| 105 | exact (H'.carrier_exact _).mp hZ |
| 106 | refine ⟨τ' / Q, H, div_pos hτ' hQ, |
| 107 | (rescalingStable_carrier_iff hCoordinates hM12 hM13 G Q hQ a E E' H H'' z.1).mpr hZ', ?_⟩ |
| 108 | apply (mul_left_cancel₀ (Real.sqrt_pos.mpr hQ).ne') |
| 109 | rw [← Real.sqrt_mul hQ.le, mul_div_cancel₀ _ hQ.ne'] |
| 110 | exact hs |
| 111 | |
| 112 | private theorem relativeInterior_homeomorph_iff {α β : Type*} |
| 113 | [TopologicalSpace α] [TopologicalSpace β] (e : α ≃ₜ β) |
| 114 | (A S : Set α) (A' S' : Set β) |
| 115 | (hA : ∀ z, z ∈ A ↔ e z ∈ A') (hS : ∀ z, z ∈ S ↔ e z ∈ S') (z : α) : |
| 116 | z ∈ M14RelativeInterior A S ↔ e z ∈ M14RelativeInterior A' S' := by |
| 117 | constructor |
| 118 | · rintro ⟨hz, U, hU, hzu, hUS⟩ |
| 119 | refine ⟨(hS z).mp hz, e.symm ⁻¹' U, hU.preimage e.symm.continuous, ?_, ?_⟩ |
| 120 | · simpa only [mem_preimage, e.symm_apply_apply] using hzu |
| 121 | · rintro w ⟨hw, hwA⟩ |
| 122 | have hwa : e.symm w ∈ A := (hA _).mpr (by simpa only [e.apply_symm_apply] using hwA) |
| 123 | simpa only [e.apply_symm_apply] using (hS _).mp (hUS ⟨hw, hwa⟩) |
| 124 | · rintro ⟨hz, U, hU, hzu, hUS⟩ |
| 125 | refine ⟨(hS z).mpr hz, e ⁻¹' U, hU.preimage e.continuous, hzu, ?_⟩ |
| 126 | rintro w ⟨hw, hwA⟩ |
| 127 | exact (hS w).mpr (hUS ⟨hw, (hA w).mp hwA⟩) |
| 128 | |
| 129 | include hCoordinates in |
| 130 | /-- The qualified joint domain, with its actual relative-interior |
| 131 | condition, corresponds under rescaling. Corollary 6.74, p. 142. -/ |
| 132 | theorem rescalingJointDomain_iff {T : ℝ} {x : G.Point} |
| 133 | (E : M14ExponentialFamily G T x) |
| 134 | (E' : M14ExponentialFamily (rescalingTransport hM12 hM13 G Q hQ a) |
| 135 | (parabolicTime Q a T) x) (Z : G.Horizontal x) (s : ℝ) : |
| 136 | (Z, s) ∈ M14JointDomain G E ↔ |
| 137 | (rescalingInitialEquiv G.spacetime Q hQ a x Z, Real.sqrt Q * s) ∈ |
| 138 | M14JointDomain (rescalingTransport hM12 hM13 G Q hQ a) E' := |
| 139 | relativeInterior_homeomorph_iff (rescalingParameterHomeomorph hM12 hM13 G Q hQ a x) |
| 140 | _ _ _ _ (rescalingAdmissible_iff hM12 hM13 G Q hQ a T x) |
| 141 | (rescalingStableGraph_iff hCoordinates hM12 hM13 G Q hQ a E E') (Z, s) |
| 142 | |
| 143 | end PoincareMT.M14 |