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.ReducedGeometry.Exponential.InitialValue.InitialJacobiDerivative |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.InitialValue.InitialActionTime |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.InitialValue.InitialTangent |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.SquareRoot.Equation.SquareEulerReverse |
| 5 | |
| 6 | /-! |
| 7 | # The complete actual maximal square-root exponential family |
| 8 | |
| 9 | Morgan-Tian Definition 6.17, Lemmas 6.18--6.19 and Claim 6.20, |
| 10 | pp. 113-114. The actual survival domain, coherent IVP paths, actual |
| 11 | action, genuine initial-vector differential and normalized actual |
| 12 | Jacobi fields supply every field of the frozen exponential record. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M14 |
| 23 | |
| 24 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 25 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 26 | {T : ℝ} {x : G.Point} |
| 27 | |
| 28 | /-- The actual maximal square-root IVP, including its true action and |
| 29 | its actual differential represented by normalized Jacobi fields, |
| 30 | supplies the full frozen exponential family, Definition 6.17, |
| 31 | Lemmas 6.18--6.19 and Claim 6.20, pp. 113-114. -/ |
| 32 | noncomputable def exponentialFamily |
| 33 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 34 | (hbase : G.spacetime.timeFunction x = T) : M14ExponentialFamily G T x := by |
| 35 | let P (Z : G.Horizontal x) (s : ℝ) (hs : (Z, s) ∈ initialValueDomain G T x) |
| 36 | (hpos : 0 < s) := |
| 37 | selectedInitialValuePath ⟨hpos, (initialValueDomain_positive_iff hpos).mp hs⟩ |
| 38 | let EP (Z : G.Horizontal x) (s : ℝ) (hs : (Z, s) ∈ initialValueDomain G T x) |
| 39 | (hpos : 0 < s) := |
| 40 | Classical.choice (exists_backwardVelocity_extension_of_square (P Z s hs hpos).square_path) |
| 41 | let Q (Z : G.Horizontal x) (s : ℝ) (hs : (Z, s) ∈ initialValueDomain G T x) |
| 42 | (hpos : 0 < s) (W : G.Horizontal x) := |
| 43 | initialValuePath_differentialData hM04 hM12 (P Z s hs hpos) W |
| 44 | have hdiff (Z : G.Horizontal x) (s : ℝ) (hs : (Z, s) ∈ initialValueDomain G T x) |
| 45 | (hpos : 0 < s) (W : G.Horizontal x) : |
| 46 | ∃ hEq : (P Z s hs hpos).square_path.curve s = initialValueCurve G T x Z s, |
| 47 | initialValueDifferential G T x Z s W = hEq ▸ (Q Z s hs hpos W).field s := by |
| 48 | have hsC : s ∈ M14SqrtParameterInterval 0 (s ^ 2) := by |
| 49 | simpa only [M14SqrtParameterInterval, Real.sqrt_zero, Real.sqrt_sq hpos.le] using |
| 50 | (show s ∈ Icc 0 s from ⟨hpos.le, le_rfl⟩) |
| 51 | let hEq := (initialValueCurve_eqOn_square hM04 hM12 (P Z s hs hpos) hsC).symm |
| 52 | refine ⟨hEq, eq_of_heq ?_⟩ |
| 53 | exact (initialValuePath_differentialField_heq hM04 hM12 (P Z s hs hpos) W hsC).symm.trans |
| 54 | (eqRec_heq hEq ((Q Z s hs hpos W).field s)).symm |
| 55 | exact { |
| 56 | base_time := hbase |
| 57 | domain := initialValueDomain G T x |
| 58 | domain_admissible := initialValueDomain_admissible hbase |
| 59 | domain_relative_open := initialValueDomain_relative_open hM04 hM12 hbase |
| 60 | domain_zero := initialValueDomain_zero |
| 61 | gamma := initialValueCurve G T x |
| 62 | gamma_at_zero := initialValueCurve_zero |
| 63 | family_smooth := initialValueCurve_family_smooth hM04 hM12 hbase |
| 64 | joint_continuous := initialValueCurve_joint_continuous hM04 hM12 hbase |
| 65 | clock := fun _ _ hs => initialValueCurve_clock hbase hs |
| 66 | path := fun Z s hs hpos => (P Z s hs hpos).path |
| 67 | path_coherent := fun Z s hs hpos _ hr => |
| 68 | initialValueCurve_eqOn_path hM04 hM12 (P Z s hs hpos) hr |
| 69 | path_extension := EP |
| 70 | path_euler := fun Z s hs hpos => |
| 71 | eulerEquation_of_squareRootEuler hM12 (P Z s hs hpos).square_path |
| 72 | (P Z s hs hpos).extension (P Z s hs hpos).euler (EP Z s hs hpos) |
| 73 | positive_survival_iff := fun _ _ hpos => initialValueDomain_positive_iff hpos |
| 74 | initial_value_agreement := fun _ _ _ _ A => initialValueCurve_eqOn_path hM04 hM12 A |
| 75 | square_path := fun Z s hs hpos => (P Z s hs hpos).square_path |
| 76 | square_extension := fun Z s hs hpos => (P Z s hs hpos).extension |
| 77 | square_euler := fun Z s hs hpos => (P Z s hs hpos).euler |
| 78 | square_initial_velocity := fun Z s hs hpos => (P Z s hs hpos).initial_velocity |
| 79 | action := initialValueAction G T x |
| 80 | action_eq := fun Z s hs hpos => initialValueAction_eq_of_path hM04 hM12 hpos (P Z s hs hpos) |
| 81 | action_global_eq := fun Z s hs hpos hmin => |
| 82 | (initialValueAction_eq_of_path hM04 hM12 hpos (P Z s hs hpos)).trans |
| 83 | (action_eq_actionValue_of_minimizing (P Z s hs hpos).path hmin) |
| 84 | action_time_derivative := fun Z s hs hpos => |
| 85 | initialValueAction_hasDerivWithinAt hM04 hM12 hpos (P Z s hs hpos) |
| 86 | reduced_length := fun Z s => initialValueAction G T x Z s / (2 * s) |
| 87 | reduced_length_eq := fun _ _ _ _ => rfl |
| 88 | reduced_length_global_eq := fun Z s hs hpos hmin => by |
| 89 | rw [M14ReducedLengthValue, Real.sqrt_sq hpos.le, |
| 90 | initialValueAction_eq_of_path hM04 hM12 hpos (P Z s hs hpos), |
| 91 | action_eq_actionValue_of_minimizing (P Z s hs hpos).path hmin] |
| 92 | initial_derivative := fun Z s hs hpos => initialValuePath_initial_derivative (P Z s hs hpos) |
| 93 | differential := fun Z s _ => initialValueDifferential G T x Z s |
| 94 | ambient_differential := fun Z s _ => |
| 95 | M14InitialVectorDerivative G (initialValueCurve G T x) s Z |
| 96 | ambient_differential_eq := fun _ _ _ => rfl |
| 97 | differential_pointwise_mfderiv := fun _ _ hs W => |
| 98 | initialValueDifferential_val hM04 hM12 hbase hs W |
| 99 | differential_val_eq := fun _ _ hs W => initialValueDifferential_val hM04 hM12 hbase hs W |
| 100 | differential_jacobi_map := fun Z s hs hpos W => ⟨Q Z s hs hpos W, hdiff Z s hs hpos W⟩ |
| 101 | jacobi_path := fun Z s hs hpos W => ⟨Q Z s hs hpos W, |
| 102 | initialValuePath_differentialField_zero hM04 hM12 (P Z s hs hpos) W, |
| 103 | initialValuePath_differential_initialDerivative hM04 hM12 (P Z s hs hpos) W⟩ |
| 104 | jacobi_equation := fun Z s hs hpos W _ hr V => |
| 105 | initialValuePath_differential_jacobi hM04 hM12 (P Z s hs hpos) W hr V |
| 106 | differential_jacobi := hdiff |
| 107 | jacobi_initial_zero := fun Z s hs hpos W => |
| 108 | initialValuePath_differentialField_zero hM04 hM12 (P Z s hs hpos) W |
| 109 | jacobi_initial_derivative := fun Z s hs hpos W => |
| 110 | initialValuePath_differential_initialDerivative hM04 hM12 (P Z s hs hpos) W |
| 111 | maximal_lifetime := initialValueDomain_ordConnected } |
| 112 | |
| 113 | end PoincareMT.M14 |