CLRS §4.3: the rounded balanced recurrence has theta n log n cost
ProvedCLRS.Chapter4SubstitutionExamples.balancedCost_isTheta_nlognLet be the constructed total balanced recurrence with , , and for .
This numerical cost has the natural-valued asymptotic bound
The comparison uses positive natural constants and an eventual natural threshold. Explicit estimates are available from threshold : the upper constant may be , and the lower comparison is . The positive base value at one is why the bare comparison is stated eventually. This theorem does not assert that a compiled merge-sort program realizes the recurrence.
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.balancedCost_isTheta_nlogn :
IsTheta balancedCost (fun n => n*Nat.log2 n) := by sorry