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.Pinching.RegionTopology |
| 2 | import PoincareLib.Geometry.Riemannian.Tensor.MaximumPrinciple.OperatorFiber |
| 3 | |
| 4 | /-! |
| 5 | # Hamilton--Ivey regions in Hilbert tensor fibers |
| 6 | |
| 7 | The metric identification of endomorphisms with covariant two-tensors transfers |
| 8 | the unchanged Hamilton--Ivey carrier to the Hilbert space used by the compact |
| 9 | tensor maximum principle. |
| 10 | |
| 11 | Reference: Morgan--Tian, Claim 4.28, pp. 77--78; Theorem 4.8, p. 66. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open PoincareMT TensorFiber |
| 17 | |
| 18 | namespace Poincare.HamiltonIvey |
| 19 | |
| 20 | variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] |
| 21 | [FiniteDimensional ℝ E] |
| 22 | |
| 23 | /-- The original carrier under the inverse metric identification. -/ |
| 24 | def tensorRegion (hn : Module.finrank ℝ E = 3) (t : ℝ) : Set (TensorFiber E 2) := |
| 25 | operatorTensorEquiv.symm ⁻¹' continuousRegion hn t |
| 26 | |
| 27 | @[simp] theorem operatorTensor_mem_tensorRegion (hn : Module.finrank ℝ E = 3) |
| 28 | (t : ℝ) (A : E →ₗ[ℝ] E) : |
| 29 | operatorTensor A ∈ tensorRegion hn t ↔ A ∈ region hn t := by |
| 30 | change operatorTensorEquiv.symm (operatorTensor A) ∈ continuousRegion hn t ↔ _ |
| 31 | have hA := operatorTensorEquiv_symm_apply (LinearMap.toContinuousLinearMap A) |
| 32 | simp only [LinearMap.coe_toContinuousLinearMap] at hA |
| 33 | rw [hA] |
| 34 | rfl |
| 35 | |
| 36 | theorem tensorRegion_eq_image (hn : Module.finrank ℝ E = 3) (t : ℝ) : |
| 37 | tensorRegion hn t = operatorTensorEquiv '' continuousRegion hn t := by |
| 38 | ext T |
| 39 | constructor |
| 40 | · intro hT |
| 41 | exact ⟨operatorTensorEquiv.symm T, hT, operatorTensorEquiv.apply_symm_apply T⟩ |
| 42 | · rintro ⟨A, hA, rfl⟩ |
| 43 | simpa only [tensorRegion, Set.mem_preimage, ContinuousLinearEquiv.symm_apply_apply] using hA |
| 44 | |
| 45 | theorem isClosed_tensorRegion (hn : Module.finrank ℝ E = 3) |
| 46 | {t : ℝ} (ht : 0 ≤ t) : IsClosed (tensorRegion hn t) := |
| 47 | (isClosed_continuousRegion hn ht).preimage operatorTensorEquiv.symm.continuous |
| 48 | |
| 49 | theorem convex_tensorRegion (hn : Module.finrank ℝ E = 3) |
| 50 | {t : ℝ} (ht : 0 ≤ t) : Convex ℝ (tensorRegion hn t) := |
| 51 | (convex_continuousRegion hn ht).linear_preimage operatorTensorEquiv.symm.toLinearMap |
| 52 | |
| 53 | theorem tensorRegion_nonempty (hn : Module.finrank ℝ E = 3) |
| 54 | {t : ℝ} (ht : 0 ≤ t) : (tensorRegion hn t).Nonempty := by |
| 55 | rw [tensorRegion_eq_image] |
| 56 | exact (continuousRegion_nonempty hn ht).image _ |
| 57 | |
| 58 | theorem isClosed_tensorRegion_spacetime (hn : Module.finrank ℝ E = 3) : |
| 59 | IsClosed {p : ℝ × TensorFiber E 2 | 0 ≤ p.1 ∧ p.2 ∈ tensorRegion hn p.1} := |
| 60 | (isClosed_continuousRegion_spacetime hn).preimage |
| 61 | (continuous_fst.prodMk (operatorTensorEquiv.symm.continuous.comp continuous_snd)) |
| 62 | |
| 63 | /- Carrier membership is independent of the choice of isometric fiber. -/ |
| 64 | theorem tensorRegion_transport_equiv_iff |
| 65 | {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F] |
| 66 | [FiniteDimensional ℝ F] (hn : Module.finrank ℝ E = 3) |
| 67 | (hm : Module.finrank ℝ F = 3) (e : E ≃ₗᵢ[ℝ] F) |
| 68 | {t : ℝ} (ht : 0 ≤ t) (T : TensorFiber E 2) : |
| 69 | TensorFiber.transport e 2 T ∈ tensorRegion hm t ↔ T ∈ tensorRegion hn t := by |
| 70 | obtain ⟨A, rfl⟩ := operatorTensorEquiv.surjective T |
| 71 | rw [operatorTensorEquiv_apply, transport_operatorTensor_eq, |
| 72 | operatorTensor_mem_tensorRegion, operatorTensor_mem_tensorRegion] |
| 73 | exact region_conj_equiv_iff hn hm e ht A.toLinearMap |
| 74 | |
| 75 | theorem tensorRegion_transport_iff (hn : Module.finrank ℝ E = 3) |
| 76 | (e : E ≃ₗᵢ[ℝ] E) {t : ℝ} (ht : 0 ≤ t) (T : TensorFiber E 2) : |
| 77 | TensorFiber.transport e 2 T ∈ tensorRegion hn t ↔ T ∈ tensorRegion hn t := |
| 78 | tensorRegion_transport_equiv_iff hn hn e ht T |
| 79 | |
| 80 | theorem tensorRegion_transport_image |
| 81 | {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F] |
| 82 | [FiniteDimensional ℝ F] (hn : Module.finrank ℝ E = 3) |
| 83 | (hm : Module.finrank ℝ F = 3) (e : E ≃ₗᵢ[ℝ] F) |
| 84 | {t : ℝ} (ht : 0 ≤ t) : |
| 85 | TensorFiber.transport e 2 '' tensorRegion hn t = tensorRegion hm t := by |
| 86 | ext T |
| 87 | constructor |
| 88 | · rintro ⟨S, hS, rfl⟩ |
| 89 | exact (tensorRegion_transport_equiv_iff hn hm e ht S).mpr hS |
| 90 | · intro hT |
| 91 | obtain ⟨S, rfl⟩ := (TensorFiber.transport e 2).surjective T |
| 92 | exact ⟨S, (tensorRegion_transport_equiv_iff hn hm e ht S).mp hT, rfl⟩ |
| 93 | |
| 94 | theorem tensorRegion_scale_iff (hn : Module.finrank ℝ E = 3) |
| 95 | {t : ℝ} (ht : 0 ≤ t) (T : TensorFiber E 2) : |
| 96 | T ∈ tensorRegion hn t ↔ (1 + t) • T ∈ tensorRegion hn 0 := by |
| 97 | change operatorTensorEquiv.symm T ∈ continuousRegion hn t ↔ |
| 98 | operatorTensorEquiv.symm ((1 + t) • T) ∈ continuousRegion hn 0 |
| 99 | rw [map_smul] |
| 100 | exact region_scale_iff hn ht (operatorTensorEquiv.symm T).toLinearMap |
| 101 | |
| 102 | end Poincare.HamiltonIvey |