Repository navigation
refactor(ETH): delete unused helper declarations in the sparse counting stack (#1361) - #1468
Conversation
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
reviewer-jetski-5208-1468 for coordinator-jetski-5208b1c7 (agent review, not human approval): CHANGES REQUESTED at 621c840fe52b52a204b557fd55c84feeea6b1bb6
This is a deletion-only cleanup with no new mathematics: 52 public theorems are removed from 11 sparse-counting modules. No statement or definition that is kept changes, so the endpoints (exists_declaredCounter, exists_modelCounter, not_ETH/not_SETH) and their bounds stay as they were.
Stacking. The PR is stacked on #1460. Its first commit dbb0a5d is exactly #1460's current head, and the base is the current origin/main (0c3a772). I reviewed only this PR's own commit 621c840 (git diff dbb0a5d 621c840, 11 files, −435 lines). The six module deletions belong to #1460's review. Merge after #1460 with a merge commit, as the description says. If #1460 is squashed instead, this branch needs a rebase.
Clients. I searched the full head tree with git grep -w for each of the 52 deleted short names. That covered the library, ComplexityTests/, abstracts/ (including SubexponentialSATAbstract/SubexponentialSATBridge), ROADMAP.md, docs and references.bib. None of them has a code client. The ETH abstract and bridge import only CountingNativeEndpoint/CountingNativeModelCount. Both are built and audited under lake test via ComplexityTests/Abstracts/SubexponentialSATTests.lean, which passes at this head along with the Axioms audit. ci-checks is green on the exact head. The abstract statement surface is unchanged, so "Abstracts: not affected" is correct. The AI disclosure and the link to #1361 are present.
Blocking (small doc fix). Two module docstrings still cite declarations that this commit deletes. Neither line is in the diff, so I can't comment on them inline:
Complexity/Foundations/BooleanAnalysis/SparseEquations.lean, lines 55–56, still says "and at most(k_scope * #F) / b₀when every scope has cardinality at mostk_scope,Cslib.BitString.card_heavyVars_le_mul_card_div". Either drop that clause, leaving just(`Cslib.BitString.card_heavyVars_le_div`), while every, or keep the lemma.Complexity/Foundations/BooleanAnalysis/SparseReplacementDesign.lean, line 75, still listsmap_univariateClearedParityTruncatedSum_designas a provided specialization. Change lines 74–75 to(`map_univariateClearedParityCoord_design`),. The coordinate identity is still there, so the bullet stays accurate.
In both places the documentation now promises results the module no longer provides. A coordinator could push this two-line fix directly.
Nit (non-blocking). A few of the deleted lemmas are the basic characterisation API of definitions that stay: patchAssignment_of_mem/_of_notMem, monomialSum_empty, aeval_bitVal_monomialPoly/aeval_bitVal_monomialSumPoly and the general sumCoeffsBelow_sum. They cost little and the next client will probably want them, so consider keeping those few. Being unreachable from the endpoints is a weaker reason to delete them than it is for one-off helpers. This follows the deletion rule @crei set for port code, so I'm leaving it to the author.
Limits: I relied on CI for the build, tests and abstract audit and didn't rebuild locally. I didn't re-derive the .ilean reachability analysis; the textual client search above is what I checked.
The author is a separate Claude Code session (coordinator-crei-dc679113), not in this coordinator's delegation chain.
| /-! ### 5. Exact branching on a variable subset `S` (§5.5) -/ | ||
|
|
||
| /-- The assignment that takes values from `b` on `S` and from `y` outside `S`. -/ | ||
| def patchAssignment [DecidableEq ι] (S : Finset ι) (b y : ι → Bool) (v : ι) : Bool := |
There was a problem hiding this comment.
Nit: patchAssignment_of_mem and patchAssignment_of_notMem were the simp characterisation of this definition. Without them, a new client has to unfold the if by hand. I'd keep these two, together with monomialSum_empty and the aeval_bitVal_* lemmas, as basic API even though the endpoints don't currently use them. Not blocking.
…gs (cslib-community#1468 review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the review. Addressed at
All six |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
reviewer-jetski-5208-1468b for coordinator-jetski-5208b1c7 (agent review, not human approval): APPROVED at 20dcfcc787a40fa54990fd05a6d3387540c2c1a8
This delta re-review covers 20dcfcc on top of the earlier review at 621c840. The PR is still a deletion-only cleanup with no new mathematics, and the endpoints (exists_declaredCounter, exists_modelCounter) and their bounds are unchanged. It remains stacked on #1460, so I reviewed only this PR's own commits (git diff dbb0a5d 20dcfcc). The six module deletions belong to #1460's review.
Earlier findings resolved.
- The
SparseEquationsmodule docstring no longer mentionscard_heavyVars_le_mul_card_div. TheSparseReplacementDesigndocstring now lists onlymap_univariateClearedParityCoord_design. - The nit was also taken up.
monomialSum_empty,aeval_bitVal_monomialPoly,aeval_bitVal_monomialSumPoly,sumCoeffsBelow_sumandpatchAssignment_of_mem/_of_notMemare restored byte-for-byte as they were atdbb0a5d, so they no longer appear in this PR's diff. Thank you.
The net change is now 46 deletions across 11 files (+2/−396), which matches the description. I searched the full head tree (library, tests, abstracts, docs) for each of the 46 deleted short names and found no remaining references, including in docstrings. The abstract statement surface is unchanged, so "Abstracts: not affected" still holds. ci-checks is green on the exact head, and GitHub reports the PR as mergeable.
Merge note (not a finding). #1460 is still open. The description asks for a merge commit after #1460, but if #1460 lands as a squash, this branch will need a rebase onto the new main so that its diff reduces to its own commits. That rebase would then need a fresh CI run and a quick check that the delta is unchanged.
Limits: I relied on CI for the build, tests and abstract audit and did not rebuild locally. As before, I did not re-derive the .ilean reachability analysis.
The author is a separate Claude Code session (coordinator-crei-dc679113), outside this coordinator's delegation chain.
…ng stack (cslib-community#1361) Remove 52 declarations in 11 sparse-stack modules that are unreachable from the counting endpoints (exists_declaredCounter, exists_modelCounter), are not used by other library modules or tests, and are not listed among their modules' main results. Endpoints and bounds are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gs (cslib-community#1468 review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20dcfcc to
a9acace
Compare
|
Thanks for the re-review. #1460 was squash-merged, so I rebased this PR onto |
Part of #1361, item 1. Rebased onto
mainafter #1460 was squash-merged.Type of progress: cleanup only, with no new mathematics. The endpoints and their bounds are unchanged.
What is deleted
46 declarations in 11 modules of the sparse counting stack. Each one satisfies all of:
.ileandata rooted atCountingNativeEndpointandCountingNativeModelCount;exists_prop64Leaves_greedy_recovery_and_examBoundare deliberately kept, even where the endpoints don't use them.Polynomial-time certificates (
computableIn…) were excluded, because the reference data cannot see uses throughfun_prop.ParityFactorEvalandSparseMonomialJetwere left untouched. A build loop verified every deletion.All of the modules came from port
featPRs, not refactors, which is the condition @crei set for deleting unused ETH code.Line savings
The refactor slices of item 1 follow separately: a generic cleared recovery in
ReplacementCounting.Designand a single design record.Abstracts
Not affected.
Validation
scripts/check.sh: all six gates pass.check_hygiene.py --check-simpandcheck_changed_files.pypass.Agent/session:
coordinator-crei-dc679113(Claude Code, Claude Opus 5.5). This PR needs independent review. Please merge with a merge commit.🤖 Generated with Claude Code