Scalar bounds for arbitrary controller replies #
These are bounds for the actual list-valued controller handlers, independent of graph
correctness or exact expected tallies. A list entry is a successful branch; an empty callback
list rejects. Every finite prefix uses the same handlers as scanNextRound, including prefixes
that later reject or set the tie flag. The bounds concern retained scalar registers at the
callback boundary, not the workspace or duration of a callback. Native realization remains
part of #6747.
Main results #
predecessor_prefix_le: at most one increment per predecessor tested.scanVertex_prefix_bounds: at most one count andk + 1sum contribution per vertex.scanNextRound_bounds: arbitrary replies increase a round's count by at mostnand its length sum by at mostn * (k + 1).RoundCall.boundsandRoundCall.prefix_bounds: radius/fuel conservation and quadratic count/cubic sum bounds throughout the reachable controller call tree.
RoundCall.result_mem connects this proof-level call relation to the original controller
without defining another executable dispatch.
The arbitrary index maps in the prefix lemmas include the increasing initial segment
fun i => ⟨i.val, i.isLt.trans_le hj⟩ for hj : j ≤ n. Thus the current loop index is at most
n, and each queried index is strictly below n. No transcript is retained by these bounds.
See CslibFrontierTests.DoubleCountingControllerBounds for rejection and tie clients.
Every successful predecessor prefix, even one whose continuation later rejects, stores at most its initial count plus the number of tested indices. Replies may be arbitrary.
All scalar outer-loop prefixes are bounded without assuming correct membership, absence of ties, or eventual success. The index map can select the increasing initial segment.
The actual round scan satisfies the same bounds, also when its tie flag is set.
Reachable recursive calls of the existing controller, starting with its actual fuel and initial tally. This is a proof-level call relation, not another controller implementation.
- initial {n : ℕ} {edge : Fin n → Fin n → List Bool} {member : MembershipScan List n} : RoundCall edge member n 0 { count := 1, lengthSum := 0 }
The initial call.
- next {n : ℕ} {edge : Fin n → Fin n → List Bool} {member : MembershipScan List n} {fuel k : ℕ} {t : Tally} {a : RoundUpdate} : RoundCall edge member (fuel + 1) k t →
a ∈ scanNextRound edge member k t →
a.bad = false → a.tally.count ≠ t.count → RoundCall edge member fuel (k + 1) a.tally
Exactly the recursive branch of
runRounds; tied and stable rounds do not recurse.
Agreement with actual dispatch: every result at a reachable call is a result of the original controller. List membership here forgets multiplicity only for this reachability fact.
All reachable round boundaries, including those before a later rejection, have bounded radius and scalar registers for arbitrary replies. The sum bound is deliberately conservative.
At every vertex prefix of an active controller round the radius, loop index, count and
sum are polynomially bounded, including tied prefixes and prefixes of rejecting branches.
Together with predecessor_prefix_le, all retained numeric registers have polynomial bounds
sufficient for binary logarithmic-length encodings. No callee workspace is asserted.