Repository navigation
feat(WeightedThreshold): two-address-block bounds for Andreev's function (M4) - #4774
Conversation
…ion (M4) Sign-coherent depth-two circuits computing andreev 2 m need at least m - 1 bottom gates (XOR table on the cube restriction plus a ring lemma for unate grid functions), and andreevTwoBlocksCircuit computes andreev 2 m with exactly 4 ceil(m/2) + m block-symmetric bottom gates. Part of #4640. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chris-ai1
left a comment
There was a problem hiding this comment.
Independent agent review by this T3 delegated-task session, Codex codex-review-4774-20261112, on exact head 6fec765a9321b52eea8e461d7e35b62280238da2. I did not author, implement or design this change, and reviewed its source and evidence in a separate context. This is agent review on the shared account, not human or platform approval.
Verdict: no blocking mathematical or API defect found in the full diff; approval is held pending the required CI advisory and rendered-manual review. I read origin/main:AGENTS.md first and the pinned CSLib guidance. No local Lean build or full check was run; disk space was 42G free.
Source fidelity: I read the current ECCC draft, SHA-256 abadbd2fd22232a0af72dd53fa78dd63b02d8886a73100deb9dac7ad4ed39f50, remark “Two address blocks”, now lines 875–879, rather than claiming to have read the author's earlier 71f5738c… version. I also read the companion draft, SHA-256 2802eff9b095af2f52d81359333cdbd7a3a963ec4a608b2be15b0cd5a9d7f68e, prop:k2 and its proofs/reproduction paragraph. Both endpoints match: for outputBottomGates: nonzero aggregated gate weights at the designated output, excluding dead/cancelled connections. No extra positivity or balance hypothesis is imposed; natural subtraction correctly makes
The lower proof is sound on inspection. The XOR-table restriction forces nonzero mixed difference in some splitting gate, since the direct input contribution is separable and no threshold of a zero-mixed-difference form realizes XOR or its complement. circuitSplitGates_subset transfers the witness to the same output-gate count. The ring lemma is usefully more general than separable threshold gates: any Boolean grid function with uniform monotone/antitone orientation in each coordinate. Same-kind cut squares form an antichain; the border is covered by two product-order chains; the reflection bijections preserve the border and cut count. The border-cover/union-cardinality argument then gives
The upper construction's five staircase families, opposite-block unit addresses, top coefficients and threshold match the draft. Its index cardinality counts bottom gates, while size_andreevTwoBlocksCircuit includes the additional top gate. Equal integer block weights establish block symmetry and sign coherence; integer weights/thresholds are visible in the construction. I inspected the staircase reduction and four parity branches, plus the checked test clients (including size 13 at interpretation_andreevFormWeight, also used by M4. SplitCounting adds a linearity lemma without changing old statements.
I accept the two source-level repeated-block dispositions described in the PR: the coordinate-specific reflection bijections contain short arithmetic bookkeeping, and the four parity branches make the actual finite truth-table cases explicit. They do not duplicate a substantial mathematical argument requiring another abstraction here. This assessment does not substitute for inspecting the pending CI candidates.
Manual/provenance source review: the Operator's Manual correctly distinguishes bottom count from total circuit size, names the M1 and M4 APIs, links complete test clients, and identifies these as original AI-assisted results from an unpublished draft. The Agent Operator's Manual needs no edit because roles/workflow are unchanged. Keeping ROADMAP scope-only, the broader issue open, candidate upstream markers and the original-results registry exclusion is consistent with repository policy. Nonblocking wording nit: “all weights doubled” should say the top affine coefficients and threshold are doubled; the bottom gates retain their draft weights and thresholds.
Readiness hold: Lean CI is still in progress. Its repeated-proof step has succeeded, but gh run view --log reports that logs are unavailable until completion, so I have not read that actual notice or the Parallel-definition/Duplicate-statement notice. The manual PDF build and Guide are also pending. Title and HTTP-cache tests pass. Before approval, inspect all three actual advisories and resolve relevant candidates/coverage limits, confirm final-head validation, and inspect the affected rendered manual pages. No queue or merge action, per the user's explicit instruction.
|
Coordinator integration record at
Queueing. |
Resolve the manual conflict in circuits-and-formulas.md by keeping both sides: #4774's paragraph with this PR's weight-bound sentences inserted after the sign-coherence sentence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of #4640, milestone M4 (two address blocks,$k=2$ ). Based on
main.Mathematical progress. For two address blocks, both sign-coherent bounds are linear in$m$ :
andreev 2 mwhose bottom gates are sign-coherent has at leastsub_one_le_card_outputBottomGates_andreev_two; fordepthTwoInputscircuits,sub_one_le_of_depthTwoInputs_andreev_two).andreevTwoBlocksCircuit mis an explicitdepthTwoInputscircuit that computesandreev 2 mon every input. It has exactlyProof of (a). Fix the table$x_c=c_0\oplus c_1$ . On each unit square of block counts (M3's cube restriction), the circuit computes XOR or its negation. Restricted to the square, the circuit is an upper level set of its live form. If no bottom gate had a nonzero mixed difference there, the live form would be separable; the output gate's direct input wires are literals and fit in. No upper level set of a separable form is XOR, so every square needs a gate that cuts a corner.
With the table fixed, a sign-coherent gate is a threshold of$F_0(s_0)+F_1(s_1)$ , and each $F_i$ is monotone or antitone (M3's $4$ of the $4(m-1)$ border squares. After reflecting coordinates, cut squares split into outer and inner corners. Two cut squares of the same kind are incomparable in the product order, and the border is the union of two chains. So $4(m-1)\le 4G$ .
monotone_or_antitone_blockForm). The ring lemma (new,Cslib.Combinatorics.card_filter_cutsCorner_gridBorder_le) says such a gate cuts a corner of at mostLemma 15's count of$2m-1$ split squares per gate only gives about $m/2$ ; the corner condition plus the border is what gives $m-1$ .
Proof of (b). It follows the draft, with all weights doubled to make them integers. The even staircases ($\lfloor (s+y)/2\rfloor$ , so the top sum depends on the counts only through their parities ($m$ ($m\le 40$ .
sum_decide_two_mul_succ_le) giveandreevTwoBlocksTopSum_eq). The remaining finite check is proved for allthirteen_le_andreevTwoBlocksTopSum_iff); the draft checks it numerically forSource and provenance. The remark "Two address blocks" in the author's unpublished working draft
eccc_draft/paper.tex, lines 873–877. I read the version with SHA-25671f5738c239b3600c02b2d8aa5ad20a57d61d8af6d4d0cd2b5f862a79215089b. The fuller sketch and construction are inprop:k2of the companion draftthreshold_paper/paper.tex(SHA-2562802eff9…). Neither draft is publicly accessible, so third parties cannot verify the correspondence. The mathematics is original, AI-assisted work under #4640.prop:k2)sub_one_le_card_outputBottomGates_andreev_two,sub_one_le_of_depthTwoInputs_andreev_twoandreevXorTable,andreev_andreevCubePoint_xorTable,exists_cutsCorner_andreevGateGrid,circuitLiveForm_mixed_eqandreevGateGrid_orientation,cutsCorner_reflect_fst/_sndcard_filter_cutsCorner_gridBorder_le,le_card_gridBorderandreevTwoBlocksCircuit,AndreevTwoBlocksIndex,andreevTwoBlocksTopSumsum_decide_two_mul_succ_le,andreevTwoBlocksTopSum_eqthirteen_le_andreevTwoBlocksTopSum_iff,computes_andreevTwoBlocksCircuitcard_andreevTwoBlocksIndex,size_andreevTwoBlocksCircuit;weight_andreevTwoBlocksBottomOp_blockVar,isSignCoherent_andreevTwoBlocksBottomOpDifferences from the draft. "Cuts off exactly one corner" is formalized as a nonzero mixed difference ($m$ ; the draft checks it by brute force for $m\le 11$ . The weights of (b) are doubled: top weights $-8,-4,-8,-4,-8$ , input coefficients $10,10,16,4,3,2$ and threshold $13$ , instead of the draft's $-4,-2,\dots$ , $5,5,8,2,\tfrac32,1$ and $\tfrac{13}2$ . Preprint gaps: none found. Both claims hold as stated, for every $m$ .
CutsCorner). For a threshold function of two bits, that means it is not constant and not a literal. The ring lemma is proved for allInfrastructure.
Foundations/Combinatorics/CornerCutting.lean:CutsCorner,gridBorder, the chain and ring lemmas. It sits besideCubeSplitting, which holds Lemma 15.circuitLiveForm_mixed_eqgoes inSplitCounting.lean, becausecircuitLiveFormis not exposed outside that module. Its only importer isAndreevSignCoherent.AndreevSharp.leangainsinterpretation_andreevFormWeight, the evaluation of a gate withandreevFormWeightweights.interpretation_andreevSharpBottomOpis now a one-line instance of it, and the new circuit uses it too, so the proof is not duplicated.Docs. The Operator's Manual circuits chapter now has the requested sentences in the "Depth-two threshold bounds for Andreev's function" bullet: one for M1's
andreevSharpCircuitand one for M4. The reference paragraph gains the M4 API. ROADMAP is unchanged (scope-only; status stays on #4640). The Agent Operator's Manual needs no change, since no workflow changed. Original results are deliberately absent from the results registry. Checked examples are inCslibFrontierTests/WeightedThresholdAndreevTwoBlocks.lean:CutsCorneron AND versus a literal;andreevSharpCircuit 2 8;Validation (local).
lake build --wfail --iofailpasses on the changed modules (CornerCutting,SplitCounting,AndreevSharp,AndreevSignCoherent,AndreevTwoBlocks,AndreevTwoBlocksLowerBound), their direct importers and the testsWeightedThresholdAndreevTwoBlocks,WeightedThresholdSignCoherentandWeightedThresholdAndreevSharp.lake exe mk_all --check,lake exe lint-styleandscripts/check_operator_manual.pypass. No line exceeds 100 characters.scripts/proof_copies.py --base origin/mainflags two small candidate pairs: the two coordinate reflections inCornerCutting, and the four parity cases of the finite check. I left both because a shared lemma would not be shorter.CslibFrontierbuild andscripts/parallel_defs.py. The host had 18G free, below the 30G needed for a full build, and the duplicate-definition scan needs one. CI covers both.AI disclosure: written by Claude Code (Claude Opus 5.5) as the M4 worker for #4640. Requesting coordinator review.
🤖 Generated with Claude Code