Skip to content

refactor: delete 10 zero-consumer Mayer/vd-polymer wrapper modules (safe-to-delete batch 3) - #4751

Merged
phasetr merged 3 commits into
mainfrom
refactor/safe-to-delete-batch3
Jul 28, 2026
Merged

refactor: delete 10 zero-consumer Mayer/vd-polymer wrapper modules (safe-to-delete batch 3)#4751
phasetr merged 3 commits into
mainfrom
refactor/safe-to-delete-batch3

Conversation

@phasetr

@phasetr phasetr commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

Deletes ten ℤ^d thin-wrapper modules under
IsingModel/Concrete/LatticeGraphCorrelation/39 theorems, 724 lines — whose
declarations have no consumer anywhere in the repository, and retracts in the same
commit the eight survival-count claims in docs/index.md and tex/proof-guide.tex
that the deletion would otherwise falsify.

The 39 declarations form the ℤ^d layer of eight GJ §18.4–18.5 wrapper families
(Mayer expansion term, vdPolymerFamilies_sum, log_vdPolymerFamilies_sum, the
Mayer identity and polymerFreeEnergy_eq_mayerPartialSum edge-case slices, and the
generic-t bound family), so this is one logical layer rather than a set of
unrelated lemmas.

Deleted modules

module thm
MayerAnalyticityTanhExpansionTerm.lean 4
MayerEdgeCasesAlongExIdentity.lean 4
MayerEdgeCasesLambdaPolymer.lean 4
MayerVdBoundsAlongExNonneg.lean 4
MayerVdRegularityExpansionTerm.lean 4
MayerVdRegularityPolymer.lean 3
MayerVdRegularityPolymerTanh.lean 4
MayerVdRegularityTanhExpansionTermAlongEx.lean 4
MayerVdRegularityTanhExpansionTermLambda.lean 4
VdPolymerFamiliesAnalyticityLog.lean 4

Two umbrella modules (Umbrella/MagnetizationAndMayer.lean,
Umbrella/TwoPointUniform.lean) drop the ten import lines; eight surviving sibling
modules have their Moved: doc-comment blocks corrected.

Documentation retraction

docs/index.md (8 sentences) and tex/proof-guide.tex (8 \paragraph blocks) each
claimed these families sit at "all 4 volume layers". Both were re-measured on this
branch with a line-spanning-aware declaration extractor — a ^theorem <name> grep
misses the 615 declarations in this repository whose name sits on a later line — and
rewritten to the measured survival counts:

family historical surviving deleted surviving layers
#1582 mayerExpansionTerm regularity 16 12 4 Λ 4, AlongEx 4, ℤ^d Λ 2, ℤ^d AlongEx 2
#1584 mayerExpansionTerm tanh β/J 24 12 12 Λ 6, AlongEx 6
#1585 vdPolymerFamilies_sum regularity 16 13 3 Λ 4, AlongEx 4, ℤ^d Λ 1, ℤ^d AlongEx 4
#1586 vdPolymerFamilies_sum tanh β/J 24 20 4 Λ 6, AlongEx 6, ℤ^d Λ 2, ℤ^d AlongEx 6
#1587 log_vdPolymerFamilies_sum analyticity 16 12 4 Λ 4, AlongEx 4, ℤ^d AlongEx 4
#1588 mayer_identity_at_* 16 12 4 Λ 4, AlongEx 4, ℤ^d Λ 4
#1589 polymerFreeEnergy_eq_mayerPartialSum_at_* 16 12 4 Λ 4, AlongEx 4, ℤ^d AlongEx 4
#1596 vdPolymerFamilies_sum generic-t bounds 16 12 4 Λ 4, AlongEx 4, ℤ^d Λ 4

Two independent consistency checks hold: surviving + deleted equals the historical
per-PR total in every row, and the deleted column sums to 39, which equals the
whole-tree declaration delta (10832 → 10793). The ten modules therefore account for
every removal, and the historical "PR #N added M wrappers" sentences are correct as
they stand — only the survival counts move.

The retraction text names families by label (mayer_identity_at_*) rather than
spelling out deleted declarations, and cites no deleted module path, so it adds no
dangling citation. Every module path it does cite was checked to exist.

Gates (all measured on this branch)

gate result
lake build exit 0, 5015 jobs (5025 before, matching the ten deletions), 0 warnings, 0 errors
#print axioms unchanged; observed union {propext, Classical.choice, Quot.sound}
grep -rn "sorry" IsingModel/ 0 tactic occurrences (2 hits are prose in doc comments)
citation_audit.py PASS, ratchet 0 cleared / 0 new, 960 gating findings, coverage OK
dead_candidate_scan.py --self-test 100 tests OK; fixtures PASS (18 rows)
python3 -m unittest scripts.test_audit_gate 166 tests OK (1 skipped)
lake exe GKSTest === All tests passed ===
Japanese in docs/index.md / tex/proof-guide.tex 0

Final cross-check, re-scanning the 39 names against the pre-deletion library
overlaid with this commit's retracted docs/tex
: safe-to-delete 39/39, with
published-result, load-bearing and uncertain all 0 and 0 coverage
warnings
; both scanner canaries PASS. This is the check that would catch a
retraction sentence accidentally citing a declaration that is being removed.

The three Markdown backtick-parity warnings at docs/index.md:1200/1201/1809 predate
this branch and are unchanged.

Ratchet

iter_checked_files() 2003 → 1993 and iter_lib_files() 1996 → 1986, against floors
1957 / 1950, leaving slack 36. Module counts under both pathspec conventions:
IsingModel/*.lean 1996 → 1986 (the full count) and IsingModel/**/*.lean 1957 →
1947 (the undercount that drops the 39 depth-1 modules).

Four visited-list assertions in scripts/test_audit_gate.py — three in
ScanExecutionTest, one in V4ScanTest — carried a bare 2000
literal that the named floors did not describe, so iter_checked_files() at 1993
trips it — this surfaced only when the deletion was applied. The literal gives way to
the named floors, with a new V4_FILE_FLOOR = 1977 calibrated 46 below the measured
iter_v4_files() = 2023, the same offset the two existing floors use.

Slack narrows to 36 with this batch, so a per-directory assertion or a floor
recalibration is worth a look before the slack absorbs further batches.

Build-time effect

Per-module process cost was measured at 2.144 s wall / 2.156 s CPU (warm cache,
10 modules × 2 passes, minus the lake env wrapper), giving ≈21.6 s CPU for the
ten modules. The wall figure is a serial extrapolation, not a parallel measurement; a
warm-cache full build differs only by trace replay, so the saving shows up in clean
and CI builds.

Scope note

