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 | /- Adapted from Mapher `PoincareMT/Proofs/M03/Existence/IntegralGaugeRecovery.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.RicciFlow.Local.Gauge.Pullback.GaugeRecovery |
| 6 | import PoincareLib.Geometry.RicciFlow.Local.DeTurck.Gauge.DeTurckGaugeSign |
| 7 | |
| 8 | /-! |
| 9 | # Integral-form gauge recovery boundary |
| 10 | |
| 11 | An actual chart producer naturally gives a Volterra reconstruction identity. |
| 12 | This helper converts that identity, source continuity, and the negative- |
| 13 | DeTurck cancellation into the derivative certificate consumed by |
| 14 | `GaugeRecovery`. It introduces no solver premise beyond those explicit |
| 15 | identities. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open scoped Manifold ContDiff |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT |
| 25 | |
| 26 | variable {n : ℕ} {M : Type u} |
| 27 | [TopologicalSpace M] [T2Space M] [SecondCountableTopology M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 29 | [IsManifold (𝓡 n) ∞ M] [CompactSpace M] |
| 30 | |
| 31 | namespace IntegralGaugeRecovery |
| 32 | |
| 33 | structure Certificate (g₀ : RiemannianMetric n M) where |
| 34 | T : ℝ |
| 35 | hT : 0 < T |
| 36 | metric : ℝ → RiemannianMetric n M |
| 37 | connection : ∀ t : ℝ, LeviCivitaData (metric t) |
| 38 | smooth : RiemannianMetric.IsSmoothFamilyOn metric (Set.Ico 0 T) |
| 39 | initial : metric 0 = g₀ |
| 40 | source : ∀ (t : ℝ) (x : M), |
| 41 | TangentSpace (𝓡 n) x → TangentSpace (𝓡 n) x → ℝ |
| 42 | gaugeCorrection : ∀ (t : ℝ) (x : M), |
| 43 | TangentSpace (𝓡 n) x → TangentSpace (𝓡 n) x → ℝ |
| 44 | source_continuous : ∀ (x : M) (u v : TangentSpace (𝓡 n) x), |
| 45 | ContinuousOn (fun s => source s x u v - gaugeCorrection s x u v) |
| 46 | (Set.Ico 0 T) |
| 47 | integral_equation : ∀ (t : ℝ), t ∈ Set.Ico 0 T → ∀ (x : M) |
| 48 | (u v : TangentSpace (𝓡 n) x), |
| 49 | (metric t).inner x u v = g₀.inner x u v + |
| 50 | ∫ s in (0 : ℝ)..t, source s x u v - gaugeCorrection s x u v |
| 51 | cancellation : ∀ (t : ℝ), t ∈ Set.Ico 0 T → |
| 52 | ∀ (D : LeviCivitaData (metric t)) (x : M) |
| 53 | (u v : TangentSpace (𝓡 n) x), |
| 54 | source t x u v - gaugeCorrection t x u v = -2 * D.ricci x u v |
| 55 | |
| 56 | theorem derivative |
| 57 | {g₀ : RiemannianMetric n M} (C : Certificate (n := n) (M := M) g₀) |
| 58 | (t : ℝ) (ht : t ∈ Set.Ico 0 C.T) (D : LeviCivitaData (C.metric t)) |
| 59 | (x : M) (u v : TangentSpace (𝓡 n) x) : |
| 60 | HasDerivWithinAt (fun s => (C.metric s).inner x u v) |
| 61 | (-2 * D.ricci x u v) (Set.Ico 0 C.T) t := by |
| 62 | have hsrc : ContinuousOn |
| 63 | (fun s => C.source s x u v - C.gaugeCorrection s x u v) |
| 64 | (Set.Ico 0 C.T) := C.source_continuous x u v |
| 65 | have hderiv := DeTurckNative.hasDerivWithinAt_metric_of_intervalIntegral_Ico |
| 66 | (g₀ := g₀) (g := C.metric) |
| 67 | (h := fun s p a b => C.source s p a b - C.gaugeCorrection s p a b) |
| 68 | (hcont := fun p a b => C.source_continuous p a b) |
| 69 | (hint := C.integral_equation) ht x u v |
| 70 | exact hderiv.congr_deriv (C.cancellation t ht D x u v) |
| 71 | |
| 72 | theorem exists_metricFamily |
| 73 | {g₀ : RiemannianMetric n M} (C : Certificate (n := n) (M := M) g₀) : |
| 74 | ∃ T : ℝ, 0 < T ∧ ∃ g : ℝ → RiemannianMetric n M, |
| 75 | g 0 = g₀ ∧ RiemannianMetric.IsSmoothFamilyOn g (Set.Ico 0 T) ∧ |
| 76 | ∀ (t : ℝ), t ∈ Set.Ico 0 T → ∀ (D : LeviCivitaData (g t)) |
| 77 | (x : M) (u v : TangentSpace (𝓡 n) x), |
| 78 | HasDerivWithinAt (fun s ↦ (g s).inner x u v) |
| 79 | (-2 * D.ricci x u v) (Set.Ico 0 T) t := by |
| 80 | refine ⟨C.T, C.hT, C.metric, C.initial, C.smooth, ?_⟩ |
| 81 | intro t ht D x u v |
| 82 | exact derivative C t ht D x u v |
| 83 | |
| 84 | end IntegralGaugeRecovery |
| 85 | |
| 86 | end PoincareMT |