Upper and Lower Bounds for Query Complexity #
Definitions of upper and lower bounds on the number of queries a program makes, quantified over oracles.
theorem Cslib.Query.UpperBound.of_pointwise {α : Type w} {Q : Type u → Type v} {β : Type u} {prog : α → FreeM Q β} {size : α → ℕ} {bound : ℕ → ℕ} (hmono : Monotone bound) (h :
∀ (oracle : {ι : Type u} → Q ι → ι) (x : α),
FreeM.countQueries (fun {ι : Type u} => oracle) (prog x) ≤ bound (size x)) :
UpperBound prog size bound
To prove an UpperBound with a monotone bound function, it suffices to bound the
query count of each input by bound at its own size.
theorem Cslib.Query.LowerBound.le_upperBound {α : Type w} {Q : Type u → Type v} {β : Type u} {prog : α → FreeM Q β} {size : α → ℕ} {l u : ℕ → ℕ} (hl : LowerBound prog size l) (hu : UpperBound prog size u) (n : ℕ) :
l n ≤ u n
A lower bound for a program never exceeds an upper bound for the same program and size function.