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.Topology.Manifold.Poincare.Final.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Positive.PositiveHistoryOpenness |
| 3 | |
| 4 | /-! |
| 5 | # The included nonnegative onset of a positive ordinary component |
| 6 | |
| 7 | The infimum is taken over the actual positive slices of the given closed |
| 8 | ordinary flow. Fixed-parameter right limits include the onset slice. |
| 9 | Source: Morgan--Tian, pp. 393-394; positive-history derivation, Stage D. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M47Positive |
| 21 | |
| 22 | open PoincareMT.M04 Proofs.M46 |
| 23 | |
| 24 | variable {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 26 | [CompactSpace M] [T2Space M] [SecondCountableTopology M] |
| 27 | |
| 28 | /-- A positive terminal slice has an actual earliest positive interval, |
| 29 | with a closed nonnegative curvature-pair bound at its included onset. |
| 30 | Earlier included slices are nonpositive; MT pp. 393-394. -/ |
| 31 | theorem exists_positive_history_onset {b T : ℝ} (hbT : b < T) |
| 32 | (F : RicciFlow 3 M (Icc b T)) |
| 33 | (hpos : ∀ x : M, ∀ u v : TangentSpace (𝓡 3) x, |
| 34 | LeviCivitaData.IsOrthonormalPair (F.metric T) x u v → |
| 35 | 0 < (F.connection T).sectionalCurvature x u v) : |
| 36 | ∃ a ∈ Ico b T, |
| 37 | (∀ x : M, ∀ u v : TangentSpace (𝓡 3) x, |
| 38 | 0 ≤ (F.connection a).curvatureTensor x u v u v) ∧ |
| 39 | (∀ t ∈ Ioc a T, ∀ x : M, ∀ u v : TangentSpace (𝓡 3) x, |
| 40 | LeviCivitaData.IsOrthonormalPair (F.metric t) x u v → |
| 41 | 0 < (F.connection t).sectionalCurvature x u v) ∧ |
| 42 | (∀ t ∈ Ico b a, ¬ (∀ x : M, ∀ u v : TangentSpace (𝓡 3) x, |
| 43 | LeviCivitaData.IsOrthonormalPair (F.metric t) x u v → |
| 44 | 0 < (F.connection t).sectionalCurvature x u v)) ∧ |
| 45 | (a = b ∨ ¬ (∀ x : M, ∀ u v : TangentSpace (𝓡 3) x, |
| 46 | LeviCivitaData.IsOrthonormalPair (F.metric a) x u v → |
| 47 | 0 < (F.connection a).sectionalCurvature x u v)) := by |
| 48 | classical |
| 49 | let Pos (t : ℝ) : Prop := ∀ x : M, ∀ u v : TangentSpace (𝓡 3) x, |
| 50 | LeviCivitaData.IsOrthonormalPair (F.metric t) x u v → |
| 51 | 0 < (F.connection t).sectionalCurvature x u v |
| 52 | let A : Set ℝ := {t | t ∈ Icc b T ∧ Pos t} |
| 53 | have hTA : T ∈ A := ⟨⟨hbT.le, le_rfl⟩, hpos⟩ |
| 54 | have hne : A.Nonempty := ⟨T, hTA⟩ |
| 55 | have hbelow : BddBelow A := ⟨b, fun _ ht => ht.1.1⟩ |
| 56 | let a := sInf A |
| 57 | have hba : b ≤ a := le_csInf hne (fun _ ht => ht.1.1) |
| 58 | obtain ⟨s, hs, hsp⟩ := exists_earlier_positive_time F hbT le_rfl hpos |
| 59 | have hsa : s ∈ A := ⟨⟨hs.1.le, hs.2.le⟩, hsp⟩ |
| 60 | have haT : a < T := (csInf_le hbelow hsa).trans_lt hs.2 |
| 61 | have hafter : ∀ t ∈ Ioc a T, Pos t := by |
| 62 | intro t ht |
| 63 | obtain ⟨r, hr, hrt⟩ := exists_lt_of_csInf_lt hne ht.1 |
| 64 | exact sectional_positive_at_later_time F hr.1 |
| 65 | ⟨hba.trans ht.1.le, ht.2⟩ hrt.le hr.2 |
| 66 | have hbefore : ∀ t ∈ Ico b a, ¬ Pos t := by |
| 67 | intro t ht htp |
| 68 | have htA : t ∈ A := ⟨⟨ht.1, ht.2.le.trans haT.le⟩, htp⟩ |
| 69 | exact (not_le_of_gt ht.2) (csInf_le hbelow htA) |
| 70 | have honset : a = b ∨ ¬ Pos a := by |
| 71 | by_cases hab : a = b |
| 72 | · exact Or.inl hab |
| 73 | · right |
| 74 | intro hap |
| 75 | have hba' : b < a := lt_of_le_of_ne hba (Ne.symm hab) |
| 76 | obtain ⟨r, hr, hrp⟩ := exists_earlier_positive_time F hba' haT.le hap |
| 77 | exact hbefore r ⟨hr.1.le, hr.2⟩ hrp |
| 78 | refine ⟨a, ⟨hba, haT⟩, ?_, hafter, hbefore, honset⟩ |
| 79 | obtain ⟨P⟩ := compactSectionalParameters F |
| 80 | let q : ℝ × P.carrier → ℝ := fun p => |
| 81 | (F.connection p.1).curvatureTensor (P.point p.2) (P.left p.2) (P.right p.2) |
| 82 | (P.left p.2) (P.right p.2) / |
| 83 | metricGram (F.metric p.1) (P.point p.2) (P.left p.2) (P.right p.2) |
| 84 | have hgram (t : ℝ) (z : P.carrier) : |
| 85 | 0 < metricGram (F.metric t) (P.point z) (P.left z) (P.right z) := |
| 86 | metricGram_pos_of_linearIndependent (F.metric t) _ _ _ (P.independent z) |
| 87 | have hqpos (t : ℝ) (ht : t ∈ Ioc a T) (z : P.carrier) : 0 < q (t, z) := |
| 88 | div_pos (curvature_pair_positive_of_orthonormal (F.connection t) (P.point z) |
| 89 | (hafter t ht (P.point z)) _ _ (P.independent z)) (hgram t z) |
| 90 | have hlimit (z : P.carrier) : 0 ≤ q (a, z) := by |
| 91 | have hqc : ContinuousOn (fun t => q (t, z)) (Icc a T) := |
| 92 | P.continuous_quotient.comp (continuous_id.prodMk continuous_const).continuousOn |
| 93 | (fun t ht => ⟨⟨hba.trans ht.1, ht.2⟩, mem_univ z⟩) |
| 94 | have hlim : Tendsto (fun t => q (t, z)) (𝓝[>] a) (𝓝 (q (a, z))) := |
| 95 | ((hqc a ⟨le_rfl, haT.le⟩).mono_of_mem_nhdsWithin |
| 96 | (Icc_mem_nhdsGE haT)).mono Ioi_subset_Ici_self |
| 97 | apply ge_of_tendsto hlim |
| 98 | filter_upwards [Ioc_mem_nhdsGT haT] with t ht |
| 99 | exact (hqpos t ht z).le |
| 100 | have hbound := P.complete a 0 (fun z => |
| 101 | (le_div_iff₀ (hgram a z)).mp (hlimit z)) |
| 102 | simpa only [zero_mul] using hbound |
| 103 | |
| 104 | end PoincareMT.M47Positive |