把黎曼猜想的 Lean 证明,写成人能读懂的证明
把黎曼猜想的 Lean 证明写成数学家能读的证明文章,以及人人能看懂的证明思路
Record real module inventory, tested extractor and active environment jobs
Browse files+92 −104 routes/cogito-source-provenance/README.md View file
| @@ -1,118 +1,106 @@ | ||
| 1 | 1 | --- |
| 2 | 2 | issue: 1 |
| 3 | 3 | status: working |
| 4 | +tried: Source-byte integrity, lexical module graph, pinned compiler, declaration extractor fixture | |
| 5 | +outcome: Real source inventory complete; full declaration atlas not yet extracted | |
| 4 | 6 | --- |
| 5 | -# Source provenance preflight for the declaration atlas | |
| 6 | - | |
| 7 | -## Result (2026-11-22) | |
| 8 | - | |
| 9 | -Downloaded the fourteen original source archive parts from the URLs pinned in | |
| 10 | -ATLAS.md to a private cache outside this clone. Read the compressed bytes in | |
| 11 | -part01 through part14 order, without extracting or executing source. | |
| 12 | - | |
| 13 | -- Observed total: **239,275,554 bytes**. | |
| 14 | -- Observed SHA-256: `9631b4f020199e580ba86178cb56c6e9b09f690c2369a80dc4334aa93f49c7fc`. | |
| 15 | -- Both match ATLAS.md. `provenance.json` records the observed per-part byte counts | |
| 16 | - and hashes. Those per-part hashes are observations from this run, not independently | |
| 17 | - authenticated upstream pins. The combined pinned digest is the integrity check. | |
| 18 | -- `verify_source.py` is the reproducible streaming downloader/checker. It caches | |
| 19 | - outside git, downloads at most four parts concurrently, and emits the report | |
| 20 | - only after combined size and hash validation. It never extracts source. | |
| 21 | - | |
| 22 | -This is source-byte integrity evidence only. It does not verify the authorship, | |
| 23 | -license, mathematical claims, Lean build, dependency graph, or declaration atlas. | |
| 24 | -No source, proof body, archive, olean, real atlas, or fabricated declaration is | |
| 25 | -included in this route. Metadata is proposed for maintainer review via PR. | |
| 7 | +# Original source inventory and declaration-extractor preparation | |
| 8 | + | |
| 9 | +## Current result (2026-11-22) | |
| 10 | + | |
| 11 | +- Verified all fourteen original archive parts: **239,275,554 bytes**, SHA-256 | |
| 12 | + `9631b4f020199e580ba86178cb56c6e9b09f690c2369a80dc4334aa93f49c7fc`. | |
| 13 | + `provenance.json` contains observed per-part hashes/sizes. `verify_source.py` | |
| 14 | + reproduces the streaming integrity check. Per-part hashes are observations; | |
| 15 | + the independently pinned combined digest is the integrity criterion. | |
| 16 | +- Inventoried **175,187 source modules**, **17,374,215 source lines**, and | |
| 17 | + **1,030,531,854 source bytes**. The lexical source-import cone from `Main` | |
| 18 | + reaches all project modules. It over-approximates individual theorem dependencies. | |
| 19 | + `Main` imports `Statements` and `Supplements.Kernels.MainTheoremsAll`. | |
| 20 | + `module-summary.json` contains the aggregate counts. The full 16,940,327-byte | |
| 21 | + compressed module graph remains private outside git; its digest is recorded. | |
| 22 | +- Installed the digest-verified official **Lean 4.33.1 / 819816b2** toolchain. | |
| 23 | + [Job 166](https://shoal.club/cogito/alpoge-rh-blueprint/jobs/166) completed, | |
| 24 | + exit 0; `toolchain-report.json` records the exact release hash and version. | |
| 25 | +- Implemented `ExtractAtlas.lean`. A synthetic fixture produced **23 declarations**; | |
| 26 | + assertions checked definition dependencies, proof-only theorem dependencies, | |
| 27 | + one-line source ranges, uniqueness, and exclusion of core declarations. | |
| 28 | + Eight generated fixture declarations have no recorded ranges and receive zero | |
| 29 | + source_lines. This fixture is **not RH evidence**. No real atlas is submitted. | |
| 30 | + | |
| 31 | +All working files, private archives, tools and subsequent build work are on the | |
| 32 | +operator's requested E drive. No original source, olean, real atlas, proof body or | |
| 33 | +extracted RH declaration type is committed to this public route. The tiny Lean | |
| 34 | +fixture is newly authored test code, unrelated to the RH submission. | |
| 35 | + | |
| 36 | +## Cache/source identity | |
| 37 | + | |
| 38 | +The original archive's Git source-tree identity is | |
| 39 | +`b41b516b1f7baee4d83ced235ecc71fd43c97695`, matching upstream original commit | |
| 40 | +`40e56bab`. The native cache baseline `e50d09817ad81469f737e8f637561e6ccf86c670` | |
| 41 | +has source-tree identity `24df20b62d9976ccd20da819bc20b16f808f0fdd`. | |
| 42 | +Initially these differed. Upstream comparison shows the only source change is | |
| 43 | +added `Challenge.lean`. Recomputing the original tree with that single blob | |
| 44 | +produces exactly the cache tree. All original proof source blobs are unchanged. | |
| 45 | +`cache-source-match.json` records the comparison and both raw identities. | |
| 46 | + | |
| 47 | +The native cache manifest's SHA-256 is | |
| 48 | +`292caa386a620d935cfc736b56fcceaab9fe7073086693b62e899c1ee4725f04`. | |
| 49 | +A fresh sample archive matched its pinned SHA-256. Two fresh transfers then passed | |
| 50 | +the downloader's per-artifact digest validation. Full provisioning is in | |
| 51 | +[job 171](https://shoal.club/cogito/alpoge-rh-blueprint/jobs/171). | |
| 52 | +[source/dependency staging job 172](https://shoal.club/cogito/alpoge-rh-blueprint/jobs/172) | |
| 53 | +privately stages the original source, adds the challenge-only wrapper, verifies | |
| 54 | +its Git tree, and fetches exact dependency revisions from the original manifest. | |
| 55 | + | |
| 56 | +Third-party cache integrity/source identity is not an independent rebuild or | |
| 57 | +proof verification. The original published compiled archive's Main.olean hash | |
| 58 | +also differs from Sutherland's separate build; byte identity across those producer | |
| 59 | +builds was not established, and that larger download path was abandoned. Only its | |
| 60 | +small digest-checked manifest was downloaded. No verified-atlas claim relies on it. | |
| 26 | 61 | |
| 27 | 62 | ## Reproduce |
| 28 | 63 | |
| 29 | -From the repository root, choose a private cache **outside** this repository: | |
| 30 | - | |
| 31 | -```text | |
| 32 | -python routes/cogito-source-provenance/verify_source.py --cache <private-cache> --download --report <report-path> | |
| 33 | -``` | |
| 34 | - | |
| 35 | -Repeat offline by omitting `--download`. The cache must contain all fourteen | |
| 36 | -`lean.tar.gz.part01` through `lean.tar.gz.part14` files. Expected output: | |
| 37 | - | |
| 38 | -```text | |
| 39 | -source archive: 239275554 bytes, 14 parts, sha256 matches ATLAS.md | |
| 40 | -No source was extracted; no declaration atlas or Lean build was verified. | |
| 41 | -``` | |
| 42 | - | |
| 43 | -## Continuation (2026-11-22) | |
| 44 | - | |
| 45 | -Resumed at the operator's request. The working folder and private source cache | |
| 46 | -are now on drive E. Next, inventory actual source modules and imports before | |
| 47 | -preparing the pinned Lean environment. No atlas result is claimed yet. | |
| 48 | - | |
| 49 | -## Earlier claim release | |
| 50 | - | |
| 51 | -This contribution completes only the source integrity preflight. The atlas task | |
| 52 | -is not complete: there is no built Lean environment or extracted atlas in this | |
| 53 | -route. The claim is released rather than left active while awaiting those inputs. | |
| 54 | -PR #8 retains the tool and evidence for review; it does not close issue #1. | |
| 55 | - | |
| 56 | -## Validation and limitations | |
| 57 | - | |
| 58 | -The real download passed size and hash validation. A separate local synthetic | |
| 59 | -fixture confirmed numeric part ordering, rejection of same-length byte corruption, | |
| 60 | -and rejection of a missing part. These tests are software checks, not RH evidence. | |
| 61 | -The supplied fictional `examples/` fixture also passed the project's verifier; | |
| 62 | -that result is not evidence for this contribution or the RH proof. | |
| 63 | - | |
| 64 | -`python verify.py routes/cogito-source-provenance/` outputs `Nothing to check yet`. | |
| 65 | -The approved project checker does not inspect source-provenance reports or execute | |
| 66 | -route scripts. No atlas manifest is supplied, so this route cannot satisfy the | |
| 67 | -atlas task's acceptance criterion. No declaration count or coverage is claimed. | |
| 68 | - | |
| 69 | -## Server check state | |
| 70 | - | |
| 71 | -For result commit `a6102892ccb918f1975a4399a420352bd52c5538`, the | |
| 72 | -commit-status API returned `pending`, `total_count: 0`, `statuses: []`. | |
| 73 | -The compute API reports approved rules `cccd4b165caf701d02b46db33b5d8a9246c6df2c`, | |
| 74 | -no pending rule changes, the `verify` gate, and `runners: []`. The approved | |
| 75 | -verifier files match those used locally. No server verdict has judged this | |
| 76 | -artifact. A maintainer-controlled runner must be available for the server gate. | |
| 77 | - | |
| 78 | -## Actual source module inventory | |
| 79 | - | |
| 80 | -`inventory_source.py` streams the same hash-checked archive. It scans source | |
| 81 | -module import headers, including Unicode identifiers and nested comments, and | |
| 82 | -stores the full source-module graph privately outside git. It does not extract | |
| 83 | -Lean declarations, elaborate types, inspect proof terms, or build the project. | |
| 84 | - | |
| 85 | -Observed: **175,187 source modules**, **17,374,215 source lines**, and | |
| 86 | -**1,030,531,854 source bytes**. The lexical project-module import cone rooted at | |
| 87 | -`Main` reaches **all 175,187 project modules**. This source import graph therefore | |
| 88 | -does not offer a smaller module build than the full project. It over-approximates | |
| 89 | -the dependencies of individual theorems; it says nothing about which results | |
| 90 | -are new mathematics or necessary proof-term dependencies. | |
| 91 | - | |
| 92 | -`Main` directly imports `Statements` and | |
| 93 | -`Supplements.Kernels.MainTheoremsAll`. Module-family counts and pinned toolchain/ | |
| 94 | -Mathlib revision are in `module-summary.json`. The 16,940,327-byte compressed graph | |
| 95 | -is private and not committed. Its digest is in that report for reproducibility. | |
| 96 | -No source excerpts or declaration types are included. | |
| 97 | - | |
| 98 | -Reproduce after placing the fourteen parts in a private cache: | |
| 64 | +From the repository root, use a private cache outside this clone: | |
| 99 | 65 | |
| 100 | 66 | ```text |
| 101 | -python routes/cogito-source-provenance/inventory_source.py --cache <private-cache> --private-graph <private-graph.jsonl.gz> --summary <summary.json> | |
| 67 | +python routes/cogito-source-provenance/verify_source.py --cache <private-cache> --download --report <report.json> | |
| 68 | +python routes/cogito-source-provenance/inventory_source.py --cache <private-cache> --private-graph <graph.jsonl.gz> --summary <summary.json> | |
| 102 | 69 | ``` |
| 103 | 70 | |
| 104 | -The scanner supports one unescaped import name per import command and rejects | |
| 105 | -unexpected same-line tokens. The actual full scan succeeded. Synthetic regression | |
| 106 | -tests cover Unicode imports, nested/line comments, stopping at declarations, and | |
| 107 | -rejection of unsupported multi-name syntax. This is lexical metadata, not an atlas | |
| 108 | -accepted by the project checker. | |
| 71 | +Omit `--download` for offline byte verification. The import scanner supports | |
| 72 | +Unicode unescaped names and nested/line comments, stops at the first declaration, | |
| 73 | +and rejects unsupported same-line import syntax. Regression tests and the actual | |
| 74 | +full scan passed. See `extractor-fixture/README.md` for the separate synthetic | |
| 75 | +Lean test. The extractor entry point is unsafe metaprogram code solely because it | |
| 76 | +uses Lean's initializer-enabled environment import; it is not a proposed theorem. | |
| 77 | +It uses pinned Lean's `ConstantInfo.getUsedConstantsAsSet` policy for direct | |
| 78 | +references, including opaque theorem values and inductive/constructor/recursor | |
| 79 | +metadata. Missing recorded source ranges are zero, never invented line counts. | |
| 80 | + | |
| 81 | +## Attempts and checks | |
| 82 | + | |
| 83 | +Earlier preparation attempts are retained in site job records/logs: TLS download | |
| 84 | +failures (116), Windows extraction unable to create Linux links (130), and a | |
| 85 | +cancelled redundant rewrite (161). Job 166 verified/reused existing package files | |
| 86 | +and succeeded. Cache download reporting/separator errors in 169/170 were corrected; | |
| 87 | +two fresh sample transfers passed before job 171 was launched. Completed, hash- | |
| 88 | +verified cache files are reused on a retry. These are infrastructure attempts, | |
| 89 | +not failed mathematical proofs or independent kernel verdicts. | |
| 90 | + | |
| 91 | +`python verify.py routes/cogito-source-provenance/` outputs **Nothing to check yet**. | |
| 92 | +The approved verifier does not judge these reports or execute route programs. | |
| 93 | +The server has no runner and has reported no check verdict on this route. Local | |
| 94 | +job success, fictional example checks and synthetic fixture tests do not satisfy | |
| 95 | +issue #1's atlas criterion. The issue remains open and this route remains working. | |
| 109 | 96 | |
| 110 | 97 | ## Next |
| 111 | 98 | |
| 112 | -Build the privately retained, hash-checked source with the pinned Lean 4.33.1 | |
| 113 | -(`819816b2`) and Mathlib v4.33.1 (`0df444a3`) environment. Run a reviewed Lean | |
| 114 | -extractor over that built environment, recording module selection, handling of | |
| 115 | -generated declarations, and direct dependencies. Obtain maintainer rights and | |
| 116 | -provenance review before publishing extracted types to an external artifact store. | |
| 117 | -Then stage a hash-checked atlas and request the real `atlas: N declarations, | |
| 118 | -sha256 ok` check. Issue #1 remains unresolved. | |
| 99 | +Take in jobs 171/172 when they finish. Restore only SHA-256-checked native archives | |
| 100 | +with the pinned stock leantar, provision the pinned Mathlib cache, and run the | |
| 101 | +extractor against the actual Main environment with the original project-module | |
| 102 | +list. Keep all types and generated atlas data private until maintainer rights and | |
| 103 | +provenance review. Record missing ranges and the exact extraction command, then | |
| 104 | +stage a local manifest and run the approved atlas checker. Do not silently trim | |
| 105 | +an atlas that exceeds its size limits. A maintainer-controlled runner is still | |
| 106 | +needed for a server verdict. | |