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.ReducedGeometry.ReducedLength.Calculus.PathPrimitive |
| 2 | import Mathlib.Analysis.Calculus.Deriv.Mul |
| 3 | import Mathlib.Analysis.Calculus.Deriv.Comp |
| 4 | |
| 5 | /-! |
| 6 | # Signed rescaling of integral paths |
| 7 | |
| 8 | Clamping defines the rescaled continuous path at every real scale. For |
| 9 | scales of absolute value at most one, signed integral substitution gives |
| 10 | the corresponding rescaled Picard equation. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open scoped Topology intervalIntegral |
| 16 | open Set Filter |
| 17 | |
| 18 | namespace PoincareMT.ReducedLength |
| 19 | |
| 20 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 21 | |
| 22 | noncomputable def pathRescale (c : ℝ) (v : C(Set.Icc (-1 : ℝ) 1, E)) : |
| 23 | C(Set.Icc (-1 : ℝ) 1, E) := |
| 24 | v.comp ⟨fun r ↦ symmetricTimeProjection (c * (r : ℝ)), |
| 25 | symmetricTimeProjection.continuous.comp (continuous_const.mul continuous_subtype_val)⟩ |
| 26 | |
| 27 | @[simp] theorem pathRescale_apply (c : ℝ) (v : C(Set.Icc (-1 : ℝ) 1, E)) |
| 28 | (r : Set.Icc (-1 : ℝ) 1) : |
| 29 | pathRescale c v r = v (symmetricTimeProjection (c * (r : ℝ))) := rfl |
| 30 | |
| 31 | theorem pathRescale_norm_sub_const_le (c : ℝ) (v : C(Set.Icc (-1 : ℝ) 1, E)) (x : E) : |
| 32 | ‖pathRescale c v - ContinuousMap.const _ x‖ ≤ ‖v - ContinuousMap.const _ x‖ := by |
| 33 | apply (ContinuousMap.norm_le _ (norm_nonneg _)).2 |
| 34 | intro r |
| 35 | exact (v - ContinuousMap.const _ x).norm_coe_le_norm |
| 36 | (symmetricTimeProjection (c * (r : ℝ))) |
| 37 | |
| 38 | variable [CompleteSpace E] |
| 39 | |
| 40 | theorem picard_path_at_zero (f : C(E, E)) (x : E) (a : ℝ) |
| 41 | (v : C(Set.Icc (-1 : ℝ) 1, E)) |
| 42 | (hv : v = ContinuousMap.const _ x + a • pathPrimitive (f.comp v)) : |
| 43 | v ⟨0, by norm_num⟩ = x := by |
| 44 | have h := congrArg (fun w : C(Set.Icc (-1 : ℝ) 1, E) ↦ w ⟨0, by norm_num⟩) hv |
| 45 | simpa only [ContinuousMap.add_apply, ContinuousMap.const_apply, |
| 46 | ContinuousMap.smul_apply, pathPrimitive_at_zero, smul_zero, add_zero] using h |
| 47 | |
| 48 | theorem picard_path_hasDerivAt (f : C(E, E)) (x : E) (a : ℝ) |
| 49 | (v : C(Set.Icc (-1 : ℝ) 1, E)) |
| 50 | (hv : v = ContinuousMap.const _ x + a • pathPrimitive (f.comp v)) |
| 51 | (r : ℝ) (hr : r ∈ Set.Ioo (-1 : ℝ) 1) : |
| 52 | HasDerivAt (fun s : ℝ ↦ v (symmetricTimeProjection s)) |
| 53 | (a • f (v (symmetricTimeProjection r))) r := by |
| 54 | have hd : HasDerivAt |
| 55 | (fun t : ℝ ↦ x + a • ∫ s in 0..t, (f.comp v) (symmetricTimeProjection s)) |
| 56 | (a • f (v (symmetricTimeProjection r))) r := |
| 57 | (HasDerivAt.const_smul a (pathPrimitive_hasDerivAt (f.comp v) r hr)).const_add x |
| 58 | apply hd.congr_of_eventuallyEq |
| 59 | filter_upwards [Ioo_mem_nhds hr.1 hr.2] with s hs |
| 60 | have hsI : s ∈ Set.Icc (-1 : ℝ) 1 := ⟨hs.1.le, hs.2.le⟩ |
| 61 | rw [symmetricTimeProjection_of_mem hsI] |
| 62 | have h := congrArg (fun w : C(Set.Icc (-1 : ℝ) 1, E) ↦ w ⟨s, hsI⟩) hv |
| 63 | exact h |
| 64 | |
| 65 | theorem pathRescale_picard (f : C(E, E)) (x : E) (a c : ℝ) |
| 66 | (v : C(Set.Icc (-1 : ℝ) 1, E)) |
| 67 | (hv : v = ContinuousMap.const _ x + a • pathPrimitive (f.comp v)) (hc : |c| ≤ 1) : |
| 68 | pathRescale c v = ContinuousMap.const _ x + |
| 69 | (a * c) • pathPrimitive (f.comp (pathRescale c v)) := by |
| 70 | ext r |
| 71 | have hcr : c * (r : ℝ) ∈ Set.Icc (-1 : ℝ) 1 := by |
| 72 | apply abs_le.mp |
| 73 | rw [abs_mul] |
| 74 | exact (mul_le_mul hc (abs_le.mpr r.property) (abs_nonneg _) zero_le_one).trans_eq |
| 75 | (one_mul 1) |
| 76 | have hInt : (∫ s in 0..(r : ℝ), f (v (symmetricTimeProjection (c * s)))) = |
| 77 | ∫ s in 0..(r : ℝ), (f.comp (pathRescale c v)) (symmetricTimeProjection s) := by |
| 78 | apply intervalIntegral.integral_congr |
| 79 | intro s hs |
| 80 | have hsI : s ∈ Set.Icc (-1 : ℝ) 1 := |
| 81 | Set.uIcc_subset_Icc (by norm_num) r.property hs |
| 82 | change f (v (symmetricTimeProjection (c * s))) = |
| 83 | (f.comp (pathRescale c v)) (symmetricTimeProjection s) |
| 84 | rw [symmetricTimeProjection_of_mem hsI] |
| 85 | rfl |
| 86 | have h := congrArg (fun w : C(Set.Icc (-1 : ℝ) 1, E) ↦ |
| 87 | w ⟨c * (r : ℝ), hcr⟩) hv |
| 88 | change v ⟨c * (r : ℝ), hcr⟩ = |
| 89 | x + a • ∫ s in 0..c * (r : ℝ), f (v (symmetricTimeProjection s)) at h |
| 90 | rw [pathRescale_apply, symmetricTimeProjection_of_mem hcr, h] |
| 91 | change x + a • (∫ s in 0..c * (r : ℝ), f (v (symmetricTimeProjection s))) = |
| 92 | x + (a * c) • ∫ s in 0..(r : ℝ), |
| 93 | (f.comp (pathRescale c v)) (symmetricTimeProjection s) |
| 94 | rw [← hInt, mul_smul] |
| 95 | have hsub := intervalIntegral.smul_integral_comp_mul_left |
| 96 | (fun s ↦ f (v (symmetricTimeProjection s))) (a := 0) (b := (r : ℝ)) c |
| 97 | rw [mul_zero] at hsub |
| 98 | rw [hsub] |
| 99 | |
| 100 | end PoincareMT.ReducedLength |