Skip to content

refactor: remove 97 dead decoration lemmas + 2 unused imports (2026-07-17 tier2 cycle) - #4536

Merged
phasetr merged 3 commits into
mainfrom
refactor/dead-decoration-removal-2026-07-17
Jul 16, 2026
Merged

refactor: remove 97 dead decoration lemmas + 2 unused imports (2026-07-17 tier2 cycle)#4536
phasetr merged 3 commits into
mainfrom
refactor/dead-decoration-removal-2026-07-17

Conversation

@phasetr

@phasetr phasetr commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

Refactoring cycle (user-authorized 2026-07-17): removes 94 dead decoration-lemma decls + optional 3 _apply aliases (H1 scope), and 2 pinned unused mathlib imports (M2 pinned scope) from tier2 audit findings.

  • H1: interval-membership variant decorations + cascade-dead (0-reference, no attrs) → 94 removals across 5 files
    • Whole-file deletion: IsingModel/PseudoMass/FromParamsBounds/Intervals.lean (21 decls)
    • File edits (ref-0 decl removal): TwoPoint.lean, CorrelationInfinite/Bounds.lean, PseudoMass/Ext.lean, PseudoMass/Basic.lean
  • M2 pinned: TransferMatrix/CycleGraphLink.lean (remove Mathlib.Tactic), Inequalities/WalkSum.lean (remove Mathlib.Tactic.Positivity)

Deferred: H2 gate (user approval pending), M1 file splits, mathlib fine-grained imports, _symm_apply attr review.

Test plan

Closes #4535

🤖 Generated with Claude Code

phasetr and others added 3 commits July 17, 2026 01:10
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…n lemmas

Pure removal of unreferenced theorems flagged by the tier-2 dead-decl audit
(finding H1). All 97 are plain theorems with no attributes and no surviving
referrers (78 leaf ref-0 + 16 cascade-dead + 3 unused '_apply' unfold aliases).

- PseudoMass/FromParamsBounds/Intervals.lean: whole file dead -> deleted, and
  its sole import dropped from PseudoMass/FromParamsBounds.lean (21 lemmas).
- AmbientLattice/TruncatedFunctions/TwoPoint.lean: 14 truncated2Infinite_* bounds.
- AmbientLattice/CorrelationInfinite/Bounds.lean: 13 correlationInfinite_* bounds.
- PseudoMass/Ext.lean: 31 pseudoMassExt_*/neg_pseudoMassExt_* lemmas.
- PseudoMass/Basic.lean: 15 pseudoMass_* lemmas.
- Removed 3 unused unfold aliases: susceptibilityAlongExhaustion_apply,
  susceptibilityInfinite_apply, spontaneousMagnetization_apply.

No mathematical content lost: every KEPT lemma still builds; no survivor proof
edits needed. Build green (zero warnings), GKSTest passes, zero sorry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Import hygiene (tier-2 audit finding M2): CycleGraphLink no longer needs the
full `import Mathlib.Tactic` umbrella; the tactics it uses are provided by the
existing SimpleGraph.Circulant/.Finite imports. The sibling WalkSum candidate
(Mathlib.Tactic.Positivity) was checked and REVERTED -- positivity is genuinely
used there. Build green (zero warnings), GKSTest passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@phasetr
phasetr marked this pull request as ready for review July 16, 2026 20:54
@phasetr
phasetr merged commit 1793e54 into main Jul 16, 2026
1 check passed
@phasetr
phasetr deleted the refactor/dead-decoration-removal-2026-07-17 branch July 16, 2026 20:55
phasetr added a commit that referenced this pull request Jul 16, 2026
* chore(issues): close-out mirror sync for #4535 refactor cycle

Merged PR #4536 (commit 1793e54): 97 dead decoration lemmas + 1 unused import
removed. Issue auto-closed. Mirror updates: #4535.md CLOSED completed status,
INDEX.md row updated with merged commit + deferred items noted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore(issues): add #4535 status table row to INDEX.md

Add missing table row for #4535 refactor cycle in established format:
state CLOSED completed (2026-07-17), role and PR merge commit noted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore(issues): correct M2 wording in #4535 narrative — safe not unsafe

Fix parenthetical: 1 safe import removal (1/2 candidates; unsafe WalkSum
candidate rejected). CycleGraphLink removal was safe; WalkSum was rejected
as unsafe false positive.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
phasetr added a commit that referenced this pull request Jul 21, 2026
Delete twelve dead pseudoMassG decoration lemmas from IsingModel/PseudoMass/Profile.lean (745 → 610 lines, deletions only). This completes on the pseudoMassG layer the sweep PR #4536 already did on pseudoMassExt. An independent audit narrowed the original 22 reference-0 candidates to 12: seven are load-bearing inside the file and three are cited by docs/index.md as GJ §17.5 results, so those ten are kept.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@phasetr phasetr mentioned this pull request Aug 10, 2026
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.

refactor: remove 97 dead decoration lemmas + 1 unused import (2026-07-17 tier2 cycle)

1 participant