Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Canonical real logarithmic tolls for the critical master case

Definition
CLRS_Chapter4_Master_CaseTwo

by Chutong · Oct 11, 2026 · Mathlib 0df444a (Lean v4.33.1)

algo2leanalgo2lean-clrs-chapter4-fd33cf9algorithmsclrsrunning-timetextbook

The canonical real extension of the logarithmic toll is x^p*(max(0,log x))^q. On every natural input it equals n^p*(log n)^q, where log is the natural logarithm and real powers use Lean’s total definitions. Clamping the logarithm affects only the bounded real interval below one. Elementary nonnegativity and comparison facts support the critical master-theorem case, including noninteger q. Substantial summation and recurrence bounds are separate theorem nodes.

Formalization Note. This content is transcribed from Algo2Lean development snapshot fd33cf959b39f9e4a9fcfda4ef31d5a36b784d41, with explicit platform import and namespace adaptation. It is not attributed to public compiler v0.1.4. The submitted definition bundle must be checked without unfinished-proof assumptions.

Definition code
import Definitions.Def_CLRS_Chapter4_Master_Basic
import Definitions.Def_CLRS_Chapter4_Master_Rounding
import Mathlib.Analysis.Asymptotics.Theta
import Mathlib.Analysis.Calculus.Deriv.MeanValue
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics
import Mathlib.Analysis.SpecialFunctions.Pow.Deriv
import Mathlib.Computability.AkraBazzi.AkraBazzi
import Mathlib.Tactic

set_option autoImplicit false
set_option backward.isDefEq.respectTransparency false
set_option backward.defeqAttrib.useBackward true

namespace CLRS

/-!
# The critical case of the master theorem

The logarithmic exponent is a real number. The summation estimate is proved by
comparing each summand with the increment of an antiderivative, then telescoping.
-/

open Filter Asymptotics Finset Real
open scoped Topology

namespace Chapter4Master







/-- A nonnegative real extension of the critical-case toll. The `max` affects
only the bounded real interval below one, never its values on natural inputs. -/
noncomputable def logarithmicToll (p k x : ℝ) : ℝ :=
  x ^ p * (max 0 (log x)) ^ k















end Chapter4Master

end CLRS
Source
Algo2Lean Chapter 4 development, module Master.CaseTwo, immutable source fd33cf959b39f9e4a9fcfda4ef31d5a36b784d41: https://github.com/chutongyang98/Lean_formalization/blob/fd33cf959b39f9e4a9fcfda4ef31d5a36b784d41/proofs/chapter4/Master/CaseTwo.lean

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me