The two homonym basenames that also exist under AmbientLattice/SpecialCases/
(MayerVdRegularityExpansionTerm.lean, VdPolymerFamiliesAnalyticityLog.lean) are
untouched, as is the ambient import at
VdPolymerFamiliesAnalyticityLogAlongEx.lean. No file under AmbientLattice/ is
modified.

Part of the safe-to-delete sweep tracked in #4746, following batches 1 (#4747) and
2 (#4749).

Review follow-up (commit 3f77b982)

Two review findings, both about prose that named the wrong thing. No Lean source is
touched by this commit.

Survival-location module names (tex/proof-guide.tex). Six wrapper-family
paragraphs pointed readers at modules that do not hold the declarations they claim.
Each name below is the module that a scan of every theorem/lemma head under
IsingModel/ puts the surviving declarations in (the scan reads the name off the
next line when the head wraps, which a single-line grep misses):

Family Claimed Measured
#1589 ℤ^d Concrete/LatticeGraphCorrelation/MayerEdgeCases.lean Concrete/LatticeGraphCorrelation/MayerEdgeCasesAlongExPolymer.lean
#1588 ℤ^d Concrete/LatticeGraphCorrelation/MayerEdgeCases.lean Concrete/LatticeGraphCorrelation/MayerEdgeCasesLambda.lean
#1587 along-ex AmbientLattice/SpecialCases/VdPolymerFamiliesAnalyticity.lean, Concrete/…/VdPolymerFamiliesAnalyticity.lean AmbientLattice/SpecialCases/VdPolymerFamiliesAnalyticityLog.lean (+ …LogTanh.lean), Concrete/…/VdPolymerFamiliesAnalyticityLogAlongEx.lean
#1586 Cont./Diff. AmbientLattice/SpecialCases/MayerVdRegularity.lean, Concrete/…/MayerVdRegularity.lean AmbientLattice/SpecialCases/MayerVdRegularityVdPolymerTanh.lean (+ …TanhDifferentiable.lean), Concrete/…/MayerVdRegularityPolymerTanhAlongEx.lean
#1586 AnalyticAt VdPolymerFamiliesAnalyticity.lean (both sides) VdPolymerFamiliesAnalyticityTanh.lean (both sides)
#1585 Cont./Diff./HasDerivAt AmbientLattice/SpecialCases/MayerVdRegularity.lean, Concrete/…/MayerVdRegularity.lean AmbientLattice/SpecialCases/MayerVdRegularityVdPolymer.lean (+ …VdPolymerHasDerivAt.lean), Concrete/…/MayerVdRegularityPolymerAlongEx.lean
#1582 Cont./Diff. AmbientLattice/SpecialCases/MayerVdRegularity.lean AmbientLattice/SpecialCases/MayerVdRegularityExpansionTerm.lean (+ MayerVdRegularityDifferentiableExpansionTerm.lean)
#1582 ℤ^d analytic Concrete/LatticeGraphCorrelation/MayerAnalyticity.lean Concrete/LatticeGraphCorrelation/MayerAnalyticityExpansionTerm.lean

Concrete/LatticeGraphCorrelation/MayerEdgeCases.lean carries zero declarations after
this batch, so the first two rows pointed at an empty signpost module.

docs/index.md was not already right either, contrary to the premise the review
worked from: its #1582 ℤ^d analytic name, its #1586 AnalyticAt names and its #1587
along-exhaustion name were the same stale names, and its #1585/#1586
"MayerVdRegularity.lean cluster" phrasing named no member of that cluster. Those
five spots move to the measured modules, so docs and tex now say the same thing.

Stale comment (scripts/test_audit_gate.py). The comment above V4_FILE_FLOOR
said the bare 2000 literal had sat at "three sites" in ScanExecutionTest and
V4JapaneseTest. It sat at four — three in ScanExecutionTest, one in
V4ScanTest — and V4JapaneseTest is not a class in this file. Comment only; the
code and the floor values are unchanged.

Verification of this commit.

  • citation_audit.py: PASS, 960 gating findings, ratchet 0 cleared / 0 new, coverage
    OK. The per-target citation census moves 1216 → 1217 (tex) and 2693 → 2700 (docs),
    because one generic module name gives way to the two or three exact ones; the census
    is a deletion budget and gates only downwards, and every added path resolves.
  • python3 -m unittest scripts.test_audit_gate: 166 tests OK (1 skipped).
  • dead_candidate_scan.py --self-test: 100 tests OK.
  • No Japanese in tex/proof-guide.tex, docs/index.md or the edited script.

Left alone, and why. Three survival-location claims outside the six reviewed
paragraphs remain stale and are unchanged here, since correcting them means asserting
provenance this commit did not measure: #1582's Λ-layer sentence points at
IsingModel/AmbientLattice/Analyticity.lean while mayerExpansionTerm_Λ_* sit in
AnalyticityLambdaMayer.lean (created by #1983); the #1587 paragraph opens with a
sentence naming Analyticity.lean and Concrete/LatticeGraphCorrelation.lean that
its own next sentence contradicts; and the #1581/#1583/#1584 paragraphs use the
same bare MayerVdRegularity.lean shorthand.

Independent audit (dev-audit-tier1, re-measured on 3f77b982)

Every number in the tables above was re-run in a throw-away worktree with a
cloned build cache, and two corrections were folded into this message.

  • lake build: exit 0, 5015 jobs, grep -ic warning = 0, grep -ic error = 0.
    The pre-deletion tree at b09535cd builds 5025 jobs in the same setup, so the
    delta is exactly the ten modules.
  • grep -rn "sorry" IsingModel/: 2 prose hits, not 4 (the table above said 4);
    both are doc-comment sentences and are identical on b09535cd. No tactic occurrence.
    native_decide: 1 prose hit. admit: prose only. Zero axiom declarations.
  • #print axioms on four capstones (mayer_identity_at_zero_Λ_latticeGraph,
    mayerExpansionTerm_Λ_latticeGraph_analyticAt,
    log_vdPolymerFamilies_sumAlongExhaustion_latticeGraph_analyticAt,
    exists_cubicMayerClusterFreeEnergyComplex_limit):
    [propext, Classical.choice, Quot.sound] only.
  • citation_audit.py: PASS, 960 gating findings, ratchet 0 cleared / 0 new, coverage
    OK, census 1216 -> 1217 (tex) and 2693 -> 2700 (docs).
  • dead_candidate_scan.py --self-test: 100 tests OK.
    python3 -m unittest scripts.test_audit_gate: 166 tests OK (1 skipped).
    lake exe GKSTest: all tests passed.
  • Deletion-safety, re-derived independently: the ten modules hold 39 declarations;
    at b09535cd none of the 39 names occurs anywhere outside those ten files
    (IsingModel/, docs/, tex/, scripts/, test/), and at 3f77b982 none occurs
    at all. Re-scanning the 39 against the pre-deletion library overlaid with this
    commit's docs/tex reproduces safe-to-delete 39, published-result 0,
    load-bearing 0, uncertain 0, coverage warnings 0, both canaries PASS.
  • dead_candidate_scan.py --lean (requirement (i) of [refactor] tier2 2026-07-27 technical-debt lane: safe-to-delete module deletion (A), Lemma_17_5_2 providers (B), lakefile warningAsError (C, done), tex lexicon PR-A (D), scanner fail-open (F) #4746 Item A, not reported in
    the body above) was run against a green pre-deletion build: 39 candidates compared
    against the elaborated graph; no consumer seen by Lean was missed on a
    safe-to-delete verdict
    .
  • Ratchet re-measured: iter_checked_files() 2003 -> 1993, iter_lib_files()
    1996 -> 1986, v4_visited 2033 -> 2023, against floors 1957 / 1950 / 1977
    (slack 36 / 36 / 46).
  • Scope: no file under AmbientLattice/ is touched; both homonym basenames survive
    and are still imported; docs/index.md and tex/proof-guide.tex retain no
    Concrete/LatticeGraphCorrelation/ citation of any deleted module; no
    Lemma_17_5_2 path is touched ([refactor] tier2 2026-07-27 technical-debt lane: safe-to-delete module deletion (A), Lemma_17_5_2 providers (B), lakefile warningAsError (C, done), tex lexicon PR-A (D), scanner fail-open (F) #4746 Item B stays USER-DECISION); no Japanese,
    no added declaration, no long line, no credential-shaped string in the diff.
  • Informational: the scanner's cascade list shows 30 ambient/abstract declarations
    that become reference-0 as a consequence of this batch (16 in
    AmbientLattice/SpecialCases/, 8 in AnalyticityLambdaMayer.lean, 6 abstract GJ
    Sec 18 statements in ClusterExpansion/MayerCore/Terms.lean). They are correctly
    left in place here; recorded on [refactor] tier2 2026-07-27 technical-debt lane: safe-to-delete module deletion (A), Lemma_17_5_2 providers (B), lakefile warningAsError (C, done), tex lexicon PR-A (D), scanner fail-open (F) #4746 so a later batch does not cascade into
    book content.

🤖 Generated with Claude Code

phasetr and others added 3 commits July 28, 2026 10:38
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…afe-to-delete batch 3)

Deletes ten Z^d thin-wrapper modules under
IsingModel/Concrete/LatticeGraphCorrelation/ (39 theorems, 724 lines) whose
declarations have no consumer anywhere in the repository, and retracts the
eight survival-count claims in docs/index.md and tex/proof-guide.tex that the
deletion would otherwise falsify.

Measured on this branch:

* 39 declarations removed; the whole-tree declaration count moves
  10832 -> 10793, so these ten modules account for every removal.
* For each of the eight wrapper families, surviving + deleted equals the
  historical per-PR total, so the historical "PR #N added M wrappers"
  sentences stay as they are and only the survival counts change:
  #1582 16 = 12 + 4, #1584 24 = 12 + 12, #1585 16 = 13 + 3,
  #1586 24 = 20 + 4, #1587 16 = 12 + 4, #1588 16 = 12 + 4,
  #1589 16 = 12 + 4, #1596 16 = 12 + 4.
* lake build: exit 0, 5015 jobs (5025 before), 0 warnings, 0 errors.
* audit_gate.py --full: PASS; the observed axiom union stays
  {propext, Classical.choice, Quot.sound}.
* citation_audit.py: PASS, ratchet 0 cleared / 0 new, 960 gating findings.
* dead_candidate_scan.py --self-test: 100 tests OK; fixtures PASS (18 rows).
* lake exe GKSTest: all tests passed.
* Re-scanning the 39 names against the pre-deletion library overlaid with the
  retracted docs/tex keeps all 39 at safe-to-delete, with published-result,
  load-bearing and uncertain at 0 and no coverage warning.

scripts/test_audit_gate.py carried a bare 2000 literal at three visited-list
assertions, which the named floors did not describe: iter_checked_files()
moves 2003 -> 1993 and trips it. The literal gives way to the named floors,
with a new V4_FILE_FLOOR = 1977 calibrated 46 below the measured
iter_v4_files() = 2023, the same offset the two existing floors use.

The two homonym basenames under AmbientLattice/SpecialCases/ are untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…test comment

Review found the survival-location module names in tex/proof-guide.tex naming
modules that do not hold the declarations they claim, and a stale comment in
scripts/test_audit_gate.py.  No Lean source is touched.

Measured on this branch by scanning every theorem/lemma head under IsingModel/
(the scanner reads the name off the next line when the head wraps, which a
plain single-line grep misses):

* #1589 Z^d survivors are polymerFreeEnergyAlongExhaustion_latticeGraph_eq_
  mayerPartialSum_at_{zero,betaJ_zero,beta_zero,J_zero} in
  Concrete/LatticeGraphCorrelation/MayerEdgeCasesAlongExPolymer.lean, not
  MayerEdgeCases.lean.
* #1588 Z^d survivors are mayer_identity_at_*_Lambda_latticeGraph in
  Concrete/LatticeGraphCorrelation/MayerEdgeCasesLambda.lean, not
  MayerEdgeCases.lean.
* #1587 along-exhaustion survivors are in
  AmbientLattice/SpecialCases/VdPolymerFamiliesAnalyticityLog.lean (tanh pair in
  VdPolymerFamiliesAnalyticityLogTanh.lean) and
  Concrete/LatticeGraphCorrelation/VdPolymerFamiliesAnalyticityLogAlongEx.lean.
* #1586 Continuous/Differentiable survivors are in
  MayerVdRegularityVdPolymerTanh.lean,
  MayerVdRegularityVdPolymerTanhDifferentiable.lean and
  Concrete/.../MayerVdRegularityPolymerTanhAlongEx.lean; its AnalyticAt
  survivors are in VdPolymerFamiliesAnalyticityTanh.lean on both sides.
* #1585 Continuous/Differentiable/HasDerivAt survivors are in
  MayerVdRegularityVdPolymer.lean, MayerVdRegularityVdPolymerHasDerivAt.lean and
  Concrete/.../MayerVdRegularityPolymerAlongEx.lean.
* #1582 Continuous/Differentiable survivors are in
  MayerVdRegularityExpansionTerm.lean and
  MayerVdRegularityDifferentiableExpansionTerm.lean; its Z^d analytic survivors
  are in Concrete/LatticeGraphCorrelation/MayerAnalyticityExpansionTerm.lean.

Concrete/LatticeGraphCorrelation/MayerEdgeCases.lean carries zero declarations
after this batch, so the two sentences pointing readers there were unresolvable.

docs/index.md was not already correct either: its #1582 Z^d analytic name, its
#1586 AnalyticAt names and its #1587 along-exhaustion name were the same stale
names, and its #1585/#1586 "MayerVdRegularity.lean cluster" phrasing named no
member.  Those five spots move to the measured modules so docs and tex agree.

scripts/test_audit_gate.py: the comment above V4_FILE_FLOOR said the bare 2000
literal had sat at "three sites" in ScanExecutionTest and V4JapaneseTest.  The
literal sat at four sites -- three in ScanExecutionTest, one in V4ScanTest --
and V4JapaneseTest is not a class in this file.  Comment only; the code and the
floors are unchanged.

Verification: citation_audit.py PASS, 960 gating findings, ratchet 0 cleared /
0 new, coverage OK; the per-target citation census moves 1216 -> 1217 (tex) and
2693 -> 2700 (docs) because one generic module name is replaced by the two or
three exact ones, which the census gates only downwards.
python3 -m unittest scripts.test_audit_gate: 166 tests OK (1 skipped).
dead_candidate_scan.py --self-test: 100 tests OK.
No Japanese in tex/proof-guide.tex, docs/index.md or the edited script.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@phasetr
phasetr marked this pull request as ready for review July 28, 2026 06:21
@phasetr
phasetr merged commit 051aa85 into main Jul 28, 2026
1 check passed
@phasetr
phasetr deleted the refactor/safe-to-delete-batch3 branch July 28, 2026 06:21
phasetr added a commit that referenced this pull request Jul 28, 2026
…ck decision point (#4752)

## Summary

Records #4746 Item A batch 3 (PR #4751, main `051aa857`) in the local issue mirror.
`.self-local/issues/4746.md` only; no Lean source, no `docs/`, no `tex/`, no
`scripts/` file is touched, so no library gate can move.

## What the entry records

* The ten deleted modules (724 lines / 39 declarations), the ten dropped import lines,
  and the `Moved:` doc-block corrections in eight surviving siblings.
* Condition (ii): the eight survival-count retractions in `docs/index.md` and
  `tex/proof-guide.tex`, plus the eight stale survival-*location* module names the
  follow-up commit corrected, and the three that were deliberately left alone.
* Condition (i): `--lean` was **not** reported in the PR body, so the tier-1 audit ran it
  against a green pre-deletion build — *no consumer seen by Lean was missed on a
  safe-to-delete verdict*.
* Gates re-run on the merged main: `lake build` 5,015 jobs / 0 warning / 0 error
  (5,025 before, difference exactly ten), `citation_audit.py` PASS with 960 gating
  findings and ratchet 0/0, `dead_candidate_scan.py --self-test` 100 OK,
  `test_audit_gate.py` 166 OK, `lake exe GKSTest` pass, `#print axioms` std-3 only.
* The one PR-body number that was wrong (`grep -rn "sorry" IsingModel/` claimed 4 prose
  hits, actual 2) and its correction in the squash message.

## Two findings carried into the mirror

**The recorded Item A denominator no longer reconciles.** Subtracting batches 1-3 from
the recorded 64 leaves 39, but a full-tree sweep on the merged main reports 205
fully-dead modules excluding `Lemma_17_5_2` (231 on the pre-merge main), and
recomputing the same quantity from the tier-2 report's own stored verdicts gives 178
against a recorded 75. The rule behind the recorded figure is not recoverable from the
stored data, so the denominator should be re-derived and written down before batch 4 is
scoped.

**F1 is now due rather than deferrable.** Measured slack after batch 3 is 36 / 36 / 46
against `CHECKED_FILE_FLOOR` / `LIB_FILE_FLOOR` / the new `V4_FILE_FLOOR`; one more
ten-module batch takes it to 26 / 26 / 36 and two more exhaust the named floors.

Also carries a cascade warning: 30 declarations became reference-0 as a consequence of
batch 3, six of them abstract GJ §18 statements in
`IsingModel/ClusterExpansion/MayerCore/Terms.lean`, which a later batch must not sweep.

Part of the mirror upkeep for #4746.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
phasetr added a commit that referenced this pull request Jul 28, 2026
…h 4)

Deletes the nine fully-dead modules of issue #4746 Item A batch 4: 31
declarations, 712 lines, all of them zero-consumer thin Z^d Lambda-layer or
along-exhaustion wrappers.

  Concrete/LatticeGraphCorrelation/
    PartitionFreeEnergyBoundsAlongExBridges.lean            (4 decls,  78 lines)
    PartitionFreeEnergyMonotonicityFreeEnergyAlongEx.lean   (3 decls,  56 lines)
    PartitionFreeEnergyRegularity.lean                      (4 decls,  87 lines)
    PartitionFunctionGeneralAnalyticity.lean                (5 decls,  83 lines)
    PartitionFunctionSymmetryCubicAbsH.lean                 (2 decls,  42 lines)
    MagnetizationCorrelationBasic.lean                      (4 decls,  72 lines)
    MayerFilterConnected.lean                               (4 decls,  96 lines)
    MayerVdBounds.lean                                      (3 decls,  81 lines)
  PseudoMass/FromParamsHZero/JZeroJointRegularity.lean      (2 decls, 117 lines)

The batch is the union of the three cascade-0 groups of the 32 lane-eligible
fully-dead modules, so no declaration anywhere else loses its last consumer.

Library wiring: 8 import lines drop from Umbrella/PartitionAndPerStage.lean (5)
and Umbrella/MagnetizationAndMayer.lean (3). Deleting JZeroJointRegularity.lean
would leave PseudoMass/FromParamsHZero.lean an empty umbrella and break its only
consumer (FromParamsBounds/LogBounds.lean, which reached Mathlib through that one
line), so the umbrella is repointed at JZeroHRegularity, which the deleted module
itself imported. The public import surface is unchanged.

Documentation retraction, in the same commit because the build never reads docs:

* docs/index.md: 4 module-directory bullets removed; the nested-brace family
  label at the free-energy monotonicity row split so it no longer names the 3
  deleted members; the BddAbove_freeEnergyAlongExhaustion_latticeGraph* family
  label dropped (it lost every member); 4 wrapper-count claims re-measured
  (PR #1595 12 -> 9, PR #1610 20 -> 15, PR #1611 24 -> 20, PR #1613 20 -> 16).
* tex/proof-guide.tex: the same 4 counts, plus the 4 "now live in" sentences that
  named the deleted child modules.
* 11 in-library module doc comments that pointed at the deleted modules.

The PR #1611 and PR #1613 count claims are retractions the batch-4 design did not
list; they were found by measuring every layer of each affected wrapper family
rather than by trusting the scanner, which cannot see prose counts.

Script recalibration:

* scripts/test_dead_candidate_scan.py: the ferromagnetic family pin moves
  SAFE 47 -> 46 and UNCERTAIN 77 -> 78 (one declaration moves away from
  safe-to-delete, the safe direction), and three docs/index.md line pins shift
  by the 8 removed bullet lines.
* scripts/test_audit_gate.py: the floors are NOT lowered. The comment blocks are
  corrected: they recorded 2003/1996 as "measured", which were the counts from
  before PR #4751's deletion, making the derived "46 below" false. Measured now:
  1984 / 1977 / 2014 against floors 1957 / 1950 / 1977.
* scripts/audit/citation_baseline.tsv: 4 rows hand-moved from AMBIGUOUS to
  BASENAME_ONLY. Deleting one of two files sharing a basename makes the tex
  citation resolve uniquely, which is a class change and not new erosion; the
  gating finding total is unchanged at 960.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
phasetr added a commit that referenced this pull request Jul 28, 2026
…e fresh-measurement comment

The comment block rewritten for this batch claims to be measured on this
branch, but it carried the previous block's `Concrete` (869) figure
unchanged. Re-measured on this commit: the eight largest library
directories are Concrete 851, AmbientLattice 275, ClusterExpansion 205,
TransferMatrix 109, Peierls 105, AmbientComplexAnalyticity 76,
Inequalities 71, Conditioning 48. 869 was the count from before PR #4751
deleted its ten modules (859 at fd7a2a7, 851 here).

The block's claim still holds after the correction: with
iter_checked_files() = 1984 against CHECKED_FILE_FLOOR = 1957, losing the
smallest of those eight (Conditioning, 48) drops the count to 1936 and
trips the floor.

Comment only; no test or floor changes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
phasetr added a commit that referenced this pull request Jul 28, 2026
…/Mayer and J = 0 pseudo-mass wrapper modules (safe-to-delete batch 4) (#4754)

Part of #4746 (Item A, batch 4).

Deletes the nine fully-dead modules of batch 4 — **31 declarations, 712 lines** —
and retracts every documentation claim that counted them. The batch is the union
of the three cascade-0 groups of the 32 lane-eligible fully-dead modules, so no
declaration anywhere else in the library loses its last consumer.

Measured on `fd7a2a71` (`git ls-remote origin main` at branch time) in a
throw-away worktree with an APFS-cloned warm `.lake`.

## What was deleted

| module | decls | lines |
|---|---|---|
| `Concrete/LatticeGraphCorrelation/PartitionFreeEnergyBoundsAlongExBridges.lean` | 4 | 78 |
| `Concrete/LatticeGraphCorrelation/PartitionFreeEnergyMonotonicityFreeEnergyAlongEx.lean` | 3 | 56 |
| `Concrete/LatticeGraphCorrelation/PartitionFreeEnergyRegularity.lean` | 4 | 87 |
| `Concrete/LatticeGraphCorrelation/PartitionFunctionGeneralAnalyticity.lean` | 5 | 83 |
| `Concrete/LatticeGraphCorrelation/PartitionFunctionSymmetryCubicAbsH.lean` | 2 | 42 |
| `Concrete/LatticeGraphCorrelation/MagnetizationCorrelationBasic.lean` | 4 | 72 |
| `Concrete/LatticeGraphCorrelation/MayerFilterConnected.lean` | 4 | 96 |
| `Concrete/LatticeGraphCorrelation/MayerVdBounds.lean` | 3 | 81 |
| `PseudoMass/FromParamsHZero/JZeroJointRegularity.lean` | 2 | 117 |
| **total** | **31** | **712** |

The line total is 712, not the 721 the batch-4 design recorded: the design's
per-file figures are each one higher than `wc -l`, and `git diff --stat` charges
712 deletions.

Build jobs go 5015 → 5006. **No build-time claim is made.** Own elaboration cost
of these modules is at or below the per-module import-only baseline (issue #4724),
so the wall-clock effect is not measurable and none is asserted.

## Declaration-level double confirmation

The 31 declarations were re-extracted independently of the design, with a
line-folding-aware extractor (a same-line `^theorem NAME` regex silently misses
every wrapped declaration, and did so on a first pass here). All 31 names **and
their line numbers** reproduce the design's appendix exactly.

A boundary-aware reference check over **every tracked file** (not only
`IsingModel/`, `docs/`, `tex/`) found **0** genuine references. The four raw
`git grep` hits are all prefix collisions with surviving siblings, and none is a
reference to a deleted declaration:

| raw hit | why it is not a reference |
|---|---|
| `PartitionFreeEnergyBoundsFeAlongExId.lean:46` | `…_nonneg_of_ferromagnetic` — different identifier |
| `PartitionFunctionSymmetryLog.lean:63,64`, `PartitionFunctionSymmetryLogCubic.lean:29,39` | `log_…` prefix — different identifiers |
| `PolymerFreeEnergyEpsilonSharpening.lean:31` | `…_minus_one_pow_at_zero` — different identifier |

## Requirement (i): `--lean` cross-check

`python3 scripts/dead_candidate_scan.py <31 names> --lean`, run against the green
pre-deletion build (scanner blob `7f47c6bd`, unmodified), exit 0:

```
--lean cross-check: 31 candidate(s) compared against the elaborated graph;
no consumer seen by Lean was missed on a safe-to-delete verdict
canary: 1021 declarations carrying 'Λ'x1018, 'β'x1, 'σ'x2 each find themselves: PASS
canary: 10162 code citations in tex/proof-guide.tex, none broken across a line: PASS

-- published-result: 0 --   -- load-bearing: 0 --
-- uncertain: 0 --          -- safe-to-delete: 31 --
-- coverage warnings: 0 --
```

Every one of the 31 carries the reason *"no reference outside the delete set, no
citation in the scanned documentation"*.

## Requirement (v): the two sweeps

Both sweeps run the full-library scan (`--pattern '.'`, 10,868 scanned
declarations) on the **pre-deletion library**, changing only the documentation.

| sweep | docs/tex | safe-to-delete | delete set |
|---|---|---|---|
| 1 | pre-deletion | 1127 | 31/31 safe |
| 2 | this commit's | 1123 | 31/31 safe |

**Condition (v) assertion: 0 violations.** No declaration outside the delete set
moves toward `safe-to-delete`. All seven verdict moves are in the protective
direction, and they are quoted rather than summarised:

```
safe-to-delete -> published-result  freeEnergyAlongExhaustion_latticeGraph_cubicExhaustion_monotone_J
safe-to-delete -> published-result  freeEnergyAlongExhaustion_latticeGraph_cubicExhaustion_monotone_beta
safe-to-delete -> published-result  freeEnergyAlongExhaustion_latticeGraph_cubicExhaustion_monotone_h
uncertain      -> published-result  freeEnergyAlongExhaustion_latticeGraph_cubicExhaustion_upper_bound
uncertain      -> published-result  freeEnergyAlongExhaustion_latticeGraph_upper_bound
uncertain      -> published-result  mayerPartialSum_Λ_latticeGraph_analyticOnNhd
safe-to-delete -> uncertain         mayerPartialSum_Λ_latticeGraph_differentiable
```

The first three are the point of the surgical brace split: replacing the nested
brace by two exact labels turns a citation the scanner could not resolve into
citations it can. The 29 declarations the design predicted could be stranded by a
careless line rewrite are all still `published-result`.

An **independent fail-closed re-expansion** of every backticked token in
`docs/index.md` and every `\texttt{}`/`\path{}` token in `tex/proof-guide.tex`
(recursive brace expansion, `*` as zero-or-more, cross-checked against a
folding-aware index of all 10,963 library declarations) confirms the design's
result and adds nothing: of every family token that covers at least one deleted
name, **exactly one loses all of its members** —
`` `BddAbove_freeEnergyAlongExhaustion_latticeGraph*` `` at `docs/index.md`, which
this PR drops. Every other covering token keeps survivors (e.g.
`` `correlation_*_latticeGraph` `` 19 members → 17, `` `freeEnergyAlongExhaustion_latticeGraph_*` `` 103 → 98).

## Documentation retraction

Prose *counts* are invisible to the scanner, so each affected wrapper family was
measured layer by layer instead. **Two of the four count retractions below were
not in the batch-4 design** and were found by that measurement.

| site | before | after | in design? |
|---|---|---|---|
| `docs/index.md` PR #1595 / `tex` §18.5 | `12 new thin wrappers (3 abstracts × 4 layers)` | `12 … ; the three ℤ^d Λ-layer wrappers had no consumers and were deleted in PR #4754, leaving 9 across three layers` | yes |
| `docs/index.md` PR #1610 / `tex` §18.6 | `20 thin wrappers (5 abstracts × 4 layers)` | `20 … leaving 15 across three layers` | yes |
| `docs/index.md` PR #1611 / `tex` §18.6 | `24 thin wrappers (8 abstracts × 3 missing layers)` | `24 … leaving 20 across the remaining layers` | **no** |
| `docs/index.md` PR #1613 / `tex` §18.5 | `20 thin wrappers (5 abstracts × 4 layers)` | `20 … leaving 16` | **no** |

PR #1613 loses 4 and not 5 because the ℤ^d Λ-layer
`mayerPartialSum_Λ_latticeGraph_analyticOnNhd` lives in another module and
survives; the retraction says so.

Family labels and module lists:

| site | before | after |
|---|---|---|
| `docs/index.md` module-directory bullets | 4 bullets naming the deleted concrete modules | removed (8 lines) |
| `docs/index.md` §4.6 monotonicity row | `` `freeEnergyAlongExhaustion_latticeGraph{,_cubicExhaustion}_{upper_bound,monotone_{J,h,beta}}` `` (8 members, 3 deleted) | `` `…latticeGraph{,_cubicExhaustion}_upper_bound` `` + `` `…latticeGraph_cubicExhaustion_monotone_{J,h,beta}` `` |
| `docs/index.md` §4.6 bounds row | `` , and `BddAbove_freeEnergyAlongExhaustion_latticeGraph*` now live in `PartitionFreeEnergyBounds.lean` `` (2 members, both deleted) | token dropped; location claim widened to `` `PartitionFreeEnergyBounds.lean` and its child modules `` |
| `tex` ×4 "now live in …" sentences | claimed the deleted ℤ^d Λ-layer children among the surviving ones | each names the surviving children and records the ℤ^d Λ-layer deletion |

`docs/index.md:1411` (`` `correlation_*_latticeGraph` ``, 17 of 19 survive) and
`docs/index.md:1983` are deliberately left alone, as the design determined.

The retraction sentences describe the removed wrappers **by layer, never by
name**. A first draft named them, and sweep 2 caught it immediately: 11 of the 31
flipped to `published-result` because the retraction itself had become a citation
of a declaration about to stop existing.

**12 in-library module doc comments** that pointed at the deleted modules were
corrected in the same commit: four parent-module "Moved:"/"Removed:" sections
(`Magnetization.lean:66`, `PartitionFreeEnergyBounds.lean:102`,
`PartitionFreeEnergyMonotonicity.lean:46` and `PartitionFunctionSymmetry.lean:75`)
and eight "extracted from `X.lean`" provenance notes. Five of those eight were the basename trap: a
same-named module survives under `AmbientLattice/SpecialCases/`, so the reference
would silently re-resolve to the wrong file instead of dangling. This closure was
not enumerated by the design.

## Ratchet and floor recalibration

`scripts/test_dead_candidate_scan.py`

* `test_ferromagnetic_family_counts`: `SAFE 47 → 46`, `UNCERTAIN 77 → 78`;
  `LOAD_BEARING` (64), `PUBLISHED` (35), the 223 total and
  `test_zero_consumer_count` (112) are unchanged. Exactly one declaration moves,
  and it moves *away* from `safe-to-delete`:
  `freeEnergyAlongExhaustion_latticeGraph_nonneg_of_ferromagnetic`
  `safe-to-delete → uncertain`, because the deleted sibling was the other member
  of the `nonneg*` component of its family label. The docstring records the
  mechanism.
* Three `docs/index.md` line pins (`1200/1201/1809 → 1192/1193/1801`) shift by the
  8 removed bullet lines. Same three rows, different numbers.

`scripts/test_audit_gate.py` — **the floors are not lowered.**

| counter | `fd7a2a71` | this PR | floor | slack |
|---|---|---|---|---|
| `iter_checked_files()` | 1993 | 1984 | `CHECKED_FILE_FLOOR` 1957 | 27 |
| `iter_lib_files()` | 1986 | 1977 | `LIB_FILE_FLOOR` 1950 | 27 |
| `iter_v4_files()` | 2023 | 2014 | `V4_FILE_FLOOR` 1977 | 37 |

The comment block claimed *"Measured 2026-07-27 … `iter_checked_files()` = 2003
and `iter_lib_files()` = 1996 … The floors sit 46 below the measured counts"*.
Both halves were wrong: 2003/1996 were the counts from *before* PR #4751 deleted
its ten modules, so on `fd7a2a71` the real gap was 36, not 46. The block is
rewritten against the fresh measurement, and it now records the standing
decision that **the next batch that would actually trip a floor must land F1
(per-directory assertions) rather than another recalibration.**

A follow-up commit fixes one figure the rewritten block had carried over unchanged:
the largest library directory is `Concrete` **851**, not 869. 869 predates PR #4751's
ten-module deletion (859 at `fd7a2a71`). Re-measured on this branch, the eight largest
are `Concrete` 851, `AmbientLattice` 275, `ClusterExpansion` 205, `TransferMatrix` 109,
`Peierls` 105, `AmbientComplexAnalyticity` 76, `Inequalities` 71, `Conditioning` 48 —
so the block's claim survives the correction: losing the smallest of the eight takes
`iter_checked_files()` from 1984 to 1936, below `CHECKED_FILE_FLOOR` 1957.

`scripts/audit/citation_baseline.tsv` — 4 rows hand-moved from `AMBIGUOUS` to
`BASENAME_ONLY` (`MayerFilterConnected.lean`, `MayerVdBounds.lean` ×2,
`PartitionFreeEnergyRegularity.lean`, `PartitionFunctionGeneralAnalyticity.lean`).
Deleting one of two files that share a basename makes the tex citation resolve
uniquely, which is a class change, not erosion: **gating findings stay at 960**.
`--update-baseline` refuses a row that rises and directs the change to a hand
edit so the diff shows it, which is what this is.

## Verification, all re-measured here

| gate | result |
|---|---|
| `lake build` | exit 0, **5006 jobs**, build text grepped: 0 `warning`, 0 `error` (the 2 `info:` `ring` notes are present on `fd7a2a71` too) |
| `scripts/audit_gate.py` | PASS — V1 no `axiom` (1984 files), V2 no sorry/admit/native_decide (1984 files), V3 13 capstones all `{propext, Classical.choice, Quot.sound}`, V4 no Japanese (2014 files) |
| `grep -rn "sorry" IsingModel/` | 2 hits, both prose inside doc comments, same as `fd7a2a71` |
| `lake exe GKSTest` | all tests passed |
| `scripts/citation_audit.py` | PASS — 960 gating findings (unchanged), coverage OK, ratchet **0 cleared / 0 new**, tex 1210 raw / 1217 citations, docs 2636 raw / 2700 citations |
| `dead_candidate_scan.py --self-test` | **100 tests OK** |
| `python3 -m unittest scripts.test_audit_gate` | **166 tests, OK (1 skipped)** |
| `citation_audit.py --self-test` | 150 tests OK |
| Japanese scan | none in `tex/`, `docs/`, `README.md`, `IsingModel/`, `scripts/` |

## Final check on a synthesized tree

A separate throw-away worktree at `fd7a2a71` (**pre-deletion library**) carrying
**this commit's** `docs/index.md` and `tex/proof-guide.tex`, scanned with the
unmodified scanner:

```
-- published-result: 0 --   -- load-bearing: 0 --
-- uncertain: 0 --          -- safe-to-delete: 31 --
-- coverage warnings: 0 --
canary (unicode self-find): PASS   canary (tex line-break): PASS
```

and the full-library sweep on that same tree reports **0 condition-(v)
violations**. So the documentation in this commit still justifies deleting
exactly these 31 declarations and nothing else.

On the merged tree, no exact name among the 31 and none of the five uniquely
named deleted modules occurs anywhere in `IsingModel/`, `docs/` or `tex/`. The
four shared basenames that remain (`MayerVdBounds.lean`, `MayerFilterConnected.lean`,
`PartitionFreeEnergyRegularity.lean`, `PartitionFunctionGeneralAnalyticity.lean`)
all resolve to the surviving `AmbientLattice/SpecialCases/` modules.

## Follow-up recorded, not fixed here

The three scanner fail-open constructs found while validating this batch are
recorded as a child item of #4746 and are deliberately out of scope for this PR:
nested braces, a bare trailing `*` with no separating underscore, and `*` read as
one-or-more. All three are fail-open on the deletion side, the same polarity
class as #4745. The affected sites in this batch were handled by hand and
verified by the independent expander above.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
phasetr added a commit that referenced this pull request Jul 28, 2026
…le Concrete directory size

Adds the batch-4 record to the local mirror of issue #4746: 9 modules /
31 declarations / 712 lines deleted, the same-commit docs/index.md and
tex/proof-guide.tex retraction, the two-sweep condition (v) result (7
verdict moves, all protective, 0 violations), and every gate re-measured
on the merged main ee98192.

Also corrects one figure the mirror carried in its F1 note: the largest
library directory is Concrete 851, not 869. 869 predated PR #4751's
ten-module deletion (859 at fd7a2a7). The same stale figure was fixed
in scripts/test_audit_gate.py inside PR #4754.

Adds an F1 update for batch 4: the floors were not lowered, so the
measured slack is 27 / 27 / 37 and the F1 decision stays due before
batch 5.

Remaining scope re-derived on the merged main: 23 modules left on the
tier-2 tracked list; freshly measured population 199 fully dead raw /
194 excluding Lemma_17_5_2 / 146 lane-eligible.

.self-local/ only; no library, docs, tex or script change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
phasetr added a commit that referenced this pull request Jul 28, 2026
…le Concrete directory size (#4755)

Part of #4746.

Syncs `.self-local/issues/4746.md` with the merged state of Item A batch 4 (PR #4754,
main `ee981926`) and repairs one stale figure the mirror carried.

* New section recording batch 4: 9 modules / 31 declarations / 712 lines deleted, the
  same-commit `docs/index.md` + `tex/proof-guide.tex` retraction (four re-measured
  wrapper counts, the nested-brace label split, the one family label that lost all its
  members, 12 in-library doc comments), the two-sweep condition (v) result (7 verdict
  moves, all protective, **0 violations**), and every gate re-measured on the merged
  main.
* Ratchet: the floors were **not** lowered by batch 4. The mirror's F1 table is updated
  to the measured slack 27 / 27 / 37, and the F1 note's `Concrete, 869` figure is
  corrected to **851** — 869 predated PR #4751's ten-module deletion (859 at
  `fd7a2a71`). The same stale figure was fixed in `scripts/test_audit_gate.py` inside
  #4754.
* Remaining scope re-derived on the merged main: 23 modules left on the tier-2 tracked
  list; freshly measured population 199 fully dead raw / 194 excluding `Lemma_17_5_2` /
  **146 lane-eligible** (157 before: 9 deleted here plus 2 that left the set because
  this PR's documentation retraction protected their declarations).
* Records that the three scanner fail-open constructs are already filed as a child item
  of Item A.

`.self-local/` only; no library, docs, tex or script change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
phasetr added a commit that referenced this pull request Jul 28, 2026
…l body drift (#4760)

## Purpose

Part of #4746. Sync the local mirror `.self-local/issues/4746.md` to the canonical
GitHub issue #4746 state after PR #4759 merged (main `ecdaf2e5`, Item F F-2/F-3 fix,
`MAX_CHARGED_GLOB_MATCHES = 10`).

## Change

- Resynced the mirror's `## Summary` section verbatim from the canonical GitHub issue
  body (title, Item A figures, ratchet retraction, Item F promoted/re-diagnosed state).
  The mirror's Summary had drifted from canonical since the 2026-07-28 governance
  re-verification (PR #4758 only touched the Progress/Follow-ups sections, not the
  Summary header/title/Item-A figures).
- Added a Progress entry recording PR #4759 MERGED (main `ecdaf2e5`): F-2/F-3 fixed by
  raising `MAX_CHARGED_GLOB_MATCHES` to 10, documentation-invariance double sweep
  (`SAFE_after ⊆ SAFE_before`), and retrospective audit against batches 1-4 (PRs
  #4747/#4749/#4751/#4754) finding zero erroneous deletions.
- Recorded the residual fail-open surfaced by the independent review of #4759 (issue
  comment #4746 (comment)):
  namespace-qualified wildcard tokens that resolve to zero declarations are invisible to
  the report (no verdict, no family label, no coverage warning) — 58 occurrences / 46
  distinct expanded names / 36 distinct source tokens on current docs, with a live
  false-safe example at `tex/proof-guide.tex:3861`. This residual is not a regression of
  #4759 (identical pre-#4759) and is recorded as an unauthorized follow-up candidate.

## Scope

`.self-local/issues/4746.md` only (mirror sync; no library/docs/tex changes).

## Test plan

- [x] Diff confined to `.self-local/issues/4746.md`.
- [x] Content verified against `gh issue view 4746` (canonical body + comment
      5105348942) at write time.
- [x] No Japanese in PR body/commit message.
phasetr added a commit that referenced this pull request Jul 28, 2026
…e file-count floors (#4746 Item F1) (#4766)

`CheckedFilesTest`'s three blanket floors (`CHECKED_FILE_FLOOR`,
`LIB_FILE_FLOOR`, `V4_FILE_FLOOR`) were calibrated a few dozen files below the
measured count, so every deletion batch of the #4746 safe-to-delete lane had to
lower them: 2003/1996 (#4749) -> 1993/1986 (#4751) -> 1984/1977 (#4754). The
ratchet described the deletions instead of constraining them, and the file's
own standing decision was that the first batch which would actually trip a
floor must land F1 (per-directory assertions) rather than recalibrate again.
Measured on `f8911169` the slack is 6 further file deletions on two of the three
floors, so that batch is the next one.

F1-a: pin `LIB_TOP_LEVEL_DIRS` (25 directories, measured) and assert it both
against a census of what the scan enumerates and against an independent disk
traversal. A filter such as `if "Peierls" not in p.parts` now fails by name at
any library size, with no constant to move; a directory the deletion lane
empties disappears from both sides at once, so no recalibration follows.

F1-b: `LIB_DIR_FLOORS`, coarse per-directory floors for the eight directories
at 40+ files plus the loose bucket (Concrete 843 -> 600, AmbientLattice
275 -> 180, ClusterExpansion 205 -> 150, TransferMatrix 109 -> 80, Peierls
105 -> 80, AmbientComplexAnalyticity 76 -> 55, Inequalities 71 -> 50,
Conditioning 48 -> 35, loose 39 -> 25). Parity only requires one surviving file
per directory; these keep the big ones populated. `assertGreaterEqual`, not the
strict comparison the blanket floors use.

F1-c: with directory loss now asserted directly, the blanket floors are derived
from a budget rather than from today's measurement: 200 further deleted modules
below the 2026-07-29 measurement (1964/1957/1994), rounded down to a multiple of
ten, giving 1760/1750/1790. Their residual job -- the two ways the exact
`git ls-files` comparison can be made vacuous -- does not need a tight floor.

F1-d: two mutation tests. `iter_checked_files` filtered on "Peierls" loses the
directory from the census while staying above the blanket floor; the same
function thinned to three `Conditioning` files keeps parity and the blanket
floors green and trips only the per-directory floor.

No change to `scripts/audit_gate.py`; V1/V2/V4 read the same 1964/1964/1994
files as before.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
phasetr added a commit that referenced this pull request Aug 3, 2026
Follow-up to 0a52f59 after independent review.  Documentation only: Lean doc
comments, `docs/index.md` rows, and `tex/proof-guide.tex`.  No statement, proof
term, or public name changes.

1. Off-by-one in the identical-statement group.  The pilot canonicalizes three
   of *four* declarations that share the statement, not three of three.
   `freeEnergyComplexAlongExhaustion_closedBallBranchDeviationRelCompact_patch`
   (`ClosedBallPatches/RelCompact.lean`, PR #2745) carries the byte-identical
   statement as well, but was deliberately excluded from the pilot: it proves
   the statement by the independent `toDeviationData` route into
   `freeEnergyComplexAlongExhaustion_branchDeviationRelCompact_patch`, and it
   still has its own in-repo consumers (`BranchLocallyBoundedPatches/
   RelCompact.lean`, its own `_of_isCompact`, and the Z^d wrapper).  The owner
   doc comment, the excluded theorem's doc comment, the two `docs/index.md`
   rows, and the PR #2745/#2752/#2756/#2768 proof-guide theorem environments
   now say "owner for the three pilot-scoped declarations" and disclose the
   fourth instead of implying an exhaustive three-element group.

2. Stale construction path in the PR #2756 proof-guide environment.  It stated
   that the direct-range endpoints build their relatively compact range data
   "through the PR #2757 direct-route data alias".  Since 0a52f59 none of the
   three endpoints listed there calls
   `toRangeRelCompactData_direct`: the abstract one forwards to the owner, the
   `_of_isCompact` one calls the abstract one, and the positive-real one calls
   the `_of_isCompact` one; the owner calls
   `toRangeRelCompactData_closedBallLocal_direct`.  The data alias itself
   remains in use by the other closed-ball conversions
   (`toRangeRelCompactData_viaDeviation_direct` and the eventual-overlap
   conversion), so it is not orphaned.  The sentence now states the actual
   post-PR path.

3. Correction to the 0a52f59 commit message (left as pushed; not rewritten).
   It justified keeping
   `...ClosedBallBranchDeviationAscoliData.toRangeRelCompactData_viaLocal_direct`
   with the blanket claim "this repo does not run reference-0 deletion
   campaigns".  That claim is false: deliberate zero-consumer deletions have
   happened repeatedly (272b310/#4641, 3fbc873/#4749, 051aa85/#4751,
   f891116/#4764), as have duplicate retirements (6147071/#4839,
   2613222/#4851), and `lean-coding-conventions` points the other way
   (reference-0 declarations are decorative and should generally be removed).
   The real, narrower reason is that removing or re-pointing that declaration
   is outside the minimal scope of the #4854 pilot.  The `docs/index.md` rows
   and the via-local proof-guide environment are reworded to that narrower
   claim and now say explicitly that this is a scope statement about this PR,
   not a general exemption for reference-0 declarations.

Verification: `lake build` full, zero warnings and zero errors;
`lake exe GKSTest` passes; `latexmk -g -pdf proof-guide.tex` clean with zero
Overfull/Underfull boxes, zero LaTeX/package warnings and zero undefined
references; no Japanese characters in the proof guide.

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