refactor: drop a duplicated pseudoMassFromParamsAtPair J=0 h=0 lemma - #4657
Merged
Conversation
Duplicate lemmas pseudoMassFromParamsAtPair_J_zero_h_zero and pseudoMassFromParamsAtPair_J_zero_h_zero_any_pair state identical propositions with identical hypotheses. Scanner-vetted deletion under standing authorization (issue #4639). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two theorems stated the identical proposition under identical
hypotheses for arbitrary (x, z):
pseudoMassFromParamsAtPair hα hr d Λ ⟨0,0,β⟩ x z = 0
- pseudoMassFromParamsAtPair_J_zero_h_zero
(PseudoMass/FromParamsBasic/BasicSlices.lean) — direct proof via
correlationInfinite_J_zero; references no exclusive helpers.
- pseudoMassFromParamsAtPair_J_zero_h_zero_any_pair
(PseudoMass/FromParamsHZero/JZeroValues.lean) — the canonical
"J-zero value cases" hub that case-splits into the granular helpers
pseudoMassFromParamsAtPair_diag_h_zero and
pseudoMassFromParamsAtPair_at_J_zero_h_zero_eq_zero.
scripts/dead_candidate_scan.py --lean classified both as
safe-to-delete (reference-0, no doc/tex citation). Deleting only one
per the issue #4639 adoption rule. The direct BasicSlices copy is
removed and the JZeroValues hub kept, because deleting the hub would
cascade its two exclusively-referenced helpers into new reference-0
declarations, whereas removing the direct copy leaves the dependency
graph intact (post-deletion cascade = 0, both helpers still
load-bearing). The surviving lemma's `#check @` dump and
`#print axioms` ([propext, Classical.choice, Quot.sound]) are
unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
Author
|
dev-issue-manager resolution verification — PASS Independently re-verified (not just re-reading the PR body):
Governance sync: tracking issue #4658, this PR, and the local mirror Verdict: resolved, PR is mergeable, tracking issue #4658 may be closed on merge. |
phasetr
marked this pull request as ready for review
July 22, 2026 05:38
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>
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 #4636/#4641/#4648/#4651/#4655. Two theorems state the identical proposition —
pseudoMassFromParamsAtPair hα hr d Λ ⟨0,0,β⟩ x z = 0under the same hypotheses (hα,hr,d,Λ, edge-Fintypeinstance,0 < β, arbitraryx z) — a duplicate proof of one fact:pseudoMassFromParamsAtPair_J_zero_h_zero(IsingModel/PseudoMass/FromParamsBasic/BasicSlices.lean:105)pseudoMassFromParamsAtPair_J_zero_h_zero_any_pair(IsingModel/PseudoMass/FromParamsHZero/JZeroValues.lean:61)Both are referenced nowhere in the repository outside their own declaration, and neither is cited by
docs/index.mdortex/proof-guide.tex.Decision: which to delete
Per the issue #4639 adoption rule, when both candidates are reference-0 only one is removed. The
JZeroValueshub (_any_pair) is kept and theBasicSlicesdirect copy (_J_zero_h_zero) is deleted, because:_any_pairis the canonical "J-zero value cases" module head and case-splits (x = z/x ≠ z) into the granular helperspseudoMassFromParamsAtPair_diag_h_zeroandpseudoMassFromParamsAtPair_at_J_zero_h_zero_eq_zero, which are referenced only by_any_pair._any_pairwould cascade those two helpers into new reference-0 declarations. Deleting theBasicSlicesdirect copy (whose proof uses only general library lemmas —correlationInfinite_J_zero,pseudoMassExt_of_not_mem) leaves the dependency graph intact._any_pairloses no information.Post-deletion the two helpers remain
load-bearing(scanner re-run) → cascade = 0.Scanner output (issue #4639 adoption rule)
python3 scripts/dead_candidate_scan.py --name pseudoMassFromParamsAtPair_J_zero_h_zero --name pseudoMassFromParamsAtPair_J_zero_h_zero_any_pair --lean:The
cascadelist above is why theBasicSlicescopy is chosen for deletion: those two helpers are reachable only through_any_pair, so the hub is retained. Post-deletion scan of the two helpers reports themload-bearing(referenced by the surviving_any_pair), i.e. cascade = 0, zero new reference-0 declarations.Verification
LIMITS:banner pasted (textual scan +--leancross-check); both classifysafe-to-deletepseudoMassFromParamsAtPair_J_zero_h_zeroabsent repo-wide (IsingModel/docs/tex/README)load-bearing, cascade = 0 (no new reference-0 decl)_any_pair#check @dump unchanged and#print axioms=[propext, Classical.choice, Quot.sound]unchanged (before/after deletion)lake builderror-free / warning-freescripts/audit_gate.py --fullV1-V4 PASSaudit_gate.py --self-test(166 OK) anddead_candidate_scan.py --self-test(79 OK)lake exe GKSTestPASSBasicSlices.leanchanged)🤖 Generated with Claude Code