Imports
Chapter 3. Growth of Functions
CLRS introduces asymptotic notation — O, Ω, Θ, o, ω — as the language for describing how running times grow with input size. This chapter bridges the textbook definitions to mathlib's filter-based asymptotics library.
3.1 Asymptotic Notation
Defines O, Ω, Θ, o, ω as CLRS-style wrappers around mathlib's
=O[atTop] / =o[atTop]. Proves equivalence between the CLRS discrete
definition (∃ c n₀) and the filter-based one. Collects algebraic
properties: reflexivity, transitivity, sum and product rules.
3.2 Standard Functions
Proves concrete growth comparisons that matter for algorithm analysis:
-
polynomial
n^avs exponentialc^nfor everyc > 1 -
logarithm powers
(log n)^avs polynomialn^ε -
exponential base comparisons
a^n = o(b^n)for0 ≤ a < b -
harmonic numbers
H_n ~ log nandH_n = Θ(log n) -
factorial upper/lower bounds, exponential-vs-factorial comparison, and
n! = o(n^n) -
floor / ceiling Θ-behavior, including half-scale floor and ceiling
Notation: we use |·| (absolute value) rather than ‖·‖ for readability.
namespace CLRSnamespace Chapter03end Chapter03end CLRS