Skip to content

refactor: drop twelve dead pseudoMassG decoration lemmas - #4641

Merged
phasetr merged 2 commits into
mainfrom
refactor/drop-dead-pseudomassg-decorations
Jul 21, 2026
Merged

refactor: drop twelve dead pseudoMassG decoration lemmas#4641
phasetr merged 2 commits into
mainfrom
refactor/drop-dead-pseudomassg-decorations

Conversation

@phasetr

@phasetr phasetr commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

The user gave explicit item-specific authorization to delete reference-0 declarations. IsingModel/PseudoMass/Profile.lean was reported as having 22 of its declarations unreferenced across the repository, but an independent audit narrowed that to 12: seven of the original candidates are load-bearing inside the file (they feed declarations that live modules consume, e.g. pseudoMassG_analyticAtanalyticWithinAt_Ici_zeroLemma_17_5_2/UniformTransferLargeK.lean), and three are cited by docs/index.md as GJ §17.5 results in their own right (one_div_mul_pow_mul_one_div_mul_pow_eq at :2050, one_div_one_add_pow_mul_one_div_one_add_pow_le_one_div_pow_mul_one_div_pow at :2052, pseudoMassG_le_two_div_one_add_pow_of_preimage_le at :1943). Only the remaining 12 are deleted here.

Context

This completes on the pseudoMassG layer the same dead-decoration sweep that PR #4536 (1793e549) already performed on the pseudoMassExt layer, where the exact twins of several of these lemmas (neg_pseudoMassExt_strictMonoOn, pseudoMassExt_lt_iff, pseudoMassExt_differentiableOn, pseudoMassExt_continuousOn) were removed. Some of the candidates lost their last consumer in that very PR.

Scope

Eight leaves plus four that become unreferenced once the leaves go — they must be deleted together, or the four become new dead declarations.

Note that none of the twelve is cited by docs/index.md or tex/proof-guide.tex, so no documentation update is expected; this will be re-verified during implementation.

Note on pseudoMassG_analyticAt_of_even (raised by codex review)

One of the twelve, pseudoMassG_analyticAt_of_even, is not a redundant special case of the
surviving pseudoMassG_analyticAt. It claimed AnalyticAt ℝ (pseudoMassG α r) t for all
t : ℝ when α is even (using boundedness of (t·r)^α ≥ 0 to keep the denominator positive
everywhere), whereas pseudoMassG_analyticAt only covers r > 0, t ≥ 0. It is a genuinely
broader (all-of-ℝ) statement, just an unused, standalone one — no open GJ §17.5 target requires
analyticity for t < 0. Deletion is still correct (zero references anywhere), but it is a
deletion of an independent unused result, not a "duplicate discard."

Verification checklist

  • The twelve names have no remaining references anywhere (rg over IsingModel/, docs/, tex/, test/, scripts/)
  • lake build warning-free
  • scripts/audit_gate.py V1-V4
  • lake exe GKSTest
  • #print axioms unchanged for the surviving declarations in the file
  • No new reference-0 declarations created by the deletion
  • CI green

Resolves #4640

🤖 Generated with Claude Code

Initiate PR to remove reference-0 declarations from IsingModel/PseudoMass/Profile.lean as authorized in issue #4640.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
These twelve declarations in IsingModel/PseudoMass/Profile.lean were
reference-0 decorations off the critical path: eight leaves with no
consumer anywhere in the repo, plus four whose only consumers were
those leaves (a cascade that must be removed in the same commit, since
dropping the leaves alone would just create four fresh dead
declarations).

Removed leaves:
  neg_pseudoMassG_strictMonoOn, pseudoMassG_lt_iff,
  pseudoMassG_eq_two_iff_zero, pseudoMassG_analyticOnNhd_univ_of_even,
  pseudoMassG_continuousOn_Ioi_zero, pseudoMassG_continuousAt_of_pos,
  pseudoMassG_differentiableOn_Ioi_zero,
  pseudoMassG_differentiableAt_of_pos

