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.CurveShortening.Ramp.LocalFlow.Smooth.InitialForcing |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.Analysis.Compact.ParameterNeighborhood |
| 3 | |
| 4 | /-! |
| 5 | # Local agreement and smoothness of the same initial forcing |
| 6 | |
| 7 | Agreement near the closed trace identifies actual forcing maps locally. |
| 8 | Finite-order extensions then prove smoothness of one forcing at its |
| 9 | fixed point. MT2007 Claim 19.1, p. 437; |
| 10 | `2026-09-21-local-finite-order-forcing.md`, statements 2-3. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter MeasureTheory |
| 16 | open scoped Topology ContDiff |
| 17 | |
| 18 | namespace PoincareMT.M63 |
| 19 | |
| 20 | open SpectralHeatNative QuasilinearDeTurckNative DeTurckMetricProducerNative |
| 21 | |
| 22 | /-- Coefficient agreement on an open neighborhood of the actual closed |
| 23 | center trace identifies the two actual forcing maps near the center. |
| 24 | MT2007 Claim 19.1, p. 437; local finite-order forcing derivation, |
| 25 | statement 2. No regularity of the supplied maps is assumed. -/ |
| 26 | theorem initialForcing_eventuallyEq_of_coefficients |
| 27 | {iota E : Type*} [Countable iota] [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 28 | (lambda : iota → NNReal) {T : ℝ} (hT : 0 ≤ T) |
| 29 | (M : E →L[ℝ] State iota →L[ℝ] State iota) |
| 30 | (G1 G2 : ℝ × State iota → E) (Q1 Q2 : ℝ × State iota → State iota) |
| 31 | (R1 R2 : State iota × ForcingSpace iota T → ForcingSpace iota T) |
| 32 | (hR1 : ∀ w F, ∀ᵐ t ∂timeMeasure T, ∀ ht : t ∈ Icc (0 : ℝ) T, |
| 33 | R1 (w, F) t = |
| 34 | M (G1 (t, initialResponseTrace lambda w hT F ⟨t, ht⟩)) |
| 35 | (initialHeatHigh lambda w t + shiftedHighOperator hT lambda F t - |
| 36 | shiftedBaseMultiplier lambda (initialResponseTrace lambda w hT F ⟨t, ht⟩)) + |
| 37 | Q1 (t, initialResponseTrace lambda w hT F ⟨t, ht⟩)) |
| 38 | (hR2 : ∀ w F, ∀ᵐ t ∂timeMeasure T, ∀ ht : t ∈ Icc (0 : ℝ) T, |
| 39 | R2 (w, F) t = |
| 40 | M (G2 (t, initialResponseTrace lambda w hT F ⟨t, ht⟩)) |
| 41 | (initialHeatHigh lambda w t + shiftedHighOperator hT lambda F t - |
| 42 | shiftedBaseMultiplier lambda (initialResponseTrace lambda w hT F ⟨t, ht⟩)) + |
| 43 | Q2 (t, initialResponseTrace lambda w hT F ⟨t, ht⟩)) |
| 44 | (w : State iota) (F0 : ForcingSpace iota T) {O : Set (ℝ × State iota)} |
| 45 | (hO : IsOpen O) |
| 46 | (htrace : ∀ t : Icc (0 : ℝ) T, ((t : ℝ), initialResponseTrace lambda w hT F0 t) ∈ O) |
| 47 | (heq : ∀ t u, 0 ≤ t → (t, u) ∈ O → G1 (t, u) = G2 (t, u) ∧ Q1 (t, u) = Q2 (t, u)) : |
| 48 | R1 =ᶠ[𝓝 (w, F0)] R2 := by |
| 49 | obtain ⟨V0, _, hV0⟩ := exists_initialHeatPath_operator lambda hT |
| 50 | let S := State iota |
| 51 | let X := S × ForcingSpace iota T |
| 52 | let V : X →L[ℝ] ResponsePath iota T := |
| 53 | V0.comp (ContinuousLinearMap.fst ℝ S (ForcingSpace iota T)) + |
| 54 | (shiftedTraceOperator hT lambda).comp (ContinuousLinearMap.snd ℝ S (ForcingSpace iota T)) |
| 55 | have hV (z : X) (t : Icc (0 : ℝ) T) : |
| 56 | V z t = initialResponseTrace lambda z.1 hT z.2 t := by |
| 57 | change V0 z.1 t + shiftedTracePath hT lambda z.2 t = _ |
| 58 | rw [hV0] |
| 59 | rfl |
| 60 | let Z : X × Icc (0 : ℝ) T → ℝ × S := fun p => ((p.2 : ℝ), V p.1 p.2) |
| 61 | have hZ : Continuous Z := |
| 62 | (continuous_subtype_val.comp continuous_snd).prodMk |
| 63 | (continuous_eval.comp ((V.continuous.comp continuous_fst).prodMk continuous_snd)) |
| 64 | obtain ⟨eps, heps, hnear⟩ := exists_uniform_open_parameter_radius (x0 := (w, F0)) hZ hO |
| 65 | (fun t => by simpa only [Z, hV] using htrace t) |
| 66 | filter_upwards [Metric.ball_mem_nhds (w, F0) heps] with z hz |
| 67 | apply Lp.ext |
| 68 | filter_upwards [hR1 z.1 z.2, hR2 z.1 z.2, |
| 69 | ae_restrict_mem measurableSet_Ioc] with t h1 h2 ht |
| 70 | have hmem : t ∈ Icc (0 : ℝ) T := ⟨ht.1.le, ht.2⟩ |
| 71 | have hinside : (t, initialResponseTrace lambda z.1 hT z.2 ⟨t, hmem⟩) ∈ O := by |
| 72 | simpa only [Z, hV] using hnear z hz ⟨t, hmem⟩ |
| 73 | obtain ⟨hG, hQ⟩ := heq t _ hmem.1 hinside |
| 74 | rw [h1 hmem, h2 hmem, hG, hQ] |
| 75 | |
| 76 | /-- Local finite-order coefficient extensions make the same actual |
| 77 | forcing smooth at the given center. MT2007 Claim 19.1, p. 437; |
| 78 | local finite-order forcing derivation, statement 3. Neighborhoods |
| 79 | may depend on the finite order. -/ |
| 80 | theorem contDiffAt_initialForcing_of_local_extensions |
| 81 | {iota E : Type*} [Countable iota] [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 82 | (lambda : iota → NNReal) {T : ℝ} (hT : 0 ≤ T) |
| 83 | (M : E →L[ℝ] State iota →L[ℝ] State iota) |
| 84 | (G : ℝ × State iota → E) (Q : ℝ × State iota → State iota) |
| 85 | (R : State iota × ForcingSpace iota T → ForcingSpace iota T) |
| 86 | (hR : ∀ w F, ∀ᵐ t ∂timeMeasure T, ∀ ht : t ∈ Icc (0 : ℝ) T, |
| 87 | R (w, F) t = |
| 88 | M (G (t, initialResponseTrace lambda w hT F ⟨t, ht⟩)) |
| 89 | (initialHeatHigh lambda w t + shiftedHighOperator hT lambda F t - |
| 90 | shiftedBaseMultiplier lambda (initialResponseTrace lambda w hT F ⟨t, ht⟩)) + |
| 91 | Q (t, initialResponseTrace lambda w hT F ⟨t, ht⟩)) |
| 92 | (w : State iota) (F0 : ForcingSpace iota T) {O : Set (ℝ × State iota)} |
| 93 | (hO : IsOpen O) |
| 94 | (htrace : ∀ t : Icc (0 : ℝ) T, ((t : ℝ), initialResponseTrace lambda w hT F0 t) ∈ O) |
| 95 | (hext : ∀ k : ℕ, ∃ (Gk : ℝ × State iota → E) (Qk : ℝ × State iota → State iota), |
| 96 | ContDiff ℝ k Gk ∧ ContDiff ℝ k Qk ∧ |
| 97 | ∀ t u, 0 ≤ t → (t, u) ∈ O → G (t, u) = Gk (t, u) ∧ Q (t, u) = Qk (t, u)) : |
| 98 | ContDiffAt ℝ ∞ R (w, F0) := by |
| 99 | apply contDiffAt_infty.mpr |
| 100 | intro k |
| 101 | obtain ⟨Gk, Qk, hGk, hQk, heq⟩ := hext k |
| 102 | obtain ⟨Rk, hRk, hrep⟩ := exists_contDiff_initialForcing lambda hT M Gk Qk hGk hQk |
| 103 | exact hRk.contDiffAt.congr_of_eventuallyEq |
| 104 | (initialForcing_eventuallyEq_of_coefficients lambda hT M G Gk Q Qk R Rk |
| 105 | hR hrep w F0 hO htrace heq) |
| 106 | |
| 107 | end PoincareMT.M63 |