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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Spacetime.Geometry.BoxPathLength |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Spacetime.CompactGeometry.CompactTransportCylinder |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Spacetime.Curvature.ScalarContinuity |
| 5 | |
| 6 | /-! |
| 7 | # Transporting one compact path with scalar and length control |
| 8 | |
| 9 | Compactness selects one finite family of actual boxes and one common |
| 10 | relative time interval. Their transport gives paths in the changing slice |
| 11 | carriers, with the original path at the tested time, joint scalar |
| 12 | continuity, and continuity of actual selected-metric length. This is the |
| 13 | producer required by task derivation 08 of the dense-time extension of |
| 14 | Morgan--Tian Theorem 10.2. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Set Function |
| 20 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M28 |
| 25 | |
| 26 | /-- One compact path has a common transport interval with C1 slice paths, |
| 27 | the original terminal path, continuous scalar on the entire transported |
| 28 | path, and continuous actual path length. Constants are selected before |
| 29 | any good time is chosen, as required in task derivation 08. -/ |
| 30 | theorem exists_compact_path_transport |
| 31 | (F : GeneralizedRicciFlowData.{u}) (P : RicciFlowCurvatureTheory.{u}) |
| 32 | (t : ℝ) (htF : t ∈ F.interval) |
| 33 | (γ : ℝ → (F.slice t).carrier) (hγ : ContMDiff 𝓘(ℝ) (𝓡 3) 1 γ) : |
| 34 | ∃ δ : ℝ, 0 < δ ∧ |
| 35 | ∃ Γ : ∀ s : ↥(F.interval ∩ Ioo (t - δ) (t + δ)), ℝ → (F.slice s.val).carrier, |
| 36 | (∀ s, ContMDiffOn 𝓘(ℝ) (𝓡 3) 1 (Γ s) (Icc 0 1)) ∧ |
| 37 | (∀ ht : t ∈ F.interval ∩ Ioo (t - δ) (t + δ), |
| 38 | ∀ v ∈ Icc (0 : ℝ) 1, Γ ⟨t, ht⟩ v = γ v) ∧ |
| 39 | Continuous (fun z : ↥(F.interval ∩ Ioo (t - δ) (t + δ)) × unitInterval => |
| 40 | F.scalar ⟨z.1.val, Γ z.1 z.2.val⟩) ∧ |
| 41 | Continuous (fun s : ↥(F.interval ∩ Ioo (t - δ) (t + δ)) => |
| 42 | (F.metric s.val).pathELength (Γ s) 0 1) := by |
| 43 | obtain ⟨B, hB, δ, hδ, hlife⟩ := F.exists_common_box_lifetime t |
| 44 | (γ '' Icc 0 1) (isCompact_Icc.image hγ.continuous) |
| 45 | let b : B → F.box_index := fun i => i.val.val |
| 46 | have ht (i : B) : t ∈ (F.box (b i)).interval := i.val.property |
| 47 | let J := F.interval ∩ Ioo (t - δ) (t + δ) |
| 48 | have hJF : J ⊆ F.interval := inter_subset_left |
| 49 | have hJ (s : ℝ) (hs : s ∈ J) (i : B) : s ∈ (F.box (b i)).interval := by |
| 50 | apply hlife s hs.1 _ i.val i.property |
| 51 | exact abs_lt.mpr ⟨by linarith [hs.2.1], by linarith [hs.2.2]⟩ |
| 52 | let U := range (boxEvaluation F b t ht) |
| 53 | have himage : MapsTo γ (Icc 0 1) U := by |
| 54 | intro v hv |
| 55 | obtain ⟨i, hi, y, hy⟩ := mem_iUnion₂.mp (hB (mem_image_of_mem γ hv)) |
| 56 | exact ⟨⟨⟨i, hi⟩, y⟩, hy⟩ |
| 57 | let Γ : ∀ s : J, ℝ → (F.slice s.val).carrier := fun s => |
| 58 | boxTransport F b t s.val ht (hJ _ s.property) (hJF s.property) ∘ γ |
| 59 | refine ⟨δ, hδ, Γ, ?_, ?_, ?_, ?_⟩ |
| 60 | · intro s |
| 61 | exact ((boxTransport_contMDiffOn F b t s.val ht (hJ _ s.property) |
| 62 | (hJF s.property)).of_le (by norm_num)).comp hγ.contMDiffOn himage |
| 63 | · intro htJ v hv |
| 64 | obtain ⟨⟨i, y⟩, hy⟩ := himage hv |
| 65 | change boxTransport F b t t ht (hJ t htJ) (hJF htJ) (γ v) = γ v |
| 66 | rw [← hy] |
| 67 | exact boxTransport_apply F b t t ht (hJ t htJ) (hJF htJ) i y |
| 68 | · have hJopen : ∃ V : Set ℝ, IsOpen V ∧ J = F.interval ∩ V := |
| 69 | ⟨Ioo (t - δ) (t + δ), isOpen_Ioo, rfl⟩ |
| 70 | have hsp := (isOpenEmbedding_boxSpacetimeTransport F b t ht J hJF hJ htF hJopen).continuous |
| 71 | have hpath : Continuous (fun z : J × unitInterval => |
| 72 | (z.1, (⟨γ z.2.val, himage z.2.property⟩ : U))) := |
| 73 | continuous_fst.prodMk |
| 74 | ((hγ.continuous.comp (continuous_subtype_val.comp continuous_snd)).subtype_mk _) |
| 75 | exact (F.continuous_scalar_m28 P).comp (hsp.comp hpath) |
| 76 | · exact continuous_boxTransport_pathELength F b t ht J hJF hJ γ hγ himage |
| 77 | |
| 78 | end PoincareMT.M28 |