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.Comparison.Analysis.Compact.RadialConfinement |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.Analysis.Compact.UniqueLift |
| 3 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Continuous.PolarLift |
| 4 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Continued.Polar |
| 5 | |
| 6 | /-! |
| 7 | # Continuous boundary lifts from unique confined radial vectors |
| 8 | |
| 9 | Compactness of the closed confined vector class makes its unique endpoint |
| 10 | selection continuous. This proves the continuity assertion in |
| 11 | Morgan--Tian, Remark 19.42, p. 472, once geometric existence and uniqueness |
| 12 | have been supplied. It does not infer radial uniqueness from minimization. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set Metric |
| 19 | open scoped Topology Manifold ContDiff |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | /-- Unique bounded confined radial vectors over a boundary arc give an |
| 24 | actual continuous closed-interval lift. The hypotheses quantify over all |
| 25 | such vectors, not only minimizing geodesics. Source: Morgan--Tian, |
| 26 | Remark 19.42, p. 472; see the compact-fiber derivation. -/ |
| 27 | theorem m64Intrinsic_exists_continuous_confined_boundary_lift |
| 28 | {e : AnnulusCoordinates → AnnulusCoordinates} {R a b radius : ℝ} |
| 29 | (he : ContinuousOn e (closedBall 0 R)) |
| 30 | {B : Set AnnulusCoordinates} (hB : IsClosed B) |
| 31 | (hunique : ∀ s ∈ Icc a b, ∃! v : AnnulusCoordinates, |
| 32 | (‖v‖ ≤ R ∧ ∀ t ∈ Icc (0 : ℝ) 1, e (t • v) ∈ B) ∧ |
| 33 | e v = intrinsicAnnulusBoundary radius s) : |
| 34 | ∃ u : ℝ → AnnulusCoordinates, ContinuousOn u (Icc a b) ∧ |
| 35 | (∀ s ∈ Icc a b, ‖u s‖ ≤ R) ∧ |
| 36 | (∀ s ∈ Icc a b, ∀ t ∈ Icc (0 : ℝ) 1, e (t • u s) ∈ B) ∧ |
| 37 | ∀ s ∈ Icc a b, e (u s) = intrinsicAnnulusBoundary radius s := by |
| 38 | classical |
| 39 | let C : Set AnnulusCoordinates := |
| 40 | {v | ‖v‖ ≤ R ∧ ∀ t ∈ Icc (0 : ℝ) 1, e (t • v) ∈ B} |
| 41 | have hC : IsCompact C := m64_isCompact_confined_radial_vectors he hB |
| 42 | have heC : ContinuousOn e C := he.mono (by |
| 43 | intro v hv |
| 44 | simpa only [mem_closedBall, dist_zero_right] using hv.1) |
| 45 | obtain ⟨v, hv, hvC⟩ := m64_exists_continuous_lift_of_compact_unique_fibers |
| 46 | hC heC isCompact_Icc (m64Intrinsic_contDiff_boundary radius).continuous.continuousOn |
| 47 | hunique |
| 48 | let u : ℝ → AnnulusCoordinates := fun s => if hs : s ∈ Icc a b then v ⟨s, hs⟩ else 0 |
| 49 | have hu (s : ℝ) (hs : s ∈ Icc a b) : u s = v ⟨s, hs⟩ := dif_pos hs |
| 50 | have huc : ContinuousOn u (Icc a b) := by |
| 51 | apply continuousOn_iff_continuous_domRestrict.mpr |
| 52 | exact hv.congr (fun s => (hu s s.property).symm) |
| 53 | refine ⟨u, huc, ?_, ?_, ?_⟩ |
| 54 | · intro s hs |
| 55 | rw [hu s hs] |
| 56 | exact (hvC ⟨s, hs⟩).1.1 |
| 57 | · intro s hs t ht |
| 58 | rw [hu s hs] |
| 59 | exact (hvC ⟨s, hs⟩).1.2 t ht |
| 60 | · intro s hs |
| 61 | rw [hu s hs] |
| 62 | exact (hvC ⟨s, hs⟩).2 |
| 63 | |
| 64 | end PoincareMT |