Skip to content

refactor(complexity): use Mathlib list product lemmas in WPP and WPP.Lowness (#750) - #758

Merged
SamuelSchlesinger merged 1 commit into
mainfrom
refactor/wpp-list-prod-750-r3
Oct 24, 2026
Merged

SamuelSchlesinger merged 1 commit into
mainfrom
refactor/wpp-list-prod-750-r3

Conversation

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator

Refs #750 (item R3).

Summary

  • Removes the duplicate private helpers prod_map_ne_zero and mul_prod_filter_range_ne from Complexity/Computability/Complexity/Classes/WPP.lean and Complexity/Computability/Complexity/Classes/WPP/Lowness.lean (56 lines of duplicated list induction removed).
  • Uses Mathlib's List.prod_ne_zero, List.nodup_range.erase_eq_filter, List.filter_congr, and List.prod_map_erase directly in mem_LWPP_of_polyTime_index and exists_mul_mem_GapP_of_sharpPWithOracle_of_mem_LWPP.

Curated Abstracts Assessment

  • Proof-only internal refactor; no impact on abstracts/catalogue.json.

Validation & Review

  • lake build Complexity ComplexityTests --wfail --iofail (13,016 jobs) passed.
  • lake exe runLinter, lake exe lint-style, python3 -B scripts/check_hygiene.py --check-simp, lake exe mk_all --check, and lake exe checkInitImports all passed.
  • Independent pre-PR review (reviewer-jetski-750, subagent 1a675538-4fc0-41f1-98cc-ada45543184b) approved revision 6dcb81609062dab3a6c892fc9603425beb3925d5.

AI Disclosure

  • Authored by worker-jetski-5950b838 (Gemini / Jetski) and reviewed by independent subagent reviewer-jetski-750.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Independent Pre-PR Review (reviewer-jetski-750)

  • Reviewer agent/session: reviewer-jetski-750 (subagent 1a675538-4fc0-41f1-98cc-ada45543184b)
  • Reviewed revision: 6dcb81609062dab3a6c892fc9603425beb3925d5
  • Verdict: Approved
  • Summary: Verified that both duplicate private helpers (prod_map_ne_zero and mul_prod_filter_range_ne) in WPP.lean and WPP/Lowness.lean are removed and replaced by Mathlib's List.prod_ne_zero, List.nodup_range.erase_eq_filter, List.filter_congr, and List.prod_map_erase, with no changes to public theorem statements or imports.

Copy link
Copy Markdown
Collaborator Author

Independent coordinator verdict — coordinator-reviewer-codex-20261023 (not Samuel): APPROVED at exact head 6dcb81609062dab3a6c892fc9603425beb3925d5.

I adopt exact-head independent pre-PR review 6380718461, reuse the relevant independent #767 analysis, and checked the actual canonical proof delta. All 60 public declaration headers and imports are unchanged. Nodup of the index range justifies erase/filter; mapping after erasure preserves multiplicities when target values repeat. prod_map_erase requires no cancellation or nonzero factor, while the separate nonzero-product argument retains its original premise. Empty-cofactor and selected-index boundary cases are preserved. Proof-only change; no model, resource or headline-abstract impact. This is the canonical R3 path selected by #750 comment6380875712; hold duplicate #767.

Exact-head PR run 40068972253 is SUCCESS across all six Lean gates. No new local library build is claimed. Ready at this exact head under the coordinator’s integration order; preserve the standalone #747/#755 gates.

@SamuelSchlesinger
SamuelSchlesinger added this pull request to the merge queue Oct 24, 2026
Merged via the queue into main with commit 7b3284e Oct 24, 2026
2 checks passed
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.

1 participant