wave 10a of 16 - #5009
Merged
Merged
Conversation
Scaffold commit for wave 10; scope frozen in the issue comment, no file edits yet. Refs #4984
This was referenced Aug 9, 2026
Merged
Rewrite the 8 `SpecialCases/MayerVdRegularity*` module headers to intension-only prose: what each module states about continuity, differentiability and the derivative of the Mayer partial sum, the Mayer expansion term and the vertex-disjoint compatible polymer-family sum, in the activity and in `β`/`J`. Counted claims, declaration-name enumerations, `## Moved:` blocks, in-header provenance and `.lean` path references are dropped rather than renumbered. Comment-only: the comment-stripped, whitespace-normalized token stream of every file is byte-identical to `2b9cd775`. Refs #4984 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rewrite the 10 `SpecialCases/Mayer{EpsilonInfrastructure,ExpansionEdgeCases,
FilterConnected,RecurrenceHasSum}*` module headers to intension-only prose: the sign of
the order-1 and order-2 Mayer terms, the reduced polymer-family sum `ε` at and near zero
activity, the order-2 and truncation-order-2 closed forms, the triangle-inequality bound,
the connected-sequence sub-finset at small order, and the Mayer recurrence together with
the alternating logarithmic series for `polymerFreeEnergy`. Counted claims, declaration
enumerations, `## Moved:` blocks, in-header provenance and `.lean` path references are
dropped rather than renumbered.
Comment-only: the comment-stripped, whitespace-normalized token stream of every file is
byte-identical to `2b9cd775`.
Refs #4984
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rewrite the 6 `SpecialCases/Mayer{EdgeCases,StrictPositivity,TanhFerromagneticIff,
TrivialCases,VdBounds,VdIff}` module headers to intension-only prose: the Mayer identity
at the zero-activity slices and on stage subgraphs with no polymer or no edge, the bounds
and equivalences for the vertex-disjoint compatible polymer-family sum `Ξ` and its reduced
form `ε`, and the strict positivity / strict monotonicity available once a polymer exists.
Every vanishing and non-vanishing claim is a restatement of the pinned theorem, hypotheses
included. Counted claims, declaration enumerations, `## Moved:` blocks, in-header
provenance and `.lean` path references are dropped rather than renumbered.
Comment-only: the comment-stripped, whitespace-normalized token stream of every file is
byte-identical to `2b9cd775`.
Refs #4984
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…4984) Rewrite the 8 `SpecialCases/HighTemperatureBoundsExpansion*` module headers to intension-only prose: the general-field product and subset expansions of the partition function, the `Real.cosh` two-sided bounds and closed forms for `Z`, `log Z` and `f` at zero field, the trivial-slice values `Z = 2 ^ |Λ|`, and the lower-le-upper consistency statements (whose `omit [DecidableEq V]` is now disclosed instead of contradicted). `HighTemperatureBoundsExpansion.lean` carries no declaration of its own and now says so. Counted claims, declaration enumerations, `## Moved:` blocks, in-header provenance and `.lean` path references are dropped rather than renumbered. Comment-only: the comment-stripped, whitespace-normalized token stream of every file is byte-identical to `2b9cd775`. Refs #4984 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rewrite the 7 `SpecialCases/HighTemperatureBoundsExpSharper*` module headers to intension-only prose: the exponential upper bounds on `Z`, `log Z` and `f` at zero field, their two-sided `Real.cosh`-to-`Real.exp` sandwich forms, and the packaged free-energy summaries that add the trivial-slice values `f = Real.log 2`. Hypothesis sets are stated per statement, so the `0 ≤ J` / `0 < β` variants no longer read as an unqualified "ferromagnetic" label. Counted claims, declaration enumerations, `## Moved:` blocks, in-header provenance and `.lean` path references are dropped rather than renumbered. Comment-only: the comment-stripped, whitespace-normalized token stream of every file is byte-identical to `2b9cd775`. Refs #4984 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rewrite the 7 `SpecialCases/HighTemperatureBoundsDeviation*` module headers to intension-only prose: how far `f` and `log Z` at zero field may sit above `Real.log 2` and `|Λ| * Real.log 2`, the quantitative continuity of `f` in `J` and in `β`, and the strict forms of both once `0 < β * J` and the stage subgraph has an edge. Each header states its own hypothesis set, including the `0 < |Λ|` that only some of the statements take. Counted claims, declaration enumerations, `## Moved:` blocks, in-header provenance and `.lean` path references are dropped rather than renumbered. Comment-only: the comment-stripped, whitespace-normalized token stream of every file is byte-identical to `2b9cd775`. Refs #4984 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rewrite the 12 `SpecialCases/HighTemperatureBounds{Ratio*,TripleRatio}` module headers to
intension-only prose: the two-sided and upper bounds on the zero-field partition-function
ratio and on the `log Z` / `f` differences against each trivial slice, and the packaged
triple form that carries all three at once. Each header names the ratio or difference it
is about and the hypothesis set of its statements. The header of
`HighTemperatureBoundsRatioLogFeNonemptyZ` now states that statement's hypotheses exactly
(`0 < β * J`, `0 < |E|`), which is what exposed the duplicate filed as #5011.
Counted claims, declaration enumerations, `## Moved:` / `## Removed:` blocks, in-header
provenance and `.lean` path references are dropped rather than renumbered.
Comment-only: the comment-stripped, whitespace-normalized token stream of every file is
byte-identical to `2b9cd775`.
Refs #4984
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
#4984) Rewrite the 8 `SpecialCases/HighTemperatureBounds{Correlation*,DecayCapstones*}` module headers to intension-only prose: the elementary and trivial-slice values of the zero-field one- and two-site correlations along an exhaustion, the single-edge lower bound and strict positivity across an edge, and the exponential distance decay at an arbitrary admissible rate and at the named `highTempExpRate`. The headers now separate the along-exhaustion correlations at ambient sites from the finite-volume correlations at stage sites, and say where the `correlationAlongExhaustion` default value `0` carries a bound. Counted claims, declaration enumerations, `## Moved:` blocks, in-header provenance and `.lean` path references are dropped rather than renumbered. Comment-only: the comment-stripped, whitespace-normalized token stream of every file is byte-identical to `2b9cd775`. Refs #4984 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…rs (#4984) Rewrite the 8 remaining `SpecialCases/HighTemperature*` module headers to intension-only prose: the cluster-expansion convergence regime `(1 + t) ^ |E| < 2` and its `Real.tanh (β * J)` form, with the squeeze `0 ≤ F ≤ ε ≤ (1 + t) ^ |E| - 1 < 1` and the alternating logarithmic series; the two-sided polymer-family bounds and the strict free-energy bound in that regime; the zero-field free-energy sandwich and the odd-set numerator; and the closed forms writing `Z` and `f` through the polymer sum. Counted claims, declaration enumerations, `## Moved:` blocks, in-header provenance, `.lean` path references and one change-history line comment are dropped rather than renumbered. Comment-only: the comment-stripped, whitespace-normalized token stream of every file is byte-identical to `2b9cd775`. Refs #4984 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The 74 frozen files carried 90 charged rows (32 `NARROW_CHILD`, 58 `RELOCATION`) plus 42 non-authoritative telemetry rows on `main` `7ea1cbdd`; all 132 are gone and none was added elsewhere, so 85 keys fell below their pin. Baseline moves 453 charges / 362 keys -> 363 / 277. `--check` and `--check-baseline-drift` both PASS against `origin/main`. The freeze comment sized this wave at "132 charges"; that figure counts the telemetry rows the ratchet's own report calls non-authoritative. Filed as #5012 rather than silently reconciled here. Refs #4984 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
phasetr
marked this pull request as ready for review
August 9, 2026 23:37
This was referenced Aug 9, 2026
phasetr
added a commit
that referenced
this pull request
Aug 10, 2026
Refs #4984 ## Wave 10b of 16 — `AmbientLattice/SpecialCases/` header rewrite (remaining 9 families) **Split from wave 10** (originally scaffolded as the full 149-file `SpecialCases/` wave in PR #5009 — that exceeded the design report's ≤100-file/wave and came within 1 declaration of the ≤300-declaration/wave guard rails, §3). Split along family boundaries into 10a (`docs/4984-w10-specialcases-headers`, PR #5009, `HighTemperature*`/`Mayer*`) and 10b (this PR, the other 9 families). Neither family is divided between the two sub-waves. Overall campaign wave count stays 16 (this is two PRs replacing one, not a renumbering of waves 11–16). Scope frozen against `main` = `7ea1cbdd5549b566730db46d3192f26fc1468adb` (wave 9 / PR #5006's merge commit, unchanged since the original wave-10 freeze), recorded in the freeze comments: - Original wave-10 freeze (149-file measurement this sub-wave is drawn from): #4984 (comment) - This sub-wave's split freeze (single source of truth for the exact 75-file set — this body does not restate it): #4984 (comment) ### Scope | metric | value | |---|---:| | files | **75** (9 families other than `HighTemperature*`/`Mayer*`) | | charges | **137** | | declarations | **131** | | `MISSING_MODULE_DOC` | **0** (pure rewording) | Per-family subtotals: | family (filename prefix) | files | charges | declarations | |---|---:|---:|---:| | `PolymerFreeEnergy*` | 26 | 49 | 46 | | `PartitionFreeEnergy*` | 15 | 29 | 26 | | `JointRegularity*` | 7 | 13 | 10 | | `Susceptibility*` | 7 | 11 | 11 | | `FreeEnergy*` | 6 | 10 | 12 | | `JointAnalyticity*` | 5 | 10 | 10 | | `PartitionFunction*` | 4 | 8 | 6 | | `VdPolymerFamilies*` | 3 | 5 | 6 | | `InfiniteVolume*` | 2 | 2 | 4 | | **total** | **75** | **137** | **131** | ### Frozen file set (75 files) See the split freeze comment for the full list — not restated here to avoid a second copy that can drift: #4984 (comment) ## Acceptance criteria (AC1–AC8, carried forward from #4984 — all lessons from waves 1–9 apply) - [x] **AC1 — coverage.** Exactly the 75 frozen files, only them; intension-only conversion (R1/R2: counts, exhaustive enumerations, `## Moved:` blocks, in-header PR provenance all removed, not just number-corrected). Cardinality-idiom sweep reported as measured hits with adjudications, never a blanket "0 hits". - `git diff --name-only origin/main...HEAD` = **76** paths: the 75 frozen files (set-differenced against the freeze list, empty both ways) plus `scripts/audit/header_claim_baseline.tsv`, the only non-frozen path. Diffstat 733 insertions(+), 1403 deletions(-). Cardinality-idiom sweep: **0 surviving hits**, one draft hit found and fixed before push. - [x] **AC2 — ratchet.** `--findings` reports 0 charges on all 75 files; `--check` green with baseline ratcheted as a multiset; `--check-baseline-drift` green; `--self-test` green, **instrument unmodified in this PR**. Review on the `--findings` diff, never totals. Any deviation explained in this body, not absorbed silently. Re-derive the `NARROW_CHILD`/ `RELOCATION` class split for this 75-file subset at implementation time (the wave-10 freeze's combined 143/126 covers the full 149, not this sub-wave alone). This sub-wave lands **after** 10a if both are open concurrently — re-verify `--check` PASS on the current baseline before implementing (10a's merge moves the baseline; do not assume it is still at the freeze-time 453/362 figures). - `--check` before: baseline **363 charges / 277 keys**, live 363/277, K0–K4 PASS. - `--check` after: pre-re-pin live **262 / 190** ("87 baseline key(s) now below their pin", informational); after `--baseline` re-pin, **PASS**, live == baseline at **262 charges / 190 keys**, K0–K4 PASS. Movement −101 charges (exactly the 75 files' charged population), −87 keys; telemetry 39 → 3, not pinned. - `--findings` on the 75 files after: **0 rows, charged or telemetry.** - `--check-baseline-drift`: PASS, base `9c21660a` via `origin/main`. `--self-test`: OK, 184 tests, instrument unmodified (`git diff origin/main --stat -- scripts/` = one file, `header_claim_baseline.tsv`, −87 lines). - [x] **AC3 — header truth, 100% of the wave, not a sample.** Every file reviewed against its actual declaration list: identifiers in a statement/proof (not just a name); citation span covers every realized `§x.y`; strength words realized by an actual conclusion head; universal words true of every declaration; hypotheses at binder precision; route verbs match the actual tactic script. - **Zero/nonzero mathematical characterization defect class (wave 9 lesson, mandatory here).** Any header sentence giving a closed-form expression and asserting it vanishes / does not vanish / has a fixed sign states, in order: the closed form itself → the admissible domain of every free parameter under the file's own hypotheses → the exact root set of the expression restricted to that domain → the sign on each remaining sub-interval. Do not check only "the expression" in isolation from the hypothesis-admissible parameter range (wave 9's M1/M2 both failed exactly this way). This sub-wave carries closed-form-heavy families (`PartitionFunctionClosedForms*`) — sweep all zero/nonzero/vanishing/sign claims across the 75 files explicitly, not just the files whose names suggest it. - **No negative provenance claims (wave 9 lesson, N1, mandatory here).** State only what a proof *is* (the positive fact, discharged by exhibiting the proof term or citing the exact upstream lemma it applies). Never state what a proof is *not* derived from, or that some fact does *not* follow from some other route — a negative claim requires exhausting the transitive proof chain, and wave 9 produced a false one on the first attempt. - [x] **AC4 — zero Lean logic change.** Comment-stripped token stream + non-blank comment-stripped line list byte-identical to `main`; comment-aware per-file import-list equality (not `git diff -G'^import'`); every **non-blank** diff line inside a comment span, and every blank-line deletion counted and reported separately — blank lines are invisible to all three facets above, so the criterion states them rather than asserting them away. - `AC4: 75 file(s) compared against origin/main; PASS -- no Lean content changed` (`.self-local/tmp/w10b/ac4_check.py`, `--self-test` OK, 16 checks). Diff line census over the 75 files: **1194 comment lines removed / 705 added; 94 blank lines removed / 0 added, in 35 files, outside any comment span; 0 code-carrying lines touched.** The 94 blank lines are the separators that sat between a deleted `## Moved:` / section block and the following code. Net line movement 583 agrees with `git diff --stat` (1316 − 733 on the 75 Lean files) and with the reviewer's independent classifier. - [x] **AC5 — gates, zero regressions**, evidence filled incrementally as each gate runs (not left as scaffold past the point real output exists): - `lake build`: **exit 0, 4944 jobs, 0 warnings, 0 errors**, 15 min 45 s wall; recompile cone **1096 modules** rebuilt of 4944 jobs. Independently re-run by review: token-identity (AC4) makes a build regression impossible in principle, and CI's `build` job on `4bfc5c9b` is **pass** (26m16s). - `lake exe GKSTest`: **exit 0**, "=== All tests passed ===". - `lake build test.IsingModel.SentinelProps`: **exit 0**, 901 jobs, 0 warnings. - `scripts/audit_gate.py --self-test` then `--full`: **OK, 179 tests (1 skipped)**, then **PASS** — V1 no `axiom` (1922 files), V2 no sorry/admit/native_decide (1922 files), V3 13 capstones all ⊆ {propext, Classical.choice, Quot.sound}, V4 no Japanese (1977 tracked files). Independently re-run by review with the same result. - `scripts/citation_audit.py` (pre-registered expect 0 net movement): **PASS**, findings 694, self-refs 112, ratchet "37 cleared, 0 new" — byte-identical to the pre-edit run. Independently re-run by review with the same result. - `scripts/import_dag_contract.py --check` + `scripts/test_import_dag_contract.py`: **PASS**, 0 baseline entries, unchanged; **OK, 77 tests**. Independently re-run by review with the same result. - `grep -rn "sorry" IsingModel/` = **2 hits, both the phrase "no `sorry`" inside doc comments of files this wave did not touch; 0 in code.** - codepoint line length ≤100 over every touched file: max **94** over every non-`import` line in the 75 files; **2 lines exceed 100**, both pre-existing `import` lines left byte-identical by this PR. Independently re-verified by review with an oracle written from scratch: same 2 lines, same max 94. - all edited prose English only: **0 Japanese codepoints** in the 75 headers, confirmed independently by `audit_gate.py` V4 and by review's own sweep. - [x] **AC6 — review discipline + coverage attestation.** `dev-review` + independent Codex cross-review to a clean round (zero findings both sides); sampling forbidden; full re-review after every fix; `dev-issue-manager` resolution verification before any completion claim. Each reviewer, each round, records: reviewed commit SHA; `H/H` module headers; `D/D` declarations (denominator 131, to be confirmed); `A/A` newly authored headers (denominator 0); **per-family `D/D` subtotals mandatory** — the 9 strata above, no blanket sentence spanning a family boundary unless independently substantiated in each family it touches. - **Round 1** (reviewed commit `4bfc5c9b`): `dev-review`'s own verdict on the Lean content is **APPROVE** — no defect in the diff, in any of the 75 headers, or in any of the 131 declarations, verified against a from-scratch kernel telescope (`lake env lean` + `#check` on all 131) and independent AC4/zero-nonzero/negative-provenance/exclusivity/mixed-layer sweeps. Codex's independent cross-review returned **REQUEST CHANGES** (one BLOCKING on AC4 wording, one MEDIUM on issue #5013's census); `dev-review` reproduced both measurements exactly and **downgraded the BLOCKING finding to LOW (claim-precision, not code)** — nothing about "zero Lean logic change" was violated, only the comparator's PASS message asserted more than the three facets it actually compares (blind to blank-line-only deletions). Coverage attestation: **75/75** module headers, **131/131** declarations, **0/0** newly authored headers, both reviewer and implementer independently. Per-family `D/D` (both sides agree): `PolymerFreeEnergy*` 46/46, `PartitionFreeEnergy*` 26/26, `FreeEnergy*` 12/12, `Susceptibility*` 11/11, `JointRegularity*` 10/10, `JointAnalyticity*` 10/10, `PartitionFunction*` 6/6, `VdPolymerFamilies*` 6/6, `InfiniteVolume*` 4/4. - **F1 (LOW, claim precision)** — fixed without touching Lean: `ac4_check.py`'s message and this body's AC4 criterion corrected to state "every **non-blank** diff line inside a comment span, and every blank-line deletion counted and reported separately"; the census (94 blank / 35 files / 0 code) is now printed and self-tested (16 checks, up from the original set). - **F2 (MED, errata accuracy, outside this PR's files)** — issue #5013's layer census was short by one layer (4 layers/8 declarations, correct figure 5 layers/10 declarations, both reviewer and implementer independently found the same fifth pair); fixed by rewriting #5013's body directly on GitHub (title, table, consumer census, completeness check) and posting a correction comment. No Lean file touched, as #5013 stays out of this wave's scope. - Round 1 is the only round — no second round was required (both findings were claim-layer, fixed without a Lean-content change, and re-verified against the same reviewed commit `4bfc5c9b`). - [x] **AC7 — falsification rule.** ≤3 rounds confirms the size premise at 75 files / 131 declarations for pure rewording (well within the 299-declaration/149-file anchor the un-split wave 10 would have tested); 4+ rounds falls back to the largest declaration count smaller than this one that has actually closed at ≤3 rounds. **New-authoring risk calibration caveat (wave 9 lesson, mandatory to state, not to apply here):** this sub-wave carries **0** authoring files (`MISSING_MODULE_DOC` = 0), so the authoring-risk multiplier does not apply. - **Result: 1 round**, with a minor claim-precision correction (F1) — matches wave 10a's clean-round-1 result on a 9-family, non-uniform-instance-telescope corpus (168/168 declarations shared one instance binder in 10a; here 3 of 131 deviate in three different ways, all found and correctly disclosed before review). The size premise is confirmed at 75 files / 131 declarations. - [x] **AC8 — pre-review checklist over 100% before round 1.** Predicate noun phrases resolved against repo `def`s; binder-level hypothesis scoping by machine telescope for all 131; bare-cardinality idiom sweep (measured, not assumed 0); same-file `/--` ↔ `/-!` consistency; page-scoped citation verification (`pdftotext -f N -l N`, never flat OCR nor another repo copy); per-item scope-qualifier check on any mixed-layer headers; instance-binder census; PR-body raw-HTML self-check; AC5 evidence inline with real numbers, never left `[PENDING]` past the point the gate has actually run. - Predicate noun phrases resolved against repo `def`s (e.g. "vertex-disjoint compatible polymer families" ↔ `vdCompatiblePolymerFamilies`, "polymer set" ↔ `allPolymers`, "bounded edge density" ↔ `BoundedEdgeDensity`). - Binder-level hypothesis scoping by machine telescope for all **131**: 76 declarations have an empty Prop-hypothesis list, 55 have a non-empty one; independently reproduced by review's own `lake env lean` telescope (131 entries, 0 errors), which additionally surveyed the instance list of all 131 (128 share `[DecidableEq V]` + one stagewise `Fintype`; the 3 deviations are exactly the 3 the implementer disclosed, all CONFIRMED). - Bare-cardinality idiom sweep: measured, **0 surviving hits** (implementer, adversarially self-tested regex); review's own wider sweep found 1 hit, adjudicated as the named-objects exception (a hypothesis list of 4 pairwise-distinct indices, "the six inequalities"). - Same-file `/--` ↔ `/-!` consistency: machine probe, **0 flagged**; review independently confirmed all 131 `/--` blocks are byte-identical to `origin/main` (this PR modified no declaration doc). - Page-scoped citation verification: **not applicable** — no produced header carries a literature citation (citations live in the untouched `/--` docs), following wave 10a's established style; this also keeps the wave clear of #4998's `§18.x` mislabelling. - Mixed-layer scope check: 3 instance-mixed files (`FreeEnergy.lean`, `FreeEnergyTrivialSlicesJZero.lean`, `InfiniteVolume.lean`'s `inducedGraph_bot`) each state their per-declaration instance/Prop split rather than a blanket claim; review independently confirmed the `PolymerFreeEnergy*` stage-subgraph vs along-exhaustion distinction with 0 misattributions across all 26 files. - PR-body raw-HTML self-check: none present. - AC5 evidence inline with real numbers: see AC5 above. ## Accumulated lessons carried forward from waves 1–9 (standing checklist) - Waves 1–4: predicate noun phrase must resolve against a repo `def`; binder-level hypothesis scoping; bare-cardinality idioms eliminated semantically, not regex-dodged; same-file `/--` ↔ `/-!` consistency. - Wave 5/6: declaration counts must be **comment-and-attribute-aware** (strip comments, then peel leading `@[...]` attribute groups and modifiers before matching a declaration keyword). AC5 evidence must be filled incrementally as gates actually run, never left as a stale scaffold. - Wave 7/8: per-item scope-qualifier check required on mixed-layer files; freeze-time charge counts can conflate `--findings` **rows** with **charges** — recount and correct in-body if the two diverge. - **Wave 9 — three methodology lessons, carried into AC3/AC7 above:** 1. New-authoring risk calibration is not transferable and does not apply here (0 authoring files). 2. The "zero/nonzero mathematical characterization" defect class: closed form → admissible domain → root set → sign, always in that order. 3. No negative provenance claims — state only positive facts about what a proof *is*. ## What the gates do not guarantee Nothing mechanical in this repository checks header **truth**. The ratchet detects only recognized legacy inventory syntax; `lake build` never reads comment content; `audit_gate` V1–V4 are axiom/sorry/capstone/Japanese only; `citation_audit` has previously been shown insensitive to citation-only diffs; `import_dag_contract` sees no prose. The truth guarantee for this wave rests on the manual read and on the independent review passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #4984
Wave 10a of 16 —
AmbientLattice/SpecialCases/HighTemperature*+Mayer*header rewriteCOMPLETE. Split from wave 10 (was previously scaffolded as the full 149-file
SpecialCases/wave — that exceeded the design report's less-than-or-equal-to 100-file/waveand came within 1 declaration of the less-than-or-equal-to 300-declaration/wave guard rails,
design report section 3). Split along family boundaries into 10a (this PR,
HighTemperature*/Mayer*) and 10b (branchdocs/4984-w10b-specialcases-headers, scaffoldedas PR #5010, the other 9 families, not yet implemented). Neither family is divided between the
two sub-waves. Overall campaign wave count stays 16 (this is two PRs replacing one, not a
renumbering of waves 11-16).
Scope frozen against
main=7ea1cbdd5549b566730db46d3192f26fc1468adb(wave 9 / PR #5006'smerge commit, unchanged since the original wave-10 freeze), recorded in the freeze comments:
Batch-migrate the remaining stale header charges to intension-only prose (PR-3+ wave campaign, 16 waves: all merged; Lean lane at zero, docs lane D1 open/unscoped) #4984 (comment)
does not restate it):
Batch-migrate the remaining stale header charges to intension-only prose (PR-3+ wave campaign, 16 waves: all merged; Lean lane at zero, docs lane D1 open/unscoped) #4984 (comment)
Scope
HighTemperature*50 +Mayer*24)--findingsrows (charged + telemetry)NARROW_CHILD+ 58RELOCATION)MISSING_MODULE_DOCCorrection to the freeze figure (filed as new issue #5012): the freeze recorded "132
charges" for this sub-wave. 132 is the
--findingsrow count, which mixes the ratchet's90 charged rows with 42 rows the ratchet's own report prints under
# TELEMETRY (NON-AUTHORITATIVE) ... NOT part of the population, never pinned. The chargedpopulation is 90, and the ratchet baseline (below) fell by exactly 90. This is a recurrence of
the wave 7/8 lesson already recorded in this PR's own standing checklist ("freeze-time charge
counts can conflate
--findingsrows with charges") — the freeze was written after thatlesson and conflated them anyway, so #5012 exists to fix the freeze procedure rather than
re-deriving the arithmetic by hand every wave.
Per-family subtotals (row counts, with the charged/telemetry split):
--findingsrowsNARROW_CHILDRELOCATIONHighTemperature*Mayer*(allMayer-prefixed variants)Frozen file set (74 files)
See the split freeze comment for the full list — not restated here to avoid a second copy that
can drift: #4984 (comment)
Acceptance criteria (AC1-AC8, carried forward from #4984 — all lessons from waves 1-9 apply)
git diff --name-only 2b9cd775..HEAD= the 74 frozen files exactly,plus
scripts/audit/header_claim_baseline.tsv(75 paths total, machine set-differencedagainst the frozen list; the baseline is the only non-frozen path). Intension-only
conversion applied throughout: counts, exhaustive declaration enumerations,
## Moved:/## Removed:blocks, in-header PR provenance, and.leanpath referenceswere removed, not renumbered. Cardinality-idiom sweep: all draft occurrences of "Both
statements ..." (6 files) rewritten to "Each statement ..."; 0 surviving bare-cardinality
idioms about module inventory ("the two wrappers", "the three lemmas", "N theorems").
Counts of named mathematical objects (two-sided bounds, two named trivial slices) are
retained under the named-objects exception, not counted as defects.
--checkbefore (base7ea1cbdd): baseline 453 charged / 362 keys.--checkafter (headc913cca4): PASS, live == baseline at 363 charged / 277keys, all five conservation laws (K0-K4) PASS.
--findingson the 74 files after: 0 rows, charged or telemetry.--check-baseline-drift: PASS ("the pin moved only where this diff explains it"),base commit
7ea1cbddviaorigin/main.--self-test: OK, 184 tests. Instrument unmodified in this PR (only the baseline TSVchanged,
-85lines, nothing else).the combined wave-10 freeze's 143/126 over the full 149): 32
NARROW_CHILD+ 58RELOCATION= 90 charged, matching the per-family table above exactly.reviewed against its actual declaration list (identifiers, citation spans, strength
words, universal words, binder-precision hypotheses, route verbs).
scanned, not only files whose names suggest a closed-form claim. 26 sites make a
vanishing/non-vanishing/positivity/strict-inequality claim; 25 are verbatim
restatements of the pinned theorem (hypotheses included), 1 is derived and was derived
in full (
MayerEdgeCases: each zero-activity slice reducesReal.tanhapplied to anargument that is exactly
0byzero_mul/mul_zero/the hypothesis, admissible domainis all of
ℝfor the remaining free parameter, so the claim is unconditional on thatdomain rather than a root-set statement). Independently re-derived by dev-review with a
wider regex over all 74 headers: same 26-site set, no site outside it. No header
asserts non-vanishing anywhere (0 hits for
nonzero|non-zero|non-vanish|never,confirmed independently by dev-review).
rather than | not derived | NOT | neither | without | no hypothesis | unrestricted | instead of | as opposed | \bnot\b. 7 found in the first draft, all 7 eliminatedbefore the first commit (e.g. "takes the stage volume's nonemptiness rather than
0 < |Λ|" to "takes the stage volume's nonemptiness as a hypothesis"; "Without ahypothesis on
|Λ|" to "Under0 ≤ Jand0 < βalone"). A self-contradiction wascaught in the same pass and fixed: a draft scope sentence claimed every statement in
...ExpansionLowerUpperConsistencycarriesDecidableEq V, immediately followed by "bothstatements additionally omit the
DecidableEq Vinstance" — both theorems do carryomit [DecidableEq V] in, so the shared sentence was false; replaced with a file-localscope sentence.
grep pattern did not include the word "omit", so it could not have caught — and was
never meant to catch — the one surviving sentence that legitimately uses "omits" as a
positive deviation disclosure ("... and omits
DecidableEq V",HighTemperatureBoundsExpansionLowerUpperConsistency.lean:8, verified true: it is theonly file in the wave with an
omit [DecidableEq V] insite). That sentence iscorrect and required, not a banned negative-provenance claim; the sweep's pattern
description is stated here with that carve-out made explicit, rather than described as
an unqualified "0 hits" that would misleadingly imply the pattern covers all
negative-sounding vocabulary. dev-review's own wider regex (superset, includes
omits?) found exactly this one additional hit and classified it correctly as arequired disclosure, not a defect.
over all 74 files:
file, aborts on any difference — 74/74 passed.
scratch (comment-stripped byte-exact non-comment lines with indentation preserved, not
the implementer's whitespace-collapsed token stream): 0 differences, all 74 files.
git diff -G'^import'): 196 importlines across the 74 files, order included, 0 files changed — confirmed independently
by dev-review.
Every diff hunk lies inside a comment span.
git diff --check: clean.lake build: exit 0,Build completed successfully (4944 jobs), wall 5:45. Zerowarnings (
grep -inE "warning|error|sorry"over the full log: 0 hits). Recompile cone:173 modules (74 edited + 99 downstream) = 9.0% of the 1916 tracked
IsingModelmodules, predicted from the import graph before building and confirmed after (173
Builtlines).lake exe GKSTest: exit 0, all tests passed.lake build test.IsingModel.SentinelProps: exit 0, 901 jobs, no warnings.scripts/audit_gate.py --self-test: OK, 179 tests (1 skipped).--full: PASS (V1 0axiomdecls / 1922 files; V2 0 sorry/admit/native_decide / 1922 files; V3 13 capstones,union
{Classical.choice, Quot.sound, propext}; V4 0 Japanese / 1977 tracked files).scripts/citation_audit.py: PASS, byte-identical before/after (verified against adetached
git worktreeat2b9cd775):citations 2693 -> 2827 (+134); ratchet: OK -- 37 finding(s) cleared, 0 new. Zero net movement caused by this wave (inherited branchstate).
scripts/import_dag_contract.py --check: PASS, 0 baseline entries, unchanged.scripts/test_import_dag_contract.py: OK, 77 tests. No import line added, removed, ormoved (
git diff -G'^import'andgit diff -U0 | grep '^[+-]import 'both empty).grep -rn "sorry" IsingModel/: 2 hits, both the literal words "nosorry" insidepre-existing doc comments outside this wave's files, both present verbatim on
main.audit_gate.pyV2 (the authoritative check) distinguishes these and is PASS.(
HighTemperatureBoundsRatioLogFeFreeEnergyBoundOnly.lean:2, a 101-codepointimportline), byte-identical to
2b9cd775and pre-existing/unbreakable, accepted bylake buildunder the repo's linter settings. Every line the implementer authored is <=92codepoints.
audit_gate.pyV4 and by an independent Unicode-class grepover the 74 files.
c913cca4:(
HighTemperature*85/85,Mayer*83/83, both independently machine-counted). A/A =0/0 (no newly authored headers,
MISSING_MODULE_DOC= 0). ~40/74 files read in fulldepth (header + every statement); the remaining 34 covered by machine sweeps
(hypothesis-disclosure coverage over all 74, identifier existence over 31 backticked
candidates, instance-binder census over all 168, layer partition over 8 mixed-layer
files, AC4). 3 LOW findings, all report/PR-body layer, none in code or headers (the 3
corrections applied in this body). No High, no Medium.
files read in depth. Report:
.self-local/tmp/codex-w10a-out.txt..self-local/reports/dev-review-4984-w10a.md.dev-issue-managerresolution verification: confirmed before this completion claim (nounresolved findings; the 3 LOW findings are report-accuracy corrections applied in this
body, not code defects requiring further code rounds).
reach a clean round from both reviewers on the first pass. Confirms the size premise at
74 files / 168 declarations for pure rewording. New-authoring risk calibration
caveat (wave 9 lesson, stated per AC7's requirement, not promoted further): this
sub-wave carries 0 authoring files (
MISSING_MODULE_DOC= 0), so the authoring-riskmultiplier does not apply here — see the calibration note below for why this round-1
result should not yet be read as confirming the broader "generative constraints
prevent defects" methodology claim.
resolved against repo
defs (polymerFreeEnergy,mayerPartialSum,mayerExpansionTerm,vdCompatiblePolymerFamilies,allPolymers,evenSubgraphs,ursellCoefficient,clusterSeqActivity,highTempExpRate,inducedGraph,Exhaustion,freeEnergyAlongExhaustion,partitionFunctionAlongExhaustion,correlationAlongExhaustion). Binder-level hypothesis scoping by machine telescope forall 168 declarations. Bare-cardinality idiom sweep: measured (see AC1). Same-file
/--<->/-!consistency: no new header contradicts a declaration doc comment in itsown file (two pre-existing
/--defects found and filed as Errata: a verbatim-duplicate_pow_two_lt_of_nonemptywrapper that takes no nonemptiness hypothesis, plus its doc comment (wave 10a scope) #5011 rather than fixed,since fixing them would be a deletion/rename AC4 forbids in a pure-rewording wave).
Instance-binder census: all 168 declarations take
[∀ n, Fintype (inducedGraph G (Λ.volume n)).edgeSet](0 exceptions), all 74 filescarry
variable {V : Type*} [DecidableEq V], the singleomit [DecidableEq V]site isdisclosed in that file's own header. Mixed-layer scope: the 8 along-exhaustion-vs-Λ
correlation files are split explicitly (0 misattributions, independently confirmed by
dev-review). PR-body raw-HTML self-check: performed on this body before submission (no
literal angle brackets, including inside inline code, per the wave 9 CI-trap lesson).
Exclusivity claims enumeration: 5 (not 4 — corrected from the implementer's
report):
HighTemperatureBounds("takes only the stage indexn, the site setA,and the hypothesis
Odd A.card");...Deviation("under0 ≤ β * Jalone");...DeviationFerro("under0 ≤ Jand0 < βalone");...RatioLogFeNonemptyZ("theProp-valued hypotheses are exactly
0 < β * Jand0 < |E|" — this disclosure is whatexposed errata Errata: a verbatim-duplicate
_pow_two_lt_of_nonemptywrapper that takes no nonemptiness hypothesis, plus its doc comment (wave 10a scope) #5011); and the 5th, found independently by dev-review and missing fromthe implementer's original count,
HighTemperatureBoundsExpansion("This modulestates nothing of its own" — verified: 0 comment-aware declarations, imports exactly
the two named modules, 18 modules import it). AC5 evidence filled inline above with
real numbers throughout, never left
[PENDING].Accumulated lessons carried forward from waves 1-9 (standing checklist)
def; binder-level hypothesisscoping; bare-cardinality idioms eliminated semantically, not regex-dodged; same-file
/--<->
/-!consistency.filled incrementally as gates actually run, never left as a stale scaffold.
counts can conflate
--findingsrows with charges — recount and correct in-body if the twodiverge (recurred again this wave, see the scope-table correction above and Errata: #4984's per-wave "charges" figure counts the ratchet's non-authoritative TELEMETRY rows (wave 10a frozen at 132; the charged population was 90) #5012).
characterization defect class (closed form -> admissible domain -> root set -> sign, in
that order); no negative provenance claims.
constraints. The one genuinely new defect surfaced this wave (Errata: a verbatim-duplicate
_pow_two_lt_of_nonemptywrapper that takes no nonemptiness hypothesis, plus its doc comment (wave 10a scope) #5011, a verbatim-duplicatedeclaration with a misleading name) was not caught by either wave-9 prohibition sweep. It
fell out of the exclusivity-disclosure discipline (forcing enumeration of the full
hypothesis telescope), not out of a "do not say X" rule. See the calibration note below.
Calibration note (do not promote to a confirmed methodology finding yet)
This wave applied wave 9's zero/nonzero and negative-provenance lessons proactively and
closed at round 1 with zero code findings from both independent reviewers — the first wave
since wave 5 to do so. dev-review explicitly cautions this should not yet be promoted to a
confirmed campaign methodology finding ("generative pre-push constraints prevent defects
better than reactive review-round corrections"), for two compounding reasons specific to this
wave:
MISSING_MODULE_DOC. This wave contains no new-authoring activity at all — everyone of the 74 files already had a header to rewrite. Waves 8/9's defects were generated
specifically while authoring prose for modules that had none; that defect-generating
activity is simply absent here, not prevented.
pattern, all 74/74 files share one
variableline, and nearly every statement is a thinpass-through to a
Λ-level lemma — the easiest possible case for "restate the pinnedstatement, do not derive."
Because content difficulty moved in the easy direction between wave 9 and wave 10a, "fewer
defects" is confounded with "easier content," not isolated as an effect of the generative
constraints alone. The true test of whether generative constraints prevent defects is a
future wave that does include
MISSING_MODULE_DOC(new-authoring) content; thisdetermination is explicitly deferred until re-tested on such a wave.
What the gates do not guarantee
Nothing mechanical in this repository checks header truth. The ratchet detects only
recognized legacy inventory syntax;
lake buildnever reads comment content;audit_gateV1-V4 are axiom/sorry/capstone/Japanese only;
citation_audithas previously been showninsensitive to citation-only diffs;
import_dag_contractsees no prose. The truth guaranteefor this wave rests on the manual read (~40/74 files read in full depth by dev-review, 27 by
Codex) and the machine coverage sweeps over all 74 (hypothesis disclosure, identifier
existence, instance binder, layer partition, AC4).
Also filed (not fixed in this wave, by design)
_pow_two_lt_of_nonemptywrapper that takes no nonemptiness hypothesis, plus its doc comment (wave 10a scope) #5011 —partitionFunctionAlongExhaustion_high_temp_expansion_h_zero_pow_two_lt_of_nonemptyis a verbatim duplicate of
..._pow_two_lt(identical binder telescope, identicalconclusion, body forwards every argument); its
_of_nonemptysuffix names a hypothesis itdoes not take. Confirmed independently by dev-review. Pre-existing, a deletion AC4 forbids
in this wave.
the freeze procedure rather than re-correcting the arithmetic by hand every wave.
Deliberate non-actions
SpecialCases/— outside the freeze.GJ §18.xmislabel markers in this family's/--declaration doc comments(162 total occurrences across 115 lines existed on these 74 files before this wave; all
header-side (
/-!) occurrences are gone; the 18 remaining are all inside/--declarationdoc comments, outside this campaign's
/-!scope — they belong to Errata: 373 tracked occurrences (over 363 lines) cite the section-18 programme marker as "GJ §18.x", but Glimm-Jaffe Chapter 18 is the continuum cluster expansion; the lattice anchor is Friedli-Velenik §3.7.3 (3.45)/(3.46), pp. 116-117 #4998's ledger, nottouched here).
_pow_two_lt_of_nonemptywrapper that takes no nonemptiness hypothesis, plus its doc comment (wave 10a scope) #5011's duplicate declaration — a deletion, which AC4 forbids in this wave./-! ### ... -/inside module bodies were removed (matching wave 9):every one was written in the retired "along-ex wraps" inventory vocabulary, so leaving them
would have left each file internally inconsistent with its own new header.