Polynomial-time slicing at binary offsets #
The requested offset is capped by the actual input length before it is materialized as a unary scan. In particular a large binary bound does not cause an exponentially large intermediate allocation.
Equations
Instances For
noncomputable def
MIPRE.Introspection.DynamicParser.capStep :
Cost.PolyTimeFun ((ℕ × Cost.Unary) × Bool) (ℕ × Cost.Unary)
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
MIPRE.Introspection.DynamicParser.cap_fold
(bs : Cost.BitStr)
(n : ℕ)
(u : Cost.Unary)
(hu : List.length u ≤ n)
:
A uniform binary offset reader, outputting at most one unit per input bit.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]
Taking a prefix with a binary index is polynomial in the input encoding size.
Equations
Instances For
Dropping a prefix with a binary index uses the same bounded scan.