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.CurveShortening.Ramp.Analysis.Periodic.H1FiniteComposition |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Vector.PeriodicH1Coefficients |
| 3 | |
| 4 | /-! |
| 5 | # Joint finite-order H1 composition with a time parameter |
| 6 | |
| 7 | The actual zero Fourier mode inserts time as a constant coordinate. |
| 8 | Finite-order graph composition then gives joint scalar and vector |
| 9 | coefficient maps with full complex decoder identities. |
| 10 | MT2007 Claim 19.1, p. 437; |
| 11 | `2026-09-21-time-parameter-h1-composition.md`. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open AddCircle PoincareMT.SpectralHeatNative |
| 17 | |
| 18 | namespace PoincareMT.M63 |
| 19 | |
| 20 | variable {L : ℝ} [Fact (0 < L)] {ι : Type*} [Fintype ι] |
| 21 | |
| 22 | /-- Joint C^(k+1) real scalar coefficients give joint C^k maps on the |
| 23 | actual H2 trace states, with the full complex H1 identity. MT2007 |
| 24 | Claim 19.1, p. 437; time-parameter H1 derivation, statement 1. -/ |
| 25 | theorem exists_timeParameter_scalarH1_composition (k : ℕ) |
| 26 | (f : ℝ × ((Fin 2 × ι) → ℝ) → ℝ) (hf : ContDiff ℝ (k + 1) f) : |
| 27 | ∃ G : ℝ × State ((ℤ × Fin 2) × ι) → lp (fun _ : ℤ => ℂ) 2, |
| 28 | ContDiff ℝ k G ∧ ∀ t u x, |
| 29 | periodicSobolevJet (L := L) 0 0 (by omega) (G (t, u)) x = |
| 30 | (f (t, fun j : Fin 2 × ι => |
| 31 | vectorPeriodicJet (L := L) 1 j.1 (by omega) u x j.2) : ℂ) := by |
| 32 | classical |
| 33 | let J := Fin 2 × ι |
| 34 | let H := lp (fun _ : ℤ => ℂ) 2 |
| 35 | let S := State ((ℤ × Fin 2) × ι) |
| 36 | let R : (Option J → ℂ) →L[ℝ] ℝ × (J → ℝ) := |
| 37 | (Complex.reCLM.comp (ContinuousLinearMap.proj none)).prod |
| 38 | (ContinuousLinearMap.pi (fun j => Complex.reCLM.comp (ContinuousLinearMap.proj (some j)))) |
| 39 | let Φ : (Option J → ℂ) → ℂ := fun z => f (R z) |
| 40 | have hΦ : ContDiff ℝ (k + 1) Φ := Complex.ofRealCLM.contDiff.comp (hf.comp R.contDiff) |
| 41 | let X := vectorPeriodicH1JetCoordinates (L := L) (ι := ι) |
| 42 | let C : ℝ →L[ℝ] H := |
| 43 | ((lp.singleContinuousLinearMap ℂ (fun _ : ℤ => ℂ) 2 0).restrictScalars ℝ).comp |
| 44 | Complex.ofRealCLM |
| 45 | let Z : ℝ × S →L[ℝ] (Option J → H) := ContinuousLinearMap.pi (fun j => |
| 46 | match j with |
| 47 | | none => C.comp (ContinuousLinearMap.fst ℝ ℝ S) |
| 48 | | some i => (ContinuousLinearMap.proj i).comp (X.comp (ContinuousLinearMap.snd ℝ ℝ S))) |
| 49 | obtain ⟨G, hG, hdecode⟩ := exists_periodicH1_finite_composition (L := L) k Φ hΦ |
| 50 | refine ⟨G ∘ Z, hG.comp Z.contDiff, ?_⟩ |
| 51 | intro t u x |
| 52 | rw [Function.comp_apply, hdecode] |
| 53 | change (f (R (periodicH1VectorDecoder (L := L) (Option J) (Z (t, u)) x)) : ℂ) = _ |
| 54 | apply congrArg (fun z => (f z : ℂ)) |
| 55 | apply Prod.ext |
| 56 | · change (periodicSobolevJet (L := L) 0 0 (by omega) (lp.single 2 0 (t : ℂ)) x).re = t |
| 57 | rw [(periodicH1Decoder_single (L := L) 0 (t : ℂ)).1] |
| 58 | simp |
| 59 | · funext j |
| 60 | exact (vectorPeriodicH1JetCoordinates_spec (L := L) u).2.2 j x |
| 61 | |
| 62 | /-- Joint finite-order vector composition retains every full complex |
| 63 | component identity after the actual finite-state assembly. MT2007 |
| 64 | Claim 19.1, p. 437; time-parameter H1 derivation, statement 2. -/ |
| 65 | theorem exists_timeParameter_vectorH1_composition (k : ℕ) |
| 66 | (f : ℝ × ((Fin 2 × ι) → ℝ) → (ι → ℝ)) (hf : ContDiff ℝ (k + 1) f) : |
| 67 | ∃ G : ℝ × State ((ℤ × Fin 2) × ι) → State ((ℤ × Fin 2) × ι), |
| 68 | ContDiff ℝ k G ∧ ∀ t u x i, |
| 69 | periodicSobolevJet (L := L) 0 0 (by omega) |
| 70 | (complexLpRealEquiv.symm (lpFinitePiEquiv ℝ (G (t, u)) i)) x = |
| 71 | (f (t, fun j : Fin 2 × ι => |
| 72 | vectorPeriodicJet (L := L) 1 j.1 (by omega) u x j.2) i : ℂ) := by |
| 73 | classical |
| 74 | have hcomponent (i : ι) := exists_timeParameter_scalarH1_composition (L := L) k |
| 75 | (fun z => f z i) ((contDiff_apply ℝ ℝ i).comp hf) |
| 76 | choose G hG hdecode using hcomponent |
| 77 | let S := lpFinitePiEquiv (α := ℤ × Fin 2) (ι := ι) (E := ℝ) ℝ |
| 78 | let R := complexLpRealEquiv (ι := ℤ) |
| 79 | refine ⟨fun z => S.symm (fun i => R (G i z)), ?_, ?_⟩ |
| 80 | · exact S.symm.contDiff.comp (contDiff_pi.mpr (fun i => R.contDiff.comp (hG i))) |
| 81 | · intro t u x i |
| 82 | change periodicSobolevJet (L := L) 0 0 (by omega) |
| 83 | (R.symm (S (S.symm (fun i => R (G i (t, u)))) i)) x = _ |
| 84 | rw [S.apply_symm_apply, R.symm_apply_apply] |
| 85 | exact hdecode i t u x |
| 86 | |
| 87 | end PoincareMT.M63 |