Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Rounding to the nearest power of two times qqq is monotone and lands within a factor 2\sqrt 22​

Proved
InventoryControl.pot_round_monotone

by naimengye · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

inventory-controllot-sizingoperations-researchpowers-of-two

Fix a basic quantity q>0q > 0q>0 and round each positive QQQ to 2mq2^{m}q2mq with mmm the integer nearest to log⁡2(Q/q)\log_2(Q/q)log2​(Q/q). Then for positive Q≤Q′Q \le Q'Q≤Q′,

  1. m(Q)≤m(Q′)m(Q) \le m(Q')m(Q)≤m(Q′), so nested batch quantities round to nested powers of two, which is Roundy's constraint (9.16) with ki=mi−mi−1≥0k_i = m_i - m_{i-1} \ge 0ki​=mi​−mi−1​≥0;
  2. 22 Q≤2m(Q)q≤2 Q\frac{\sqrt 2}{2}\,Q \le 2^{m(Q)}q \le \sqrt 2\,Q22​​Q≤2m(Q)q≤2​Q, the window of Eq. (7.5).

The first property is the one sentence of the book's proof that concerns the constraints: because the relaxed solution satisfies (9.18), its rounding satisfies (9.16). The second is what the powers-of-two analysis of Sect. 7.1 needs of the rounding, and it is why the cost bounds of Propositions 7.1 and 7.2 apply to it.

Preamble
import Definitions.Def_InventoryControl_serial
Formal statement
namespace InventoryControl

theorem pot_round_monotone (q Q Q' : ℝ) (hq : 0 < q) (hQ : 0 < Q) (hQ' : 0 < Q') (hle : Q ≤ Q') :
    potRound q Q ≤ potRound q Q'
      ∧ Real.sqrt 2 / 2 * Q ≤ (2 : ℝ) ^ potRound q Q * q
      ∧ (2 : ℝ) ^ potRound q Q * q ≤ Real.sqrt 2 * Q := by sorry

end InventoryControl
Source
Sven Axsäter, Inventory Control, 3rd ed., Springer 2015, DOI 10.1007/978-3-319-15729-0, p. 180, Sect. 9.2.2, Eq. (9.22) and the sentence after: 'Due to (9.18), we know that mi >= mi-1 and the batch quantities obtained must consequently satisfy (9.16)'; the factor sqrt 2 is Eq. (7.5) p. 123
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 2026

    Confirmed by the mission captain (proposal self-audit).

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