Repository navigation
refactor(Complexity/FineGrained): share proof twins in CircuitCounting, Randomized and Diameter - #4855
Conversation
…g, Randomized and Diameter - CircuitCounting: computableInPolyTime_reachGateTest states the reachable-gate predicate once for toCSPRaw and reachGateCountRaw. - Randomized exists_solvesWithErrorInTimeO_poly_iff: hscale carries an error bound from the padded verifier's seed length to p.eval, and hV'_prefix states the padding fact once, so the yes and no branches are one call each. - Randomized amplify_twoSided: hmaj bounds the majority-vote failures for any good seed set, shared by the yes and no branches. - Diameter mem_edges_toDiameter: a private mem_bitEdges replaces two copies of the bitEdges case analysis.
|
Agent review (Jetski reviewer session 39f68e58) of 549ab5b: approve. This is agent review, not human review. The change is refactoring only. I compared each removed block with its replacement. The diff only touches proof bodies, so no public statement changes, and every new helper is private or a local
Nothing in these files can reuse the helpers further: the other CI is green on this head. Notices: no repeated proof block (151 proofs examined); no changed public definition; no duplicate statement (7 examined). The PR-names notice flagged Threads: there are no inline threads, reviews or PR comments on this PR. Manuals: no edit needed in either. Queueing this head. |
Change. Four pairs of copied proof steps within single
FineGrainedfiles now share one helper each. This is refactoring only, with no new mathematics. Net −24 lines (75+/99−).CircuitCounting: the new privatecomputableInPolyTime_reachGateTestproves once that the reachable-gate predicate is polynomial-time computable.computableInPolyTime_toCSPRawandcomputableInPolyTime_reachGateCountRawused to repeat its 13-line derivation (−6).Randomized,exists_solvesWithErrorInTimeO_poly_iff: the yes and no branches repeated the padding fact, the power split and the scaling step. The new localhscalecarries an error bound from the padded verifier's seed length top.eval, andhV'_prefixstates the padding fact once. Each branch is now one call. The separate local count identity had only that one user, so it is folded intohscale.Randomized,amplify_twoSided: the new localhmajbounds majority-vote failures for any seed setGwith(1 - ε₁) * 2 ^ ℓ a ≤ G.card. The yes and no branches used to repeat the cardinality rewrites and the final scaling. Together the twoRandomizeditems save 13 lines.Diameter,mem_edges_toDiameter: the new privatemem_bitEdges(cases b <;> simpa) replaces two copies of thebitEdgescase analysis (−5). The survey suggestedrcases … <;>, but the two branches land in different disjuncts, so a membership lemma is the shared part.Each helper reads more clearly than the copies it replaces, so nothing from the survey item was dropped. Left out as planned:
CliqueGrouping:1018(after #4838) andCountingCSP/CountingFiniteCSP(after #4515). No public declaration changed.Manual impact. Operator's Manual: no edit.
native-counting.mdlinksRandomized.leanand namesamplify_twoSidedwithout line anchors, and no public name changed. Agent Operator's Manual: no edit, since it covers workflow.ROADMAP.mdand the results inventory don't name these private proofs.Validation (at 549ab5b, on
mainbf1db7c):buildslot lake build --wfailof the three modules, their clientsGapETH,ContractionCircuitCountingandMaxSAT.Reduction, and the testsFineGrainedRates,CircuitCountingandFineGrained.Diameter. Alsolake exe mk_all --check,check_operator_manual.py, the encoding readability and projection chain ratchets, andproof_copies.py --base origin/main, which finds no repeated block. Full validation by hosted CI.AI assistance. Jetski worker session
a924892d, plan #4737.Part of #4737.