Charged cost transfer for an interleaved Chan–He visitor #
Traversal charges every pending descriptor, including skipped entries. Solver charges depend only on the number of emitted mathematical nodes. The fixed root and forest overheads reuse the existing traversal budgets; the callback and packed-tail release cost the actual host bound plus eight.
The ledger below combines proved instruction budgets, rather than asserting exact running time. It includes initialized frontend execution, all scalar and layout setup, the value-envelope loop, every root descriptor and stack transition, Boolean accumulation and the final halt. Its count bound is purely the finite reduction's existing theorem and uses no completed catalogue-producing native execution.
Main definitions #
callbackTime: the actual host bound and charged callback setup/receive instructions.forestCost: every root transition and one callback charge per emitted node.largeCost: the complete fused large-input branch budget, without the outer prefix or halt.
Main results #
cost_ledger: exact equality between the two symbolic charged budgets, including slack.largeCost_le,cost_le: the existing ordinary decision bound covers the fused visitor.allNodes_cost_le: the same transfer at the exact finite output list's node count.
Four native argument copies, the certified host, Boolean receive and one packed-tail release.
Charge all root work and descriptor/control overhead, but callbacks only for emitted nodes.
Native large-branch budget: frontend, snapshot, prime setup, layout, envelope and forest. The frontend's own final halt is excluded because its code is inlined into the visitor.
The reused preprocessing budget covers exactly the same root work and shared setup.
Full initialized prefix/branch/halt costs seven. Four units per callback and eighteen fixed units remain as slack in the old budget; no solver call is charged for a skipped entry.
Any emitted-node count within the finite reduction's bound preserves the old cost envelope.
The large branch leaves the existing seven-instruction outer prefix/branch/halt allowance.
The exact mathematical output count is covered without running the old native producer.