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.Surgery.StandardCap.Existence.InitialMetric.Rotations |
| 2 | import PoincareLib.Geometry.RicciFlow.Pullback |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Geometry |
| 4 | |
| 5 | /-! |
| 6 | # The actual partial flow pulled back by a prescribed standard rotation |
| 7 | |
| 8 | The literal SO(3) action is a global smooth linear equivalence. Its |
| 9 | pullback preserves the initial metric, retains the supplied compatible |
| 10 | connection at zero, and transports the actual curvature norm and bounds. |
| 11 | This is the uniqueness reduction in Morgan-Tian Section 12.5, |
| 12 | pp. 309-319; see rotation-invariance.md. No positive-time invariance or |
| 13 | noncompact uniqueness is assumed here. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set |
| 20 | open scoped Manifold ContDiff |
| 21 | |
| 22 | namespace PoincareMT.M34 |
| 23 | |
| 24 | /-- The literal standard rotation is onto the original cap space |
| 25 | (Section 12.5, pp. 309-319). -/ |
| 26 | theorem standardRotation_surjective (A : Matrix.specialOrthogonalGroup (Fin 3) ℝ) : |
| 27 | Function.Surjective (standardRotation A) := |
| 28 | LinearMap.surjective_of_injective (f := (capRotationIsometry A).toLinearMap) |
| 29 | (capRotationIsometry A).injective |
| 30 | |
| 31 | /-- The prescribed rotation as a genuine linear isometric equivalence |
| 32 | (Section 12.5, pp. 309-319). -/ |
| 33 | noncomputable def capRotationEquiv (A : Matrix.specialOrthogonalGroup (Fin 3) ℝ) : |
| 34 | StandardCapSpace ≃ₗᵢ[ℝ] StandardCapSpace := |
| 35 | LinearIsometryEquiv.ofSurjective (capRotationIsometry A) (standardRotation_surjective A) |
| 36 | |
| 37 | /-- The frozen SO(3) action is a smooth local diffeomorphism everywhere |
| 38 | (Section 12.5, pp. 309-319). -/ |
| 39 | theorem standardRotation_isLocalDiffeomorph |
| 40 | (A : Matrix.specialOrthogonalGroup (Fin 3) ℝ) : |
| 41 | IsLocalDiffeomorph (𝓡 3) (𝓡 3) ∞ (standardRotation A) := |
| 42 | (capRotationEquiv A).toContinuousLinearEquiv.toDiffeomorph.isLocalDiffeomorph |
| 43 | |
| 44 | namespace PartialStandardCapFlow |
| 45 | |
| 46 | variable {g0 : StandardInitialMetric} (F : PartialStandardCapFlow g0) |
| 47 | (A : Matrix.specialOrthogonalGroup (Fin 3) ℝ) |
| 48 | |
| 49 | /-- The total metric family obtained by the actual prescribed rotation |
| 50 | (Section 12.5, pp. 309-319). -/ |
| 51 | noncomputable def rotatedMetric (t : ℝ) : RiemannianMetric 3 StandardCapSpace := |
| 52 | (F.flow.metric t).pullbackOfLocalDiffeomorph (standardRotation A) |
| 53 | (standardRotation_isLocalDiffeomorph A) |
| 54 | |
| 55 | /-- Initial rotation invariance identifies the entire pulled-back |
| 56 | initial metric record with the supplied one (Section 12.5, pp. 309-319). -/ |
| 57 | theorem rotatedMetric_zero : rotatedMetric F A 0 = g0.metric := by |
| 58 | have hinner : ∀ x (u v : TangentSpace (𝓡 3) x), |
| 59 | (rotatedMetric F A 0).inner x u v = g0.metric.inner x u v := by |
| 60 | intro x u v |
| 61 | change (F.flow.metric 0).inner (standardRotation A x) |
| 62 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x u) |
| 63 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x v) = _ |
| 64 | rw [F.initial_metric] |
| 65 | exact g0.rotation_invariant A x u v |
| 66 | cases h₁ : rotatedMetric F A 0 |
| 67 | cases h₂ : g0.metric |
| 68 | rw [h₁, h₂] at hinner |
| 69 | simp only [Bundle.ContMDiffRiemannianMetric.mk.injEq] |
| 70 | funext x |
| 71 | ext u v |
| 72 | exact hinner x u v |
| 73 | |
| 74 | /-- A compatible connection family retaining the supplied record at |
| 75 | zero, with the metric equality explicitly transported |
| 76 | (Section 12.5, pp. 309-319). -/ |
| 77 | noncomputable def rotatedConnection (t : ℝ) : LeviCivitaData (rotatedMetric F A t) := |
| 78 | if ht : t = 0 then |
| 79 | (by rw [ht, rotatedMetric_zero F A]; exact g0.connection) |
| 80 | else (rotatedMetric F A t).euclideanLeviCivitaData |
| 81 | |
| 82 | /-- The transported initial connection is heterogeneously equal to |
| 83 | the exact supplied record (Section 12.5, pp. 309-319). -/ |
| 84 | theorem rotatedConnection_zero : HEq (rotatedConnection F A 0) g0.connection := by |
| 85 | simp [rotatedConnection] |
| 86 | |
| 87 | /-- Pullback by the fixed literal rotation gives an actual Ricci flow |
| 88 | on exactly the old time interval (Section 12.5, pp. 309-319). -/ |
| 89 | noncomputable def rotatedFlow : RicciFlow 3 StandardCapSpace (Ico 0 F.lifetime) := |
| 90 | F.flow.pullbackWithConnection (standardRotation A) |
| 91 | (standardRotation_isLocalDiffeomorph A) (rotatedConnection F A) |
| 92 | |
| 93 | /-- The full curvature norm of the pulled-back flow is the original |
| 94 | norm at the rotated point (Section 12.5, pp. 309-319). -/ |
| 95 | theorem rotatedFlow_curvatureTensorNorm (t : ℝ) (x : StandardCapSpace) : |
| 96 | ((rotatedFlow F A).connection t).curvatureTensorNorm x = |
| 97 | (F.flow.connection t).curvatureTensorNorm (standardRotation A x) := by |
| 98 | apply LeviCivitaData.curvatureTensorNorm_eq_of_local_isometry |
| 99 | ((rotatedFlow F A).connection t) (F.flow.connection t) isOpen_univ |
| 100 | (standardRotation_isLocalDiffeomorph A).contMDiff.contMDiffOn |
| 101 | (fun _ _ _ _ => rfl) (mem_univ x) |
| 102 | |
| 103 | /-- The rotated flow fills the same frozen partial-cap contract, with |
| 104 | the original lifetime and exactly the original initial records |
| 105 | (Section 12.5, pp. 309-319). -/ |
| 106 | noncomputable def rotatedPartialFlow : PartialStandardCapFlow g0 where |
| 107 | lifetime := F.lifetime |
| 108 | lifetime_pos := F.lifetime_pos |
| 109 | flow := rotatedFlow F A |
| 110 | initial_metric := rotatedMetric_zero F A |
| 111 | initial_connection := rotatedConnection_zero F A |
| 112 | curvature_locally_bounded := by |
| 113 | intro T hT hTF |
| 114 | obtain ⟨K, hK, hb⟩ := F.curvature_locally_bounded T hT hTF |
| 115 | refine ⟨K, hK, ?_⟩ |
| 116 | intro t ht x |
| 117 | rw [rotatedFlow_curvatureTensorNorm] |
| 118 | exact hb t ht (standardRotation A x) |
| 119 | |
| 120 | /-- The rotated partial flow has the exact bilinear pullback required |
| 121 | by the final literal-action invariance statement |
| 122 | (Section 12.5, pp. 309-319). -/ |
| 123 | theorem rotatedPartialFlow_metric_inner (t : ℝ) (x : StandardCapSpace) |
| 124 | (u v : TangentSpace (𝓡 3) x) : |
| 125 | ((rotatedPartialFlow F A).flow.metric t).inner x u v = |
| 126 | (F.flow.metric t).inner (standardRotation A x) |
| 127 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x u) |
| 128 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x v) := rfl |
| 129 | |
| 130 | end PartialStandardCapFlow |
| 131 | end PoincareMT.M34 |