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.Coefficient.ParameterResponse |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Initial.ForcingLocalAgreement |
| 3 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Initial.TraceNeighborhood |
| 4 | |
| 5 | /-! |
| 6 | # Smooth initial-state response from local coefficient extensions |
| 7 | |
| 8 | The same centered contraction and its strict fixed point support the |
| 9 | infinite-order parameter theorem. Local uniqueness is retained in the |
| 10 | literal forcing equation. MT2007 Claim 19.1, p. 437; |
| 11 | `2026-09-21-smooth-coefficient-response.md`. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter MeasureTheory |
| 17 | open scoped Topology ContDiff |
| 18 | |
| 19 | namespace PoincareMT.M63 |
| 20 | |
| 21 | open SpectralHeatNative QuasilinearDeTurckNative DeTurckMetricProducerNative |
| 22 | |
| 23 | /-- Local finite-order coefficient extensions yield one smooth |
| 24 | initial-state branch with local uniqueness, the actual closed trace |
| 25 | and its physical domain control. MT2007 Claim 19.1, p. 437; smooth |
| 26 | coefficient response derivation. This asserts H2, not physical C2, |
| 27 | initial trace dependence. -/ |
| 28 | theorem exists_smooth_coefficient_parameter_response |
| 29 | {iota E : Type*} [Countable iota] |
| 30 | [NormedAddCommGroup E] [NormedSpace ℝ E] [SecondCountableTopology E] |
| 31 | [MeasurableSpace (State iota)] [BorelSpace (State iota)] |
| 32 | (lambda : iota → NNReal) (w : State iota) {Tcap rcap : ℝ} |
| 33 | (hTcap : 0 < Tcap) (hrcap : 0 < rcap) |
| 34 | (M : E →L[ℝ] State iota →L[ℝ] State iota) |
| 35 | (G : ℝ × State iota → E) (Q : ℝ × State iota → State iota) |
| 36 | (hG : ContDiff ℝ 1 G) (hQ : ContDiff ℝ 1 Q) (hzero : G (0, w) = 0) |
| 37 | (hLip : ∀ R : ℝ, 0 ≤ R → ∃ KG KQ : NNReal, ∀ t u v, |
| 38 | ‖u‖ ≤ R → ‖v‖ ≤ R → |
| 39 | ‖G (t, u) - G (t, v)‖ ≤ KG * ‖u - v‖ ∧ |
| 40 | ‖Q (t, u) - Q (t, v)‖ ≤ KQ * ‖u - v‖) |
| 41 | {O : Set (ℝ × State iota)} (hO : IsOpen O) (hw : (0, w) ∈ O) |
| 42 | (hext : ∀ k : ℕ, ∃ (Gk : ℝ × State iota → E) (Qk : ℝ × State iota → State iota), |
| 43 | ContDiff ℝ k Gk ∧ ContDiff ℝ k Qk ∧ |
| 44 | ∀ t u, 0 ≤ t → (t, u) ∈ O → G (t, u) = Gk (t, u) ∧ Q (t, u) = Qk (t, u)) : |
| 45 | ∃ T : ℝ, ∃ hT : 0 < T, T ≤ Tcap ∧ T ≤ 1 ∧ |
| 46 | ∃ (F : ForcingSpace iota T) (u : State iota → ForcingSpace iota T), |
| 47 | ‖F‖ < rcap / 2 ∧ u w = F ∧ ContDiffAt ℝ ∞ u w ∧ |
| 48 | ContDiffAt ℝ ∞ (fun w' => initialResponseTrace lambda w' hT.le (u w')) w ∧ |
| 49 | (∀ᶠ w' in 𝓝 w, ∀ᵐ t ∂timeMeasure T, ∀ ht : t ∈ Icc (0 : ℝ) T, |
| 50 | u w' t = |
| 51 | M (G (t, initialResponseTrace lambda w' hT.le (u w') ⟨t, ht⟩)) |
| 52 | (initialHeatHigh lambda w' t + shiftedHighOperator hT.le lambda (u w') t - |
| 53 | shiftedBaseMultiplier lambda |
| 54 | (initialResponseTrace lambda w' hT.le (u w') ⟨t, ht⟩)) + |
| 55 | Q (t, initialResponseTrace lambda w' hT.le (u w') ⟨t, ht⟩)) ∧ |
| 56 | (∀ᶠ z : State iota × ForcingSpace iota T in 𝓝 (w, F), |
| 57 | (∀ᵐ t ∂timeMeasure T, ∀ ht : t ∈ Icc (0 : ℝ) T, |
| 58 | z.2 t = |
| 59 | M (G (t, initialResponseTrace lambda z.1 hT.le z.2 ⟨t, ht⟩)) |
| 60 | (initialHeatHigh lambda z.1 t + shiftedHighOperator hT.le lambda z.2 t - |
| 61 | shiftedBaseMultiplier lambda |
| 62 | (initialResponseTrace lambda z.1 hT.le z.2 ⟨t, ht⟩)) + |
| 63 | Q (t, initialResponseTrace lambda z.1 hT.le z.2 ⟨t, ht⟩)) ↔ u z.1 = z.2) ∧ |
| 64 | (∀ t : Icc (0 : ℝ) T, |
| 65 | ((t : ℝ), initialResponseTrace lambda w hT.le F t) ∈ O) ∧ |
| 66 | ∀ t : Icc (0 : ℝ) T, |
| 67 | ‖initialResponseTrace lambda w hT.le F t - heat lambda (t : ℝ).toNNReal w‖ < rcap := by |
| 68 | obtain ⟨rdom, hrdom, Tdom, hTdom, hTdomcap, _hTdom1, hdomain⟩ := |
| 69 | exists_initialResponseTrace_neighborhood lambda w |
| 70 | (ContinuousMap.const Unit) ContinuousMap.continuous_const' hO (fun _ => hw) hTcap |
| 71 | let r0 := min rcap rdom |
| 72 | have hr0 : 0 < r0 := lt_min hrcap hrdom |
| 73 | have hr0cap : r0 ≤ rcap := min_le_left _ _ |
| 74 | have hr0dom : r0 ≤ rdom := min_le_right _ _ |
| 75 | obtain ⟨KG, KQ, hcoeff⟩ := hLip (‖w‖ + r0) (by positivity) |
| 76 | obtain ⟨T1, hT1, hT1dom, N, _hepsEq, _hprincipal, _hlower, heps, hsource⟩ := |
| 77 | exists_centeredRealCoefficientSource lambda w hTdom hr0 M |
| 78 | (fun t u => G (t, u)) (fun t u => Q (t, u)) hG.continuous hQ.continuous KG KQ |
| 79 | (fun t _ u v hu hv => (hcoeff t u v hu hv).1) |
| 80 | (fun t _ u v hu hv => (hcoeff t u v hu hv).2) hzero |
| 81 | have huncut := hsource.mono (fun _ ht x hx => (ht x).2 hx) |
| 82 | obtain ⟨r, hr, hrr0, T, hT, hTT1, hTle1, hkappa, hzeroSource⟩ := |
| 83 | N.exists_strict_positive_interval hT1 heps (show 0 < r0 / 2 by positivity) |
| 84 | let Nt := N.restrict hTT1 |
| 85 | let kappa : ℝ := 2 * Nt.perturbationConstant + 8 * Nt.principalConstant * r + |
| 86 | 2 * Nt.principalConstant * |
| 87 | ‖(initialHeatHigh_memLp_energy lambda w hT.le).1.toLp (initialHeatHigh lambda w)‖ + |
| 88 | 2 * Nt.lowerConstant * Real.sqrt T |
| 89 | have hkappa0 : 0 ≤ kappa := by dsimp [kappa]; positivity |
| 90 | have hkappa1 : kappa < 1 := hkappa |
| 91 | have hz : ‖Nt.zero_memLp.toLp (fun t => Nt.toFun t 0)‖ < (1 - kappa) * r / 2 := |
| 92 | hzeroSource |
| 93 | have hweak : ‖Nt.zero_memLp.toLp (fun t => Nt.toFun t 0)‖ ≤ (1 - kappa) * r := by |
| 94 | have hpos := mul_pos (sub_pos.mpr hkappa1) hr |
| 95 | linarith only [hz, hpos] |
| 96 | obtain ⟨F, _U, _D, _E, hF, _hU, _hD, _hE, hfix, _hrest⟩ := |
| 97 | Nt.exists_initial_spectral_response hT.le hTle1 hr.le hkappa1 hweak |
| 98 | have hFhalf := Nt.norm_fixedPoint_lt_half hT.le hTle1 hr hkappa1 hz F hF hfix |
| 99 | have hFcap : ‖F‖ < r0 / 2 := by linarith only [hFhalf, hrr0, hr] |
| 100 | have hinside (t : Icc (0 : ℝ) T) : |
| 101 | ((t : ℝ), initialResponseTrace lambda w hT.le F t) ∈ O := |
| 102 | hdomain T hT.le (hTT1.trans hT1dom) F |
| 103 | (hFcap.trans_le (by gcongr)) t () |
| 104 | have hsourceT := ae_mono |
| 105 | (Measure.restrict_mono (Ioc_subset_Ioc le_rfl hTT1) le_rfl) huncut |
| 106 | obtain ⟨R, _hR, hrep, hagree⟩ := Nt.exists_contDiff_forcingResidual hT.le hTle1 hr.le |
| 107 | (show 2 * r ≤ r0 by linarith only [hrr0]) M G Q hG hQ hsourceT |
| 108 | have hRinf : ContDiffAt ℝ ∞ R (w, F) := |
| 109 | contDiffAt_initialForcing_of_local_extensions lambda hT.le M G Q R hrep w F hO hinside hext |
| 110 | have hRfix : R (w, F) = F := (hagree F hF).trans hfix |
| 111 | have hFinterior : ‖F‖ < r := by linarith only [hFhalf, hr] |
| 112 | have hRLip (A B : ForcingSpace iota T) (hA : ‖A‖ ≤ r) (hB : ‖B‖ ≤ r) : |
| 113 | ‖R (w, A) - R (w, B)‖ ≤ kappa * ‖A - B‖ := by |
| 114 | rw [hagree A hA, hagree B hB] |
| 115 | exact Nt.norm_forcingResidual_sub_le hT.le hTle1 hr.le A B hA hB |
| 116 | obtain ⟨u, huw, hu, hueq, hunique⟩ := |
| 117 | exists_contDiffAt_fixedPoint_of_contraction R (k := ∞) (by simp) hRinf hRfix |
| 118 | hFinterior hkappa0 hkappa1 hRLip |
| 119 | refine ⟨T, hT, hTT1.trans (hT1dom.trans hTdomcap), hTle1, F, u, |
| 120 | hFcap.trans_le (by gcongr), huw, hu, ?_, ?_, ?_, hinside, ?_⟩ |
| 121 | · obtain ⟨V0, _, hV0⟩ := exists_initialHeatPath_operator lambda hT.le |
| 122 | have hpath : (fun w' => initialResponseTrace lambda w' hT.le (u w')) = |
| 123 | fun w' => V0 w' + shiftedTraceOperator hT.le lambda (u w') := by |
| 124 | funext w' |
| 125 | apply ContinuousMap.ext |
| 126 | intro t |
| 127 | change heat lambda (t : ℝ).toNNReal w' + shiftedTracePath hT.le lambda (u w') t = _ |
| 128 | rw [ContinuousMap.add_apply, hV0] |
| 129 | rfl |
| 130 | rw [hpath] |
| 131 | exact V0.contDiff.contDiffAt.add |
| 132 | ((shiftedTraceOperator hT.le lambda).contDiff.contDiffAt.comp w hu) |
| 133 | · filter_upwards [hueq] with w' hw' |
| 134 | have h := hrep w' (u w') |
| 135 | rw [hw'] at h |
| 136 | exact h |
| 137 | · filter_upwards [hunique] with z hz |
| 138 | refine Iff.trans ⟨?_, ?_⟩ hz |
| 139 | · intro heq |
| 140 | apply Lp.ext |
| 141 | filter_upwards [hrep z.1 z.2, heq, ae_restrict_mem measurableSet_Ioc] with t h1 h2 ht |
| 142 | exact (h1 ⟨ht.1.le, ht.2⟩).trans (h2 ⟨ht.1.le, ht.2⟩).symm |
| 143 | · intro heq |
| 144 | have h := hrep z.1 z.2 |
| 145 | rw [heq] at h |
| 146 | exact h |
| 147 | · intro t |
| 148 | have hsqrt : Real.sqrt T ≤ 1 := by |
| 149 | simpa only [Real.sqrt_one] using Real.sqrt_le_sqrt hTle1 |
| 150 | apply ((initialResponseTrace_spec lambda w hT.le F).2.2.1 t).trans_lt |
| 151 | calc |
| 152 | (Real.sqrt T + 1) * ‖F‖ ≤ 2 * ‖F‖ := by gcongr; linarith only [hsqrt] |
| 153 | _ < rcap := by linarith only [hFcap, hr0cap] |
| 154 | |
| 155 | end PoincareMT.M63 |