Build and verification report
ビルド・検証報告
Comparison of the Alpöge version and the Sernau versionAlpöge 版と Sernau 版の比較
Two Lean texts prove the same five theorems: the project distributed at alpo.ge (Alpöge version) and the much shorter text of the repository lsernau/grh-lean (Sernau version). We ran the same analysis of the proof network on both and put the results side by side: how large each is, which parts of Mathlib each uses, whether their lemmas coincide, which sub-theories each builds, and what the shortening does to the build and to the check.
同じ 5 つの定理を証明する Lean のテキストが 2 つある.alpo.ge で配布されているプロジェクト(Alpöge 版)と,リポジトリ lsernau/grh-lean のはるかに短いテキスト(Sernau 版)である.両方に同じ証明ネットワークの解析を行い,結果を並べた.それぞれの規模,Mathlib のどの部分を使うか,補題が一致するか,どんな部分理論を組み立てているか,短縮がビルドと検査に何をもたらすかを示す.
This is one of the pages of the report “Independent build report on Alpöge’s Lean formal proof of the Riemann Hypothesis”. Its scope, and the pointer to the statement of the Lean and Mathlib communities, are on the page Overview.
このページは,報告「AlpögeによるRiemann予想のLean形式証明の独立ビルド報告」の一部である.報告の範囲と,Lean・Mathlib コミュニティの声明への案内は,ページ「概要」にある.
Data assembled: 2026-11-26. Page generated: 2026-11-26.
データ集約日:2026-11-26.ページ生成日:2026-11-26.
17Comparison of the Alpöge version and the Sernau versionAlpöge 版と Sernau 版の比較
Summary要約
Alpöge version: the Lean project distributed at alpo.ge, the subject of the other pages. Sernau version: the repository lsernau/grh-lean, a shorter Lean text by other authors that proves the same five theorems (Shorter proof); it has a readable and a compact edition, and the compact edition is the main side of the comparison here. Both were compiled by us, and the same tools were run on both compiled results: the dependency graph of declarations, the use of the library, the sub-theories found in the graph, and the indicators of the page Proof analysis.
Alpöge 版:alpo.ge で配布されている Lean プロジェクト(他のページの対象).Sernau 版:リポジトリ lsernau/grh-lean.別の作者による,同じ 5 つの定理を証明するより短い Lean のテキストである(短縮版).可読版と圧縮版があり,ここでは圧縮版を比較の主な対象にする.どちらも我々がコンパイルし,その結果に同じ道具を適用した:宣言の依存グラフ,ライブラリの使い方,グラフから見つかる部分理論,ページ「証明の解析」の指標である.
The comparison is structural. It counts declarations, proof terms, library results and coinciding statements; it does not say which text is better, and, as everywhere in this report, it does not assess the mathematics. The two projects pin different versions of Lean and of Mathlib, which limits some comparisons (see Limits). The maps of each proof network are on the pages Proof analysis (Alpöge version) and Sernau: proof (Sernau version, compact edition).
比較は構造についてのものである.宣言,証明項,ライブラリの結果,一致する言明を数える.どちらのテキストが優れているかは述べない.この報告の他の部分と同じく,数学的内容の評価も行わない.2 つのプロジェクトは Lean と Mathlib の版が違い,これが一部の比較を制限する(制約を参照).それぞれの証明ネットワークの可視化は,ページ「証明の解析」(Alpöge 版)と「Sernau 版の解析」(Sernau 版の圧縮版)にある.
- Same theorems, very different amounts of text. Both prove the five theorems of the same
Statements.lean. The five theorems depend on 1,265,279 constants of the project in the Alpöge version and on 37,569 in the compact edition of the Sernau version; the proof terms are 26 times as large.定理は同じで,テキストの量が大きく違う.どちらも同じStatements.leanの 5 つの定理を証明する.5 つの定理が依存するプロジェクトの定数は,Alpöge 版で 1,265,279 個,Sernau 版(圧縮版)で 37,569 個で,証明項の大きさは 26 倍違う. - The Sernau version uses a subset of the library that the Alpöge version uses. 95% of the library declarations it depends on are also among those of the Alpöge version, which depends on 1.2 times as many. Of the library declarations its own text refers to directly, 82% are also referred to directly by the Alpöge version, whose text refers to 2.2 times as many.Sernau 版が使うライブラリは,Alpöge 版が使うものの部分集合に近い.Sernau 版が依存するライブラリの宣言の 95% は,Alpöge 版も依存している.Alpöge 版が依存する宣言はその 1.2 倍ある.テキストが直接参照するライブラリの宣言では,Sernau 版のものの 82% を Alpöge 版も直接参照しており,Alpöge 版が直接参照する宣言は Sernau 版の 2.2 倍である.
- The statements of the lemmas almost never coincide. 58 of the 8,802 distinct statements of the compact edition (0.7%) occur among the 531,220 of the Alpöge version. Between the two editions of the Sernau version the same count is 2,775 (32% of the compact edition). The shorter text is not a selection or a renaming of the lemmas of the longer one.補題の言明は,ほとんど一致しない.圧縮版の 8,802 個の異なる言明のうち,Alpöge 版の 531,220 個の中にあるのは 58 個(0.7%)である.Sernau 版の 2 つの版の間では,同じ数え方で 2,775 個(圧縮版の 32%)が一致する.短いテキストは,長いテキストの補題を選んだり名前を付け替えたりしたものではない.
- The subjects are the same. 96% of the words in the module names of the compact edition (theta, Weil, Shimura, Hecke, cohomology, Galois, …) also occur in the module names of the Alpöge version. The clusters that the same algorithm finds in the two dependency graphs carry similar names.扱う対象は同じである.圧縮版のモジュール名に現れる単語(theta,Weil,Shimura,Hecke,cohomology,Galois など)の 96% は,Alpöge 版のモジュール名にも現れる.同じアルゴリズムが 2 つの依存グラフから見つけるクラスタにも,似た名前が付く.
- The Alpöge version repeats itself; the Sernau version does not. In the Alpöge version 23% of the theorems repeat the statement of another theorem up to renaming; in the compact edition 0.7%.Alpöge 版には繰り返しが多く,Sernau 版にはない.Alpöge 版では,定理の 23% が,名前の付け替えを除いて他の定理と同じ言明である.圧縮版では 0.7% である.
- The shortening happened in two different steps. From the Alpöge version to the readable edition the proof terms shrink 27 times; from the readable to the compact edition the lines of code shrink 3.9 times while the proof terms stay the same and the build takes longer (below).短縮は,性質の違う 2 つの段階で起きている.Alpöge 版から可読版へは,証明項が 27 分の 1 になる.可読版から圧縮版へは,コードの行が 3.9 分の 1 になるが,証明項は変わらず,ビルドは長くなる(下).
Size of the three texts3 つのテキストの規模
| quantity量 | Alpöge versionAlpöge 版 | Sernau version, readable editionSernau 版(可読版) | Sernau version, compact editionSernau 版(圧縮版) | Alpöge version / compact editionAlpöge 版 ÷ 圧縮版 |
|---|---|---|---|---|
| .lean files.lean ファイル | 175,187 | 803 | 794 | 221 times221 倍 |
| lines of code (without comments and blank lines)コードの行(コメントと空行を除く) | 15,531,759 | 299,902 | 76,149 | 204 times204 倍 |
| comment linesコメントの行 | 0 | 138,466 | 20,333 | — |
| theorems written in the sourceソースに書かれた定理 | 818,755 | 18,227 | 7,088 | 116 times116 倍 |
| constants of the project in the compiled resultコンパイル結果のプロジェクトの定数 | 1,905,921 | 64,456 | 51,804 | 37 times37 倍 |
| of these, theoremsうち定理 | 1,548,655 | 54,023 | 42,958 | 36 times36 倍 |
| of these, with a name of their own (not auxiliary)うち固有の名前を持つもの(補助でない) | 1,143,488 | 29,410 | 14,934 | 77 times77 倍 |
| the five theorems depend on: constants of the project5 つの定理の依存先:プロジェクトの定数 | 1,265,279 | 49,823 | 37,569 | 34 times34 倍 |
| the five theorems depend on: constants of Mathlib5 つの定理の依存先:Mathlib の定数 | 203,036 | 160,785 | 160,627 | 1.3 times1.3 倍 |
| proof terms of the project theorems among them (million nodes)そのうちプロジェクトの定理の証明項(百万ノード) | 2,319.0 | 85.7 | 87.7 | 26 times26 倍 |
| share of the library in what the five theorems depend on5 つの定理の依存先に占めるライブラリの割合 | 14% | 77% | 82% | — |
“Depends on” means: reached from one of the five theorems by following the references in statements and in proofs. The Alpöge version is compiled with Lean v4.33.1, the Sernau version with v4.35.0.
「依存先」は,5 つの定理のいずれかから,言明と証明の中の参照を辿って届く範囲である.Alpöge 版は Lean v4.33.1,Sernau 版は v4.35.0 でコンパイルした.
Use of Mathlib and of the core libraryMathlib とコアライブラリの使い方
Two sets are compared, by the names of the declarations. The first is every library declaration the five theorems depend on, however indirectly; much of it is the library's own internal dependency. The second is the library declarations that a declaration of the project refers to directly: the interface between the text of the proof and the library. Auxiliary declarations generated by Lean are left out.
2 つの集合を,宣言の名前で比べる.1 つ目は,5 つの定理が(間接的にでも)依存するライブラリの宣言すべてで,その多くはライブラリ内部の依存である.2 つ目は,プロジェクトの宣言が直接参照するライブラリの宣言で,証明のテキストとライブラリの接点に当たる.Lean が生成する補助の宣言は除いた.
| edition of the Sernau version, and setSernau 版の版と,集合 | AlpögeAlpöge 版 | SernauSernau 版 | both両方 | only AlpögeAlpöge 版のみ | only SernauSernau 版のみ | both / Sernau両方 ÷ Sernau 版 | both / Alpöge両方 ÷ Alpöge 版 |
|---|---|---|---|---|---|---|---|
| compact edition: depended on圧縮版:依存する宣言 | 131,563 | 105,283 | 99,884 | 31,679 | 5,399 | 95% | 76% |
| compact edition: referred to directly圧縮版:直接参照する宣言 | 62,858 | 28,448 | 23,427 | 39,431 | 5,021 | 82% | 37% |
| compact edition: theorems referred to directly圧縮版:直接参照する定理 | 47,310 | 19,525 | 15,615 | — | — | 80% | 33% |
| readable edition: depended on可読版:依存する宣言 | 131,563 | 105,340 | 100,216 | 31,347 | 5,124 | 95% | 76% |
| readable edition: referred to directly可読版:直接参照する宣言 | 62,858 | 29,314 | 24,781 | 38,077 | 4,533 | 85% | 39% |
Data tableデータ表
| area分野 | referred to directly by both両方が直接参照 | only by the Alpöge versionAlpöge 版のみ | only by the Sernau version (compact edition)Sernau 版(圧縮版)のみ |
|---|---|---|---|
| Mathlib.Algebra | 5,964 | 7,495 | 1,214 |
| Mathlib.RingTheory | 2,466 | 5,354 | 324 |
| Mathlib.Analysis | 1,990 | 4,082 | 367 |
| Mathlib.Data | 2,346 | 3,296 | 414 |
| Mathlib.Topology | 1,988 | 3,425 | 424 |
| Mathlib.CategoryTheory | 907 | 2,646 | 320 |
| Mathlib.LinearAlgebra | 1,498 | 1,973 | 247 |
| Init | 1,433 | 1,361 | 562 |
| Mathlib.MeasureTheory | 1,160 | 1,883 | 252 |
| Mathlib.Order | 828 | 1,409 | 255 |
| Mathlib.AlgebraicGeometry | 472 | 1,976 | 31 |
| Mathlib.NumberTheory | 677 | 1,418 | 97 |
| Mathlib.GroupTheory | 475 | 753 | 146 |
| Mathlib.FieldTheory | 267 | 745 | 48 |
| Mathlib.Logic | 372 | 328 | 86 |
| Mathlib.RepresentationTheory | 84 | 533 | 4 |
| Mathlib.Tactic | 296 | 111 | 26 |
| Mathlib.SetTheory | 93 | 145 | 9 |
- In every area the Sernau version refers to fewer library declarations, and most of them are also referred to by the Alpöge version. The declarations that only the Sernau version refers to are 18% of its set.どの分野でも,Sernau 版が参照するライブラリの宣言は少なく,その大半は Alpöge 版も参照している.Sernau 版だけが参照する宣言は,その集合の 18% である.
- The difference is largest in algebraic geometry and representation theory. In
Mathlib.AlgebraicGeometrythe Alpöge version refers directly to 2,448 declarations, the compact edition to 503; inMathlib.RepresentationTheoryto 617 and 88; inMathlib.NumberTheoryto 2,095 and 774.差が最も大きいのは,代数幾何と表現論である.Mathlib.AlgebraicGeometryで直接参照する宣言は,Alpöge 版が 2,448 個,圧縮版が 503 個である.Mathlib.RepresentationTheoryでは 617 個と 88 個,Mathlib.NumberTheoryでは 2,095 個と 774 個である. - Different revisions of the library. Of the 39,431 declarations that only the Alpöge version refers to, 39,197 exist under the same name in the library of the Sernau version and are simply not used there. Of the 5,021 that only the Sernau version refers to, 4,810 exist in the library of the Alpöge version; the remaining 211 have no declaration of that name there (added or renamed between the two revisions).ライブラリの版の違い.Alpöge 版だけが参照する 39,431 個のうち,39,197 個は,Sernau 版のライブラリにも同じ名前で存在し,単に使われていない.Sernau 版だけが参照する 5,021 個のうち,4,810 個は Alpöge 版のライブラリにも存在する.残りの 211 個は,その名前の宣言がない(2 つの版の間で追加されたか,名前が変わった).
- How often the common declarations are used agrees moderately: the rank correlation of the number of direct users, over the declarations both refer to, is 0.63 (between the two editions of the Sernau version: 0.91).共通の宣言の使われる頻度は,中程度に一致する.両方が参照する宣言について,直接の利用者数の順位相関は 0.63 である(Sernau 版の 2 つの版の間では 0.91).
Do the statements coincide?言明は一致するか
For every theorem of the project that the five theorems depend on and that has a name of its own, we hashed its statement after replacing the project's own definitions by numbered placeholders. Two theorems then get the same hash exactly when their statements are the same expression up to a consistent renaming of project definitions; library declarations are compared by name. For the Alpöge version the hashes come from the tree of commit f1f6d654 of the community repository, which is the distributed tree with unreachable files removed and about twenty files edited (the same tree as for the indicators on Proof analysis).
5 つの定理が依存し,固有の名前を持つプロジェクトの定理のそれぞれについて,プロジェクト自身の定義を番号つきの仮の記号に置き換えたうえで,言明のハッシュを取った.2 つの定理のハッシュが一致するのは,プロジェクトの定義の名前を一貫して付け替えれば言明が同じ式になるときである.ライブラリの宣言は名前で比べる.Alpöge 版のハッシュは,コミュニティのリポジトリのコミット f1f6d654 のツリーから取った.これは配布時のツリーから届かないファイルを除き,約 20 ファイルを編集したもので,「証明の解析」の指標に用いたツリーと同じである.
| pair (first, second)組(1 つ目,2 つ目) | theorems of the first1 つ目の定理 | distinct statements異なる言明 | theorems of the second2 つ目の定理 | distinct statements異なる言明 | statements in both両方にある言明 | share of the second2 つ目に占める割合 | of these, about library notions only (second side: matched of all)うちライブラリの概念だけの言明(2 つ目の側:一致 / 全体) |
|---|---|---|---|---|---|---|---|
| Alpöge version and Sernau version, compact editionAlpöge 版 と Sernau 版(圧縮版) | 682,617 | 531,220 | 8,851 | 8,802 | 58 | 0.7% | 19 of 58919 / 589 |
| Alpöge version and Sernau version, readable editionAlpöge 版 と Sernau 版(可読版) | 682,617 | 531,220 | 20,498 | 20,344 | 101 | 0.5% | 34 of 1,37334 / 1,373 |
| Sernau version, readable edition and Sernau version, compact editionSernau 版(可読版) と Sernau 版(圧縮版) | 20,498 | 20,344 | 8,851 | 8,802 | 2,775 | 31.5% | 250 of 589250 / 589 |
- Almost no lemma of the Sernau version states what a lemma of the Alpöge version states. The 58 coinciding statements of the compact edition are mostly small (median size 27 expression nodes; 24 are larger than 50 nodes), and several are declarations that Lean generates for structures.Sernau 版の補題で,Alpöge 版の補題と同じことを述べるものは,ほとんどない.圧縮版の一致する 58 個の言明は,大半が小さく(式の大きさの中央値は 27 ノード,50 ノードを超えるのは 24 個),構造体について Lean が生成する宣言もいくつか含む.
- The method does find coincidences where there are some. The same count between the two editions of the Sernau version gives 2,775 common statements, 32% of the compact edition, and those are large (median 128 nodes).この方法は,一致があれば検出する.Sernau 版の 2 つの版の間で同じ数え方をすると,共通の言明は 2,775 個(圧縮版の 32%)あり,それらは大きい(中央値 128 ノード).
- Names. 13 names occur in both projects: the five theorems, the four definitions of
Statements.lean, and generated declarations.名前.両方のプロジェクトに現れる名前は 13 個である.5 つの定理,Statements.leanの 4 つの定義,および生成された宣言である. - What this does not show. A hash coincides only for literally the same expression. Two lemmas that say the same thing with the hypotheses in another order, with another but equivalent definition, or about a library declaration that was renamed between the two Mathlib revisions, count as different. The count is a lower bound for “the same lemma”.この数え方で分からないこと.ハッシュが一致するのは,文字どおり同じ式のときだけである.仮定の順序が違う,同値な別の定義を使う,2 つの Mathlib の版の間で名前の変わった宣言についての補題である,といった場合は,同じ内容でも別のものと数える.この数は「同じ補題」の下限である.
The largest coinciding statements (Alpöge version and compact edition)一致する言明のうち大きいもの(Alpöge 版と圧縮版)
| theorem in the Sernau versionSernau 版の定理 | theorem in the Alpöge versionAlpöge 版の定理 | size of the statement (nodes)言明の大きさ(ノード) | about library notions onlyライブラリの概念だけの言明 |
|---|---|---|---|
Lift. | GlobalTheory. | 182 | yesはい |
PeriodPair. | GlobalTheory. | 147 | yesはい |
coeff_ | Formalism. | 130 | noいいえ |
half_ | GlobalTheory. | 126 | yesはい |
mem_ | IntegralComplexMem. | 122 | yesはい |
exists_ | GlobalTheory. | 117 | yesはい |
weierstrass_ | GlobalTheory. | 99 | yesはい |
taylorAtZero_ | GlobalTheory. | 97 | noいいえ |
Sub-theories of the two projects2 つのプロジェクトの部分理論
The two projects organise their files differently, so their folders cannot be matched one to one. Three views are given: the largest folders of each, the words that occur in the module names, and the clusters that a community-detection algorithm finds in each dependency graph.
2 つのプロジェクトはファイルの整理のしかたが違うので,フォルダを 1 対 1 に対応させることはできない.3 つの見方を示す:それぞれの最大のフォルダ,モジュール名に現れる単語,依存グラフからコミュニティ検出のアルゴリズムが見つけるクラスタである.
Alpöge version: the 8 largest of 310 folders, by proof terms
Alpöge 版:310 個のフォルダのうち,証明項の大きい 8 個
| folderフォルダ | declarations with a name of their own固有の名前を持つ宣言 | theorems定理 | values (million nodes)値の式(百万ノード) | share割合 |
|---|---|---|---|---|
| Development.AbelianVarietyTheory | 347,214 | 463,003 | 1,177.5 | 49% |
| Development.AutomorphicArithmetic | 50,469 | 107,107 | 319.5 | 13% |
| Development.AutomorphicSpectrum | 58,850 | 73,768 | 150.4 | 6% |
| Development.WeilBound | 53,975 | 66,774 | 150.3 | 6% |
| Formalism.LocalToGlobal | 57,546 | 66,988 | 108.5 | 5% |
| Formalism.SharpRestriction | 39,447 | 49,522 | 99.0 | 4% |
| Formalism.HermitianCurvature | 29,802 | 39,275 | 64.7 | 3% |
| GroundTheory.HeightsAndTheta | 23,302 | 27,477 | 50.6 | 2% |
Sernau version, compact edition: the 8 largest of 40 folders, by proof terms
Sernau 版(圧縮版):40 個のフォルダのうち,証明項の大きい 8 個
| folderフォルダ | declarations with a name of their own固有の名前を持つ宣言 | theorems定理 | values (million nodes)値の式(百万ノード) | share割合 |
|---|---|---|---|---|
| New.Exchange | 365 | 1,160 | 7.6 | 8% |
| New.Filling | 616 | 1,760 | 7.0 | 7% |
| Lib.Shimura | 996 | 1,912 | 6.8 | 7% |
| Lib.Weil | 1,283 | 2,821 | 6.8 | 7% |
| Lib.DiscreteSeries | 747 | 1,898 | 5.6 | 6% |
| Lib.Cohomology | 824 | 1,356 | 5.2 | 6% |
| Lib.ClassField | 807 | 1,608 | 4.4 | 5% |
| Lib.GaloisRep | 261 | 951 | 4.2 | 5% |
In the Alpöge version one folder, Development.AbelianVarietyTheory, holds 49% of the proof terms. In the Sernau version the largest folder holds 8%. Only declarations the five theorems depend on are counted.
Alpöge 版では,1 つのフォルダ Development.AbelianVarietyTheory が証明項の 49% を占める.Sernau 版では,最大のフォルダでも 8% である.数えたのは,5 つの定理が依存する宣言だけである.
Words in the module names
モジュール名の単語
The names of the folders and files were split into words (SiegelWeil gives “siegel” and “weil”). The Alpöge version has 7,236 different words, the compact edition 764; 732 occur in both. Weighted by the number of declarations in the modules, the common words cover 98% of the compact edition and 62% of the Alpöge version.
フォルダとファイルの名前を単語に分けた(SiegelWeil は「siegel」と「weil」になる).Alpöge 版には 7,236 種類,圧縮版には 764 種類の単語があり,732 種類が両方に現れる.モジュール内の宣言の数で重みを付けると,共通の単語は圧縮版の 98%,Alpöge 版の 62% を占める.
| words単語 | examples, most frequent first例(頻度の高い順) |
|---|---|
| in both両方に現れる | local, theta, weil, geometry, unitary, cohomology, period, level, groups, bound, integral, galois, series, forms, siegel, finite, dual, group, zero, real, point, etale, sum, formula |
| only in the Alpöge versionAlpöge 版のみ | variety, automorphic, divisor, spectrum, eigenvalues, curvature, integrals, varieties, reductive, decorated, span, satake, pow, representations, archimedean |
| only in the compact edition of the Sernau versionSernau 版(圧縮版)のみ | flensted, magnitudes, corepresentable, subfunctors, pseudocharacter, gradings, upsilon, albert, killers, kolyvagin, alternants, combinatorics, ostrowski, bordering, avatars, eigenchar |
Generic words (“theory”, “proofs”, “definitions”, …) are left out of the examples. The words are those the authors of each text chose as names; a shared word shows a shared subject, not a shared proof.
例からは一般的な単語(theory,proofs,definitions など)を除いた.単語は,それぞれのテキストの作者が名前として選んだものである.単語が共通であることは,対象が共通であることを示すが,証明が共通であることは示さない.
Clusters of the dependency graphs
依存グラフのクラスタ
| textテキスト | declarations in the graphグラフの宣言 | communities found見つかったコミュニティ | modularityモジュラリティ | agreement with the folders (NMI)フォルダとの一致度(NMI) | the five largest clusters, named after their most frequent folders最大の 5 つのクラスタ(最も多いフォルダの名前で表示) |
|---|---|---|---|---|---|
| Alpöge versionAlpöge 版 | 1,265,279 | 1,540 | 0.80 | 0.50 | TwistedOperators + DecoratedLatticeProofs; DivisorProofs + DegenerationProofs + UniformizationProofs; Convolution + ArchimedeanBaseChange + PositivityTheory; HermitianCurvatureProofs (files); FlagMeasures + CokernelGLCounts + ClosedLocalOrbits |
| Sernau version, readable editionSernau 版(可読版) | 49,823 | 64 | 0.71 | 0.54 | Construction + DualPair + MixedModel; Frames + Unfolding + RemainingTerms; AuxiliaryForms + Data + Objects; Uniformisation + ThetaModuli + Geometry; FirstOrder + Selmer + GreenbergWiles |
| Sernau version, compact editionSernau 版(圧縮版) | 37,569 | 53 | 0.71 | 0.52 | Construction + MixedModel + DualPair; Places + Selmer + GaloisCohomology; Exchange + Data + Rows; Filling + RealPlace + Bruhat; Uniformisation + Geometry + Sigma |
Leiden algorithm on the graph of the project declarations that the five theorems depend on, as on the page Proof analysis. In all three texts the graph splits into communities with a modularity above 0.7, and the communities follow the folders only partly.
「証明の解析」と同じく,5 つの定理が依存するプロジェクトの宣言のグラフに Leiden 法を適用した.3 つのテキストのどれでも,グラフはモジュラリティ 0.7 以上のコミュニティに分かれ,コミュニティはフォルダと部分的にしか一致しない.
Shape of the proof networks証明ネットワークの形
| quantity量 | Alpöge version (tree f1f6d654)Alpöge 版(ツリー f1f6d654) | Sernau version, readable editionSernau 版(可読版) | Sernau version, compact editionSernau 版(圧縮版) |
|---|---|---|---|
| declarations of the project the five theorems depend on (auxiliary constants merged into their parents)5 つの定理が依存するプロジェクトの宣言(補助の定数は親にまとめる) | 862,342 | 26,853 | 13,625 |
| library declarations they depend on依存するライブラリの宣言 | 143,877 | 118,005 | 117,103 |
| largest distance from the five theorems (references followed)5 つの定理からの最大の距離(参照を辿る回数) | 51 | 43 | 35 |
| longest chain of dependencies inside the projectプロジェクト内の依存の最長の鎖 | 157 | 128 | 104 |
| depth of the dominator tree支配木の深さ | 47 | 34 | 31 |
| project declarations used by exactly one other declarationちょうど 1 つの宣言からだけ使われるプロジェクトの宣言 | 446,883 | 9,215 | 1,955 |
| theorems whose statement mentions library notions only言明がライブラリの概念だけからなる定理 | 107,441 | 1,513 | 747 |
| their share of the theorems of the projectプロジェクトの定理に占める割合 | 12.4% | 6.8% | 7.7% |
| theorems that repeat the statement of another theorem up to renaming名前の付け替えを除いて他の定理と同じ言明の定理 | 23.0% | 0.9% | 0.7% |
| theorems that are a second copy of the same statement and proof shape言明と証明の形が同じ 2 つ目以降の写しである定理 | 117,686 | 12 | 1 |
- The networks are similar in depth and very different in width. The longest chain of dependencies inside the project and the distance from the five theorems differ by less than a factor of two, while the number of declarations differs by a factor of more than sixty.ネットワークの深さは近く,幅が大きく違う.プロジェクト内の依存の最長の鎖と,5 つの定理からの距離の違いは 2 倍未満である.一方,宣言の数は 60 倍以上違う.
- Repetition. About a quarter of the theorems of the Alpöge version state something that another of its theorems also states, up to renaming; the Sernau version has almost no such repetition.繰り返し.Alpöge 版の定理の約 4 分の 1 は,名前の付け替えを除いて,別の定理と同じことを述べている.Sernau 版には,そのような繰り返しがほとんどない.
- Lemmas about the library alone. The Alpöge version contains more than a hundred thousand theorems that mention no definition of the project (statements about Mathlib notions only); the Sernau version has several hundred. As a share of all theorems the two are closer.ライブラリだけについての補題.Alpöge 版には,プロジェクトの定義に言及しない定理(Mathlib の概念だけについての言明)が 10 万個以上ある.Sernau 版では数百個である.定理全体に占める割合では,両者はもっと近い.
The spine: declarations through which every path from the five theorems passes背骨:5 つの定理からのどの経路も通る宣言
For each text, the chain of declarations that dominate the most of the proof: every dependency path from the five theorems to the declarations counted in the second column passes through the declaration.
それぞれのテキストについて,証明の最も多くを支配する宣言の列.2 列目に数えた宣言へ 5 つの定理から届く依存の経路は,すべてその宣言を通る.
| Alpöge version (tree f1f6d654)Alpöge 版(ツリー f1f6d654) | declarations reached only through itそれを通ってのみ届く宣言 | Sernau version, compact editionSernau 版(圧縮版) | declarations reached only through itそれを通ってのみ届く宣言 |
|---|---|---|---|
allChi | 955,714 | New. | 78,324 |
UpperTheory. | 955,713 | eventually_ | 68,060 |
UpperTheory. | 669,635 | star_ | 40,494 |
UpperTheory. | 581,408 | sphericalCompat_ | 18,494 |
UpperTheory. | 357,258 | sphericalCompat_ | 18,308 |
UpperTheory. | 296,209 | exists_ | 18,065 |
GlobalTheory. | 100,714 | Model. | 7,597 |
GlobalTheory. | 37,054 | CategoryTheory. | 1,275 |
The shortening has two steps短縮は 2 つの段階からなる
The Sernau version has two editions, and the two steps (Alpöge version → readable edition → compact edition) change different things.
Sernau 版には 2 つの版があり,2 つの段階(Alpöge 版 → 可読版 → 圧縮版)で変わるものが違う.
| quantity量 | Alpöge versionAlpöge 版 | Sernau version, readable editionSernau 版(可読版) | Sernau version, compact editionSernau 版(圧縮版) | first step第 1 段階 | second step第 2 段階 |
|---|---|---|---|---|---|
| lines of codeコードの行 | 15,531,759 | 299,902 | 76,149 | ÷ 51.8÷ 51.8 | ÷ 3.9÷ 3.9 |
| theorems written in the sourceソースに書かれた定理 | 818,755 | 18,227 | 7,088 | ÷ 44.9÷ 44.9 | ÷ 2.6÷ 2.6 |
| project constants the five theorems depend on5 つの定理が依存するプロジェクトの定数 | 1,265,279 | 49,823 | 37,569 | ÷ 25.4÷ 25.4 | ÷ 1.3÷ 1.3 |
| proof terms of the theorems among them (million nodes)そのうち定理の証明項(百万ノード) | 2,319.0 | 85.7 | 87.7 | ÷ 27.1÷ 27.1 | × 1.02× 1.02 |
| export that Comparator replays (GB)Comparator が再生するエクスポート(GB) | 61.6 | 4.5 | 5.2 | ÷ 13.7÷ 13.7 | × 1.15× 1.15 |
| work of the build: sum of the module times (core-hours)ビルドの仕事量:モジュール時間の和(コア時間) | 399.5 | 3.2 | 4.4 | ÷ 125.0÷ 125.0 | × 1.38× 1.38 |
- First step: another text for the same theorems. The number of theorems, the proof terms and the work of the build all fall by one to two orders of magnitude, while the library that is used stays of the same order (above) and the statements of the lemmas do not carry over (above). The README of the repository describes its text as a shorter rewriting in which many steps are proved by other arguments.第 1 段階:同じ定理についての別のテキスト.定理の数,証明項,ビルドの仕事量は 1〜2 桁小さくなる.一方,使うライブラリは同じ桁にとどまり(上),補題の言明は引き継がれていない(上).リポジトリの README は,このテキストを,多くの段階を別の議論で証明した短い書き直しと説明している.
- Second step: the same proof terms from fewer lines. The compact edition has a quarter of the lines of code of the readable edition. The proof terms that Lean produces are of the same size, the export is larger, and the build needs more work: named steps (
have,rw,exact,calc) are replaced by calls of search procedures (simp,simp_all,aesop,grind), and more is packed into a line.第 2 段階:同じ証明項を,より少ない行から.圧縮版のコードの行は,可読版の 4 分の 1 である.Lean が作る証明項は同じ大きさで,エクスポートは大きくなり,ビルドの仕事量は増える.名前のついた手順(have,rw,exact,calc)が,探索を行う手続き(simp,simp_all,aesop,grind)の呼び出しに置き換えられ,1 行に多くが詰め込まれている.
Row labels are in English in both languages: lines of code, characters of code, theorems in the source, project constants in the compiled result, proof terms of the theorems the five theorems depend on, size of the .olean files, export for Comparator, work of the build (sum of the module times), wall-clock time of lake build at 64 threads.
行の見出しは英語のまま表示している.上から,コードの行,コードの文字数,ソースに書かれた定理,コンパイル結果のプロジェクトの定数,5 つの定理が依存する定理の証明項,.olean ファイルの大きさ,Comparator のエクスポート,ビルドの仕事量(モジュール時間の和),64 スレッドでの lake build の実時間.
Occurrences of tactics per 1,000 lines of codeコード 1,000 行あたりのタクティクの出現数
| word語 | Alpöge versionAlpöge 版 | Sernau version, readable editionSernau 版(可読版) | Sernau version, compact editionSernau 版(圧縮版) |
|---|---|---|---|
rw | 114.4 | 49.8 | 14.7 |
exact | 69.8 | 35.6 | 11.5 |
have | 143.8 | 118.0 | 57.6 |
calc | 2.6 | 8.5 | 0.1 |
simp | 47.1 | 75.1 | 167.5 |
simp_all | 0.1 | 1.6 | 26.8 |
only | 22.8 | 14.7 | 2.3 |
grind | 0.0 | 5.9 | 35.5 |
aesop | 0.0 | 1.3 | 16.5 |
fun_prop | 0.5 | 6.5 | 15.3 |
; between tactics on one line1 行の中でタクティクを区切る ; | 30.6 | 1.0 | 100.3 |
<;><;> | 7.4 | 3.8 | 41.9 |
Counted in the lines of code (comments removed), at word boundaries. only is mostly simp only, the form that lists the lemmas to use. The Alpöge version, written for Lean 4.33, uses neither grind nor aesop.
コードの行(コメントを除く)の中で,語の区切りで数えた.only は主に simp only(使う補題を列挙する形)である.Lean 4.33 向けに書かれた Alpöge 版は,grind も aesop も使っていない.
One lemma in the two editions (classSum_pos; readable edition src/Lib/Adelic/Hecke/ClassSums.lean, compact edition src/Lib/Adelic/Hecke/ClassMean.lean; the repository is under the Apache 2.0 licence). The proof in the readable edition:
2 つの版での同じ補題の例(classSum_pos.可読版は src/Lib/Adelic/Hecke/ClassSums.lean,圧縮版は src/Lib/Adelic/Hecke/ClassMean.lean.リポジトリのライセンスは Apache 2.0).可読版での証明:
rw [classSum, finsum_eq_sum_of_fintype]
have h_weight (q : DoubleCosets Γ K) : (0 : ℚ) < (Nat.card (classAut Γ K q.out) : ℚ)⁻¹ :=
inv_pos.2 (Nat.cast_pos.2 Nat.card_pos)
exact sum_pos' (fun q _ ↦ smul_nonneg (h_weight q).le (h_nonneg _))
⟨c, mem_univ c, smul_pos (h_weight c) hc⟩and in the compact edition:
圧縮版での証明:
simp_all [sum_pos_iff_of_nonneg, smul_nonneg]; use c; positivityBuild and checkビルドと検査
| quantity量 | Alpöge versionAlpöge 版 | Sernau version, readable editionSernau 版(可読版) | Sernau version, compact editionSernau 版(圧縮版) |
|---|---|---|---|
| modulesモジュール | 175,187 | 803 | 794 |
| work: sum of the module times (core-hours)仕事量:モジュール時間の和(コア時間) | 399.5 | 3.2 | 4.4 |
| longest chain of imports最長の依存の鎖 | 49 min 06 s49 分 06 秒 | 12 min 23 s12 分 23 秒 | 15 min 14 s15 分 14 秒 |
lake build at 64 threads64 スレッドでの lake build | 6 h 24 min6 時間 24 分 | 12 min 42 s12 分 42 秒 | 15 min 35 s15 分 35 秒 |
| seconds of compilation per 1,000 lines of codeコード 1,000 行あたりのコンパイル時間(秒) | 93 | 38 | 209 |
| export of the five theorems and their dependencies (GB)5 つの定理とその依存先のエクスポート(GB) | 61.6 | 4.5 | 5.2 |
| Comparator: replay with nanoda (4 threads)Comparator:nanoda による再生(4 スレッド) | 1 h 58 min1 時間 58 分 | 7 min 02 s7 分 02 秒 | 8 min 03 s8 分 03 秒 |
| Comparator: replay with the Lean default kernelComparator:Lean の既定のカーネルによる再生 | 73 h 14 min73 時間 14 分 | 38 min 41 s38 分 41 秒 | 44 min 16 s44 分 16 秒 |
| Comparator: largest memory of its processComparator:プロセスのメモリの最大値 | 296 GiB | 14.2 GiB | 13.6 GiB |
- The Alpöge version was limited by the amount of work, the Sernau version is limited by its chain of imports. The work fell by a factor of about a hundred, the longest chain by a factor of three to four. A simulation of the build of the compact edition on its import graph gives 34 min 40 s at 8 cores, 20 min 27 s at 16, and the length of the chain from 32 cores on.Alpöge 版のビルドは仕事量で決まっていた.Sernau 版のビルドは import の鎖で決まる.仕事量は約 100 分の 1 になったが,最長の鎖は 3〜4 分の 1 である.圧縮版のビルドを import のグラフの上で模擬すると,8 コアで 34 分 40 秒,16 コアで 20 分 27 秒,32 コア以上では鎖の長さになる.
- Lines of source do not predict the time of the build; the size of the proof terms does better. Over the modules, the rank correlation of the compilation time with the number of lines is 0.66 (readable edition) and 0.59 (compact edition); with the nodes of the compiled values it is 0.78 and 0.81.ソースの行数はビルド時間の目安にならず,証明項の大きさのほうがよく合う.モジュールごとのコンパイル時間との順位相関は,行数が 0.66(可読版)と 0.59(圧縮版),コンパイルされた値の式のノード数が 0.78 と 0.81 である.
- The check follows the proof terms. The export and the replay times fall with the proof terms in the first step and do not fall in the second. The times of the Alpöge version are those of the standalone Comparator run on the page Overview; the times of the Sernau version are on the page Shorter proof.検査の量は証明項に従う.エクスポートと再生の時間は,第 1 段階で証明項とともに減り,第 2 段階では減らない.Alpöge 版の時間は「概要」のページの単体の Comparator の実行のもの,Sernau 版の時間は「短縮版」のページのものである.
Limits of the comparison比較の制約
- Not a judgement. The page counts; it does not say that one text is a better proof than the other, and it does not assess the mathematics of either.評価ではない.このページは数えた結果を示す.どちらのテキストがよい証明かは述べないし,どちらの数学的内容も評価しない.
- Different versions. The Alpöge version pins Lean v4.33.1, the Sernau version v4.35.0, each with its own revision of Mathlib. Library declarations are compared by name, so a renamed declaration counts as different; the page gives the number of names that do not exist on the other side. Build times are not for the same compiler.版の違い.Alpöge 版は Lean v4.33.1,Sernau 版は v4.35.0 を使い,Mathlib の版もそれぞれ違う.ライブラリの宣言は名前で比べるので,名前の変わった宣言は別のものと数える.相手側に存在しない名前の数はページに示した.ビルド時間は,同じコンパイラでの値ではない.
- Coinciding statements are a lower bound. Only literally equal expressions are found, up to renaming of project definitions. Lemmas that express the same fact differently are not matched, and we did not try to match proofs or mathematical steps by hand.一致する言明の数は下限である.見つかるのは,プロジェクトの定義の名前の付け替えを除いて文字どおり等しい式だけである.同じ事実を別の形で述べた補題は対応づけられない.証明や数学的な段階を人の手で対応づけることもしていない.
- Two trees on the Alpöge side. Sizes, the use of the library, folders, words and clusters are those of the distributed tree. Statement hashes and the indicators of the network section are those of the tree of commit
f1f6d654of the community repository, as on the page Proof analysis.Alpöge 版の側には 2 つのツリーがある.規模,ライブラリの使い方,フォルダ,単語,クラスタは,配布時のツリーのものである.言明のハッシュと「ネットワーク」の節の指標は,「証明の解析」と同じく,コミュニティのリポジトリのコミットf1f6d654のツリーのものである. - Names are the authors' choices. The words of the module names and the names of the clusters show which subjects the texts name, not how the proofs proceed.名前は作者が選んだものである.モジュール名の単語とクラスタの名前が示すのは,テキストがどの対象に名前を付けているかであり,証明がどう進むかではない.
- How the shorter text was made is not known to us. The repository publishes the result; we did not examine how it was produced.短いテキストがどう作られたかは,我々には分からない.リポジトリは結果を公開している.その作り方は調べていない.
The dumps, maps, indicators and the comparison of the Sernau version took 7 short jobs, 0.38 GPU-hours (113 yen) in all; the builds and Comparator runs are listed on the page Shorter proof.
Sernau 版の依存グラフの書き出し,地図,指標,比較には,短いジョブを 7 本,合計 0.38 GPU 時間(113 円)使った.ビルドと Comparator の実行は「短縮版」のページにある.