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.Spacetime.Rescaling.Geometry.Construction |
| 2 | import PoincareLib.Geometry.Riemannian.Homothety.Curvature.TangentIsometry |
| 3 | import PoincareLib.Geometry.Spacetime.Rescaling.Horizontal |
| 4 | |
| 5 | /-! Adapted from Mapher06/Poincare-MorganTian, `PoincareMT/Proofs/M13/HorizontalBasics.lean`, |
| 6 | revision `0c5d5c4e1ecbc12703b1994e226df1b15d2e8d39`. See `references/ricci-flow/mapher/rescaling-import.json`. -/ |
| 7 | |
| 8 | /-! |
| 9 | # Horizontal sections and normalized fiber geometry |
| 10 | |
| 11 | The constructed spacetime retains the ambient charts. Its smooth bundle |
| 12 | equivalence preserves sections and the actual vector field underlying them. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | open PoincareMT.Homothety |
| 23 | |
| 24 | namespace PoincareMT.ParabolicRescaling |
| 25 | |
| 26 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] |
| 27 | {A : AdaptedMetricAtlas n X} {R : GeneralizedFlowCarrierConclusion A} |
| 28 | {Q : ℝ} {hQ : 0 < Q} {a : ℝ} |
| 29 | |
| 30 | noncomputable def normalizedHorizontalIsometry |
| 31 | (P : ParabolicSpacetimeRescaling R Q hQ a) : |
| 32 | ParabolicNormalizedHorizontalIsometry P := by |
| 33 | have hs : Real.sqrt Q ≠ 0 := (Real.sqrt_pos.mpr hQ).ne' |
| 34 | refine { |
| 35 | linearEquiv := fun p ↦ ContinuousLinearEquiv.equivOfInverse |
| 36 | ((1 / Real.sqrt Q : ℝ) • (P.horizontal p).toContinuousLinearMap) |
| 37 | (Real.sqrt Q • (P.horizontal p).symm.toContinuousLinearMap) |
| 38 | (by intro v; simp [smul_smul, hs]) |
| 39 | (by intro v; simp [smul_smul, hs]) |
| 40 | linearEquiv_eq := fun _ _ ↦ rfl |
| 41 | inner_eq := ?_ } |
| 42 | intro p v w |
| 43 | change P.realization.spacetime.horizontalMetric.inner p |
| 44 | ((1 / Real.sqrt Q : ℝ) • P.horizontal p v) |
| 45 | ((1 / Real.sqrt Q : ℝ) • P.horizontal p w) = |
| 46 | R.spacetime.horizontalMetric.inner p v w |
| 47 | simp only [map_smul, smul_apply, smul_eq_mul, P.metric_eq, one_div] |
| 48 | have hscale : (Real.sqrt Q)⁻¹ * (Real.sqrt Q)⁻¹ * Q = 1 := by |
| 49 | rw [inv_sqrt_mul_inv_sqrt Q hQ.le, inv_mul_cancel₀ hQ.ne'] |
| 50 | calc |
| 51 | _ = ((Real.sqrt Q)⁻¹ * (Real.sqrt Q)⁻¹ * Q) * |
| 52 | R.spacetime.horizontalMetric.inner p v w := by ring |
| 53 | _ = _ := by rw [hscale, one_mul] |
| 54 | |
| 55 | theorem parabolic_section_smooth_iff |
| 56 | (V : HorizontalSection R.spacetime) (U : Set R.spacetime.Point) : |
| 57 | IsSmoothHorizontalSectionOn (spacetimeRescaling R Q hQ a).realization.spacetime |
| 58 | (parabolicHorizontalSection (spacetimeRescaling R Q hQ a) V) U ↔ |
| 59 | IsSmoothHorizontalSectionOn R.spacetime V U := by |
| 60 | let P := spacetimeRescaling R Q hQ a |
| 61 | constructor |
| 62 | · intro hV |
| 63 | have h := P.horizontal_inverse_smooth.comp_contMDiffOn hV |
| 64 | change IsSmoothHorizontalSectionOn R.spacetime |
| 65 | (fun p ↦ (P.horizontal p).symm (P.horizontal p (V p))) U at h |
| 66 | simpa only [ContinuousLinearEquiv.symm_apply_apply] using h |
| 67 | · intro hV |
| 68 | exact P.horizontal_smooth.comp_contMDiffOn hV |
| 69 | |
| 70 | theorem parabolic_timeBracket |
| 71 | (V : HorizontalSection R.spacetime) (p : R.spacetime.Point) : |
| 72 | horizontalTimeBracket (spacetimeRescaling R Q hQ a).realization.spacetime |
| 73 | (parabolicHorizontalSection (spacetimeRescaling R Q hQ a) V) p = |
| 74 | (1 / Q : ℝ) • (spacetimeRescaling R Q hQ a).horizontal p |
| 75 | (horizontalTimeBracket R.spacetime V p) := by |
| 76 | let : ChartedSpace (ModelProd (EuclideanHalfSpace 1) (EuclideanSpace ℝ (Fin n))) |
| 77 | R.spacetime.Point := R.spacetime.chartedSpace |
| 78 | let : IsManifold (spacetimeModel n) ∞ R.spacetime.Point := R.spacetime.isManifold |
| 79 | change (parabolicSpacetime R.spacetime Q hQ a).horizontalProjection p |
| 80 | (VectorField.mlieBracket (spacetimeModel n) |
| 81 | ((1 / Q : ℝ) • R.spacetime.timeVector) |
| 82 | (horizontalSectionVectorField R.spacetime V) p) = _ |
| 83 | rw [VectorField.mlieBracket_const_smul_left |
| 84 | (R.spacetime.timeVector_smooth.mdifferentiable (by simp) p), map_smul, |
| 85 | parabolicSpacetime_projection] |
| 86 | rfl |
| 87 | |
| 88 | theorem horizontalMetric_inner_mdifferentiableAt |
| 89 | (V W : HorizontalSection R.spacetime) (p : R.spacetime.Point) |
| 90 | (hV : MDifferentiableAt (spacetimeModel n) |
| 91 | ((spacetimeModel n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) |
| 92 | (fun q ↦ Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) |
| 93 | (E := R.spacetime.Horizontal) q (V q)) p) |
| 94 | (hW : MDifferentiableAt (spacetimeModel n) |
| 95 | ((spacetimeModel n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) |
| 96 | (fun q ↦ Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) |
| 97 | (E := R.spacetime.Horizontal) q (W q)) p) : |
| 98 | MDifferentiableAt (spacetimeModel n) 𝓘(ℝ) |
| 99 | (fun q ↦ R.spacetime.horizontalMetric.inner q (V q) (W q)) p := by |
| 100 | have htotal : MDifferentiableAt (spacetimeModel n) ((spacetimeModel n).prod 𝓘(ℝ)) |
| 101 | (fun q : R.spacetime.Point ↦ Bundle.TotalSpace.mk' ℝ |
| 102 | (E := Bundle.Trivial R.spacetime.Point ℝ) q |
| 103 | (R.spacetime.horizontalMetric.inner q (V q) (W q))) p := by |
| 104 | apply MDifferentiableAt.clm_bundle_apply₂ |
| 105 | (F₁ := EuclideanSpace ℝ (Fin n)) (F₂ := EuclideanSpace ℝ (Fin n)) |
| 106 | · exact R.spacetime.horizontalMetric.contMDiff.mdifferentiableAt (by simp) |
| 107 | · exact hV |
| 108 | · exact hW |
| 109 | simp only [mdifferentiableAt_totalSpace] at htotal |
| 110 | exact htotal.2 |
| 111 | |
| 112 | end PoincareMT.ParabolicRescaling |