Polynomial bounds on natural-number functions #
PolyBound f says f is dominated pointwise (at every argument, not merely
eventually) by the evaluation of a natural polynomial. Resource bookkeeping
assembles time and space bounds by addition, multiplication, and monotonicity,
so an everywhere-bound closed under those operations is easier to carry through
a construction than a big-O statement; PolyBound.bigO converts to the big-O
form the complexity classes are stated in.
Main results #
PolyBound— pointwise domination by a natural polynomialPolyBound.const,.id,.add,.mul,.pow,.mono,.max,.eval— the closure APIPolyBound.bigO— a polynomial bound is a big-O power bound
Pointwise domination by the evaluation of a natural polynomial.
Equations
- Complexity.PolyBound f = ∃ (p : Polynomial ℕ), ∀ (inputLength : ℕ), f inputLength ≤ Polynomial.eval inputLength p
Instances For
theorem
Complexity.PolyBound.eval
(p : Polynomial ℕ)
:
PolyBound fun (inputLength : ℕ) => Polynomial.eval inputLength p