Skip to content

wave 12 of 16 - #5018

Merged
phasetr merged 7 commits into
mainfrom
docs/4984-w12-analyticity-headers
Aug 10, 2026
Merged

wave 12 of 16#5018
phasetr merged 7 commits into
mainfrom
docs/4984-w12-analyticity-headers

Conversation

@phasetr

@phasetr phasetr commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Refs #4984

Wave 12 of 16 — AmbientLattice/ Analyticity.lean umbrella + all AnalyticityLambda* children header rewrite

COMPLETE. Scope frozen against main @
93d92b7e77372814d1ac265bf24ba8764c942954 (wave 11 / PR #5016's merge commit); freeze detail:
#4984 (comment).

Final scope (19 files, all under IsingModel/AmbientLattice/)

Analyticity.lean
AnalyticityLambdaBasicIdentities.lean
AnalyticityLambdaCapstones.lean
AnalyticityLambdaEpsilonIff.lean
AnalyticityLambdaJoint.lean
AnalyticityLambdaMagSuscep.lean
AnalyticityLambdaMayer.lean
AnalyticityLambdaMayerIdentity.lean
AnalyticityLambdaMayerPfeEdgeBounds.lean
AnalyticityLambdaMayerRecurrenceEpsilon.lean
AnalyticityLambdaPerDirection.lean
AnalyticityLambdaPfeSharpening.lean
AnalyticityLambdaPolymer.lean
AnalyticityLambdaPolymerBounds.lean
AnalyticityLambdaRegularity.lean
AnalyticityLambdaSandwich.lean
AnalyticityLambdaSection186.lean
AnalyticityLambdaTanhFerroIff.lean
AnalyticityLambdaVdPolymer.lean

git diff --name-only origin/main...docs/4984-w12-analyticity-headers equals exactly these 19
files plus scripts/audit/header_claim_baseline.tsv (the ratchet baseline) — no other path.

metric value (final, re-verified against live --findings at head a2f9f8ea)
files 19
charges cleared 37 (19 NARROW_CHILD + 18 RELOCATION)
declarations 260 (re-derived independently by round-3 review from a fresh full read; the
scaffold's earlier 261 was off by one)
MISSING_MODULE_DOC 0 — 6th consecutive zero-authoring wave
ratchet 235 charges / 163 keys → 198 charges / 126 keys (exact charge count as
pre-registered; keys landed at 126, below the pre-registered ≤144 upper 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-specific
conventions with no analogue in the Concrete/LatticeGraphCorrelation/ waves 1–10. W12 is also in
AmbientLattice/, so these applied directly:

  1. Vocabulary check runs inverted. Nothing in this tree is ℤ^d: files quantify over an
    arbitrary G : SimpleGraph V with {V : Type*} [DecidableEq V].
  2. Every *AlongExhaustion description must state both branches of its dite.
  3. Exhaustion is Monotone, never strictly increasing.
  4. Λ may be overloaded within single filesΛ : Finset V vs Λ : Exhaustion V.
  5. Expect stale citations from past deletion PRs in this tree.

Umbrella-specific note (new to W12, no wave-11 analogue)

Analyticity.lean carries 0 local declarations and 19 of the wave's 37 charges — it is a
pure umbrella whose entire content is claims about its 18 children. All 18 RELOCATION pointers
were 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.

  • Round 1 (.self-local/reports/dev-review-4984-w12-analyticity.md, head 491ff3d5):
    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.
  • Round 2 (.self-local/reports/dev-review-4984-w12-round2.md, head eafba79f): reviewed the
    round-1 fixes with a rigorous git show (blob of the pushed commit) + git log -S pickaxe
    verification 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.lean is 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 their
    statements). F2 was a separate false "nothing here treats a negative activity" claim across 3
    files, contradicted by the two-sided neighbourhood behaviour of AnalyticAt/ContinuousAt at
    the admissible boundary t = 0.
  • Round 3 / final (.self-local/reports/dev-review-4984-w12-round3.md, head a2f9f8ea = PR
    HEAD): 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):

  1. Verification must check the actual pushed git commit (git show/git log -S), never trust
    a 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.
  2. A fix for defect class X can itself introduce a new instance of defect class X — F1 is
    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 against
page-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

  • AC1 (coverage) — PASS. Exactly the 19 frozen files; git diff --name-only shows no other
    path besides the ratchet baseline TSV.
  • AC2 (ratchet) — PASS. --findings 0 charges on all 19 files; --check green at
    198 charges / 126 keys (from 235/163, −37 charges exact); --check-baseline-drift green
    (base = frozen main commit 93d92b7e); --self-test 184 tests OK, instrument unmodified.
  • AC3 (header truth, 100%) — PASS. Every sentence of all 19 touched headers re-derived from
    declarations/proof terms by both reviewers independently across 3 review rounds; the umbrella's
    18 RELOCATION pointers each verified against the live target module (existence + declaration
    count); 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.
  • AC4 (zero Lean logic change) — PASS. Comment-stripped token stream, non-blank comment-stripped
    line list, and per-file import list byte-identical to the frozen main on all 19 files
    (independently re-verified by both round-2 and round-3 review); all non-blank diff lines fall
    inside comment spans.
  • AC5 (gates, zero regressions) — PASS. lake build exit 0 zero warnings/errors (CI build
    7m6s green with warningAsError = true); import_dag_contract.py --check PASS, 0 baseline
    entries; audit_gate.py --full PASS (V1 1922 files, V2 1922 files, V3 13 capstones ⊆
    {propext, Classical.choice, Quot.sound}, V4 1977 tracked files); citation_audit.py PASS —
    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).
  • AC6 (review discipline) — PASS. dev-review + independent Codex reached a clean round with
    zero 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 fix
    across 3 rounds; per-file declaration subtotals reproduced by both reviewers independently.
  • AC7 (falsification rule) — this wave needed 4 rounds (task-level count; 3 distinct review
    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.
  • AC8 (pre-review checklist) — PASS. Predicate noun phrases, binder-level hypothesis scoping
    (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)/vdSum
shorthands) 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.md remains a separate, later lane per the design report; never
bundled with this Lean-lane wave).

phasetr and others added 5 commits August 10, 2026 13:49
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>
phasetr and others added 2 commits August 10, 2026 16:03
 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant