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 Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus |
| 2 | import Mathlib.Topology.ContinuousMap.Compact |
| 3 | import Mathlib.Topology.ContinuousMap.Algebra |
| 4 | import Mathlib.Topology.Order.ProjIcc |
| 5 | |
| 6 | /-! |
| 7 | # A bounded primitive operator on the fixed path interval |
| 8 | |
| 9 | Clamping extends continuous paths to the real line. Integrating this |
| 10 | extension from zero gives the bounded linear operator in the scaled |
| 11 | Picard equation; its sup operator norm is at most one. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open scoped Topology intervalIntegral |
| 17 | open Set |
| 18 | |
| 19 | namespace PoincareMT.ReducedLength |
| 20 | |
| 21 | noncomputable def symmetricTimeProjection : C(ℝ, Set.Icc (-1 : ℝ) 1) := |
| 22 | ⟨Set.projIcc (-1) 1 (by norm_num), continuous_projIcc⟩ |
| 23 | |
| 24 | @[simp] theorem symmetricTimeProjection_of_mem {r : ℝ} (hr : r ∈ Set.Icc (-1 : ℝ) 1) : |
| 25 | symmetricTimeProjection r = ⟨r, hr⟩ := |
| 26 | Set.projIcc_of_mem (by norm_num) hr |
| 27 | |
| 28 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] |
| 29 | |
| 30 | noncomputable def pathPrimitive : |
| 31 | C(Set.Icc (-1 : ℝ) 1, E) →L[ℝ] C(Set.Icc (-1 : ℝ) 1, E) := by |
| 32 | let L : C(Set.Icc (-1 : ℝ) 1, E) →ₗ[ℝ] C(Set.Icc (-1 : ℝ) 1, E) := { |
| 33 | toFun := fun v ↦ ⟨fun r ↦ ∫ s in 0..(r : ℝ), v (symmetricTimeProjection s), |
| 34 | (intervalIntegral.continuous_primitive |
| 35 | (fun a b ↦ (v.continuous.comp symmetricTimeProjection.continuous).intervalIntegrable a b) |
| 36 | 0).comp continuous_subtype_val⟩ |
| 37 | map_add' := by |
| 38 | intro v w |
| 39 | ext r |
| 40 | exact intervalIntegral.integral_add |
| 41 | ((v.continuous.comp symmetricTimeProjection.continuous).intervalIntegrable _ _) |
| 42 | ((w.continuous.comp symmetricTimeProjection.continuous).intervalIntegrable _ _) |
| 43 | map_smul' := by |
| 44 | intro c v |
| 45 | ext r |
| 46 | exact intervalIntegral.integral_smul c _ |
| 47 | } |
| 48 | have hL : ∀ v, ‖L v‖ ≤ 1 * ‖v‖ := by |
| 49 | intro v |
| 50 | rw [one_mul] |
| 51 | apply (ContinuousMap.norm_le _ (norm_nonneg v)).2 |
| 52 | intro r |
| 53 | change ‖∫ s in 0..(r : ℝ), v (symmetricTimeProjection s)‖ ≤ ‖v‖ |
| 54 | have hbound := intervalIntegral.norm_integral_le_of_norm_le_const |
| 55 | (a := 0) (b := (r : ℝ)) (fun s _ ↦ v.norm_coe_le_norm (symmetricTimeProjection s)) |
| 56 | calc |
| 57 | ‖∫ s in 0..(r : ℝ), v (symmetricTimeProjection s)‖ ≤ ‖v‖ * |(r : ℝ) - 0| := hbound |
| 58 | _ ≤ ‖v‖ * 1 := mul_le_mul_of_nonneg_left |
| 59 | (by simpa only [sub_zero] using (abs_le.mpr r.property)) (norm_nonneg v) |
| 60 | _ = ‖v‖ := mul_one _ |
| 61 | exact L.mkContinuous 1 hL |
| 62 | |
| 63 | @[simp] theorem pathPrimitive_apply (v : C(Set.Icc (-1 : ℝ) 1, E)) |
| 64 | (r : Set.Icc (-1 : ℝ) 1) : |
| 65 | pathPrimitive v r = ∫ s in 0..(r : ℝ), v (symmetricTimeProjection s) := rfl |
| 66 | |
| 67 | theorem pathPrimitive_norm_le : |
| 68 | ‖pathPrimitive (E := E)‖ ≤ 1 := by |
| 69 | apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one |
| 70 | intro v |
| 71 | rw [one_mul] |
| 72 | apply (ContinuousMap.norm_le _ (norm_nonneg v)).2 |
| 73 | intro r |
| 74 | rw [pathPrimitive_apply] |
| 75 | have hbound := intervalIntegral.norm_integral_le_of_norm_le_const |
| 76 | (a := 0) (b := (r : ℝ)) (fun s _ ↦ v.norm_coe_le_norm (symmetricTimeProjection s)) |
| 77 | exact hbound.trans ((mul_le_mul_of_nonneg_left |
| 78 | (by simpa only [sub_zero] using (abs_le.mpr r.property)) (norm_nonneg v)).trans_eq |
| 79 | (mul_one ‖v‖)) |
| 80 | |
| 81 | @[simp] theorem pathPrimitive_at_zero (v : C(Set.Icc (-1 : ℝ) 1, E)) : |
| 82 | pathPrimitive v ⟨0, by norm_num⟩ = 0 := by |
| 83 | simp only [pathPrimitive_apply, intervalIntegral.integral_same] |
| 84 | |
| 85 | theorem pathPrimitive_hasDerivAt (v : C(Set.Icc (-1 : ℝ) 1, E)) |
| 86 | (r : ℝ) (_hr : r ∈ Set.Ioo (-1 : ℝ) 1) : |
| 87 | HasDerivAt (fun t : ℝ ↦ ∫ s in 0..t, v (symmetricTimeProjection s)) |
| 88 | (v (symmetricTimeProjection r)) r := |
| 89 | ((v.continuous.comp symmetricTimeProjection.continuous).integral_hasStrictDerivAt 0 r).hasDerivAt |
| 90 | |
| 91 | end PoincareMT.ReducedLength |