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.Surgery.CanonicalInduction.Terminal.Common.TerminalCommonIntervalCoherence |
| 2 | import PoincareLib.Geometry.Riemannian.Coordinates.Composition |
| 3 | import PoincareLib.Geometry.Manifold.RegularLevel.OpenInclusion |
| 4 | |
| 5 | /-! |
| 6 | # Actual source coefficients on the common included past |
| 7 | |
| 8 | The original scalar normalization and both source metric slots pass |
| 9 | through the actual cylinder maps. Physical backward uniqueness retains |
| 10 | the terminal coordinate transition at every common included time. |
| 11 | MT Theorem 5.11 and Proposition 5.14, pp. 89-91; |
| 12 | terminal-source-actual-overlap.md. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter TopologicalSpace |
| 19 | open scoped Manifold ContDiff Bundle Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M47 |
| 24 | |
| 25 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 26 | |
| 27 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 28 | normedSpaceTangentSpaceVectorSpace |
| 29 | |
| 30 | /-- The actual normalized source metric has the physical coefficients |
| 31 | in both tangent slots through its original open inclusion. -/ |
| 32 | theorem terminalSource_actual_coordinate_readout |
| 33 | {F : SurgeryFlowData.{u}} {C : GeneralizedSliceCarrier.{u}} |
| 34 | {origin Q : ℝ} {I : Set ℝ} (U : Opens C.carrier) |
| 35 | (e : SurgeryFlowCylinder F C origin Q I U) (s : ℝ) (hs : s ∈ I) |
| 36 | (gU : RiemannianMetric 3 U) |
| 37 | (hmetric : ∀ (y : U) (v w : TangentSpace (𝓡 3) y), |
| 38 | gU.inner y v w = e.pullbackInner s hs y.val |
| 39 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U → C.carrier) y v) |
| 40 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U → C.carrier) y w)) |
| 41 | {W : Set E} (hW : IsOpen W) (p : E → U) |
| 42 | (hp : ContMDiffOn (𝓡 3) (𝓡 3) ∞ p W) |
| 43 | {x : E} (hx : x ∈ W) (v w : E) : |
| 44 | gU.pullbackCoefficients p x v w = |
| 45 | Q * (F.metric (origin + s / Q)).pullbackCoefficients |
| 46 | (fun y => e.forward s hs (p y).val) x v w := by |
| 47 | have hp' := hp.contMDiffAt (hW.mem_nhds hx) |
| 48 | have hi : ContMDiffAt (𝓡 3) (𝓡 3) ∞ |
| 49 | (Subtype.val : U → C.carrier) (p x) := contMDiff_subtype_val.contMDiffAt |
| 50 | have he := (e.forward_smooth s hs).contMDiffAt (U.isOpen.mem_nhds (p x).property) |
| 51 | have hdU := mfderiv_comp x (hi.mdifferentiableAt (by simp)) |
| 52 | (hp'.mdifferentiableAt (by simp)) |
| 53 | have hdE := mfderiv_comp x (he.mdifferentiableAt (by simp)) |
| 54 | ((hi.comp x hp').mdifferentiableAt (by simp)) |
| 55 | change gU.inner (p x) (mfderiv (𝓡 3) (𝓡 3) p x v) |
| 56 | (mfderiv (𝓡 3) (𝓡 3) p x w) = |
| 57 | Q * (F.metric (origin + s / Q)).inner (e.forward s hs (p x).val) |
| 58 | (mfderiv (𝓡 3) (𝓡 3) |
| 59 | (e.forward s hs ∘ ((Subtype.val : U → C.carrier) ∘ p)) x v) |
| 60 | (mfderiv (𝓡 3) (𝓡 3) |
| 61 | (e.forward s hs ∘ ((Subtype.val : U → C.carrier) ∘ p)) x w) |
| 62 | rw [hdE, hdU, hmetric] |
| 63 | rfl |
| 64 | |
| 65 | /-- The same terminal physical map gives the full normalized source |
| 66 | coefficient transition at every common included past time. -/ |
| 67 | theorem terminalSource_actual_overlap_coefficients |
| 68 | {F : SurgeryFlowData.{u}} {C D : GeneralizedSliceCarrier.{u}} |
| 69 | {origin Q a : ℝ} {I J : Set ℝ} (U : Opens C.carrier) (V : Opens D.carrier) |
| 70 | (e : SurgeryFlowCylinder F C origin Q I U) |
| 71 | (f : SurgeryFlowCylinder F D origin Q J V) |
| 72 | (ha : a ≤ 0) (hI : Icc a 0 ⊆ I) (hJ : Icc a 0 ⊆ J) |
| 73 | (gU : RiemannianMetric 3 U) (gV : RiemannianMetric 3 V) |
| 74 | (hemetric : ∀ (y : U) (v w : TangentSpace (𝓡 3) y), |
| 75 | gU.inner y v w = e.pullbackInner a (hI ⟨le_rfl, ha⟩) y.val |
| 76 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U → C.carrier) y v) |
| 77 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U → C.carrier) y w)) |
| 78 | (hfmetric : ∀ (y : V) (v w : TangentSpace (𝓡 3) y), |
| 79 | gV.inner y v w = f.pullbackInner a (hJ ⟨le_rfl, ha⟩) y.val |
| 80 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : V → D.carrier) y v) |
| 81 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : V → D.carrier) y w)) |
| 82 | {W Z : Set E} (hW : IsOpen W) (hZ : IsOpen Z) |
| 83 | (p : E → U) (q : E → V) (T : E → E) |
| 84 | (hp : ContMDiffOn (𝓡 3) (𝓡 3) ∞ p W) |
| 85 | (hq : ContMDiffOn (𝓡 3) (𝓡 3) ∞ q Z) |
| 86 | (hT : ContDiffOn ℝ ∞ T W) (hTZ : MapsTo T W Z) |
| 87 | (hterminal : ∀ x ∈ W, |
| 88 | e.forward 0 (hI ⟨ha, le_rfl⟩) (p x).val = |
| 89 | f.forward 0 (hJ ⟨ha, le_rfl⟩) (q (T x)).val) |
| 90 | {x : E} (hx : x ∈ W) (v w : E) : |
| 91 | gV.pullbackCoefficients q (T x) (fderiv ℝ T x v) (fderiv ℝ T x w) = |
| 92 | gU.pullbackCoefficients p x v w := by |
| 93 | let P : E → (F.slice (origin + a / Q)).carrier := |
| 94 | fun y => e.forward a (hI ⟨le_rfl, ha⟩) (p y).val |
| 95 | let R : E → (F.slice (origin + a / Q)).carrier := |
| 96 | fun y => f.forward a (hJ ⟨le_rfl, ha⟩) (q y).val |
| 97 | have hq' := hq.contMDiffAt (hZ.mem_nhds (hTZ hx)) |
| 98 | have hi : ContMDiffAt (𝓡 3) (𝓡 3) ∞ |
| 99 | (Subtype.val : V → D.carrier) (q (T x)) := contMDiff_subtype_val.contMDiffAt |
| 100 | have hf := (f.forward_smooth a (hJ ⟨le_rfl, ha⟩)).contMDiffAt |
| 101 | (V.isOpen.mem_nhds (q (T x)).property) |
| 102 | have hR : ContMDiffAt (𝓡 3) (𝓡 3) ∞ R (T x) := |
| 103 | hf.comp (T x) (hi.comp (T x) hq') |
| 104 | have hTx := (hT x hx).contDiffAt (hW.mem_nhds hx) |
| 105 | have heq : R ∘ T =ᶠ[𝓝 x] P := by |
| 106 | filter_upwards [hW.mem_nhds hx] with y hy |
| 107 | exact (terminalCommonInterval_physical_eq e f ha hI hJ |
| 108 | (p y).val (p y).property (q (T y)).val (q (T y)).property (hterminal y hy)).symm |
| 109 | rw [terminalSource_actual_coordinate_readout V f a (hJ ⟨le_rfl, ha⟩) |
| 110 | gV hfmetric hZ q hq (hTZ hx), |
| 111 | terminalSource_actual_coordinate_readout U e a (hI ⟨le_rfl, ha⟩) |
| 112 | gU hemetric hW p hp hx] |
| 113 | exact congrArg (fun z : ℝ => Q * z) |
| 114 | ((F.metric (origin + a / Q)).pullbackCoefficients_comp_of_eventuallyEq |
| 115 | (hR.mdifferentiableAt (by simp)) (hTx.differentiableAt (by simp)) heq v w) |
| 116 | |
| 117 | end PoincareMT.M47 |