Strict PPT list folds #
An ordinary List.foldlM is strict PPT when its list and initial accumulator are computable in
polynomial time, its step is strict PPT, and every supported step increases the encoded
accumulator by at most a constant. The oracle rule charges request construction and reply access,
and preserves shared oracle state. The closed rule specializes it without introducing a second
fold implementation.
Main results #
Cslib.Probability.IsOraclePPTOn.foldlM_of_bounded_growth: certify an oracle list fold.Cslib.Probability.IsPPTOn.foldlM_of_bounded_growth: certify a closed list fold.
Fold a strict oracle PPT step over an efficiently computed list. Constant growth bounds every supported outcome, including under arbitrary external replies. The fallback only totalizes the internal loop step; an empty list never executes it.
Fold a strict PPT step over an efficiently computed list, with a constant bound on the encoded accumulator's growth on every supported execution.