Repository navigation
chore(Machines): remove unreferenced tidy declarations (#862) - #1673
SamuelSchlesinger merged 2 commits into
Conversation
…ty#862) Delete 17 public tidy declarations with no reference in the library, tests, abstracts, guide, docs or scripts: the unused tidy closure rules of ComputableTidilyInPolySpace (the plain ComputableInPolySpace rules cover them), three ComputableTidilyInSpace rules, two ComputableTidilyInDegree list operations, the tidy polynomial-time foldl and encoding transfer, the tidy-space iff bridge and ComputableTidilyInO.isComputable. Lower the tidy surface baseline from 704 to 687 statements. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
reviewer-crei-opus (agent review, not human approval). Verdict: FINAL, advisory (same session as the authoring workers). Head Are the removed names referenced anywhere?
Could anything have used them implicitly?
Does #862 plan to keep any of these?
Docstrings:
Baseline: the six module deltas are 19→16, 4→3, 14→12, 12→4, 19→17 and 5→4, i.e. −3−1−2−8−2−1 = −17, so 704 → 687. That matches the JSON and the 17 names. Limits:
|
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine — independent agent review, not human approval. Approve 16321e33ff1e8369df71df3684c86fcdcce89010 (complete eight-file layer over 96fd02a85579bbbce97c02110ed80da02684cb2e).
The seventeen removals have no remaining named clients; the surviving foldl' prefix matches are distinct declarations. Removed automation registrations are confined to the unused tidy polynomial-space closure rules; its predicate and of_polyTime registration, plain closure rules and bridges remain. Existing ResourceBoundsPlain clients cover the intended mixed plain/tidy usage. Machine kernels, definitions and retained theorem statements are unchanged. Documentation targets resolve, and the baseline changes sum to 704→687 across the same 78 modules. The alias-free deletion follows the current policy; no curated-abstract or guide scope change found.
Validation: git diff --check passed; author reports all six local gates and static audits passed, including the build/test check needed for implicit fun_prop uses. At inspection Lean CI 40964859747 was running; PR title passed. No local elaboration/build. Combined tidy-baseline changes and supported-pin restacking require final delta validation.
|
Coordinator All six default local gates and exact post-build baseline generation passed, followed by fresh canonical/Guide/Comparator success and required actual-prefix merge-group success. Exact-main CI passed all six, restored that validated producer (attempt 1), rebuilt no |
Normal merge of actual main 9b51132. Resolve only the generated tidy-surface baseline by retaining main and applying the original six module count reductions. Every reviewed Lean/doc payload and mode is unchanged from 16321e3. Validation pending; private integration checkpoint. AI-assisted coordinator integration.
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Coordinator review_logsq_savitch_1671: APPROVE exact 613bc0f under the validated coordinator-fix rule. Source-preserving ordinary main/generated-baseline reconciliation only; all seven independently reviewed Lean/doc payloads remain exact and retained public meanings are unchanged. Fresh canonical all-six, Guide and Comparator succeeded. The single scope/preservation/validation record is #1673 (comment) . Agent review, not human approval.
Removes 17 public tidy declarations in
Complexity/Computability/Machines/Turing/MultiTape/**that nothing in the tree refers to. No aliases are added, following the pre-release policy. Part of #862 (step 4/5: shrink the tidy calculus toward the machine-level kernel). Nothing in the kernel the issue keeps is touched. That means noComputesTidily…, normal form, combinators, raw constructions or streaming lemmas.Removed (all in
Turing.MultiTapeTM)Complexity/PolySpace.leanComputableTidilyInPolySpace.polyBounded_length,.comp,.id',.prod,.ite,.congr,.iterate,.comp'Complexity/InSpace.leanComputableTidilyInSpace.mono_le,.of_encIn_eq,.appendComplexity/InSpace/Plain.leancomputableInSpace_iff_computableTidilyInSpaceComplexity/Lists.leanComputableTidilyInDegree.dropUnary,ComputableTidilyInDegree.lengthComplexity/PolyTime.leanEncodingEquiv.computableTidilyInPolyTime_iff,ComputableTidilyInPolyTime.foldlHalting/Computable.leanComputableTidilyInO.isComputableAfter this PR the tidy polynomial-space predicate keeps only its definition,
of_polyTime(used byComplexityTests/ResourceBoundsPlain.lean), its bridges inPolySpace/Plain.leanand the linear-time counter. Its closure rules (composition, pairing,ite,congr, iteration) already exist on the plain predicateComputableInPolySpaceinPolySpace/Plain.lean.ComputableTidilyInPolySpace.compand.polyBounded_lengthwere used only bycomp'anditerate, which are removed too. No private helper became unused.Module docstrings that listed the removed declarations are updated:
PolySpace,PolyTime,Lists,InSpace/Plain,Halting/ComputableandResourceBounds.ResourceBoundsnow points toComputableInSpace.tidy/.of_tidyinstead of the deleted iff.Evidence of no references
origin/main96fd02a, a full build ofComplexity,ComplexityTestsandComplexityAbstractswas checked withpython3 scripts/audit_queries.py references --unused Complexity/. It reports each removed declaration as referenced "nowhere", exceptComputableTidilyInPolySpace.comp/.polyBounded_length, which it reports as "only its own module" (the removedcomp'/iterate).Complexity/,ComplexityTests/,abstracts/,guide/,docbuild/,scripts/and the top-level*.mdfiles. The only hits were the definitions and the module docstrings updated here. There are no hits in tests, abstracts, guide or scripts.fun_proprules (PolySpaceid',prod,ite,comp'), which can be used without being named. The full build and test run below show that no proof needed them. That check matters: an earlier version of this PR also removedComputableTidilyInPolyTime.increment, whichaudit_querieslists as unreferenced, andfun_propinClasses/IP/PSPACE.leanfailed without it. It is kept.Line counts
ComputableTidilyInPolyTime.polynomiallyBounded(PolyTime/Nat.lean) has not landed, so that derivation is left for when it does.Baseline
In the original reviewed layer, the tidy total dropped by 17. The source-preserving supported-pin main merge at
613bc0fdcombines all existing baseline changes: the exact post-build generator reproduces 690→673 public tidy statements; other modules and entries are preserved. Changes:PolySpace12→4,InSpace19→16,InSpace/Plain4→3,Lists14→12,PolyTime19→17,Halting/Computable5→4. These are exactly what--updatewrites.Checks (at the PR head)
scripts/check.sh: all 6 gates pass. These are build and test with--wfail --iofail,mk_all --check,lint,lint-styleandcheckInitImports.python3 scripts/check_hygiene.py --check-simp: passes.python3 scripts/check_changed_files.py --base origin/main: passes.python3 scripts/check_tidy_surface.py: 673 statements in the combined supported-pin tree, matching the exact generated baseline.python3 scripts/check_pr_names.py: flags the 17 removed names above as removed by this change, as expected.Not included
These are other unreferenced tidy declarations I left out on purpose:
InSpaceLib,Quantitative,PolyTime/Nat/Binary,CookLevin/Reduction.Combinators/*,Streaming,Encodings/StreamFold,Plumbing/OnWords,Universal/InPlace,ReadMachine/Tidy,Probabilistic/*(the PTM normal form, step 3), andPolyTime/Nat/BinaryDiv(feat(machines): complete plain calculus and compare automation coverage (T1) #608 slice F).ComputableTidilyInO.filterWith, which the issue thread plans to migrate.fun_proprules ofComputableTidilyInPolyTime(PolyTime/{Tape,Int,Int/Binary,List,Configuration,Basic,Pi,Nat}). Plainfun_propgoals reach them through the tidy-to-plain bridge, for exampleComplexityTests/TapePolyTime.lean. They need plain restatement, not deletion.Independent source/API review approves this revision. The bounded main/baseline refresh is now published at
613bc0fd80840c95539e2d7134a2ba9c318e11ef. All seven reviewed Lean/doc payloads and modes are exact; only the combined baseline was resolved. All six default local gates and static audits passed at that exact clean revision. Fresh current-head hosted validation is required before queue integration.Catalogue assessment: no impact on selected abstracts, their bridges, guide scope or rendering. The removed declarations have no surviving clients; retained machine definitions and theorem statements are unchanged, as checked in the review.
AI disclosure: Claude Code (worker
worker-crei-dc679113-cleanup1) prepared and validated this change.🤖 Generated with Claude Code