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.Blowup.Construction.LongTime.GeneralizedLimit.GeneralizedScalarSpatialJets |
| 2 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.LongTime.GeneralizedLimit.GeneralizedCoefficientLimit |
| 3 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.Analysis.UniformBilinearJets |
| 4 | import PoincareLib.Geometry.RicciFlow.Compactness.Coordinates.SpacetimeBounds.Ricci.Operator |
| 5 | |
| 6 | /-! |
| 7 | # Actual bilinear spatial jets on generalized limits |
| 8 | |
| 9 | The actual normalized metric coefficients retain all compact spatial jets |
| 10 | of the frozen generalized convergence, including the closed time endpoints. |
| 11 | Source: Morgan--Tian Definition 5.12, Proposition 5.14 and Theorem 11.8, |
| 12 | pp. 90--91 and 272; M30 `generalized-native-curvature-readout.md`. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M30 |
| 24 | |
| 25 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 26 | FlowCarrier.isManifold |
| 27 | |
| 28 | /-- The actual normalized slice pullback on its recorded window, with a |
| 29 | total zero branch outside it (Definition 5.12, p. 90; Theorem 11.8, p. 272). -/ |
| 30 | noncomputable def generalizedPullbackCoefficients |
| 31 | {S : GeneralizedBlowupSequence.{u}} {J : Set ℝ} |
| 32 | (G : GeneralizedBlowupConvergence S J) (k : ℕ) |
| 33 | (q : G.limit.carrier.carrier) (p : ℝ × EuclideanSpace ℝ (Fin 3)) : |
| 34 | SpacetimeBounds.MetricCoefficient 3 := by |
| 35 | classical |
| 36 | exact if ht : p.1 ∈ Icc (-G.exhaustion.time k) 0 then |
| 37 | (normalizedBlowupSliceMetric S (G.subsequence k) p.1).pullbackCoefficients |
| 38 | (generalizedSliceHomeomorph G k p.1 ht ∘ (extChartAt (𝓡 3) q).symm) p.2 |
| 39 | else 0 |
| 40 | |
| 41 | /-- Every finite actual bilinear spatial jet converges uniformly on compact |
| 42 | spacetime tests with the original maps and windows (Definition 5.12 and |
| 43 | Proposition 5.14, pp. 90--91; Theorem 11.8, p. 272). -/ |
| 44 | theorem tendstoUniformlyOn_generalized_bilinear_spatial_jets |
| 45 | {S : GeneralizedBlowupSequence.{u}} {J : Set ℝ} |
| 46 | (G : GeneralizedBlowupConvergence S J) (q : G.limit.carrier.carrier) |
| 47 | (r : ℕ) {K : Set (ℝ × EuclideanSpace ℝ (Fin 3))} |
| 48 | (hK : IsCompact K) (hKc : K ⊆ blowupMetricChartDomain G.limit q) : |
| 49 | TendstoUniformlyOn |
| 50 | (fun k p => iteratedFDeriv ℝ r |
| 51 | (fun y => generalizedPullbackCoefficients G k q (p.1, y)) p.2) |
| 52 | (fun p => iteratedFDeriv ℝ r |
| 53 | ((G.limit.flow.metric p.1).pullbackCoefficients |
| 54 | (extChartAt (𝓡 3) q).symm) p.2) atTop K := by |
| 55 | let E := EuclideanSpace ℝ (Fin 3) |
| 56 | let : NormedAddCommGroup (E →L[ℝ] ℝ) := ContinuousLinearMap.toNormedAddCommGroup |
| 57 | let : NormedAddCommGroup (E →L[ℝ] E →L[ℝ] ℝ) := |
| 58 | ContinuousLinearMap.toNormedAddCommGroup |
| 59 | let c := extChartAt (𝓡 3) q |
| 60 | let f := fun k t x => generalizedPullbackCoefficients G k q (t, x) |
| 61 | let g := fun t => (G.limit.flow.metric t).pullbackCoefficients c.symm |
| 62 | have hc : ContinuousOn c.symm c.target := (contMDiffOn_extChartAt_symm (n := ∞) q).continuousOn |
| 63 | have hmap : ContinuousOn (fun p : ℝ × E => c.symm p.2) K := |
| 64 | hc.comp continuousOn_snd (fun p hp => (hKc hp).2) |
| 65 | obtain ⟨j, hj⟩ := exists_generalized_exhaustion_stage G (hK.image_of_continuousOn hmap) |
| 66 | have hvalid : ∀ᶠ k in atTop, ∀ p ∈ K, |
| 67 | p.1 ∈ Icc (-G.exhaustion.time k) 0 ∧ c.symm p.2 ∈ G.exhaustion.space k := by |
| 68 | have htime := G.exhaustion.time_cofinal (Prod.fst '' K) |
| 69 | (hK.image continuous_fst) (by rintro _ ⟨p, hp, rfl⟩; exact (hKc hp).1) |
| 70 | filter_upwards [htime, eventually_ge_atTop j] with k hk hjk p hp |
| 71 | exact ⟨hk (mem_image_of_mem _ hp), |
| 72 | G.exhaustion.space_increasing hjk (hj (mem_image_of_mem _ hp))⟩ |
| 73 | have hchart (x : E) (hx : x ∈ c.target) : ContMDiffAt (𝓡 3) (𝓡 3) ∞ c.symm x := |
| 74 | (contMDiffOn_extChartAt_symm q).contMDiffAt |
| 75 | ((isOpen_extChartAt_target (I := 𝓡 3) q).mem_nhds hx) |
| 76 | have hf : ∀ᶠ k in atTop, ∀ p ∈ K, ContDiffAt ℝ ∞ (f k p.1) p.2 := by |
| 77 | filter_upwards [hvalid] with k hk p hp |
| 78 | have ht := (hk p hp).1 |
| 79 | have he := (generalizedSliceHomeomorph_contMDiffAt G k p.1 ht |
| 80 | (hk p hp).2).comp p.2 (hchart p.2 (hKc hp).2) |
| 81 | have H := RiemannianMetric.contDiffAt_pullbackCoefficients |
| 82 | (normalizedBlowupSliceMetric S (G.subsequence k) p.1) he |
| 83 | simpa only [f, generalizedPullbackCoefficients, dif_pos ht] using H |
| 84 | have hg : ∀ p ∈ K, ContDiffAt ℝ ∞ (g p.1) p.2 := fun p hp => |
| 85 | (G.limit.flow.metric p.1).contDiffAt_pullbackCoefficients (hchart p.2 (hKc hp).2) |
| 86 | apply tendstoUniformlyOn_bilinear_jets_of_scalar_entries |
| 87 | (EuclideanSpace.basisFun (Fin 3) ℝ) r hf hg |
| 88 | intro a b |
| 89 | apply (tendstoUniformlyOn_generalized_scalar_spatial_jets G q r a b hK hKc).congr |
| 90 | filter_upwards [hvalid] with k hk p hp |
| 91 | let V := c.target ∩ c.symm ⁻¹' G.exhaustion.space k |
| 92 | have hV : IsOpen V := hc.isOpen_inter_preimage |
| 93 | (isOpen_extChartAt_target (I := 𝓡 3) q) (G.exhaustion.space_open k) |
| 94 | have hpV : p.2 ∈ V := ⟨(hKc hp).2, (hk p hp).2⟩ |
| 95 | have ht := (hk p hp).1 |
| 96 | have heq : (fun y => blowupPullbackCoefficient (G.embedding k) q a b (p.1, y)) =ᶠ[𝓝 p.2] |
| 97 | (fun y => f k p.1 y (EuclideanSpace.basisFun (Fin 3) ℝ a) |
| 98 | (EuclideanSpace.basisFun (Fin 3) ℝ b)) := by |
| 99 | filter_upwards [hV.mem_nhds hpV] with y hy |
| 100 | simpa only [f, generalizedPullbackCoefficients, dif_pos ht] using |
| 101 | (generalized_slice_coefficient_eq G k p.1 ht q hy.1 hy.2 a b).symm |
| 102 | exact (heq.iteratedFDeriv ℝ r).self_of_nhds |
| 103 | |
| 104 | end PoincareMT.M30 |