把黎曼猜想的 Lean 证明,写成人能读懂的证明
把黎曼猜想的 Lean 证明写成数学家能读的证明文章,以及人人能看懂的证明思路
Normalize native archive paths and avoid deep-type pretty-print elision
Browse files+4 −2 routes/cogito-source-provenance/ExtractAtlas.lean View file
| @@ -19,8 +19,10 @@ unsafe def main (args : List String) : IO UInt32 := do | ||
| 19 | 19 | let modulesText := modulesText.replace "\r" "" |
| 20 | 20 | let modules : Std.HashSet String := Std.HashSet.ofList (modulesText.splitOn "\n" |>.filter (· != "")) |
| 21 | 21 | enableInitializersExecution |
| 22 | - let env ← importModules #[{module := entry.toName}] {} (loadExts := true) | |
| 23 | - let ctx : PPContext := { env := env } | |
| 22 | + let opts := ({} : Options) |>.setNat `maxRecDepth 100000 |>.setNat `maxHeartbeats 0 | |
| 23 | + |>.setBool `pp.deepTerms true |>.setNat `pp.maxSteps 10000000 | |
| 24 | + let env ← importModules #[{module := entry.toName}] opts (loadExts := true) | |
| 25 | + let ctx : PPContext := { env := env, opts := opts } | |
| 24 | 26 | let output ← IO.FS.Handle.mk outputFile .write |
| 25 | 27 | let mut count := 0 |
| 26 | 28 | let mut missingRanges := 0 |
+3 −1 routes/cogito-source-provenance/prepare_windows_toolchain.py View file
| @@ -36,7 +36,9 @@ def main(): | ||
| 36 | 36 | subprocess.run(['/mnt/c/Python314/python.exe',win(Path(__file__)),'--root',win(root),'--report',win(a.report),'--extract-only'],check=True);return |
| 37 | 37 | fsroot=Path('\\\\?\\'+str(root)) |
| 38 | 38 | with tarfile.open(archive,mode='r|zst') as package: |
| 39 | - package.extractall(fsroot,filter='data') | |
| 39 | + for member in package: | |
| 40 | + normalized=member.replace(name=str(Path(member.name)),linkname=str(Path(member.linkname)) if member.linkname else '') | |
| 41 | + package.extract(normalized,fsroot,filter='data') | |
| 40 | 42 | binaries=list(root.glob('*/bin/lean.exe')) |
| 41 | 43 | if len(binaries)!=1:raise ValueError('unexpected Windows release layout') |
| 42 | 44 | version=subprocess.check_output([str(binaries[0]),'--version'],text=True).strip() |
+8 −0 routes/cogito-source-provenance/unpack_windows_toolchain.sbatch added View file
| @@ -0,0 +1,8 @@ | ||
| 1 | +#!/bin/bash | |
| 2 | +#SBATCH --job-name=windows-unpack | |
| 3 | +#SBATCH --time=00:30:00 | |
| 4 | +#SBATCH --cpus-per-task=2 | |
| 5 | +#SBATCH --mem=4096 | |
| 6 | +set -euo pipefail | |
| 7 | +base="$(git rev-parse --show-toplevel)/../.." | |
| 8 | +/mnt/c/Python314/python.exe prepare_windows_toolchain.py --root "$(wslpath -w "$base/private-environment/windows-toolchain")" --report windows-toolchain-report.json --extract-only | |