refactor: drop the correlationΛ pair-singleton bundle cluster - #4659
Merged
phasetr merged 2 commits intoJul 22, 2026
Conversation
Scanner-vetted deletion (scripts/dead_candidate_scan.py, issue #4639 methodology) of the 8-declaration `correlationΛ ... at_pair_singleton_bundle` cluster, a distinct namespace from the #4655 correlationAlongExhaustion family. All 8 are conjunction wrappers that only re-pair already-proved facts with `⟨a, b⟩`; none is cited by docs/index.md or tex/proof-guide.tex, and none is consumed outside the deleted set (safe-to-delete under both the textual scan and the --lean elaborated-graph cross-check, cascade 0). Removed (ambient layer, HighTempCorrelation.lean): correlationΛ_high_temp_h_zero_at_pair_singleton_bundle correlationΛ_high_temp_h_zero_at_pair_singleton_bundle_ferromagnetic correlationΛ_high_temp_h_zero_at_pair_singleton_complete_summary correlationΛ_high_temp_h_zero_at_pair_singleton_trivial_slices_bundle Removed (ℤ^d latticeGraph layer): correlationΛ_latticeGraph_high_temp_h_zero_at_pair_singleton_bundle correlationΛ_latticeGraph_high_temp_h_zero_at_pair_singleton_bundle_ferromagnetic correlationΛ_latticeGraph_high_temp_h_zero_at_pair_singleton_complete_summary correlationΛ_latticeGraph_high_temp_h_zero_at_pair_singleton_trivial_slices_bundle HighTemperatureBoundsPairSingletonBundle.lean held all 3 latticeGraph wrappers, so it becomes declaration-free and is deleted whole; its umbrella import is dropped. Transitive reachability is preserved via the kept sibling HighTemperatureBoundsCorrelationBasicBundles.lean. Stale module-docstring prose in that sibling and in HighTemperatureBounds.lean is updated in the same commit. The 7 constituent lemmas the bundles consumed all survive as load-bearing (post-deletion cascade re-scan: 0). Two deleted names carry _ferromagnetic, so the dead_candidate_scan self-test FamilyCalibrationTest recalibrates: total 261 -> 259, SAFE 130 -> 128, UNCERTAIN/LOAD_BEARING/PUBLISHED unchanged (44/52/35), zero-consumer 142 -> 141 -- the healthy signature that no live lemma was reclassified; fixture integers updated accordingly. lake build warning-free (5061 jobs); audit_gate --full V1-V4 PASS; audit_gate --self-test 166 OK; dead_candidate_scan --self-test 79 OK; GKSTest PASS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
phasetr
force-pushed
the
refactor/drop-correlation-lambda-pair-singleton-bundle
branch
from
July 22, 2026 06:53
71190cb to
785a137
Compare
…etion The previous commit dropped the 8-declaration `correlationΛ ... at_pair_singleton_bundle` cluster but left three module-docstring references pointing at the removed `correlationΛ_latticeGraph_high_temp_h_zero_at_pair_singleton_bundle` wrapper. This updates the doc comments only (no declaration or statement changes) to match the post-deletion reality: * HighTemperatureBounds.lean Moved note: drop `pair+singleton bundle` from the `correlationΛ_latticeGraph` basic-wrapper enumeration. * HighTemperatureBoundsCorrelationBasic.lean module header: drop the `pair+singleton bundle` item from the wrapper list. * HighTemperatureBoundsCorrelationBasic.lean Moved note: `five` -> `four` wrappers and remove `pair_singleton_bundle`, matching the sibling `HighTemperatureBoundsCorrelationBasicBundles.lean` header the previous commit already narrowed to four. The line-189 alongExhaustion Moved note and the abstract `correlation_high_temp_h_zero_at_pair_singleton_bundle` declaration name a distinct, still-live family and are deliberately left untouched. Verification: zero references to the 8 deleted names remain across IsingModel/, docs/, tex/; lake build warning-free; audit_gate --full V1-V4 PASS; audit_gate --self-test 166 OK; dead_candidate_scan --self-test 79 OK. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
Author
|
dev-issue-manager resolution-verification (round 5 of the #4639 adoption rule) Verified independently (not from PR author's claims):
Governance note: recommend the #4639 adoption-rule text be tightened to state explicitly that once a PR has a real implementation commit, follow-up fixes (e.g. review-flagged stale docstrings) must land as new commits, not amends — this round did it correctly; making the rule explicit prevents regression in future rounds. Outstanding at time of this comment: CI ( |
phasetr
marked this pull request as ready for review
July 22, 2026 07:47
This was referenced Jul 22, 2026
phasetr
added a commit
that referenced
this pull request
Jul 22, 2026
…ster 1) Sixth application of the #4639 adoption rule (continuing #4648/#4655/#4657/ #4659). Delete the first self-contained closure-component of the `ratio_bound_bundle` family: the six base-Conditioning conjunction wrappers freeEnergy_high_temp_h_zero_ratio_bound_bundle{,_ferromagnetic} log_partitionFunction_high_temp_expansion_h_zero_ratio_bound_bundle{,_ferromagnetic} partitionFunction_high_temp_expansion_h_zero_ratio_bound_bundle{,_ferromagnetic} in `Conditioning/HighTempClosed/{FreeEnergyRatios,PartitionRatios}.lean`. These wrappers only re-pair the underlying `_ratio_bound` / `_ratio_bound_beta_zero` lemmas, which survive (still consumed by the `triple_ratio_bound_bundle` and the `_ferromagnetic` single-slice variants), so the scanner reports zero cascade for this subset. The component is self-contained: each member's only consumer is its own same-file `_ferromagnetic` companion, all of which are in the delete set. `dead_candidate_scan.py` verdict for the subset: 6/6 safe-to-delete, cascade 0; `--lean` cross-check on the green build finds no consumer missed. No `docs/index.md` or `tex/proof-guide.tex` citation touched; no module docstring named these decls. Recalibrate the `_ferromagnetic` family fixture: total 259 -> 256 and safe 128 -> 125 (both drop by the three deleted `_ferromagnetic` wrappers), zero-consumer 141 -> 138; uncertain/load-bearing/published unchanged -- the healthy signature that no live lemma was reclassified. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
phasetr
added a commit
that referenced
this pull request
Jul 22, 2026
* refactor: drop the first ratio_bound_bundle cluster WIP: placeholder for the first self-contained closure-component subset of ratio_bound_bundle deletions under standing authorization. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * refactor: drop six base-Conditioning ratio_bound_bundle wrappers (cluster 1) Sixth application of the #4639 adoption rule (continuing #4648/#4655/#4657/ #4659). Delete the first self-contained closure-component of the `ratio_bound_bundle` family: the six base-Conditioning conjunction wrappers freeEnergy_high_temp_h_zero_ratio_bound_bundle{,_ferromagnetic} log_partitionFunction_high_temp_expansion_h_zero_ratio_bound_bundle{,_ferromagnetic} partitionFunction_high_temp_expansion_h_zero_ratio_bound_bundle{,_ferromagnetic} in `Conditioning/HighTempClosed/{FreeEnergyRatios,PartitionRatios}.lean`. These wrappers only re-pair the underlying `_ratio_bound` / `_ratio_bound_beta_zero` lemmas, which survive (still consumed by the `triple_ratio_bound_bundle` and the `_ferromagnetic` single-slice variants), so the scanner reports zero cascade for this subset. The component is self-contained: each member's only consumer is its own same-file `_ferromagnetic` companion, all of which are in the delete set. `dead_candidate_scan.py` verdict for the subset: 6/6 safe-to-delete, cascade 0; `--lean` cross-check on the green build finds no consumer missed. No `docs/index.md` or `tex/proof-guide.tex` citation touched; no module docstring named these decls. Recalibrate the `_ferromagnetic` family fixture: total 259 -> 256 and safe 128 -> 125 (both drop by the three deleted `_ferromagnetic` wrappers), zero-consumer 141 -> 138; uncertain/load-bearing/published unchanged -- the healthy signature that no live lemma was reclassified. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
phasetr
added a commit
that referenced
this pull request
Jul 22, 2026
Seventh application of the #4639 adoption rule (continuing #4648/#4651/#4655/#4657/#4659/#4661). Remove the second self-contained closure-component of the `ratio_bound_bundle` family: the eight `freeEnergy{Λ,AlongExhaustion}{,_latticeGraph}_high_temp*_h_zero_ratio_bound_bundle` wrappers (general + ferromagnetic) across the Λ / latticeGraph / AlongExhaustion layers. These are unused conjunction bundles; the underlying non-bundle `*_ratio_bound` / `*_ratio_bound_beta_zero` slices they pass through are retained and still consumed by the triple-ratio and log-Fe wrappers. The component is self-contained: every reference to a member is a def-site or a use-site inside another member, and none is cited by `docs/index.md` / `tex/proof-guide.tex`. Two files empty out and are removed (`HighTemperatureBoundsRatioLogFeFreeEnergyBound{,Ferro}.lean`); their umbrella imports are dropped from `HighTemperatureBounds.lean` and `HighTemperatureBoundsRatioLogFe.lean`, and reachability is preserved because every consumer of the surviving `BoundOnly` slices imports that child directly. Module-docstring prose mentioning the removed wrappers is updated in the same commit. Cascade is zero: the scanner's cascade set is unchanged (7 entries), and the `_ferromagnetic` family calibration moves along the healthy signature -- total 256->252 and safe 125->121 both drop by the four deleted ferromagnetic wrappers, with uncertain/load-bearing/published unchanged (no live lemma reclassified) and zero-consumer 138->136. Fixture constants in `test_dead_candidate_scan.py` recalibrated accordingly. Verification: `lake build` green (warning-free), `audit_gate --full` V1-V4 PASS, `audit_gate --self-test` 166 OK, `dead_candidate_scan --self-test` 79 OK, `lake exe GKSTest` PASS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
phasetr
added a commit
that referenced
this pull request
Jul 22, 2026
drop the second `ratio_bound_bundle` cluster — eight freeEnergy-stem wrappers (`freeEnergyΛ` / `freeEnergyAlongExhaustion`, both bare and latticeGraph, each `_ratio_bound_bundle` + `_ferromagnetic`) that only paired the underlying `_ratio_bound` / `_ratio_bound_beta_zero` facts with `⟨a,b⟩` and were consumed only within the deletion set; the underlying facts survive and stay load-bearing (consumed by the `triple_ratio_bound_bundle` family). Two files that became declaration-free were removed. seventh deletion PR under the issue #4639 adoption rule: scanner (textual, `--lean`, post-deletion re-run) classified all eight `safe-to-delete` with cascade 0; four are `_ferromagnetic`, so the scanner fixture was retuned 256→252 / SAFE 125→121 with the UNCERTAIN/LOAD_BEARING/PUBLISHED split held fixed. the umbrella re-export path to `FreeEnergyBoundOnly` (the surviving non-bundle slices) was restored on three umbrellas so `import ...HighTemperatureBounds` still reaches them, consistent with the #4659/#4661 convention. no other Lean statement or proof modified. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 22, 2026
phasetr
deleted the
refactor/drop-correlation-lambda-pair-singleton-bundle
branch
August 1, 2026 05:01
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.
Motivation
Simplification refactor under the user's standing authorization, continuing the scanner-vetted deletions of #4648/#4651/#4655/#4657. A systematic scanner pass (
.self-local/reports/remaining-safe-clusters-2026-07-22.md) enumerated the remaining self-contained safe-to-delete clusters; this PR takes thecorrelationΛ ... at_pair_singleton_bundlecluster (8 declarations, 2 closure-components). This is a distinct namespace from thecorrelationAlongExhaustionfamily removed in #4655 and has not been touched before. None of these_bundlelemmas is cited bydocs/index.mdortex/proof-guide.tex; they only pair two already-proved facts with⟨a,b⟩and are consumed by nothing outside the deleted set.Deleted declarations (8)
Ambient layer —
IsingModel/AmbientLattice/Defs/HighTempCorrelation.lean:correlationΛ_high_temp_h_zero_at_pair_singleton_bundlecorrelationΛ_high_temp_h_zero_at_pair_singleton_bundle_ferromagneticcorrelationΛ_high_temp_h_zero_at_pair_singleton_complete_summarycorrelationΛ_high_temp_h_zero_at_pair_singleton_trivial_slices_bundleℤ^d
latticeGraphlayer:correlationΛ_latticeGraph_high_temp_h_zero_at_pair_singleton_bundle(HighTemperatureBoundsCorrelationBasicBundles.lean)correlationΛ_latticeGraph_high_temp_h_zero_at_pair_singleton_bundle_ferromagnetic(HighTemperatureBoundsPairSingletonBundle.lean)correlationΛ_latticeGraph_high_temp_h_zero_at_pair_singleton_complete_summary(HighTemperatureBoundsPairSingletonBundle.lean)correlationΛ_latticeGraph_high_temp_h_zero_at_pair_singleton_trivial_slices_bundle(HighTemperatureBoundsPairSingletonBundle.lean)HighTemperatureBoundsPairSingletonBundle.leanheld all 3_latticeGraph_wrappers, so it becomes declaration-free and is deleted whole; its umbrella import (Umbrella/HighTemperature.lean) is dropped. Transitive reachability is preserved: the siblingHighTemperatureBoundsCorrelationBasicBundles.lean(kept) still importsLatticeGraphBED.LatticeBoundaryBED, andIsingModel.Latticeremains reachable from the umbrella by many other paths (confirmed green build). Two stale module-docstring prose mentions were updated in the same commit: theHighTemperatureBoundsCorrelationBasicBundles.leanheader (five → fourwrappers, dropped bullet) and theHighTemperatureBounds.lean"Moved: ℤ^d HT pair+singleton bundle wrappers" section.Follow-up (commit
48d88aa3, doc comments only): review (dev-review + codex) found three further stale docstring mentions of the removedcorrelationΛ_latticeGraph_high_temp_h_zero_at_pair_singleton_bundlewrapper that the first commit missed. All three are now purged, with no declaration/statement change:HighTemperatureBounds.lean"Moved: correlationΛ pair / singleton basic wrappers" note — droppedpair+singleton bundlefrom the enumeration.HighTemperatureBoundsCorrelationBasic.leanmodule header — dropped thepair+singleton bundlelist item.HighTemperatureBoundsCorrelationBasic.lean"Moved: pair sandwich / ferromagnetic / bundle wrappers" note —five → fourwrappers, removedpair_singleton_bundle, matching the already-narrowed siblingHighTemperatureBoundsCorrelationBasicBundles.leanheader.The
HighTemperatureBounds.lean:189alongExhaustion note and the abstractcorrelation_high_temp_h_zero_at_pair_singleton_bundledeclaration name a distinct, still-live family and are deliberately left untouched. After this follow-up, zero references to the 8 deleted names remain acrossIsingModel/,docs/,tex/.Note (deviation from the research report): the report expected this
correlationΛcluster to carry no_ferromagnetic-named member; in fact 2 of the 8 (..._at_pair_singleton_bundle_ferromagnetic, both layers) do. They are legitimately safe-to-delete and their removal recalibrated the scanner's_ferromagneticself-test fixture (see below).Pre-deletion scanner output (
scripts/dead_candidate_scan.py, textual +--lean)All 8 classify
safe-to-deleteunder both the textual scan and the--leanelaborated-graph cross-check (no consumer missed), cascade 0.Post-deletion cascade re-run
The 8 deleted names no longer exist, so the faithful post-deletion check re-scans the 7 constituent lemmas the bundles consumed (
correlationΛ_high_temp_h_zero_at_{singleton, pair_nonneg, pair_le_one, pair_J_zero, pair_beta_zero, singleton_J_zero, singleton_beta_zero}):Every constituent survives as load-bearing (each still referenced by
_latticeGraph_/ trivial-slices / along-exhaustion wrappers) — the deletion orphaned nothing; cascade 0._ferromagneticself-test recalibration2 deleted names carry
_ferromagnetic, sodead_candidate_scan.py --self-test'sFamilyCalibrationTestrecalibrates. Measured before → after:_ferromagneticbundles)_latticeGraph_bundle-ferromagnetic wrapper was itself zero-consumer)Only total, SAFE, and the zero-consumer count drop by exactly the deletion counts; the other three classes are unchanged — the healthy signature that no live lemma was reclassified. Fixture integers in
scripts/test_dead_candidate_scan.pyupdated accordingly.Verification
LIMITS:banner pasted (textual scan +--leancross-check); all 8safe-to-delete48d88aa3; existing alongExhaustion / abstractcorrelation_*families left intact)lake buildwarning-free, error-free — "Build completed successfully (5061 jobs)"scripts/audit_gate.py --fullV1–V4 PASSaudit_gate.py --self-test(166 OK) anddead_candidate_scan.py --self-test(79 OK, after recalibration)_ferromagneticfixture SAFE/UNCERTAIN/LOAD_BEARING/PUBLISHED split shown (SAFE −2, others unchanged)lake exe GKSTestPASS🤖 Generated with Claude Code