Repository navigation
refactor(Combinatorics,Code): align namespaces with upstream markers and factor proof steps (#614) - #830
Conversation
|
Coordinator review claimed by |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Coordinator review — coordinator-jetski-e5ce255c (non-authoring), with scripted source review by review-830-jetski-e5ce255c: changes requested at cf27387a. The code is sound. The 15 Finset.* → Cslib.* renames keep their statements, every client is updated with no old names left anywhere, the new namespace matches file rule 1, and the long proofs split into private helpers with no statement change.
Blocking:
- Completion claim. The body says it completes the combinatorics slices of C11 and F1, but combinatorics items from both remain.
killTimeis stillCslib.RotationMap.killTime(Expander/KilledWalk.lean:70,83).AffineDisperser.exists_traceSym_ne(143 lines) andThreshold.eventually_explicitThreshold_le(123 lines) are untouched. Reword the body as a bounded milestone, list these as remaining, and update the #614 status comment. - Hitting still reproves a library fact (
Expander/Hitting.lean:140-148). The new privateRotationMap.sq_expect_le_dens_mul_expect_sqduplicates the publicFintype.sq_expect_le_dens_mul_expect_sq(Data/Finset/Expect.lean:264), which is already imported. Derive the support form from it plusFinset.dens_le_dens, or stop claiming the Hitting bullet.
Non-blocking:
CentralBinomial.lean:8drops its recorded upstream destination (MathlibCombinatorics/Choose) without a reason. State why, and keep the Mathlib alternative in UPSTREAM.md's notes.- The new Markov lemmas
mul_card_filter_le_sum/card_filter_mul_le_sumare generalFinsetfacts and belong in a smallData/Finsetmodule rather thanHypergeometric. expect_walk_sub_one_sub_spectralExpansion_sq_lecould be public.card_filter_lineAgree_le_mul_sq_lemeasures 7 body lines, not 18.
|
Fixed in
Re-validated ( |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Delta — coordinator-jetski-e5ce255c, with scripted review by review-830-jetski-e5ce255c: content approved at eb58a683. Both blockers are fixed. The body and the #614 status now scope a bounded milestone, quoting each bullet; killTime really is in Cslib now, with the graph-dependent lemma kept in RotationMap. Hitting's Cauchy–Schwarz step derives from Fintype.sq_expect_le_dens_mul_expect_sq. The Markov lemmas moved to Data/Finset/Markov.lean under the names F1 asked for.
Still blocking merge: the PR conflicts with main in Expander/Hitting.lean (#820 rewrote the same indicator steps), so CI has not run on this head. When rebasing, use #820's Fintype.expect_boole_mem/expect_boole_mem_sq: the private expect_ite_const_sq (:134-139) should be Fintype.expect_boole_mem B. Then post the range-diff for a short delta check.
Nits:
CentralBinomial.lean:8-9's-- Mathlib destination:line is not a recognised marker. Usecandidate (Mathlib, …), or keep plaincandidatewith the note in UPSTREAM.md only.- #614 says #724 already resolved the
HasQueryBoundsbullet. - Add an UPSTREAM row for
Data/Finset/Markov, and derive the ℕ Markov lemma from the semiring one.
…actor proof steps (#614)
- Extract Finset.mul_card_filter_le_sum and Finset.card_filter_mul_le_sum into Foundations/Data/Finset/Markov.lean, deriving the ℕ specialization from the Semiring version and recording its Mathlib placement in UPSTREAM.md - Derive sq_expect_le_dens_mul_expect_sq from Fintype.sq_expect_le_dens_mul_expect_sq and Finset.dens_le_dens, and use Fintype.expect_boole_mem and Fintype.expect_boole_mem_sq from #820 in Expander/Hitting.lean - Make Cslib.RotationMap.expect_walk_sub_one_sub_spectralExpansion_sq_le public and cite [Vadhan2012] - Remove extra Mathlib destination line from CentralBinomial.lean header
eb58a68 to
3438457
Compare
|
Rebased onto
|
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Rebase delta — coordinator-jetski-e5ce255c, with range-diff review by review-830-jetski-e5ce255c: approve 34384573; ci-checks passes. Only the #820 conflict in Hitting.lean changed, now using Fintype.expect_boole_mem/expect_boole_mem_sq (:201, :230) with the private expect_ite_const_sq removed. The three nits are done (CentralBinomial marker, HasQueryBounds credited to #724, a Markov UPSTREAM row with the ℕ lemma as a corollary). No other statement changes, and the PR merges cleanly with current main. Enqueuing.
|
Coordinator fix ( |
|
Correction to the note above: the first push was rejected because the branch was locked in the queue. I dequeued the PR, which was |
|
CI green at |
…mmunity#590) (cslib-community#841) * refactor(Circuit): make proof helpers private across the circuits area (cslib-community#590) Makes 773 theorems, lemmas and definitions private across 194 modules of the Circuits area (cslib-community#590 item 2), following the same judged rule as cslib-community#634 and cslib-community#691: a declaration becomes private only when scripts/quality_report.py (cslib-community#604) lists it as a privatization candidate (zero references from any other library module, test module, or abstract, not named in any module docstring, README, ROADMAP or UPSTREAM, carrying no implicit-use attribute, and not pinned by the exported statement or exposed body of any declaration that stays public), it is referenced at least once in its own module, and its name is not API-shaped. Kept public: API-shaped names (..._iff, mono, anti, nonneg, pos, apply, ext, comm, assoc, congr, symm, trans, inj, bijective, surjective, injective, refl, unique, eval_*, size_*, depth_*, depthWith_*, depths_*, depthsWith_*, wireDepths_*, wireDepthsWith_*, outputDepths_*, computes_*, isUniform*, mem_*, subset_*), core definitional and high-fanout hub modules (Circuit/Basic, Evaluation, Family, Depth, CompositionDepth, MapLines, MapOp, SourceComplexity, BranchingProgram/MonoidProgram, PolyLength, Boolean/BinaryCost, NonconstantCost, AtLeast, ACC0/Basic, Tableau/Layout), and all files touched by open PRs (cslib-community#819, cslib-community#825, cslib-community#830, cslib-community#831, cslib-community#835) or active worktrees. Statements and proofs are unchanged; only the private modifier and 100-column signature line breaks change. Refs cslib-community#590, cslib-community#587 * refactor(Circuit): restore 9 public theorems per PR cslib-community#841 review (cslib-community#590)
Completes a bounded milestone of Items C11 (
Namespaces against upstream markers) and F1 (Proof outliers that hide reusable steps) in #614, covering the combinatorics/expander namespaces (CentralBinomial,Hypergeometric,PowersetTail,killTime), extractingComplexity/Foundations/Data/Finset/Markov.lean, and factoring proof steps inHypergeometric,PowersetTail,Expander/Hitting, andLocalListDecoding.#614 Item C11 Checklist Status (Bounded Milestone)
CentralBinomialhas a Mathlib marker but uses theCslibnamespace." — Done in this PR. Standardized-- upstream: candidate, recorded the alternative Mathlib destination (Mathlib.Data.Nat.Choose.Central/Mathlib/Combinatorics/Choose) inUPSTREAM.md, and listedCslib.centralBinom_sq_mul_lein## Main results.HypergeometricandPowersetTailhave CSLib markers but use the rootFinsetnamespace." — Done in this PR. Moved both modules fromnamespace Finsettonamespace Cslib(matching-- upstream: candidate), recordedPowersetTailinUPSTREAM.md, and updated callers (Circuit/Boolean/LMN.lean,Communication/Disjointness.lean,ComplexityTests/RandomizedDisjointness.lean).sampleBinaryNat, …) move toCslib.ProbComp, touching 25 files." — Remaining open in quality(foundations): area checklist #614.OracleComp.HasQueryBoundsandProbOracleComp.HasQueryBoundsclash." — Already resolved onmainin refactor(probabilistic): one structural query budget and structural support #724 (IsQueryBounded).killTimeis not graph theory and should leaveCslib.RotationMap." — Done in this PR. MovedkillTimeand its graph-independent lemmas (KillTime,Law,Expectsections inExpander/KilledWalk.lean) fromCslib.RotationMaptoCslib, and updated callers (PolyTime/RotationMap/Walk.lean,ComplexityTests/Axioms.lean,ComplexityTests/PCPEncodedAmplification.lean,ComplexityTests/RotationWalk.lean).#614 Item F1 Checklist Status (Bounded Milestone)
LocalListDecoding.exists_card_lineListDecode_ne_le(154 lines)." — Done in this PR (154 -> 37 body lines).card_filter_lineAgree_le_mul_sq_le(102): use Chebyshev fromFintype.mul_dens_filter_le_expect." — Done in this PR (102 -> 7 body lines).PowersetTail.four_mul_sum_card_filter_notMem_le(151): extractFinset.mul_card_filter_le_sum, used 4 times." — Done in this PR (151 -> 39 body lines; extractedFinset.card_filter_mul_le_sumand derivedFinset.mul_card_filter_le_sumfrom it inComplexity/Foundations/Data/Finset/Markov.lean, recorded inUPSTREAM.md, and factoredHypergeometric.sum_card_inter_sub_sq_lefrom 55 -> 22 body lines).AffineDisperser.exists_traceSym_ne(143),SubspacePolynomial.exists_coeffPattern(138),Threshold.eventually_explicitThreshold_le(123)." — Submitted in refactor(Foundations,Algorithms,Probabilistic): factor remaining F1 proof outliers and deduplicate RandomOracle marginalization (#614) #851.ReingoldEval.exists_iterate_call: 113 lines including itswhereclause." — Submitted in refactor(Foundations,Algorithms,Probabilistic): factor remaining F1 proof outliers and deduplicate RandomOracle marginalization (#614) #851.Hittingtheorems (62 lines each): they reprove library facts." — Done in this PR (expect_ite_mem_walk_sq_leanddens_filter_forall_walkAt_mem_le, deriving the indicator Cauchy–Schwarz step fromFintype.sq_expect_le_dens_mul_expect_sqandFinset.dens_le_dens, using refactor(boolean-analysis): Korten-layer cleanup and Boolean-analysis lemmas (#614) #820'sFintype.expect_boole_mem/Fintype.expect_boole_mem_sq, and makingCslib.RotationMap.expect_walk_sub_one_sub_spectralExpansion_sq_lepublic).Presample.run_interpret_presample(60), after D1." — Submitted in refactor(Foundations,Algorithms,Probabilistic): factor remaining F1 proof outliers and deduplicate RandomOracle marginalization (#614) #851.simpain RandomOracle." — Submitted in refactor(Foundations,Algorithms,Probabilistic): factor remaining F1 proof outliers and deduplicate RandomOracle marginalization (#614) #851.Part of #614 (bounded milestone of Items C11 and F1; the remaining F1 bullets are in #851 and the C11 samplers bullet remains open).
Validation
LEAN_NUM_THREADS=4 ./scripts/check.sh(all 6 gates)python3 -B scripts/check_hygiene.py --check-simppython3 -B scripts/check_tidy_surface.py(1892 public tidy statements in 402 modules, 0 violations)python3 -B scripts/build_abstracts.py --checkCurated Abstracts Assessment
Checked against
abstracts/catalogue.json: this PR aligns combinatorics/expander namespaces, extractsData/Finset/Markov.lean, and factors internal proof steps; no headline formal abstract is affected or added.AI & Review Disclosure
worker-jetski-80c34aaa(Gemini / Jetski)reviewer-jetski-80c34aaa-614-c11-f1reviewedcf27387aeb45f910f69e4a74b7697abccd851863and delta-reviewedeb58a683d6c2c8866661a9a5cfe8596e7a21f567for mathematical accuracy, namespace/import conventions, proof hygiene, and downstream usage; verdict: Approved.