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.SourceNames.LGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Measure.Jacobian.InitialJacobianCoordinates |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Jacobi.JacobiGaugeCover |
| 4 | |
| 5 | /-! |
| 6 | # Initial scaled metric pairings of actual zero fields |
| 7 | |
| 8 | One closed initial gauge expresses both fields in fixed Euclidean |
| 9 | coordinates. Their within-slope limits and the continuous chart |
| 10 | metric identify the scaled Gram pairing with the metric pairing of |
| 11 | the actual initial covariant derivatives. Morgan-Tian Lemma 6.19, |
| 12 | p. 114, and Proposition 6.78, pp. 142-144. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | -- The open gauge spatial tangent uses its retained Euclidean model. |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Bundle Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M14 |
| 25 | |
| 26 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 27 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 28 | {T τ : ℝ} {x y : G.Point} {p : M14BackwardPath G T 0 τ x y} |
| 29 | |
| 30 | private theorem metric_pair_heq {q r : G.Point} (h : q = r) |
| 31 | {v w : G.Horizontal q} {v' w' : G.Horizontal r} |
| 32 | (hv : HEq v v') (hw : HEq w w') : |
| 33 | G.spacetime.horizontalMetric.inner q v w = |
| 34 | G.spacetime.horizontalMetric.inner r v' w' := by |
| 35 | cases h |
| 36 | cases hv |
| 37 | cases hw |
| 38 | rfl |
| 39 | |
| 40 | /-- The metric pairing of two actual initial-zero fields divided by |
| 41 | square time squared tends to the pairing of their initial covariant |
| 42 | derivatives, Lemma 6.19, p. 114, and Proposition 6.78, pp. 142-144. -/ |
| 43 | theorem tendsto_initialJacobi_scaled_pair |
| 44 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) (R : M14SquareRootPath G p) |
| 45 | (Q₁ Q₂ : M14JacobiFieldData G R.curve (M14SqrtParameterInterval 0 τ)) |
| 46 | (hz₁ : Q₁.field 0 = 0) (hz₂ : Q₂.field 0 = 0) : |
| 47 | Tendsto (fun s : ℝ => (s⁻¹) ^ 2 * G.spacetime.horizontalMetric.inner (R.curve s) |
| 48 | (Q₁.field s) (Q₂.field s)) (𝓝[>] (0 : ℝ)) |
| 49 | (𝓝 (G.spacetime.horizontalMetric.inner (R.curve 0) |
| 50 | (M14JacobiFirstDerivative Q₁ 0) (M14JacobiFirstDerivative Q₂ 0))) := by |
| 51 | have hS : 0 < Real.sqrt τ := Real.sqrt_pos.mpr p.tau_lt |
| 52 | have hC : M14SqrtParameterInterval 0 τ = Icc 0 (Real.sqrt τ) := by |
| 53 | simp only [M14SqrtParameterInterval, Real.sqrt_zero] |
| 54 | have h0C : (0 : ℝ) ∈ M14SqrtParameterInterval 0 τ := by |
| 55 | rw [hC] |
| 56 | exact ⟨le_rfl, hS.le⟩ |
| 57 | obtain ⟨b, N, β, hN, h0N, hβ, hrec, hclock⟩ := |
| 58 | exists_squareRoot_gauge_neighborhood R h0C |
| 59 | obtain ⟨l, d, hl, hld, hdS, hl0, h0d, hsubN, _⟩ := |
| 60 | M08.exists_enlarged_closed_interval hS le_rfl le_rfl hS.le hN |
| 61 | (by simpa only [Icc_self, singleton_subset_iff] using h0N) |
| 62 | have hlzero : l = 0 := le_antisymm hl0 hl |
| 63 | subst l |
| 64 | have hsub : Icc 0 d ⊆ M14SqrtParameterInterval 0 τ := by |
| 65 | rw [hC] |
| 66 | exact Icc_subset_Icc le_rfl hdS |
| 67 | have hsub' : Icc 0 d ⊆ M14SqrtParameterInterval 0 τ ∩ N := |
| 68 | fun _ hr => ⟨hsub hr, hsubN hr⟩ |
| 69 | have hβ' := hβ.mono hsub' |
| 70 | have hrec' := fun r hr => hrec r (hsub' hr) |
| 71 | have hclock' := fun r hr => hclock r (hsub' hr) |
| 72 | have hR := R.smooth.mono R.interval_subset |
| 73 | obtain ⟨f, hf, hfQ⟩ := exists_smooth_horizontalGauge_coordinates b hβ' hrec' Q₁.field |
| 74 | ((pullbackExtension_field_contMDiffOn Q₁.extension hR).mono hsub) |
| 75 | obtain ⟨g, hg, hgQ⟩ := exists_smooth_horizontalGauge_coordinates b hβ' hrec' Q₂.field |
| 76 | ((pullbackExtension_field_contMDiffOn Q₂.extension hR).mono hsub) |
| 77 | have hCoordinates := hM12.coordinate_gauges X time I G.spacetime G.slices |
| 78 | G.timeIntervals G.gaugeCover G.leafwise |
| 79 | obtain ⟨F⟩ := ordinaryGaugeWitness_nonempty b hCoordinates |
| 80 | obtain ⟨v, hv, hflim⟩ := tendsto_initialGauge_scaledField R hCoordinates b F hld hsub |
| 81 | hβ' hrec' hclock' Q₁ hz₁ f hf hfQ |
| 82 | obtain ⟨w, hw, hglim⟩ := tendsto_initialGauge_scaledField R hCoordinates b F hld hsub |
| 83 | hβ' hrec' hclock' Q₂ hz₂ g hg hgQ |
| 84 | let A := fun r => M08.chartActionMetric F.flow T (β 0).2 (r, (β r).2.val) |
| 85 | have htime (r : ℝ) (hr : r ∈ Icc 0 d) : |
| 86 | T - r ^ 2 ∈ (G.gaugeCover.interval b).domain := by |
| 87 | rw [← hclock' r hr] |
| 88 | exact (β r).1.property |
| 89 | have hpoint := contDiffOn_id.prodMk (gaugeLift_spatialCurve_contDiffOn b hβ') |
| 90 | have hmap : MapsTo (fun r => (r, (β r).2.val)) (Icc 0 d) |
| 91 | (Icc 0 d ×ˢ (extChartAt (𝓡 n) (β 0).2).target) := by |
| 92 | intro r hr |
| 93 | refine ⟨hr, ?_⟩ |
| 94 | have hsrc : (β r).2 ∈ (extChartAt (𝓡 n) (β 0).2).source := by |
| 95 | rw [extChartAt_source, (G.gaugeCover.spatial b).chartAt_source_eq_univ] |
| 96 | exact mem_univ _ |
| 97 | have he : extChartAt (𝓡 n) (β 0).2 (β r).2 = (β r).2.val := by |
| 98 | rw [extChartAt_coe] |
| 99 | rfl |
| 100 | simpa only [he] using (extChartAt (𝓡 n) (β 0).2).map_source hsrc |
| 101 | have hA : ContDiffOn ℝ ∞ A (Icc 0 d) := |
| 102 | (M08.chartActionMetric_closed_contDiffOn F.flow T (β 0).2 htime).comp hpoint hmap |
| 103 | have h0 : (0 : ℝ) ∈ Icc 0 d := ⟨le_rfl, hld.le⟩ |
| 104 | have hAlim := (hA.continuousOn 0 h0).mono Ioc_subset_Icc_self |
| 105 | change Tendsto A (𝓝[Ioc 0 d] (0 : ℝ)) (𝓝 (A 0)) at hAlim |
| 106 | rw [nhdsWithin_Ioc_eq_nhdsGT hld] at hAlim |
| 107 | have hpair (r : ℝ) (hr : r ∈ Icc 0 d) : |
| 108 | G.spacetime.horizontalMetric.inner (R.curve r) (Q₁.field r) (Q₂.field r) = |
| 109 | A r (f r) (g r) := |
| 110 | (metric_pair_heq (hrec' r hr).symm (hfQ r hr) (hgQ r hr)).trans |
| 111 | (gauge_chartActionMetric b F T (β 0).2 (β r).2 r (β r).1 |
| 112 | (hclock' r hr).symm (f r) (g r)).symm |
| 113 | have hvalue : G.spacetime.horizontalMetric.inner (R.curve 0) |
| 114 | (M14JacobiFirstDerivative Q₁ 0) (M14JacobiFirstDerivative Q₂ 0) = A 0 v w := |
| 115 | (metric_pair_heq (hrec' 0 h0).symm hv hw).trans |
| 116 | (gauge_chartActionMetric b F T (β 0).2 (β 0).2 0 (β 0).1 |
| 117 | (hclock' 0 h0).symm v w).symm |
| 118 | have hleft := (isBoundedBilinearMap_apply (𝕜 := ℝ)).continuous.tendsto (A 0, v) |
| 119 | have hright := (isBoundedBilinearMap_apply (𝕜 := ℝ)).continuous.tendsto (A 0 v, w) |
| 120 | have hlim := hright.comp ((hleft.comp (hAlim.prodMk_nhds hflim)).prodMk_nhds hglim) |
| 121 | rw [← hvalue] at hlim |
| 122 | apply hlim.congr' |
| 123 | filter_upwards [Ioc_mem_nhdsGT hld] with r hr |
| 124 | rw [hpair r (Ioc_subset_Icc_self hr)] |
| 125 | change A r (r⁻¹ • f r) (r⁻¹ • g r) = (r⁻¹) ^ 2 * A r (f r) (g r) |
| 126 | simp only [map_smul, smul_apply, smul_eq_mul] |
| 127 | ring |
| 128 | |
| 129 | end PoincareMT.M14 |