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.CanonicalInduction.Prefix.PrefixMonotone |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Assembly.Configuration |
| 3 | |
| 4 | /-! |
| 5 | # The literal observation before a first failure |
| 6 | |
| 7 | The strict past supplies canonical control only on the shortened |
| 8 | observation. Its horizon must be strictly above the old epoch endpoint. |
| 9 | Source: MT pp. 395-402; seed-first-failure-horizon.md. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.Proofs.M47 |
| 19 | |
| 20 | open M46 |
| 21 | |
| 22 | /-- Construct the existing M46 input record from the primitive extension |
| 23 | inputs and the actual canonical strict past. -/ |
| 24 | theorem seed_firstFailure_observedInputs |
| 25 | {K : MetricSurgeryConstants} {p : SurgeryParameterPrefix K} |
| 26 | {F : SurgeryFlowData.{u}} {O : SurgeryObservation F} |
| 27 | {rNext cutoff T : ℝ} (hT : 0 < T) (hTO : T ≤ O.H) |
| 28 | (hstart : surgeryEpochStart p.i < T) |
| 29 | (hnext : SurgeryObservationIsNextEpoch p O) |
| 30 | (old : SurgeryPrefixControls p F O) |
| 31 | (admissible : SurgeryFlowAdmissible F) (pinched : SurgeryFlowPinched F) |
| 32 | (policy : SurgeryFlowTerminalPolicyOn F (surgeryObservationInterval O)) |
| 33 | (scales : SurgeryPostPrefixScales p F O rNext cutoff) |
| 34 | (overlap : ∀ t ∈ surgeryObservationInterval O ∩ |
| 35 | Ico (surgeryEpochStart (p.i - 1)) O.H, F.parameters.delta t ≤ cutoff) |
| 36 | (past : SurgeryCanonicalOn F (Ico 0 T) rNext) : |
| 37 | ObservedInputs p rNext cutoff F (O.restrictTo T hT hTO) := by |
| 38 | refine { |
| 39 | next_epoch := hnext.restrictObservation hTO hstart |
| 40 | old := old.restrictObservation hTO |
| 41 | admissible := admissible |
| 42 | pinched := pinched |
| 43 | terminal_policy := policy.restrictObservation hTO |
| 44 | scales := scales.restrictObservation hTO |
| 45 | canonical := past |
| 46 | overlap := ?_ } |
| 47 | intro t ht |
| 48 | have hobs : t ∈ surgeryObservationInterval O := ⟨ht.1.1, ht.1.2.trans_le hTO⟩ |
| 49 | exact overlap t ⟨hobs, ht.2.1, hobs.2⟩ |
| 50 | |
| 51 | end PoincareMT.Proofs.M47 |