Every exact rounded balanced recurrence has a quadratic upper bound
ProvedCLRS.Chapter4SubstitutionExamples.balanced_quadratic_upperLet satisfy , , and the exact rounded recurrence for every . Then
This applies to any function with those premises, including zero and one, and makes no source-program execution claim.
Platform namespace. The imported Chapter 4 source declarations live under CLRS in this upload to avoid collisions with independently published compiler versions. The immutable source reference retains the original declaration names.
Catalog organization (2026-10-11). This record was retired from the active Chapter 4 catalog to focus the presentation on three algorithms and four reusable recurrence results. Its mathematical statement and proof status are unchanged, and existing imports and links remain valid. The retained results are CLRS.Chapter4Substitution.upper_comparison, CLRS.Chapter4Substitution.lower_comparison. Supporting lemmas needed by the retained results are included in their accepted proof files.
import Definitions.Def_CLRS_Chapter4_Substitution import Definitions.Def_CLRS_Chapter4_SubstitutionExamples import Std set_option autoImplicit false set_option backward.isDefEq.respectTransparency false set_option backward.defeqAttrib.useBackward true namespace CLRS end CLRS open CLRS namespace CLRS.Chapter4SubstitutionExamples end CLRS.Chapter4SubstitutionExamples open CLRS.Chapter4SubstitutionExamples open Chapter4Substitution
theorem CLRS.Chapter4SubstitutionExamples.balanced_quadratic_upper (cost : Nat → Nat)
(zero : cost 0 = 0) (one : cost 1 = 1)
(recurrence : ∀ n, 2 ≤ n → cost n = cost (n/2) + cost (n-n/2) + n) :
∀ n, cost n ≤ n*n := by sorry