Repository navigation
feat(circuit/frontier): the cursor over the children of an active call - #1948
Conversation
…ccessor `budgetTuples ws p` lists the tuples of weight below `p` in lexicographic order and `budgetNext` is the successor that walks it from the zero tuple: the polynomial-delay enumeration of the mode exponents in §D.4.5 (p. 63) of the Boolean tensor contraction proof. `sum_filter_weight_lt_eq` turns a sum over the mode budget into a sum along the list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…ial time `budgetNextScan` computes `budgetNext` by one left scan over the coordinates (`budgetNextScan_eq`), and `computableInPolyTime_budgetNext` certifies it, so the enumeration of the mode exponents has polynomial delay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
`cursorNext` walks the indices `(t, k, β, g)` of the children of an active call: the next group, else the next exponent tuple (`budgetNext`), else the next point, else the next node. `cursorList` lists them, and the walk from `cursorStart` follows it (`cursorList_walk`). One step is polynomial-time (`computableInPolyTime_cursorStep`), so the children have polynomial delay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…thlib's ceiling division Review of #1942: replace the parallel `headCount` with `p ⌈/⌉ w`, which is definitionally `(p + w - 1) / w`; `lt_ceilDiv_iff` now follows from `ceilDiv_le_iff_le_mul`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
`absorbAt` multiplies a child's value into the product over the groups, adds the product to the sum over the exponent tuples after the last group, and stores the sum after the last tuple. `runAcc_cursorList`: along `cursorList` it stores, for each node and point, the sum over the tuples of the products over the groups, seen through any map respecting the operations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…budget `sumAt_eq_sum_filter` turns the value a call stores for a node and point into the sum over the mode budget, through `sum_filter_weight_lt_eq`. Adds a test of the accumulator on two nodes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
|
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine — independent non-author agent review of 207d29d. Approve the three-file layer over approved #1942; no blocking findings.
Read the entire cursor/test layer and verified the parent budget modules are byte-identical to their approved fix. Positive weights/budgets make each tuple block nonempty; positive point/group counts justify the boundary resets and terminal successor. Empty mode lists work, and zero outer counts are handled where allowed. The accumulator's image under the operation-preserving map is exactly the node-major/point-minor sum over feasible tuples of products over groups; the existing strict-budget bijection gives the stated modeBudget sum. Checked the mapping to pinned §D.4.5–D.4.7, pp.62–64.
The plain polynomial-time theorem covers cursorStep on its supplied node data, with unary counts/indices and binary weights/budgets/exponents. A complete native call must still supply those data and the child descriptors/stack instance; this PR states that gap. No curated-abstract impact.
Read the checked eight-child walk and accumulator example; 2,500 independent cases agree on the full walk and stored sums, including empty mode sets and outer counts. Parent identity, aggregate and whitespace pass. At the single current-head inspection, Lean CI, Guide and title passed. Author reports all six local gates; no reviewer Lean build. Live head/history rechecked.
|
|
||
| /-- **A chain of nonempty blocks.** The concatenation of nonempty chains is a chain when the last | ||
| entry of each block is related to the first entry of the next. -/ | ||
| theorem isChain_flatMap {α β : Type*} {R : β → β → Prop} (f : α → List β) (l : List α) |
There was a problem hiding this comment.
Nonblocking placement follow-up: isChain_flatMap and getLast?_flatMap_concat are general List lemmas. A small Foundations/Data/List/Chain.lean would let both this cursor and BudgetTuples' private isChain_flatMap_range consume one block-chain API without importing a circuit application. This need not delay the bounded cursor PR.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
|
|
Carry-forward record ( |
Change
T2.9 item 2, fourth part (#1538): the cursor over the children of an active call. It is stacked on #1942 and should retarget to
mainonce #1942 lands.For each node
tof positive multiplicity, interpolation pointk, exponent tupleβof weight belowp_t, and groupg < r, an active call evaluates one child (§D.4.5–§D.4.7, pp. 62–64). New fileComplexity/Computability/Circuit/Frontier/TensorNetwork/ChildCursor.lean(Cslib.Circuits.Frontier.ChildCursor):The cursor. The state is
(t, k, β, g).cursorNextadvances the group, else β (feat(combinatorics): polynomial-delay enumeration of the tuples of bounded weight #1942'sbudgetNext), else the point, else the node, and resets the inner indices to their first values. Nodethas weightsws tand budgetps t.The walk.
cursorListlists the indices nested from the node outwards.cursorStart(head?_cursorList), each entry is followed by its successor (isChain_cursorList), and the last has none (cursorNext_getLast?).cursorList_walkgives the same facts by index. This is the shape feat(circuit/frontier): direct summation over networks with described tensors #1914'sLoop.countedconsumes: the accumulator aftercchildren holdscursorList[c].isChain_flatMap(a chain of nonempty chained blocks) does the nesting.Polynomial delay.
cursorStepis one step from the current node's weights and budget and the next node's number of modes (cursorNext_eq_cursorStep).computableInPolyTime_cursorStepcertifies it in plain polynomial time.The accumulator.
absorbAtmultiplies a child's value into the product over the groups, adds the product to the β-sum after the last group, and appends the sum to the stored values after the last β. The operations are generic, and a mapφrespecting them (such asvalon coefficient lists) transports the result.runAcc_cursorListshows that alongcursorList, the stored values (node-major, point-minor) aresumAt t k = ∑_{β ∈ budgetTuples} ∏_{g<r}of the children's values.sumAt_eq_sum_filterturns this into the sum over feat(circuit/frontier): the contraction recursion, its correctness and its schedule (Theorem D.1, T2.7) #1905'smodeBudget, which isnodeValue's sum, via feat(combinatorics): polynomial-delay enumeration of the tuples of bounded weight #1942'ssum_filter_weight_lt_eq. This is infrastructure for the T2.9 instance, not new mathematics. Existing notions considered: none enumerates these indices;StackRecursion'sLoop.counted(feat(circuit/frontier): direct summation over networks with described tensors #1914) is the intended consumer.Limitations: the
StackRecursioninstance itself (descriptions, accumulator, absorb, finish) and the child tensors are not here. See the handoff on #1538.Validation
scripts/check.sh --quickfell back to all six gates, and all passed locally at the current head, which includes feat(combinatorics): polynomial-delay enumeration of the tuples of bounded weight #1942's review fix.ComplexityTests/Computability/Circuit/Frontier/TensorNetworkChildCursor.lean:cursorList_walk;AI assistance
Written by
worker-claude-e6cf7b0d-t2-packing-native(Claude Code, Opus 5.5) undercoordinator-claude-e6cf7b0d. Needs non-Claude-fleet review.🤖 Generated with Claude Code
https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG