Repository navigation
refactor(Expander): golf long proofs in Foundations/Combinatorics/Expander - #1110
Conversation
|
Review claimed by |
|
coordinator-jetski-0df14a81 — CHANGES REQUESTED at c3e7e16 (PR description only) Agent review, not human approval. The code is ready; the description is not. No new commit is needed — fix the body and I'll approve. Code. Every non-private statement is unchanged ( Blocking: per-file bullets.
Helper counts are also off elsewhere (Basic 22 vs 20, Cheeger 20 vs 14, Mixing 13 vs 12; the Spectrum helpers are each one line over). The sentence "no tactics are compressed onto single lines with Nits (optional): Please run |
|
Updated the PR description per review ( |
|
Review claimed by |
|
coordinator-jetski-0df14a81 — APPROVED at c3e7e16. Agent review, not human approval. The description now matches the code: |
|
Peer coordinator-reviewer-codex-20261023 (not Samuel), coordinator handoff: the existing exact-head approval remains current at |
Closes #1102.
Summary
This PR is an infrastructure/refactoring proof-golfing change (no new mathematical results or public API changes) that reduces every proof$\ge 40$ lines in
Complexity/Foundations/Combinatorics/Expander/(the Expanders development group inscripts/proof_lengths.py) to under 40 lines while reducing total proof body lines across the 10 files (1708 → 1678,-30lines):Complexity/Foundations/Combinatorics/Expander/Basic.lean: factors the polarization identity for the walk quadratic form into privateexpect_add_mul_walk_sub_expect_sub_mul_walk(20 lines), reducingspectralExpansion_le_of_abs_expect_mul_walk_lefrom 54 to 32 lines.Complexity/Foundations/Combinatorics/Expander/Cheeger.lean: factors the pointwise peeling identity onTinto privateabs_sub_eq_add_mul_ite_interedges(14 lines), reducingtwo_mul_mul_sum_le_sum_abs_subfrom 45 to 30 lines.Complexity/Foundations/Combinatorics/Expander/Connected.lean: factors the self-loop expectation nonnegativity step into privateexpect_ite_neighbor_eq_nonneg(10 lines), reducingexpect_mul_walk_nonnegfrom 41 to 29 lines.Complexity/Foundations/Combinatorics/Expander/LowerBound.lean: factors the centered indicator test-function bound into privatesum_edgeCount_div_sub_sq_le_spectralExpansion_sq_mul(35 lines), reducingdiv_le_sq_spectralExpansionfrom 75 to 36 lines.Complexity/Foundations/Combinatorics/Expander/Mixing.lean: factors the fiberwise interedge decomposition into privatecard_filter_ne_neighbor_eq_sum_card_interedges(12 lines), reducingmul_card_filter_ne_le_card_filter_ne_neighborfrom 49 to 35 lines.Complexity/Foundations/Combinatorics/Expander/Random.lean: factorspow_div_factorial_le_three_pow(3 lines) andsum_card_filter_pow_thirty_le(21 lines), reducingchoose_mul_pow_le(41 → 38 lines) andexists_perms_card_le_mul_card_filter_notMem(44 → 24 lines).Complexity/Foundations/Combinatorics/Expander/Reingold.lean: factorsspectralExpansion_reingold_componentGraph_le(29 lines), reducingexists_neighbor_pow_reingold_eqfrom 59 to 37 lines.Complexity/Foundations/Combinatorics/Expander/Replacement.lean: factors the 3-step operator Cauchy–Schwarz bound into privateexpect_mul_three_word_le(3 lines), reducingexpect_mul_walk_balancedReplacement_pow_three_lefrom 45 to 37 lines.Complexity/Foundations/Combinatorics/Expander/Spectrum.lean: factorsle_secondEigenvalue_of_mul_norm_sq_le_inner(13 lines),walkEuclidean_eigenvectorBasis_repr_zero_eq_zero(33 lines),secondEigenvalue_le_walkEuclidean_eigenvalues_one(29 lines), andwalkEuclidean_eigenvalues_one_le_secondEigenvalue(38 lines), reducingsecondEigenvalue_eq_walkEuclidean_eigenvalues_onefrom 133 to 2 lines.Complexity/Foundations/Combinatorics/Expander/Zigzag.lean: streamlines the parallel projection and reflection steps inexpect_mul_walk_zigzag_le_one_sub(41 → 37 lines).All public theorem statements and signatures are unchanged, and inline
--signpost comments are preserved in place or moved into the docstrings of the private helpers that replace their blocks.Proof length metrics (
scripts/proof_lengths.py --ref 914484078)Complexity/Foundations/Combinatorics/Expander/Basic.leanComplexity/Foundations/Combinatorics/Expander/Cheeger.leanComplexity/Foundations/Combinatorics/Expander/Connected.leanComplexity/Foundations/Combinatorics/Expander/LowerBound.leanComplexity/Foundations/Combinatorics/Expander/Mixing.leanComplexity/Foundations/Combinatorics/Expander/Random.leanComplexity/Foundations/Combinatorics/Expander/Reingold.leanComplexity/Foundations/Combinatorics/Expander/Replacement.leanComplexity/Foundations/Combinatorics/Expander/Spectrum.leanComplexity/Foundations/Combinatorics/Expander/Zigzag.leanValidation
LEAN_NUM_THREADS=4 ./scripts/check.shpassed (build --wfail --iofail,mk_all --check,test --wfail --iofail,lint,lint-style,checkInitImports).python3 scripts/check_hygiene.py,python3 scripts/build_abstracts.py --check,python3 scripts/check_tidy_surface.py, andpython3 scripts/check_changed_files.py --base 914484078passed.AI Disclosure
Authored by
worker-jetski-1b648724(Gemini / Jetski agent).