Removed cascade:
  pseudoMassG_analyticAt_of_even, pseudoMassG_differentiableAt,
  pseudoMassG_lt_two_iff_pos, pseudoMassG_lt_two_of_pos

Nothing in docs/index.md or tex/proof-guide.tex cites any of them; the
ten neighbouring lemmas that are either live internally or cited by the
GJ 17.5 progress table are untouched. Refs #4640.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@phasetr

phasetr commented Jul 21, 2026

Copy link
Copy Markdown
Owner Author

dev-issue-manager: pre-merge resolution verification (PASS)

Verified independently against HEAD 0b7e70fe (not merely re-stating the three-gate reports):

  • CI: build check = SUCCESS (run 29791889669, 9m6s). Only one required check configured; it is green.
  • 12 deleted names confirmed zero references anywhere in IsingModel/, docs/, tex/, test/, scripts/ (independent rg/grep, not trusted from dev-verify's report).
  • 10 protected declarations verified present in IsingModel/PseudoMass/Profile.lean at HEAD:
    • 3 docs-cited survivors confirmed at their docs/index.md citation lines: one_div_mul_pow_mul_one_div_mul_pow_eq (:2050), one_div_one_add_pow_mul_one_div_one_add_pow_le_one_div_pow_mul_one_div_pow (:2052), pseudoMassG_le_two_div_one_add_pow_of_preimage_le (:1943).
    • 7 load-bearing survivors confirmed alive via internal dependency closure; spot-checked the pseudoMassG_analyticAt → pseudoMassG_analyticWithinAt_Ici_zero → (external) Lemma_17_5_2/UniformTransferLargeK.lean chain directly in source (Profile.lean:511-524, external consumer confirmed by grep).
  • File: 745→610 lines, deletion-only diff (git diff main...HEAD -- IsingModel/PseudoMass/Profile.lean = 135 deletions, 0 insertions). No sorry/admit/native_decide in the file.
  • PR refactor: remove 97 dead decoration lemmas + 2 unused imports (2026-07-17 tier2 cycle) #4536 correspondence: confirmed — refactor: remove 97 dead decoration lemmas + 2 unused imports (2026-07-17 tier2 cycle) #4536 (merged 1793e549) removed the pseudoMassExt-layer twins of several of these lemmas, establishing the precedent this PR completes on the pseudoMassG layer.

codex even-α finding: the deleted pseudoMassG_analyticAt_of_even claimed AnalyticAt ℝ (pseudoMassG α r) t for all t : ℝ (even α), which is strictly stronger than the surviving pseudoMassG_analyticAt (r > 0, t ≥ 0 only) — not a special case of it, a genuinely different (broader-domain) statement. Since it has zero references anywhere and no open GJ §17.5 target requires all-of-ℝ analyticity (only t ≥ 0 is used downstream), deletion is correct; codex's point is accurate as a mathematical observation but non-blocking for this PR. Recommend a one-line note in the PR body/commit trailer so future dead-sweep audits don't misread the deletion as removing a "duplicate" of pseudoMassG_analyticAt (it wasn't — it was a broader, unused, standalone result).

Verdict: resolved. No unresolved/mis-stated items found. Merge-ready.

@phasetr
phasetr marked this pull request as ready for review July 21, 2026 01:16
@phasetr
phasetr merged commit 272b310 into main Jul 21, 2026
1 check passed
@phasetr
phasetr deleted the refactor/drop-dead-pseudomassg-decorations branch July 21, 2026 01:17
phasetr added a commit that referenced this pull request Jul 21, 2026
Commit leftover uncommitted INDEX.md edit from prior session documenting
#4640 CLOSED (pseudoMassG dead-declaration removal, PR #4641 merged) and
#4642 OPEN (K_n closed-form generalization follow-up).

Co-Authored-By: Claude Opus 4.8 <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.

Clean up PseudoMass/Profile.lean: remove 12 reference-0 declarations

1 participant