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.Horizontal.Basic |
| 2 | import PoincareLib.Geometry.Spacetime.Rescaling.HorizontalCalculus |
| 3 | |
| 4 | /-! Adapted from Mapher06/Poincare-MorganTian, `PoincareMT/Proofs/M13/HorizontalLie.lean`, |
| 5 | revision `0c5d5c4e1ecbc12703b1994e226df1b15d2e8d39`. See `references/ricci-flow/mapher/rescaling-import.json`. -/ |
| 6 | |
| 7 | /-! |
| 8 | # Invariance of the horizontal metric Lie derivative |
| 9 | |
| 10 | The metric factor cancels the time-vector factor on local smooth sections. |
| 11 | The supplied horizontal calculus then identifies the fixed pointwise tensors. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | open PoincareMT.Homothety |
| 22 | |
| 23 | namespace PoincareMT.ParabolicRescaling |
| 24 | |
| 25 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] |
| 26 | {A : AdaptedMetricAtlas n X} {R : GeneralizedFlowCarrierConclusion A} |
| 27 | {Q : ℝ} {hQ : 0 < Q} {a : ℝ} |
| 28 | |
| 29 | theorem parabolic_lie_on_fields |
| 30 | (U : Set R.spacetime.Point) (hU : IsOpen U) |
| 31 | (V W : HorizontalSection R.spacetime) |
| 32 | (hV : IsSmoothHorizontalSectionOn R.spacetime V U) |
| 33 | (hW : IsSmoothHorizontalSectionOn R.spacetime W U) |
| 34 | (p : R.spacetime.Point) (hp : p ∈ U) : |
| 35 | horizontalMetricLieDerivativeOnFields (spacetimeRescaling R Q hQ a).realization.spacetime |
| 36 | (parabolicHorizontalSection (spacetimeRescaling R Q hQ a) V) |
| 37 | (parabolicHorizontalSection (spacetimeRescaling R Q hQ a) W) p = |
| 38 | horizontalMetricLieDerivativeOnFields R.spacetime V W p := by |
| 39 | let : ChartedSpace (ModelProd (EuclideanHalfSpace 1) (EuclideanSpace ℝ (Fin n))) |
| 40 | R.spacetime.Point := R.spacetime.chartedSpace |
| 41 | let : IsManifold (spacetimeModel n) ∞ R.spacetime.Point := R.spacetime.isManifold |
| 42 | let P := spacetimeRescaling R Q hQ a |
| 43 | have hpair := horizontalMetric_inner_mdifferentiableAt V W p |
| 44 | ((hV.contMDiffAt (hU.mem_nhds hp)).mdifferentiableAt (by simp)) |
| 45 | ((hW.contMDiffAt (hU.mem_nhds hp)).mdifferentiableAt (by simp)) |
| 46 | have hmetric : (fun q : R.spacetime.Point ↦ P.realization.spacetime.horizontalMetric.inner q |
| 47 | (parabolicHorizontalSection P V q) (parabolicHorizontalSection P W q)) = |
| 48 | (fun q ↦ Q * R.spacetime.horizontalMetric.inner q (V q) (W q)) := by |
| 49 | funext q |
| 50 | exact P.metric_eq q (V q) (W q) |
| 51 | unfold horizontalMetricLieDerivativeOnFields |
| 52 | rw [hmetric, parabolic_timeBracket, parabolic_timeBracket] |
| 53 | change mvfderiv (spacetimeModel n) |
| 54 | (fun q : R.spacetime.Point ↦ Q * R.spacetime.horizontalMetric.inner q (V q) (W q)) p |
| 55 | ((1 / Q : ℝ) • R.spacetime.timeVector p) - |
| 56 | P.realization.spacetime.horizontalMetric.inner p |
| 57 | ((1 / Q : ℝ) • P.horizontal p (horizontalTimeBracket R.spacetime V p)) |
| 58 | (P.horizontal p (W p)) - |
| 59 | P.realization.spacetime.horizontalMetric.inner p (P.horizontal p (V p)) |
| 60 | ((1 / Q : ℝ) • P.horizontal p (horizontalTimeBracket R.spacetime W p)) = _ |
| 61 | rw [mvfderiv_fun_mul mdifferentiableAt_const hpair] |
| 62 | simp only [mvfderiv_const, smul_zero, add_zero, map_smul, smul_apply, smul_eq_mul, |
| 63 | P.metric_eq] |
| 64 | field_simp [hQ.ne'] |
| 65 | |
| 66 | theorem parabolic_horizontal_lie |
| 67 | (D : LeafwiseLeviCivitaFamily R.spacetime R.slices) |
| 68 | (D' : LeafwiseLeviCivitaFamily (spacetimeRescaling R Q hQ a).realization.spacetime |
| 69 | (spacetimeRescaling R Q hQ a).realization.slices) |
| 70 | (hD : HorizontalRicciCalculus D) (hD' : HorizontalRicciCalculus D') |
| 71 | (p : R.spacetime.Point) (v w : R.spacetime.Horizontal p) : |
| 72 | horizontalMetricLieDerivative (spacetimeRescaling R Q hQ a).realization.spacetime p |
| 73 | ((spacetimeRescaling R Q hQ a).horizontal p v) |
| 74 | ((spacetimeRescaling R Q hQ a).horizontal p w) = |
| 75 | horizontalMetricLieDerivative R.spacetime p v w := by |
| 76 | let P := spacetimeRescaling R Q hQ a |
| 77 | let V : HorizontalSection R.spacetime := FiberBundle.extend (EuclideanSpace ℝ (Fin n)) v |
| 78 | let W : HorizontalSection R.spacetime := FiberBundle.extend (EuclideanSpace ℝ (Fin n)) w |
| 79 | obtain ⟨U, hUp, hV⟩ := FiberBundle.exists_contMDiffOn_extend (k := ∞) |
| 80 | (spacetimeModel n) (EuclideanSpace ℝ (Fin n)) v |
| 81 | obtain ⟨U', hU'p, hW⟩ := FiberBundle.exists_contMDiffOn_extend (k := ∞) |
| 82 | (spacetimeModel n) (EuclideanSpace ℝ (Fin n)) w |
| 83 | obtain ⟨O, hOU, hO, hp⟩ := mem_nhds_iff.mp (Filter.inter_mem hUp hU'p) |
| 84 | have hVO : IsSmoothHorizontalSectionOn R.spacetime V O := |
| 85 | hV.mono (fun _ hx ↦ (hOU hx).1) |
| 86 | have hWO : IsSmoothHorizontalSectionOn R.spacetime W O := |
| 87 | hW.mono (fun _ hx ↦ (hOU hx).2) |
| 88 | calc |
| 89 | _ = horizontalMetricLieDerivative P.realization.spacetime p |
| 90 | (P.horizontal p (V p)) (P.horizontal p (W p)) := by |
| 91 | simp only [P, V, W, FiberBundle.extend_apply_self] |
| 92 | _ = horizontalMetricLieDerivativeOnFields P.realization.spacetime |
| 93 | (parabolicHorizontalSection P V) (parabolicHorizontalSection P W) p := |
| 94 | hD'.lie_on_fields O hO _ _ |
| 95 | ((parabolic_section_smooth_iff V O).2 hVO) |
| 96 | ((parabolic_section_smooth_iff W O).2 hWO) p hp |
| 97 | _ = horizontalMetricLieDerivativeOnFields R.spacetime V W p := |
| 98 | parabolic_lie_on_fields O hO V W hVO hWO p hp |
| 99 | _ = horizontalMetricLieDerivative R.spacetime p (V p) (W p) := |
| 100 | (hD.lie_on_fields O hO V W hVO hWO p hp).symm |
| 101 | _ = _ := by simp only [V, W, FiberBundle.extend_apply_self] |
| 102 | |
| 103 | end PoincareMT.ParabolicRescaling |