refactor: drop the third ratio_bound_bundle cluster - #4665
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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>
…c comment
The removed Λ-direct ratio_bound_bundle wrappers delegated to the ambient
base log_partitionFunctionΛ_high_temp_expansion_h_zero_ratio_bound{,_beta_zero}
lemmas, not to nonexistent log_partitionFunctionΛ_latticeGraph_*_ratio_bound.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
phasetr
marked this pull request as ready for review
July 22, 2026 22:24
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.
Summary
Simplification refactor under the user's standing authorization, continuing the
scanner-vetted
ratio_bound_bundledeletions of #4661 (six base-Conditioningwrappers) and #4663 (eight freeEnergy-stem wrappers). This PR removes the next
self-contained closure-component: the
log_partitionFunctionΛstem verticalslice (4 declarations). All four are pure conjunction wrappers that only pair the
already-proved
_ratio_bound/_ratio_bound_beta_zerofacts with⟨·, ·⟩;nothing outside the closure references them, so the deletion cascade is empty.
Removed (4 declarations)
Base Λ-level bundles in
AmbientLattice/Defs/HighTempPartition/Ratios.lean:log_partitionFunctionΛ_high_temp_expansion_h_zero_ratio_bound_bundlelog_partitionFunctionΛ_high_temp_expansion_h_zero_ratio_bound_bundle_ferromagneticThe two
latticeGraphwrappers, which were the only declarations inConcrete/LatticeGraphCorrelation/HighTemperatureBoundsRatioBoundBundle.lean(file removed entirely, umbrella import dropped):
log_partitionFunctionΛ_latticeGraph_high_temp_expansion_h_zero_ratio_bound_bundlelog_partitionFunctionΛ_latticeGraph_high_temp_expansion_h_zero_ratio_bound_bundle_ferromagneticSelf-contained / umbrella / underlying lemmas
_ferromagneticsibling and the twolatticeGraphwrappers (all in-set); thelatticeGraphwrappers are leaves. Cascade is zero.the removed file imported
IsingModel.LatticeandConcrete.LatticeGraphBED.LatticeBoundaryBED. Both remain transitivelyreachable from
Umbrella/HighTemperature.leanvia the still-importedHighTemperatureBoundsRatioLogFe(which imports both directly). Whole buildgreen confirms no consumer lost an import.
log_partitionFunctionΛ_high_temp_expansion_h_zero_ratio_boundand
_ratio_bound_beta_zerostay (still consumed by the triple-ratio bundle andthe
LogBoundOnlySingletonswrappers).HighTemperatureBoundsRatioLogFe.leanis updatedin the same commit.
Scanner evidence
Pre-deletion textual verdict (all four
safe-to-delete)python3 scripts/dead_candidate_scan.py --pattern 'ratio_bound_bundle' --report-onlyclassified the full family as 1 published-result / 2 load-bearing / 2 uncertain
/ 29 safe-to-delete. All four deleted names were in
safe-to-delete(
no reference outside the delete set, no citation in the scanned documentation).Post-deletion textual re-scan (cascade for this component = 0)
python3 scripts/dead_candidate_scan.py --pattern 'ratio_bound_bundle' --report-only:published-result / load-bearing / uncertain all unchanged; safe-to-delete
29 → 25 (−4 = exactly the deleted decls). The
cascade: 7is the scanner'sforward-looking "if you deleted all 25 remaining safe candidates" set (the
untouched
triple_ratio_bound_bundlebatch + underlying_ratio_boundlemmas);those underlying lemmas remain live (consumed outside the touched family), so
this component's own cascade is empty.
--leanbuild-backed cross-check (elaborated graph, green build)python3 scripts/dead_candidate_scan.py --pattern 'log_partitionFunctionΛ.*_ratio_bound' --leanon the touched family:
The elaborated dependency graph confirms 0 cascade from the deletion.
_ferromagneticfixture calibration (unchanged split)Two of the four deleted decls are
_ferromagnetic, sotest_dead_candidate_scan.pycalibration is retuned. The split is the healthyno-reclassification signature — only total and safe drop by the deletion count:
(zero-consumer −1: only the
latticeGraphleaf ferro wrapper was zero-consumer;the base ferro wrapper feeds that leaf.)
Verification
lake build— completed successfully (5058 jobs), warning-free in touchedmodules (the only
info:lines are pre-existingTry thisdiagnostics in theuntouched
TransferMatrix/TwoSiteInteractingLayerOpenBoundaryWindow.lean).scripts/audit_gate.py --full— V1–V4 PASS.scripts/audit_gate.py --self-test— 166 OK (skipped=1).scripts/dead_candidate_scan.py --self-test— 79 OK (after fixture retune).lake exe GKSTest— All tests passed._ratio_boundlemmas retained.🤖 Generated with Claude Code