Navier–Stokes: the Lean blow-up proof, cleaned up together
OpenAI's 2026 Lean proofs of blowup for forced Navier–Stokes and Euler, rerun by others, not refereed, no ruling from Clay; cleaned up together: more readable, faster to build

| 1 | |
| 2 | open Lean in |
| 3 | #eval show CoreM Unit from do |
| 4 | let env ← getEnv |
| 5 | let mods := env.header.moduleNames |
| 6 | let proj (m : Name) : Bool := m.getRoot == `NavierStokes || m.getRoot == `Euler |
| 7 | let h ← IO.FS.Handle.mk "/out/decls.jsonl" IO.FS.Mode.write |
| 8 | let mut n := 0 |
| 9 | for (c, ci) in env.constants.map₁.toList do |
| 10 | let some idx := env.getModuleIdxFor? c | continue |
| 11 | let m := mods[idx.toNat]! |
| 12 | unless proj m do continue |
| 13 | let used := ci.getUsedConstantsAsSet.toList.filter fun u => |
| 14 | match env.getModuleIdxFor? u with |
| 15 | | some i => proj mods[i.toNat]! |
| 16 | | none => false |
| 17 | let rng ← findDeclarationRanges? c |
| 18 | let r := match rng with |
| 19 | | some r => "[" ++ toString r.range.pos.line ++ "," ++ toString r.range.endPos.line ++ "]" |
| 20 | | none => "null" |
| 21 | let kind := match ci with |
| 22 | | .thmInfo _ => "theorem" | .defnInfo _ => "def" | .axiomInfo _ => "axiom" | .opaqueInfo _ => "opaque" |
| 23 | | .inductInfo _ => "inductive" | .ctorInfo _ => "ctor" | .recInfo _ => "rec" | .quotInfo _ => "quot" |
| 24 | let doc := (← findDocString? env c).getD "" |
| 25 | h.putStrLn ("{\"n\":" ++ (toJson c.toString).compress ++ ",\"m\":" ++ (toJson m.toString).compress ++ ",\"k\":\"" ++ kind ++ "\",\"r\":" ++ r |
| 26 | ++ ",\"d\":" ++ (toJson (doc.take 240)).compress ++ ",\"u\":" ++ (toJson (used.map (·.toString))).compress ++ "}") |
| 27 | n := n + 1 |
| 28 | IO.println s!"{n} constants written" |