wave 12 of 16 - #5018
Merged
Merged
Conversation
Rewrites the module headers of the four files whose subjects are the Λ-layer definitions themselves — `partitionFunctionΛ`, `freeEnergyΛ`, `correlationΛ`, `magnetizationΛ` and `susceptibilityΛ` — from relocation/enumeration prose to declaration-derived descriptions. Each header now states which regularity forms are present for which observable (joint `AnalyticAt ℝ` / `AnalyticOnNhd ℝ` over `Set.univ`, `Continuous`, `Differentiable ℝ`, and their pointwise counterparts), which of the three parameter regimes a statement belongs to (zero field, arbitrary field, joint in the triple), and the exact binder facts: two instance binders, `DecidableEq V` and `Fintype (inducedGraph G Λ).edgeSet`, and an empty Prop-valued hypothesis list on every declaration in all four files. Comment-only: the comment-stripped token stream, the comment-stripped non-blank line list and the comment-aware import list are byte-identical to `main` on each file. Refs #4984 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rewrites the module headers of the nine files about the §18.4-§18.5 polymer gas read on `inducedGraph G Λ`, replacing relocation/enumeration prose with declaration-derived descriptions. Each header now fixes the notation once — the polymer sum and its empty-family-erased excess have no definition of their own and are written out in full wherever they occur, and `polymerFreeEnergy (inducedGraph G Λ) t` is the logarithm of the former — and then states the mathematics the declarations actually carry: - the sign and zero set of the polymer free energy as a complementary pair on `0 ≤ t` (positive exactly when `0 < t` and a polymer exists, zero exactly when `t = 0` or there is none), together with the matching characterisations of the polymer sum against `1`; - the domain of every analytic statement, all of which lie in the nonnegative activity, with an explicit note that no declaration treats a negative activity in either direction; - the ferromagnetic pair `0 ≤ β`, `0 ≤ J` distinguished from the weaker product condition `0 ≤ β * J`, which the pair implies but which does not imply it; - the five-fold shape of the high-temperature sandwich and the hypothesis that makes the logarithm series converge; - per file, the exact instance-binder pair and the exact set of Prop-valued hypotheses occurring anywhere in it, with the hypothesis-free statements named. Comment-only: the comment-stripped token stream, the comment-stripped non-blank line list and the comment-aware import list are byte-identical to `main` on each file. Refs #4984 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rewrites the module headers of the five files about the §18.5-§18.6 Mayer series and the high-temperature capstones, replacing relocation/enumeration prose with declaration-derived descriptions. Each header now states what the declarations establish rather than how many there are: the recurrence in both directions and the alternating sign of the two lowest-order terms; the regularity of the partial sums and expansion terms, which is unrestricted in the activity because both are finite sums of monomials and `Real.tanh` is real-analytic on all of `ℝ`; the situations in which the Mayer identity holds simultaneously at every order, split into the vanishing-activity family (including the slices obtained by substituting a literal `0` rather than by hypothesis) and the no-polymer family; the closed-form high-temperature expansion of `partitionFunctionΛ` and the resulting free-energy decomposition, with `Λ.Nonempty` identified as what makes the division by `Fintype.card ↑Λ` meaningful; and per file the exact instance-binder pair and the exact set of Prop-valued hypotheses occurring in it. Comment-only: the comment-stripped token stream, the comment-stripped non-blank line list and the comment-aware import list are byte-identical to `main` on each file. Refs #4984 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…e 12) `IsingModel/AmbientLattice/Analyticity.lean` holds no definition, theorem or instance of its own; its entire previous content was eighteen `Moved:` blocks, each asserting a declaration count for one child module. Those blocks are removed and the module header now describes the file's actual role: an aggregation point whose imports serve re-export alone, so that a single import brings the Λ-layer analyticity development into scope, plus an orientation to the two kinds of subject the imports develop — the Λ-layer definitions that unfold to their base-layer counterparts at `inducedGraph G Λ`, and the polymer operators that have no Λ-layer definition and are applied to `inducedGraph G Λ` directly. The eighteen removed pointers were each checked against the live tree before removal: every named child module exists and carries exactly the declaration count the pointer claimed, so nothing true was discarded, only something that a future split would falsify. Re-pins `scripts/audit/header_claim_baseline.tsv` from 235 charges / 163 keys to 198 charges / 126 keys — the pre-registered −37 exact (19 `NARROW_CHILD` + 18 `RELOCATION`), with `--check-baseline-drift` green against the frozen base commit. `MISSING_MODULE_DOC` stays at 30 repo-wide: this wave authored no new header, only rewrote existing ones. Comment-only: the comment-stripped token stream, the comment-stripped non-blank line list and the comment-aware import list are byte-identical to `main`. Refs #4984 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
wave 12) Round-1 review (dev-review + codex, both CHANGES REQUESTED) found five Med and three Low false statements in the wave-12 Analyticity headers. Comment-only change; every declaration, statement and proof is untouched. - AnalyticityLambdaPolymer: the abbreviation citation named `..._minus_one`, a stem this file never uses; its four epsilon-abbreviating names use `eps`. - Seven files claimed both polymer sums are "written out in every/each statement". Measured per file, that universal fails almost everywhere (EpsilonIff 16/16, Sandwich 10/10, BasicIdentities 16/17, MayerIdentity 15/19, Polymer 14/16, Capstones 10/11, MayerRecurrenceEpsilon 5/12); each now states what its statements actually carry. VdPolymer, where the universal does hold (0/14), is left as it was. - AnalyticityLambdaMayerIdentity: `beta * J = 0` is not a no-polymer condition, so the disjunctive hypothesis no longer sits in the no-polymer family, and the "bare and tanh, every activity" scope is restricted to the two hypotheses that carry both forms -- `mayer_identity_of_trivial` is tanh-only. - AnalyticityLambdaVdPolymer: "at least `1` only once `0 <= t`" asserted a necessity that `polymerFreeEnergy_eq_zero_of_edgeFinset_empty` refutes at every real activity; reworded to "throughout `0 <= t`" as in the sibling Regularity header. - AnalyticityLambdaMayerRecurrenceEpsilon: `polymerFreeEnergy` is by definition the logarithm of the full polymer sum; `sum = 1 + eps` is a theorem about the two sums, not part of the definition. - AnalyticityLambdaRegularity: cardinality idiom "the remaining two statements" replaced by the role-based form. - Analyticity umbrella: this path re-exports the generic development only; the `latticeGraph` specializations are downstream of its children. - AnalyticityLambdaBasicIdentities: only the polymer sum is abbreviated in the theorem names there, so the plural was dropped. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…#4984 wave 12) Round-2 review (dev-review + Codex, both CHANGES REQUESTED) confirmed all eight round-1 fixes are genuinely present in the pushed commit and found two new defects, both in prose written by the round-1 repair itself. F1 -- `AnalyticityLambdaCapstones`: the M2f replacement asserted that "the free-energy and Mayer statements are phrased through `freeEnergyΛ`, `polymerFreeEnergy`, `mayerPartialSum` and `mayerExpansionTerm`". Measured on the statements rather than the names: `mayerExpansionTerm` occurs in three theorem names and in **no statement** of the file; those three are phrased through `Fintype.piFinset`, `allPolymers` and `polymerSeqIncompatibilityGraph`, which is what the same header's later paragraph already said. The sentence now splits the free-energy statements (`freeEnergyΛ`, plus `polymerFreeEnergy` in the two decomposition identities) from the partial-sum statements (`mayerPartialSum`) and the connectedness-filter identities, and records that `mayerExpansionTerm` appears in names only. The even-subgraph closed form, which fell outside the old sentence's dichotomy entirely, is now named with its own written-out sum. F2 -- `AnalyticityLambdaRegularity`, `AnalyticityLambdaMayerPfeEdgeBounds`, `AnalyticityLambdaVdPolymer` each claimed that nothing there treats a negative activity. That is false: `ContinuousAt`, `DifferentiableAt`, `AnalyticAt`, `HasDerivAt` and `AnalyticOnNhd` (which is `AnalyticAt` at each point of its set) are two-sided neighbourhood statements, and every hypothesis in those files admits the base point `0`, where the polynomial inside the logarithm is `1`. The three paragraphs now say that the hypotheses constrain the base point only, that `ContinuousOn`/`DifferentiableOn` over `Set.Ici 0` are the only genuinely one-sided statements, and that the neighbourhood ones do reach negative activity. Comment-only: comment-stripped token streams and import lists of all 19 files are identical to main (19/19), with anti-vacuity probes on the instrument. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
phasetr
marked this pull request as ready for review
August 10, 2026 08:27
This was referenced Aug 10, 2026
Merged
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 12 of 16 —
AmbientLattice/Analyticity.leanumbrella + allAnalyticityLambda*children header rewriteCOMPLETE. Scope frozen against
main@93d92b7e77372814d1ac265bf24ba8764c942954(wave 11 / PR #5016's merge commit); freeze detail:#4984 (comment).
Final scope (19 files, all under
IsingModel/AmbientLattice/)git diff --name-only origin/main...docs/4984-w12-analyticity-headersequals exactly these 19files plus
scripts/audit/header_claim_baseline.tsv(the ratchet baseline) — no other path.--findingsat heada2f9f8ea)NARROW_CHILD+ 18RELOCATION)MISSING_MODULE_DOC≤144upper bound)AmbientLattice/-specific checklist items — TOP BILLING (carried forward from wave 11, this wave is in the SAME tree)Wave 11 (#5016) was the first campaign wave inside
AmbientLattice/and found 5 tree-specificconventions with no analogue in the
Concrete/LatticeGraphCorrelation/waves 1–10. W12 is also inAmbientLattice/, so these applied directly:arbitrary
G : SimpleGraph Vwith{V : Type*} [DecidableEq V].*AlongExhaustiondescription must state both branches of itsdite.ExhaustionisMonotone, never strictly increasing.Λmay be overloaded within single files —Λ : Finset VvsΛ : Exhaustion V.Umbrella-specific note (new to W12, no wave-11 analogue)
Analyticity.leancarries 0 local declarations and 19 of the wave's 37 charges — it is apure umbrella whose entire content is claims about its 18 children. All 18
RELOCATIONpointerswere verified against the live target module (existence + declaration count) across all four
review rounds, most recently in round 3's fresh independent re-derivation.
Review process — 4 rounds, final clean APPROVE both sides
This wave is a notable process-methodology case study within the campaign, alongside wave 9.
.self-local/reports/dev-review-4984-w12-analyticity.md, head491ff3d5):dev-review and independent Codex both CHANGES REQUESTED — 5 Med + 3 Low false header
statements, and a genuine process failure: of 4 defects the implementer's own report claimed
to have self-caught and repaired, 3 were never actually written into the tree — the report
described the intended replacement text while the files still carried the original draft. This
was caught only because the reviewer diffed the report's claims against the files themselves
rather than trusting the report.
.self-local/reports/dev-review-4984-w12-round2.md, headeafba79f): reviewed theround-1 fixes with a rigorous
git show(blob of the pushed commit) +git log -Spickaxeverification protocol (never trusting the implementer's table) to confirm every one of the 8
round-1 fixes was genuinely applied in the pushed commit object, not merely claimed — this
protocol change prevented round 1's claimed-but-unapplied failure from recurring. The same round
independently found 2 further genuine math errors (F1, F2): F1 in
AnalyticityLambdaCapstones.leanis the more significant of the two — the round-1 fix (M2f)for a false "written out in each statement" universal itself introduced a new instance of the
same defect class (a new false universal claiming 3 Mayer-filter statements were "phrased
through
mayerExpansionTerm" when the identifier occurs only in their names, not theirstatements). F2 was a separate false "nothing here treats a negative activity" claim across 3
files, contradicted by the two-sided neighbourhood behaviour of
AnalyticAt/ContinuousAtatthe admissible boundary
t = 0..self-local/reports/dev-review-4984-w12-round3.md, heada2f9f8ea= PRHEAD): both F1 and F2 fixed in
.self-local/reports/dev-implement-4984-w12-followup2.md.Round 3 is a fresh independent full re-derivation of all 19 headers' claims from the
declarations by both reviewers (not a check of only the two named fixes) — dev-review
APPROVE, independent Codex APPROVE, zero remaining findings on either side. Both reviewers
confirmed the F1/F2 repairs did not relocate the error elsewhere, which is the specific failure
mode this wave exhibited twice (the original M2f defect, then F1's reintroduction of it).
Campaign-methodology lessons this wave produced (recorded here and on the completion comment
on #4984):
git show/git log -S), never trusta report's self-description of what it repaired — round 1's 3 claimed-but-unapplied fixes were
real, and only round 2's pickaxe protocol caught and prevented recurrence of that failure mode.
exactly this: the fix for "false universal about statement phrasing" (M2f) shipped a new false
universal about statement phrasing. Fixes need the same independent scrutiny as original
content, not just self-testing.
Standing pre-review checklist (waves 1–11, unchanged)
Technical noun phrase resolved against a repo
def; binder-level hypothesis scoping;bare-cardinality idioms; same-file
/--↔/-!consistency; citations verified againstpage-scoped PDF extraction, never flat OCR nor another repo copy; PR-body raw-HTML self-check; AC5
evidence inline with real numbers; blanket-disclaimer and anaphoric-reference precision; wave 6's
per-item scope-qualifier check on files carrying 2+ regime/layer tokens; wave 7's
exclusivity-claims-about-instance-binders check; wave 9's zero/nonzero mathematical
characterization check and no-negative-provenance-claims check; wave 10a/10b's
self-test-the-verification-instrument-adversarially-first methodology.
Acceptance criteria — final status
git diff --name-onlyshows no otherpath besides the ratchet baseline TSV.
--findings0 charges on all 19 files;--checkgreen at198 charges / 126 keys (from 235/163, −37 charges exact);
--check-baseline-driftgreen(base = frozen
maincommit93d92b7e);--self-test184 tests OK, instrument unmodified.declarations/proof terms by both reviewers independently across 3 review rounds; the umbrella's
18
RELOCATIONpointers each verified against the live target module (existence + declarationcount); zero/nonzero characterization and no-negative-provenance checks clean; instance-binder
exclusivity claims checked against actual binder lists; round 3 found zero remaining false
claims.
line list, and per-file import list byte-identical to the frozen
mainon all 19 files(independently re-verified by both round-2 and round-3 review); all non-blank diff lines fall
inside comment spans.
lake buildexit 0 zero warnings/errors (CIbuild7m6s green with
warningAsError = true);import_dag_contract.py --checkPASS, 0 baselineentries;
audit_gate.py --fullPASS (V1 1922 files, V2 1922 files, V3 13 capstones ⊆{propext, Classical.choice, Quot.sound}, V4 1977 tracked files);
citation_audit.pyPASS —findings 694, self-refs 112, ratchet
37 cleared, 0 new(no citation moved);grep -rn "sorry" IsingModel/= 0; 0 Japanese in the 19 files; widest added line 93 codepoints (0 lines over 100).dev-review+ independent Codex reached a clean round withzero findings both sides at round 3 (
.self-local/reports/dev-review-4984-w12-round3.md,Codex raw log
.self-local/reports/codex-4984-w12-round3.log); full re-review after every fixacross 3 rounds; per-file declaration subtotals reproduced by both reviewers independently.
passes), tied with wave 9 for the most in the campaign so far. Per AC7, the next wave (W13)
reverts to the largest declaration count smaller than 260, of the same work type (pure
rewording), that has closed at ≤3 rounds under full attestation — recorded as a pending
next-wave-sizing input, not actioned in this PR.
(kernel telescope == source binder list for all 260 declarations), cardinality-idiom sweep,
same-file
/--↔/-!consistency, page-scoped citation verification, no raw HTML in this body,AC5 evidence filled with real numbers, all 5
AmbientLattice/-specific items above.Errata filed, not fixed in-wave
#5019 (declaration-doc defects: provenance markers, unbalanced
**,pFE/ε(t)/vdSumshorthands) and #5020 (4 alpha-identical declaration pairs) — both out of this wave's frozen
scope, filed for future triage.
Docs/tex lane
Untouched by this PR (
docs/index.mdremains a separate, later lane per the design report; neverbundled with this Lean-lane wave).