refactor: drop the first ratio_bound_bundle cluster - #4661
Merged
Conversation
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>
7 tasks
…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>
Owner
Author
dev-issue-manager: pre-merge resolution verification (6th #4639 cycle)Independently re-verified (not just re-reading dev-verify/dev-review's claims):
Outstanding at verification time: CI ( Verdict: resolved pending CI. No unresolved/mis-stated items found in the |
phasetr
marked this pull request as ready for review
July 22, 2026 10:34
This was referenced Jul 22, 2026
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
added a commit
that referenced
this pull request
Jul 22, 2026
Continue the scanner-vetted `ratio_bound_bundle` cleanup (#4661 base-Conditioning, #4663 freeEnergy stem) with the next self-contained closure-component: the `log_partitionFunctionΛ` stem vertical slice. All four wrappers are pure conjunction bundles that only pair the already-proved `_ratio_bound` / `_ratio_bound_beta_zero` facts with `⟨·, ·⟩`; nothing outside the closure references them, so the deletion cascade is empty. Removed (4 declarations): - `log_partitionFunctionΛ_high_temp_expansion_h_zero_ratio_bound_bundle` (+ `_ferromagnetic`), base Λ-level bundles in `AmbientLattice/Defs/HighTempPartition/Ratios.lean`. - `log_partitionFunctionΛ_latticeGraph_high_temp_expansion_h_zero_ratio_bound_bundle` (+ `_ferromagnetic`), the two latticeGraph wrappers, which were the only declarations in `Concrete/LatticeGraphCorrelation/HighTemperatureBoundsRatioBoundBundle.lean`; that file is removed and its umbrella import dropped from `Umbrella/HighTemperature.lean`. Transitive reachability of `IsingModel.Lattice` and `LatticeBoundaryBED` is preserved via the still-imported `HighTemperatureBoundsRatioLogFe` (which imports both), so the umbrella re-export surface is not narrowed. The underlying `log_partitionFunctionΛ_high_temp_expansion_h_zero_ratio_bound` and `_ratio_bound_beta_zero` lemmas remain (still consumed by the triple-ratio bundle and the singleton wrappers). The stale "Moved" docstring in `HighTemperatureBoundsRatioLogFe.lean` is updated in the same commit, and the `_ferromagnetic` family calibration fixture in `test_dead_candidate_scan.py` is retuned (total 252->250, safe 121->119, zero-consumer 136->135; uncertain / load-bearing / published unchanged -- the healthy no-reclassification signature). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 22, 2026
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/#4659.
.self-local/reports/remaining-safe-clusters-2026-07-22.mdlistsratio_bound_bundleas the largest remaining_bundletheme (≈28 declarations across ~11 closure-components). This PR removes only the first self-contained closure-component — a single small PR, not the whole 28.Chosen component (6 decls, base-Conditioning layer)
The six base-
Conditioning/HighTempClosedconjunction wrappers (the layer with noΛ/AlongExhaustion/Infinitequalifier):freeEnergy_high_temp_h_zero_ratio_bound_bundle{,_ferromagnetic}—FreeEnergyRatios.leanlog_partitionFunction_high_temp_expansion_h_zero_ratio_bound_bundle{,_ferromagnetic}—PartitionRatios.leanpartitionFunction_high_temp_expansion_h_zero_ratio_bound_bundle{,_ferromagnetic}—PartitionRatios.leanWhy self-contained / cascade-zero. Each
_bundleonly re-pairs the underlying single-slice_ratio_bound/_ratio_bound_beta_zerolemmas with⟨a, b⟩. Those underlying lemmas survive — they are still consumed by thetriple_ratio_bound_bundlefamily and by the single-slice_ferromagneticvariants — so deleting these six wrappers orphans nothing. Each member's only consumer is its own same-file_ferromagneticcompanion, which is itself in the delete set. The pre-deletion subset scan therefore reports 6/6 safe-to-delete, cascade 0 (see below). Nodocs/index.md/tex/proof-guide.texcitation and no module docstring names any of the six.Verification evidence
Pre-deletion subset scan (textual) — 6/6 safe, cascade 0
Post-deletion cross-check (
--lean, green build) — cascade unchanged at 7Run over the surviving
_ratio_bound_bundlepattern after the six deletions. The elaborated dependency graph agrees with the textual verdicts, and the cascade set is the same seven items as before the deletion (all orphaned by other, still-present bundles, e.g.triple_ratio_bound_bundle), i.e. this PR introduced zero new cascade:Declaration-name delta vs base
main(a60b6ca): exactly the six removals, zero additions_ferromagneticfixture calibration (healthy signature)Three of the six deleted decls are
_ferromagnetic-named and all were SAFE + zero-consumer, so the family fixture retunes exactly as the #4655 rule requires — only total and safe move, by the deletion count:Verification Checklist
LIMITS:banner pasted (textual +--lean)safe-to-deletegrepof the six base names acrossIsingModel/,docs/,tex/= none)lake buildwarning-free (5061 jobs,grep -i warningclean)scripts/audit_gate.py --fullV1–V4 PASSaudit_gate.py --self-test(166) anddead_candidate_scan.py --self-test(79) passlake exe GKSTestpassed🤖 Generated with Claude Code