Build and verification report
ビルド・検証報告
Independent build report on Alpöge’s Lean formal proof of the Riemann HypothesisAlpögeによるRiemann予想のLean形式証明の独立ビルド報告
On 2026-11-21 the Lean and Mathlib communities published a joint statement, endorsed by the Lean FRO and the Mathlib Initiative, on the proof contained in the project examined here: Lean verification of the Riemann Hypothesis. It says: “We hereby certify that both the statement and the proof of the Riemann Hypothesis are correct.”
2026-11-21,Lean コミュニティと Mathlib コミュニティは,このページが対象とするプロジェクトの証明について,共同声明 Lean verification of the Riemann Hypothesis を公表した(Lean FRO と Mathlib Initiative が賛同).声明には次の一文がある:“We hereby certify that both the statement and the proof of the Riemann Hypothesis are correct.”(リーマン予想の主張と証明がともに正しいことを認定する,という趣旨)
The Comparator setup of the community, with its notes and results, is in the repository leanprover-community/riemann-hypothesis. For the status of the proof, refer to these two sources. This page is a record of what we ran ourselves, and the Comparator run in section 3 is separate from the community's.
コミュニティによる公式の Comparator の設定と,その記録・結果は,リポジトリ leanprover-community/riemann-hypothesis にある.証明の正否については,この 2 つを参照されたい.このページは我々自身が実行した内容の記録であり,3 節の Comparator の実行はコミュニティのものとは別である.
This page reports what an independent party ran on the project and what came out. It consists of 175,187 Lean modules (17,549,402 lines) on top of Mathlib. Its Main.lean states theorem riemannHypothesis : RiemannHypothesis and 4 related theorems.
このページは,独立した第三者がこのプロジェクトに対して何を実行し,どのような結果が出たかを報告する.プロジェクトは 175,187 個の Lean モジュール(17,549,402 行)からなり,Mathlib の上に構築されている.その Main.lean には theorem riemannHypothesis : RiemannHypothesis と,関連する 4 個の定理が述べられている.
We (1) built the project with lake build on RIKYU (RIKEN R-CCS), (2) rebuilt and checked it with Comparator, a checking tool from the Lean FRO, and (3) computed statistics of the file structure and of the network of proof objects (the dependency graph of declarations). The page reports results only; it does not assess the mathematics.
我々は (1) RIKYU (RIKEN R-CCS) 上で lake build によりプロジェクトをビルドし,(2) Lean FRO の検査ツール Comparator により再ビルドと検査を行い,(3) ファイル構造と証明オブジェクトのネットワーク(宣言の依存グラフ)の統計を計算した.このページは結果のみを報告し,数学的内容の評価は行わない.
The report has 9 pages, reached through the tabs at the top:
この報告は 9 ページからなり,上部のタブで移動できる:
- Overview (this page): the sources and the set-up, the record of the build (step 1), and our runs of the standalone Comparator (step 2).概要(このページ):入手元と環境,ビルドの記録(工程 1),単体の Comparator の実行(工程 2).
- Official route: our own run of the checking procedure published in the community repository (
lake comparatoron two exports), with its deviations from that procedure. State: no verdict (time budget).公式手順:コミュニティのリポジトリが公開している検査手順(2 つのエクスポートに対するlake comparator)を我々自身で実行した記録と,その手順との相違点.状態:判定なし(制限時間). - Build analysis: statistics of the build logs (time per module and per component, messages, thread scaling) and the file structure of the sources.ビルドの解析:ビルドログの統計(モジュールごと・コンポーネント別の時間,メッセージ,スレッド数に対するスケーリング)と,ソースのファイル構造.
- Proof analysis: statistics of the network of proof objects (the dependency graph of declarations), maps of it, the use of the sub-theories, and indicators.証明の解析:証明オブジェクトのネットワーク(宣言の依存グラフ)の統計,その可視化,部分理論の使われ方,指標.
- Parallel build: a later build of another tree. The cleaned-up tree of the community repository was built from scratch at three thread counts; the page gives the times, what changed in the tree, and what the build graph allows.並列ビルド:別のツリーの,後から行ったビルド.コミュニティのリポジトリの整理後のツリーを,3 通りのスレッド数で最初からビルドした.所要時間,ツリーの変化,ビルドグラフから決まる限界を示す.
- Shorter proof: another project. A shorter Lean proof of the same five theorems, published by other authors in a repository of its own (two editions); our build of both editions and our run of the Comparator set-up that it ships.短縮版:別のプロジェクト.別の作者が独立したリポジトリで公開している,同じ 5 つの定理のより短い Lean の証明(2 つの版).両方の版のビルドと,リポジトリに含まれる Comparator の設定の実行を記録する.
- Sernau: proof: the same statistics, maps and indicators of the proof network as on the page of the proof analysis, for the compact edition of the shorter proof.Sernau 版の解析:証明の解析のページと同じ証明ネットワークの統計,可視化,指標を,短縮版(圧縮版)について示す.
- Alpöge vs Sernau: the distributed proof and the shorter proof side by side, by the same analysis of the proof network: size, use of Mathlib, coinciding statements, sub-theories, and how the shortening affects the build and the check.Alpöge 版と Sernau 版:配布された証明と短縮版の証明を,同じ証明ネットワークの解析で並べて比べる.規模,Mathlib の使い方,一致する言明,部分理論,短縮がビルドと検査に与える影響.
- Methods: tools, definitions and limitations, for all pages.方法:すべてのページに共通の,ツール,定義,制約.
Data assembled: 2026-11-26. Page generated: 2026-11-26.
データ集約日:2026-11-26.ページ生成日:2026-11-26.
sorry warnings in the build logビルドログ中の sorry 警告sorry tokens in the sources: 0ソース中の sorry トークン:0Classical.choice, Quot.sound, propextWhat it establishes示すこと
- If the build finishes with 0 errors and Comparator accepts, then the 5 stated theorems are derived in Lean's logic from the permitted axioms (
propext,Quot.sound,Classical.choice), as checked by the Lean kernel, and their statements are the ones written in the challenge file.ビルドがエラー 0 件で完了し,かつ Comparator が受理した場合,述べられた 5 個の定理は,許可された公理(propext,Quot.sound,Classical.choice)から Lean の論理の中で導出されており,そのことが Lean カーネルによって検査されている.また定理の言明はチャレンジファイルに書かれたものと一致している. - This holds relative to a trusted base: the Lean kernel; the definitions in terms of which the statements are written (those of Mathlib, and those that the challenge file takes from the project's
Statements.lean); the toolchain (Lean, Lake, lean4export, Comparator); and the sandbox and machine on which they ran.これは次の信頼基盤に対する相対的な主張である:Lean カーネル,定理の言明を記述している定義(Mathlib の定義,およびチャレンジファイルがプロジェクトのStatements.leanから取り込む定義),ツールチェーン(Lean,Lake,lean4export,Comparator),およびそれらを実行したサンドボックスと計算機.
What it does not establish示さないこと
- It is not a human review of the proof, and it does not assert that the mathematics is correct or incorrect.これは人間による証明の査読ではなく,数学的内容が正しいとも誤っているとも主張しない.
- It says nothing about the readability of the code, about the informal argument behind it, or about how the development was produced.コードの可読性,背後にある非形式的な議論,この形式化がどのように作られたかについては何も述べない.
- The statistics in sections 6 and 7 describe the size and shape of the development; they are not evidence for or against correctness.第 6 節と第 7 節の統計は形式化の規模と形を記述するものであり,正しさを支持する証拠でも否定する証拠でもない.
Status in this editionこの版での状況
- Build: The build finished: all 175,187 modules were built, with 0 error lines in the log and 0 failed jobs.ビルド:ビルドは完了した.全 175,187 モジュールがビルドされ,ログ中のエラー行は 0 件,失敗したジョブは 0 件であった.
- Comparator: Comparator ran to the end and accepted the solution: all of its checks passed for the 5 listed theorems. Final line of its output:
Your solution is okay!.Comparator:Comparator は最後まで実行され,解答を受理した.列挙した 5 個の定理について,すべての検査に合格した.出力の最終行:Your solution is okay!. - Axioms (our own graph analysis): The cones of the 5 main theorems contain 3 axioms, all of them standard axioms of Lean (
Classical.choice,Quot.sound,propext), and no axiom is declared in a project module.公理(我々自身のグラフ解析):5 個の主定理のコーンに含まれる公理は 3 個で,すべて Lean の標準公理(Classical.choice,Quot.sound,propext)である.プロジェクトのモジュール内で宣言された公理はない. - Both conditions of the first item hold in the data of this edition.この版のデータでは,第 1 項の 2 つの条件はともに満たされている.
- Separately from the two conditions above, we ran the checking procedure of the community repository ourselves (page Official route, section 4): The job stopped
lake comparatorat its time budget before it had ended; there is no verdict. Checkers: Lean paranoid: cannot start on these nodes; not run; nanoda: accepted; Lean default kernel: stopped at the time budget, no result.上の 2 つの条件とは別に,コミュニティのリポジトリの検査手順を我々自身で実行している(ページ「公式手順」,第 4 節):ジョブは,lake comparatorが終了する前に制限時間で停止させた.判定は出ていない.検査器:Lean paranoid:このノードでは起動できず,実行せず;nanoda:受理;Lean default kernel:制限時間で停止,結果なし.
1Source and setup入手元と環境
The sources were downloaded from the project's site as a gzipped tarball split into parts, and were not modified. The table gives the location, size and checksum of what was downloaded.
ソースは,分割された gzip 圧縮 tar アーカイブとしてプロジェクトのサイトからダウンロードし,変更を加えていない.下の表にダウンロードしたものの場所,サイズ,チェックサムを示す.
| Siteサイト | https://alpo.ge |
|---|---|
| URL patternURL のパターン | https://alpo.ge/lean.tar.gz.part{01..14} |
| Number of parts分割数 | 14 |
| Total size合計サイズ | 239,275,554 bytes (239 MB)239,275,554 バイト(239 MB) |
| SHA-256 of the concatenated parts連結したファイルの SHA-256 | 9631b4f020199e580ba86178cb56c6e9b09f690c2369a80dc4334aa93f49c7fc |
| Downloaded onダウンロード日 | 2026-11-21 |
Commands to obtain the same data:
同じデータを取得するコマンド:
for i in {01..14}; do
curl -fL --retry 3 -O "https://alpo.ge/lean.tar.gz.part${i}" || break
done
cat lean.tar.gz.part* | shasum -a 256
cat lean.tar.gz.part* | tar -xzf -The Lean projectLean プロジェクト
| Lean toolchainLean ツールチェーン | leanprover/lean4:v4.33.1 |
|---|---|
| Mathlib revisionMathlib のリビジョン | 0df444a360eaa60ab8c11dca51a86af692955474 |
| Lake package nameLake パッケージ名 | tree |
| Modules (.lean files)モジュール数(.lean ファイル) | 175,187 |
| Lines行数 | 17,549,402 |
| Source sizeソースのサイズ | 1.03 GB |
| Directoriesディレクトリ数 | 3,614 |
The main theorems主定理
Main.lean states the following 5 theorems. Each line gives the name of a theorem and the proposition it is stated to prove; the last column of the table says where that proposition is defined.
Main.lean には次の 5 個の定理が述べられている.各行は定理の名前と,その定理が証明するとされている命題である.表の最後の列は,その命題がどこで定義されているかを示す.
theorem riemannHypothesis : RiemannHypothesis
theorem riemannZeta_eq_zero_re : RiemannZetaZerosOnLine
theorem LFunction_ne_zero_of_half_lt_re : DirichletLNonvanishingRightOfHalf
theorem LFunction_eq_zero_re : DirichletLZerosOnLine
theorem LFunction_eq_zero_re_of_isPrimitive : PrimitiveDirichletLZerosOnLine| ## | theorem定理 | proposition命題 | proposition defined in命題の定義場所 |
|---|---|---|---|
| 1 | riemannHypothesis | RiemannHypothesis | Mathlib |
| 2 | riemannZeta_ | RiemannZetaZerosOnLine | Statements.lean |
| 3 | LFunction_ | DirichletLNonvanishingRightOfHalf | Statements.lean |
| 4 | LFunction_ | DirichletLZerosOnLine | Statements.lean |
| 5 | LFunction_ | PrimitiveDirichletLZerosOnLine | Statements.lean |
Main.lean:
Main.lean:
import Statements
import Supplements.Kernels.MainTheoremsAll
theorem riemannHypothesis : RiemannHypothesis := rhOfAll
theorem riemannZeta_eq_zero_re : RiemannZetaZerosOnLine := rhOfAll
theorem LFunction_ne_zero_of_half_lt_re : DirichletLNonvanishingRightOfHalf := allChi
theorem LFunction_eq_zero_re : DirichletLZerosOnLine := claimAll.2.1
theorem LFunction_eq_zero_re_of_isPrimitive : PrimitiveDirichletLZerosOnLine := critAll
Definitions of the propositions that are not taken from Mathlib (Statements.lean):
Mathlib 由来でない命題の定義(Statements.lean):
import Mathlib
def RiemannZetaZerosOnLine : Prop :=
∀ s : ℂ, riemannZeta s = 0 → (¬∃ n : ℕ, s = -2 * ((n : ℂ) + 1)) → s ≠ 1 → s.re = 1 / 2
def DirichletLNonvanishingRightOfHalf : Prop :=
∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N) (s : ℂ),
1 / 2 < s.re → (χ ≠ 1 ∨ s ≠ 1) → DirichletCharacter.LFunction χ s ≠ 0
def DirichletLZerosOnLine : Prop :=
∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N) (s : ℂ),
0 < s.re → s.re < 1 → DirichletCharacter.LFunction χ s = 0 → s.re = 1 / 2
def PrimitiveDirichletLZerosOnLine : Prop :=
∀ (N : ℕ) [NeZero N] (χ : DirichletCharacter ℂ N), χ.IsPrimitive →
∀ s : ℂ, 0 < s.re → s.re < 1 → DirichletCharacter.LFunction χ s = 0 → s.re = 1 / 2
Machine計算機
| Systemシステム | RIKYU (RIKEN R-CCS) |
|---|---|
| Nodeノード | NVIDIA GB200 NVL4: 2 x 72-core Arm Neoverse-V2 (aarch64), 4 GPUs, 1,691 GiB RAM |
| Operating systemOS | Ubuntu 24.04.5, Linux 7.0.0-1025-nvidia-64k (64 KiB pages) |
| CPU cores allocated per GPUGPU 1 基あたりの割り当て CPU コア数 | 32 |
| Price料金 | 300 yen per GPU-hour1 GPU 時間あたり 300 円 |
Lean does not use the GPUs. The GPU-hour is the accounting unit of the machine: one GPU is allocated together with 32 CPU cores, so one GPU-hour corresponds to 32 allocated core-hours.
Lean は GPU を使用しない.GPU 時間はこの計算機の課金単位であり,GPU 1 基は CPU 32 コアとともに割り当てられる.したがって 1 GPU 時間は割り当てコア時間 32 に相当する.
- Resources are allocated per GPU: one GPU comes with 32 cores and 400 GB of memory. The GPUs themselves were not used; GPU-hours below measure the allocation.資源は GPU 単位で割り当てられる(1 GPU につき 32 コアと 400 GB のメモリ).GPU 自体は使っていない.以下の GPU 時間は確保した資源の量である.
2Step 1: build工程 1:ビルド
Method方法
Step 1 is an ordinary build with Lake, the build tool of Lean, on one node of RIKYU (RIKEN R-CCS). The command was lake exe cache get && lake build -v. Lake elaborates the modules in dependency order. While a module is elaborated, each declaration is type-checked by the Lean kernel before it is added to the environment, and the result is written to an .olean file.
工程 1 は,RIKYU (RIKEN R-CCS) の 1 ノード上で,Lean のビルドツール Lake による通常のビルドである.実行したコマンドは lake exe cache get && lake build -v である.Lake は依存関係の順にモジュールをエラボレートする.モジュールのエラボレート中,各宣言は環境に追加される前に Lean カーネルによって型検査され,結果は .olean ファイルに書き出される.
lake exe cache get downloads the prebuilt .olean files of Mathlib, so Mathlib itself was not rebuilt in this step.
lake exe cache get は Mathlib のビルド済み .olean ファイルをダウンロードする.したがってこの工程では Mathlib 自体は再ビルドしていない.
A build that finishes without errors shows that Lean accepted every module. It is a weaker check than step 2, because the project's own build configuration and metaprograms run during the build. The statistics below are computed from the verbose build logs by analysis/build_log_stats.py.
エラーなしで完了したビルドは,Lean がすべてのモジュールを受理したことを示す.ただしビルド中にはプロジェクト自身のビルド設定やメタプログラムが実行されるため,工程 2 より弱い検査である.以下の統計は,詳細ビルドログから analysis/build_log_stats.py により計算した.
Outcome結果
The build finished: all 175,187 modules were built, with 0 error lines in the log and 0 failed jobs.
ビルドは完了した.全 175,187 モジュールがビルドされ,ログ中のエラー行は 0 件,失敗したジョブは 0 件であった.
The build log contains 0 warnings of the form “declaration uses sorry”.
ビルドログには「declaration uses sorry」という形の警告が 0 件含まれる.
| State (meta.json)状態(meta.json) | complete |
|---|---|
| Modules built / totalビルド済み / 総モジュール数 | 175,187 / 175,187 (100.0%) |
| Modules with a “Built” line in the analysed logs解析したログ中に「Built」行のあるモジュール数 | 175,186 |
| Failed jobs失敗したジョブ | 0 |
| Error linesエラー行 | 0 |
sorry warningssorry 警告 | 0 |
| Warning messages警告メッセージ | 491,673 |
| Files with warnings警告のあるファイル数 | 104,045 |
| Wall-clock time実時間 | 6 h 54 min6 時間 54 分 |
| GPU-hours charged課金された GPU 時間 | 13.30 |
| Cost費用 | 3,991 yen3,991 円 |
| Lake jobs in totalLake のジョブ総数 | 183,903 |
| Log lines analysed解析したログの行数 | 2,761,063 |
The build was run as the following batch jobs; a later job continues where the previous one stopped.
ビルドは次のバッチジョブとして実行した.後のジョブは前のジョブが止まったところから続行する.
| run実行 | job idジョブ ID | GPUsGPU 数 | threadsスレッド数 | modules at start開始時のモジュール数 | modules at end終了時のモジュール数 | elapsed経過時間 | job stateジョブの状態 |
|---|---|---|---|---|---|---|---|
| 20261121-011419-build-pilot | 376517 | 1 | 32 | 0 | 3,558 | 18 min 07 s18 分 07 秒 | stopped at its time budget |
| 20261121-015517-build | 376600 | 1 | 32 | 3,558 | 5,173 | 11 min 01 s11 分 01 秒 | stopped at its time budget |
| 20261121-020627-build | 376611 | 2 | 64 | 5,173 | 175,187 | 6 h 24 min6 時間 24 分 | complete (lake build exit code 0) |
Per-run figures computed from the logsログから計算した実行ごとの数値
| run実行 | modules built in this runこの実行でビルドしたモジュール数 | sum of per-module timesモジュールごとの時間の合計 | coresコア数 | GPUsGPU 数 | architectureアーキテクチャ | elapsed経過時間 | job stateジョブの状態 |
|---|---|---|---|---|---|---|---|
| 20261121-011419-build-pilot | 3,554 | 7 h 39 min7 時間 39 分 | 32 | 1 | aarch64 | 18 min 06 s18 分 06 秒 | done |
| 20261121-015517-build | 1,616 | 3 h 41 min3 時間 41 分 | 32 | 1 | aarch64 | 10 min 59 s10 分 59 秒 | done |
| 20261121-020627-build | 170,016 | 391 h 51 min391 時間 51 分 | 64 | 2 | aarch64 | 6 h 24 min6 時間 24 分 | done |
Notes
注記
- The build was done in three Slurm jobs. Each job saved .lake/build to shared storage when it stopped and the next job restored it, so Lake replayed the modules already built instead of compiling them again. The columns “modules at start” and “modules at end” count the .olean files of the project before and after each job.ビルドは 3 つの Slurm ジョブに分けて行った.各ジョブは停止時に .lake/build を共有ストレージに保存し,次のジョブがそれを復元したので,Lake はビルド済みのモジュールをコンパイルし直さずに再生した.表の「開始時」「終了時」のモジュール数は,各ジョブの前後でのプロジェクトの .olean ファイル数である.
- Lake writes one *.setup.json file per module (the artifact paths of all transitive imports, 5 MB or more each). These files were deleted while the build was running and were not saved; Lake does not need them to replay a module. In the first job, which kept them, they took 30.1 GB for 3,558 modules, against 4.1 GB of .olean files.Lake はモジュールごとに *.setup.json(推移的な import すべての成果物パス.1 個 5 MB 以上)を書く.これらはビルド中に削除し,保存していない(Lake がモジュールを再生するのに必要ない).削除しなかった最初のジョブでは,3,558 モジュールで 30.1 GB を占めていた(.olean は 4.1 GB).
Disk usageディスク使用量
The .olean files of the project occupy 94.6 GB.
プロジェクトの .olean ファイルは合計 94.6 GB である.
The statistics computed from the build logs (progress over time, build time per module and per component, the slowest modules, compiler messages and Lake jobs, the thread-scaling measurement) are on the page Build analysis, section 5.
ビルドログから計算した統計(時間経過,モジュールごと・コンポーネント別のビルド時間,最も遅いモジュール,コンパイラのメッセージと Lake のジョブ,スレッド数に対するスケーリングの測定)は,ページ「ビルドの解析」の第 5 節にある.
Cost費用
Compute for one pass over the project, without trial and error: the build of step 1, the one Comparator run that ended with acceptance, and the analysis of that build. Core-hours are the allocated cores multiplied by the time, not measured CPU time.
試行錯誤を除いた 1 回分の計算資源.ステップ 1 のビルド,受理で終わった 1 回の Comparator,そのビルドの解析の和である.コア時間は割り当てコア数に時間を掛けたものであり,CPU 時間の実測値ではない.
| item項目 | elapsed time of the jobsジョブの経過時間 | GPU-hoursGPU 時間 | core-hoursコア時間 | yen円 |
|---|---|---|---|---|
| Step 1: build of the tree as distributed (one build, continued over three jobs)ステップ 1: 配布時のツリーのビルド(1 回のビルドを 3 ジョブで継続) | 6 h 54 min6 時間 54 分 | 13.30 | 425.7 | 3,991 |
| Step 2: Comparator v4.33.0, the accepted run (one run over 2 jobs: the sandboxed build was begun in a job that stopped at its time limit, and the accepted job continued from the saved build, exported and replayed)ステップ 2: Comparator v4.33.0.受理された実行(1 回の実行を 2 ジョブで.サンドボックス内のビルドは制限時間で止まったジョブで始め,受理されたジョブが保存済みのビルドから続けて,エクスポートと再生を行った) | 82 h 10 min82 時間 10 分 | 89.54 | 2,865.2 | 26,861 |
| Step 3: analysis of the build (dependency graph, statistics, kernel-time sample, lean4export measurement; one job)ステップ 3: ビルドの解析(依存グラフ,統計,カーネル時間の標本調査,lean4export の測定.1 ジョブ) | 1 h 38 min1 時間 38 分 | 1.63 | 52.2 | 489 |
| sum和 | 90 h 41 min90 時間 41 分 | 104.47 | 3,343.0 | 31,341 |
All jobs charged for this report came to 197.19 GPU-hours (59,157 yen). That total is larger because it also contains the environment tests, the thread-count experiments, the Comparator runs that stopped at their time limit, and the builds and analyses of other trees. It is not the cost of one check of the project.
この報告で課金された全ジョブの合計は 197.19 GPU 時間(59,157 円)である.こちらには,環境の確認,スレッド数の実験,制限時間で止まった Comparator の実行,別のツリーのビルドと解析が入っているので,上の和より大きい.1 回の検査にかかる費用ではない.
All jobs, trials and unfinished runs included全ジョブの内訳(試行と未完了の実行を含む)
| item項目 | GPU-hoursGPU 時間 | core-hoursコア時間 | yen円 |
|---|---|---|---|
| Environment and toolchain tests環境と toolchain の確認 | 0.07 | 2.3 | 21 |
| Step 1: build (three jobs)ステップ 1: ビルド(3 ジョブ) | 13.30 | 425.7 | 3,991 |
| Thread-count experiments (a cancelled 144-thread build, 64- and 96-thread trials)スレッド数の実験(取り消した 144 スレッドのビルド,64・96 スレッドの試行) | 2.17 | 69.3 | 650 |
| Step 2: Comparator (tool build, pilot, runs)ステップ 2: Comparator(ツールのビルド,試行,本実行) | 120.31 | 3,849.9 | 36,092 |
| Step 3: analysis jobsステップ 3: 分析ジョブ | 1.73 | 55.4 | 519 |
| Community tree (commit f1f6d654): build, graph extraction, clustering and indicators (two runs)コミュニティのツリー(commit f1f6d654): ビルド,グラフの抽出,クラスタ分割,指標(2 回) | 1.13 | 36.3 | 340 |
| Community procedure, our run (three environment checks; exports and judge)コミュニティの手順の実行(環境の確認 3 回,エクスポートと判定) | 23.98 | 767.2 | 7,193 |
| Diagnosis of the Lean default kernel on the solution export (one job, three allocator settings)解答のエクスポートに対する Lean の既定のカーネルの診断(1 ジョブ,アロケータの設定 3 通り) | 20.16 | 645.2 | 6,049 |
| Community tree after the clean-up (commit 9282d3a1): timing builds at 144, 64 and 32 threads整理後のコミュニティのツリー(commit 9282d3a1): 144・64・32 スレッドの計測ビルド | 10.34 | 330.8 | 3,101 |
| Shorter proof (repository lsernau/grh-lean, commit 72fead10): builds and Comparator runs of the two editions短縮版(リポジトリ lsernau/grh-lean,commit 72fead10): 2 つの版のビルドと Comparator | 3.62 | 116 | 1,088 |
| Comparison of the two versions: dependency graphs, maps, indicators and comparison of the shorter proof (seven short jobs)2 つの版の比較: 短縮版の依存グラフ,地図,指標,比較(短いジョブ 7 本) | 0.38 | 12.1 | 113 |
| total合計 | 197.19 | 6,310.1 | 59,157 |
- Jobs still running when this page was generated are not included.このページの生成時に実行中だったジョブは含まない.
- Costs are computed from the elapsed time of each job at 300 yen per GPU-hour (before tax).費用は,各ジョブの経過時間に 1 GPU 時間 300 円(税別)を掛けて計算したものである.
3Step 2: Comparator工程 2:Comparator
This section reports our runs of the standalone Comparator with a challenge file that we wrote. The checking procedure published in the community repository differs from it in the challenge file (it imports Mathlib only), in the tool (lake comparator of Lean v4.36.0, working from two export files) and in the checkers; our run of that procedure is reported separately, on the page Official route (section 4).
この節は,我々が書いたチャレンジファイルを用いた,単体の Comparator の実行を報告する.コミュニティのリポジトリが公開している検査手順は,チャレンジファイル(Mathlib だけを import する),ツール(2 つのエクスポートファイルから動作する Lean v4.36.0 の lake comparator),検査器の点でこれと異なる.その手順を我々が実行した結果は,ページ「公式手順」(第 4 節)に別に報告する.
What Comparator checksComparator が検査すること
Comparator is a tool from the Lean FRO for judging whether a Lean project proves a given list of theorems. It is given a challenge module that states the theorems, a solution module that is claimed to prove them, the names of the theorems, and the list of axioms that may be used. As described in its documentation, it then:
Comparator は,ある Lean プロジェクトが与えられた定理の一覧を証明しているかを判定するための,Lean FRO のツールである.定理を述べたチャレンジモジュール,それらを証明していると主張される解答モジュール,定理の名前,使用を許可する公理の一覧を入力とする.ドキュメントによれば,Comparator は次のことを行う:
- rebuilds the solution inside a sandbox, so that code of the project that runs during the build cannot reach the checker or its inputs;サンドボックスの中で解答を再ビルドする.これにより,ビルド中に実行されるプロジェクトのコードが,検査器やその入力に触れることはできない.
- exports the challenge and the solution with
lean4exportand compares them: each listed theorem must have the same statement in both, including the definitions that the statement depends on;lean4exportによりチャレンジと解答をエクスポートして比較する.列挙された各定理は,言明が依存する定義まで含めて,両者で同じ言明を持たなければならない. - collects the axioms that the listed theorems of the solution depend on and rejects if one of them is not on the permitted list;解答中の列挙された定理が依存する公理を集め,許可された一覧にないものがあれば拒否する.
- replays the exported solution in the Lean kernel, so that the proofs are checked again from the exported data.エクスポートした解答を Lean カーネルで再生し,エクスポートされたデータから証明を改めて検査する.
Versions and configurationバージョンと設定
| ComparatorComparator | tag v4.33.0 (commit 3927ad38) |
|---|---|
| lean4exportlean4export | commit 15f6055e |
| landrun (sandbox)landrun(サンドボックス) | 0.1.18 (commit ec104f6e) |
| built withビルドに用いたツールチェーン | leanprover/lean4:v4.33.1 |
Configuration file given to Comparator:
Comparator に与えた設定ファイル:
{
"challenge_module": "Challenge",
"solution_module": "Main",
"theorem_names": [
"riemannHypothesis",
"riemannZeta_eq_zero_re",
"LFunction_ne_zero_of_half_lt_re",
"LFunction_eq_zero_re",
"LFunction_eq_zero_re_of_isPrimitive"
],
"permitted_axioms": [
"propext",
"Quot.sound",
"Classical.choice"
],
"enable_nanoda": false
}The 5 theorem names are the main theorems of section 1. The permitted axioms are propext, Quot.sound, Classical.choice. The optional second kernel (nanoda) was not enabled, so the replay uses the Lean kernel only.
5 個の定理名は第 1 節の主定理と一致する.許可した公理は propext, Quot.sound, Classical.choice である.オプションの第 2 のカーネル(nanoda)は有効にしていないため,再生は Lean カーネルのみで行われる.
The challenge module:
チャレンジモジュール:
import Statements
/-!
Challenge file for Comparator (https://github.com/leanprover/comparator).
It states the five theorems of `Main.lean` with `sorry` in place of the proofs. Comparator checks
that `Main` (the solution module) proves exactly these statements, using only the permitted
axioms, and replays the proofs in the Lean kernel.
The trusted base of the statements is Mathlib (`RiemannHypothesis`, `riemannZeta`,
`DirichletCharacter.LFunction`, ...) and the four definitions in `Statements.lean`, which this
file imports unchanged from the distributed project.
-/
theorem riemannHypothesis : RiemannHypothesis := sorry
theorem riemannZeta_eq_zero_re : RiemannZetaZerosOnLine := sorry
theorem LFunction_ne_zero_of_half_lt_re : DirichletLNonvanishingRightOfHalf := sorry
theorem LFunction_eq_zero_re : DirichletLZerosOnLine := sorry
theorem LFunction_eq_zero_re_of_isPrimitive : PrimitiveDirichletLZerosOnLine := sorry
Toy tests of the installation導入環境の動作確認(小さなテスト)
The same Comparator installation was first run on small test projects, to see that it accepts and rejects where it should.
同じ Comparator の導入環境を,まず小さなテストプロジェクトに対して実行し,受理すべきものを受理し拒否すべきものを拒否することを確認した.
| caseケース | expected期待される結果 | observed観測された結果 | match一致 |
|---|---|---|---|
| correct proof of the challenge | accepted受理 | accepted受理 | as expected期待どおり |
| theorem with a different statement | rejected拒否 | rejected拒否 | as expected期待どおり |
| proof that uses an extra axiom | rejected拒否 | rejected拒否 | as expected期待どおり |
All 3 toy tests gave the expected outcome.
3 件のテストはすべて期待どおりの結果であった.
The run実行
Stages reported by Comparator, with the time at which each began:
Comparator が報告した段階と,それぞれの開始時刻:
| time時刻 | stage段階 |
|---|---|
| 02:09:02 | Building Challenge |
| 02:09:24 | Exporting the five theorems, the permitted axioms and the kernel primitives from Challenge |
| 02:09:24 | Building Main (first job; stopped at 09:26 with 162,328 of 175,187 modules built) |
| 09:36:31 | Building Main (second job, continuing from the saved build) |
| 11:01:19 | Lake reports “Build completed successfully (183893 jobs)” for Main (second job) |
| 11:01 | lean4export starts on Main (seen in the process table; Comparator's own messages after this point are buffered and appear only when it ends) |
| 12:22 | lean4export has ended; Comparator parses the export |
| 12:50 | memory of the Comparator process stops growing at 296 GiB (limit of the job: 400 GiB); one thread stays busy |
| 06:54 (22nd) | still one busy thread, 18.5 hours of CPU time after the export, memory unchanged; a second copy of the run is started on another node because the time limit of the second job ends at 16:30 |
| 16:00 (22nd) | the second job reaches its time budget and is stopped: 27.6 hours after the export, without a verdict (Comparator prints its messages only when it ends, so none of the later stages appears in its log) |
| 16:25 (22nd) | the third job (started 06:54 on the 22nd, time limit 4 days) has completed the sandboxed build (08:27) and the export, and is in the same single-threaded stage, memory 297 GiB |
| 09:41:46 (25th) | the third job ends with exit code 0. Comparator prints its buffered messages: “Exporting …”, “Running Lean default kernel on solution.”, “Lean default kernel accepts the solution”, “Your solution is okay!”. This is 73 h 14 min after Lake reported the end of the sandboxed build in this job (08:27:52 on the 22nd); the memory of the process had stopped growing at about 10:15 on the 22nd |
| Final line of the output出力の最終行 | Your solution is okay! |
|---|---|
| Wall-clock time実時間 | 112 h 42 min112 時間 42 分 |
| GPU-hours charged課金された GPU 時間 | 120.08 |
| Cost費用 | 36,023 yen36,023 円 |
| run実行 | job idジョブ ID | GPUsGPU 数 | threadsスレッド数 | elapsed経過時間 | job stateジョブの状態 |
|---|---|---|---|---|---|
| 20261121-020553-comparator | 376609 | 2 | all hardware threads | 7 h 22 min7 時間 22 分 | stopped at its time budget while building Main (162,328 of 175,187 modules) |
| 20261121-093008-comparator | 377704 | 1 | all hardware threads | 30 h 32 min30 時間 32 分 | stopped at its time budget after the sandboxed build and the export; one thread had been busy for 27.6 hours and no verdict was printed |
| 20261122-065433-comparator | 381473 | 1 | all hardware threads | 74 h 47 min74 時間 47 分 | accepted: continued the sandboxed build saved by the first job, exported, and replayed with the Lean kernel; exit code 0 at 09:41:46 on 25 November, 73 h 14 min after the end of the build |
Verdict判定
Comparator ran to the end and accepted the solution: all of its checks passed for the 5 listed theorems. Final line of its output: Your solution is okay!.
Comparator は最後まで実行され,解答を受理した.列挙した 5 個の定理について,すべての検査に合格した.出力の最終行:Your solution is okay!.
Limitations and remarks制約と補足
- Comparator (github.com/leanprover/comparator, tag v4.33.0) and lean4export were compiled with the project's toolchain, Lean 4.33.1; the tag itself pins Lean 4.33.0.Comparator(github.com/leanprover/comparator,タグ v4.33.0)と lean4export は,プロジェクトの toolchain である Lean 4.33.1 でコンパイルした(タグ自体が指定しているのは Lean 4.33.0 である).
- The Comparator README recommends starting it under systemd-run with RestrictAddressFamilies=~AF_UNIX, to guard against a weakness of the landrun sandbox on Linux kernels before 7.1. systemd-run --user is not available inside a batch job on this machine (kernel 7.0), so Comparator was started under a small seccomp wrapper that makes socket(AF_UNIX, ...) fail instead. A test in the job confirms that the wrapper blocks the call.Comparator の README は,Linux カーネル 7.1 より前で landrun サンドボックスにある弱点への対策として,systemd-run に RestrictAddressFamilies=~AF_UNIX を付けて起動することを勧めている.この計算機(カーネル 7.0)のバッチジョブ内では systemd-run --user が使えないため,socket(AF_UNIX, ...) を失敗させる小さな seccomp ラッパーの下で Comparator を起動した.ラッパーがこの呼び出しを遮断することは,ジョブ内のテストで確認している.
- Comparator builds the solution inside the sandbox with all hardware threads of the node. The sandboxed build does not fit in one job, so .lake/build of the sandbox is saved when a job stops and restored by the next one, as in step 1. Lake then decides from its trace files which modules are up to date; the modules compiled in an earlier job are not compiled again.Comparator は,サンドボックス内でノードの全ハードウェアスレッドを使って解答をビルドする.このビルドは 1 つのジョブに収まらないので,ステップ 1 と同じく,ジョブの停止時にサンドボックスの .lake/build を保存し,次のジョブで復元している.どのモジュールが最新かは Lake が trace ファイルから判断し,前のジョブでコンパイルされたモジュールはコンパイルし直されない.
- Size of the export, measured separately on the build of step 1: lean4export, called with the same list of declarations as Comparator uses, wrote 61.6 GB (61,571,290,930 bytes, 1,080,769,500 lines) for the solution in 1 h 26 min, with a peak memory of 170 GB. Comparator keeps this export in memory, parses it, and replays it in the Lean kernel in a single thread.エクスポートの大きさ(ステップ 1 のビルドに対して別途測定): Comparator と同じ宣言の一覧を与えた lean4export は,解答について 61.6 GB(61,571,290,930 バイト,1,080,769,500 行)を 1 時間 26 分で出力し,最大メモリ使用量は 170 GB だった.Comparator はこのエクスポートをメモリ上に保持して解析し,Lean のカーネルで単一スレッドで再生する.
- Kernel time, estimated separately: a uniform random sample of 960 modules was elaborated again with Lean's profiler. The mean time spent in kernel type checking was 0.40 s per module (standard error 0.08 s), which scales to about 19 hours (standard error 4 hours) for the 175,187 modules. The replay covers the cone of the five theorems (66% of the project constants) and the part of Mathlib that they depend on, so this figure indicates the order of magnitude only.カーネルの時間(別途の見積もり): 無作為に選んだ 960 モジュールを Lean の profiler つきで処理し直した.カーネルの型検査にかかった時間の平均は 1 モジュールあたり 0.40 秒(標準誤差 0.08 秒)で,175,187 モジュールに換算すると約 19 時間(標準誤差 4 時間)になる.再生の対象は 5 つの定理のコーン(プロジェクトの定数の 66%)と,それらが依存する Mathlib の部分なので,この数値は桁の目安にとどまる.