| @@ -0,0 +1,153 @@ |
| 1 | +# Audit of `MODIFICATIONS.md` (issue #24, unit d) |
| 2 | + |
| 3 | +**The question.** `MODIFICATIONS.md` says that of 110 source adaptations inspected, 106 |
| 4 | +matched outside sources exactly once comments, whitespace and import/namespace commands were |
| 5 | +set aside, and that "All 124 edited Lean files" carry the attribution update, with "All |
| 6 | +per-file copyright, source and modification notices … retained". Unit (d) asks: **are those |
| 7 | +notices on those files, in this tree?** Reading and `git grep` only; no Lean build was run or |
| 8 | +needed. |
| 9 | + |
| 10 | +## What the report is, and which commit it describes |
| 11 | + |
| 12 | +The report is the repository's own `MODIFICATIONS.md`, 211 lines. It was introduced by commit |
| 13 | +`7fb9add0` ("Start from https://github.com/frenzymath/PoincareConjecture at `62db01af`…") and |
| 14 | +`git log -- MODIFICATIONS.md` shows no later change, so the text read here is the text at |
| 15 | +`main`, `78922e9b`. It describes **two** things, and they are at different revisions: |
| 16 | + |
| 17 | +- the **PoincareLib import** — "copied byte-for-byte" from `frenzymath/Poincare-Conjecture` at |
| 18 | + `432c38f2aa5a30efb13871292d17b4a3309a496a`, keeping "only the Lean library and its root |
| 19 | + module"; |
| 20 | +- the **earlier attribution update** — the 110/106/124 numbers and the mapping table, whose |
| 21 | + local files are linked at the pre-import revision |
| 22 | + `3d7318c32025ccb30465dd29850e95a9e2aa1526`. The report itself says so: "This historical |
| 23 | + record describes the replaced implementation." |
| 24 | + |
| 25 | +So unit (d) is not asking about a report on foreign code. It is asking whether the notice text |
| 26 | +the report records survived the import into `PoincareLib/`. |
| 27 | + |
| 28 | +## What I read |
| 29 | + |
| 30 | +- `MODIFICATIONS.md`, all 211 lines: the two prose paragraphs giving the counts, the 124-row |
| 31 | + table, the "Verification of the attribution update" section. |
| 32 | +- Every Lean file under `PoincareLib/` — **23,564** — read at its head and filtered to the |
| 33 | + **110** that open with `Provenance and modification notice (recorded 2026-09-29)`. |
| 34 | +- `NOTICE` (all of it), `LICENSES/Apache-2.0.txt`, `UPSTREAM.md`, `AGENTS.md`, `README.md`. |
| 35 | +- The issue text of #24, and `BOARD.md` on the `issues` branch. |
| 36 | + |
| 37 | +Scripts beside this note, rerunnable from the repository root against `main`: |
| 38 | +`audit.py` (table vs. notices, pair level; writes `audit-out.txt`), `map.py` (table row → |
| 39 | +path in this tree), `row_own.py` (is each row named by the notice **of its own file**?). |
| 40 | +`audit-out.txt` is the recorded output of all three. |
| 41 | + |
| 42 | +## How the comparison is made, and why not by path |
| 43 | + |
| 44 | +The table's local paths are the **pre-import** ones (`PoincareConjecture/Proofs/…`): |
| 45 | +**0 of the 124 exist at that path on `main`**. That is not a defect — it is what the report |
| 46 | +says the import did. The import did not rename upstream paths, so the comparison is on |
| 47 | +**(upstream repository, upstream source path)** pairs, which are stable across it. A row is |
| 48 | +"accounted for" when some notice in the tree names one of the upstream sources that row |
| 49 | +records; it is "matched by its own file" when the notice of the row's own file does. |
| 50 | + |
| 51 | +## State |
| 52 | + |
| 53 | +### Confirmed here |
| 54 | + |
| 55 | +- **Pair set is identical, in both directions.** 113 distinct `(repo, upstream path)` pairs in |
| 56 | + the table, 113 distinct in the notices: **0 in the table with no notice stating it, 0 in the |
| 57 | + notices absent from the table.** |
| 58 | +- **Every row is covered.** All **124** rows have at least one notice in the tree naming one of |
| 59 | + their sources — no `GAP` line in `audit.py`'s row-by-row tally. |
| 60 | +- **Every existing target is named by its own file's notice.** Of the rows whose file exists |
| 61 | + under `PoincareLib/`, **119 of 119** are matched by the notice of that very file (0 unmatched, |
| 62 | + 0 existing target with no notice at all). This is the strict form of the question the issue |
| 63 | + puts, and it holds. |
| 64 | +- **Notice text is complete per file.** All **110** notices carry `Source:`, a 40-hex |
| 65 | + `Comparison revision:`, `Changes:` and `License: Apache-2.0` (110/110 each), and **0** sits |
| 66 | + after the file's first `import` — every one is at the head of the file. |
| 67 | +- **Copyright is present on every notice-carrying file.** All **110** files have a copyright |
| 68 | + line; **0** files lack one entirely. Note the shape: in **74 of 110** the copyright is *not* |
| 69 | + inside the notice block but in a second `/- … -/` block just below it (by upstream: |
| 70 | + TauCeti 9/9, classification-of-surfaces 7/8, differential-geometry 58/91, mathlib4 0/2). |
| 71 | + So "per-file copyright … retained" holds at file level, while the notice block alone does |
| 72 | + not always carry it. |
| 73 | + |
| 74 | +### Does not apply here |
| 75 | + |
| 76 | +- **The table's local paths.** 0/124 resolve on `main`. They are the pre-import paths and the |
| 77 | + report says as much; they are not evidence of a missing notice, and the pair-level comparison |
| 78 | + is what replaces them. |
| 79 | +- **The link in the report to the upstream `MODIFICATIONS.md`, `archive/…/reviewed-files.json` |
| 80 | + and `archive/…/licenses/`.** These are `github.com` links to the upstream repository at |
| 81 | + `432c38f2`; they are meant to be followed there, not found in this tree. |
| 82 | + |
| 83 | +### Could not decide (why) |
| 84 | + |
| 85 | +Three numbers in the prose cannot be closed from this tree alone, because they compare against |
| 86 | +revisions **this repository does not contain**: `git cat-file -t` answers |
| 87 | +`fatal: Not a valid object name` for `3d7318c3`, `99148d28`, `e84e9c3f`, `432c38f2` and |
| 88 | +`62db01af` alike. The repository holds one relevant commit, `7fb9add0`, which is the import |
| 89 | +itself. |
| 90 | + |
| 91 | +- **106 of 110 "matched exactly".** Deciding this needs the upstream |
| 92 | + `archive/PoincareConjecture/provenance/2026-09-29/reviewed-files.json` (cited at `e84e9c3f`) |
| 93 | + and the pre-change sources. What can be said from here: the gap between 110 inspected and 110 |
| 94 | + notices in the tree is **0** — the number of notices equals the number of inspected |
| 95 | + adaptations — but 110 ≠ 106, and the report explains the 4 without naming which 4 (two ODE |
| 96 | + sources split into modules, the conjugating-flow adapter, the fundamental-group adapter). I |
| 97 | + cannot map "106 exact + 4 inspected individually" onto specific files without that JSON. |
| 98 | +- **"All 124 edited Lean files" vs 124 rows.** The two do reconcile arithmetically, and I |
| 99 | + verified the mechanism: the 124 rows map to **113** distinct import-time paths, because |
| 100 | + **11** paths are shared by two rows each (113 + 11 = 124). The report's own "repeated |
| 101 | + M05/M07 copies are included" is that phenomenon. But whether the row set *is* the edited-file |
| 102 | + set is a claim about the pre-import diff at `3d7318c3`, which is unavailable. |
| 103 | +- **The token-stream claim** ("identical code token streams", "preserved byte for byte after |
| 104 | + the new ordinary comment header"). Checking it requires the before revision. Not decidable |
| 105 | + here; I did not assume it. |
| 106 | + |
| 107 | +### Wrong here |
| 108 | + |
| 109 | +- **The notice's own pointer is dangling in this tree, 110/110.** Every notice ends |
| 110 | + "Source licenses and notices are retained under |
| 111 | + `PoincareConjecture/provenance/2026-09-29/licenses/`" and "See |
| 112 | + `PoincareConjecture/MODIFICATIONS.md` for the reviewed source mapping." Neither path exists: |
| 113 | + `PoincareConjecture/` holds only `Proofs/` and `Statement.lean`, and the report sits at the |
| 114 | + repository root as `MODIFICATIONS.md`. Locally the licence is `LICENSES/Apache-2.0.txt` |
| 115 | + (201 lines) and the notices are `NOTICE`. So the substance is retained, but **the path each |
| 116 | + of the 110 notices names is wrong for this tree** — a reader following the notice lands |
| 117 | + nowhere. |
| 118 | +- **A file-level count that is 108, not 113.** Of the 113 import-time targets, **5 do not exist |
| 119 | + at that path** and are served by **4** surviving files, because the report's "the local file |
| 120 | + extracts a subset" / "Split into local modules" cases fold several rows into one file: |
| 121 | + |
| 122 | + | row that has no file of its own | the file its source is named in | |
| 123 | + | --- | --- | |
| 124 | + | `…/VariationalMapContDiffOnK/Foundations.lean` | `…/VariationalMapContDiffOnK.lean` (itself a row) | |
| 125 | + | `…/ParametricLinearODE/ParameterDerivative.lean` | `…/ParametricLinearODE.lean` (itself a row) | |
| 126 | + | `…/ParametricLinearODE/Variational.lean` | `…/ParametricLinearODE.lean` (itself a row) | |
| 127 | + | `M64/Mathlib/InteriorCurveTraces.lean` | `Geometry/CurveShortening/…/Interior/CurveTraces.lean` (**not** a row) | |
| 128 | + | `M03/Existence/TimeDependentConjugatingFlowNative.lean` | `Geometry/RicciFlow/…/Flow/TimeDependentConjugatingFlow.lean` (**not** a row) | |
| 129 | + |
| 130 | + The ledger closes: **108** notice files are row targets and **2** are these carriers, total |
| 131 | + 110 — the 2 carriers are exactly the 2 notice files that are not table rows. But read at the |
| 132 | + file level, the tree has **108** files each carrying its own notice for its own row, not 113; |
| 133 | + the remaining 5 rows are attested only inside a shared file. That is a real limit of "one |
| 134 | + notice per edited file", and the report does not say it in those words. |
| 135 | + |
| 136 | +## Two smaller observations, for whoever reads next |
| 137 | + |
| 138 | +- The table has **25 rows whose Modifications cell is not the standard sentence**, and **10 |
| 139 | + rows naming two upstream sources** (the DeGiorgi-through-DifferentialGeometry cases, e.g. |
| 140 | + `TestSpace.lean`). Both are visible in the table and are not discrepancies; I mention them |
| 141 | + only so a second reader is not surprised that the pair set is 113 while the rows are 124 and |
| 142 | + the source mentions are 134. |
| 143 | +- The 5 distinct `Comparison revision` values in the notices match the 5 source revisions |
| 144 | + listed under "Sources" in `MODIFICATIONS.md` — I checked the set, not each file's assignment. |
| 145 | + |
| 146 | +## What this audit does not show |
| 147 | + |
| 148 | +It covers **this one report** and nothing else. It says nothing about upstream issues 43 and 44, |
| 149 | +nothing about the thirteen-theorem list of unit (c), and nothing about whether the *content* of |
| 150 | +the notices is true of the code they sit on — only that the notices are there, that they name |
| 151 | +the sources the table names, and that three of the report's numbers cannot be closed from this |
| 152 | +tree. It also does not verify authorship or licensing sufficiency; it verifies presence, |
| 153 | +correspondence and internal consistency, which is what unit (d) asks. |