Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 1 — the nested policy with protection level (1 − b(r))n has competitive ratio b(r)

Proved
RobustBooking.TwoFare.nested_protection_ratio

by mikedeng1 · Oct 2, 2026 · Mathlib 0df444a (Lean v4.33.1)

competitive-ratioonline-algorithmsp2o-batch-rm-cafterp2o-gran-per-chapterp2o-plan-paperp2o-v1revenue-management

Consider the continuous two-fare booking problem with capacity n>0n > 0n>0 and fares f1>f2>0f_1 > f_2 > 0f1​>f2​>0, and let r=f2/f1∈(0,1)r = f_2/f_1 \in (0,1)r=f2​/f1​∈(0,1) be the discount ratio. Let AAA be the nested protection-level policy with protection level

θ1=(1−b(r)) n,b(r)=12−r,\theta_1 = (1 - b(r))\,n, \qquad b(r) = \frac{1}{2-r},θ1​=(1−b(r))n,b(r)=2−r1​,

that is, with low-fare booking limit n−θ1=b(r) nn - \theta_1 = b(r)\,nn−θ1​=b(r)n. Then the competitive ratio of AAA equals b(r)b(r)b(r):

inf⁡I : v∗(I)>0vA′(I)v∗(I)  =  12−r.\inf_{I \,:\, v^*(I) > 0} \frac{v'_A(I)}{v^*(I)} \;=\; \frac{1}{2 - r}.I:v∗(I)>0inf​v∗(I)vA′​(I)​=2−r1​.

This is the achievability half of Theorem 1: the nested policy guarantees at least a fraction b(r)b(r)b(r) of the offline optimum on every instance, and the guarantee is attained (on I1I_1I1​).

Preamble
import Mathlib
import Definitions.Def_RobustBooking_TwoFare_Booking
import Definitions.Def_RobustBooking_TwoFare_BookingPolicies
Formal statement
namespace RobustBooking.TwoFare

/-- Proposition 1 (Ball–Queyranne 2009, p. 953). For the continuous two-fare booking problem with
fares `f₁ > f₂ > 0` and capacity `n > 0`, the nested policy with protection level
`θ₁ = (1 - b(r)) n`, `r = f₂ / f₁`, has competitive ratio exactly `b(r) = 1 / (2 - r)`. -/
theorem nested_protection_ratio (f₁ f₂ n : ℝ) (hf₂ : 0 < f₂) (hf₁₂ : f₂ < f₁) (hn : 0 < n) :
    competitiveRatio f₁ f₂ n (nested n ((1 - b (f₂ / f₁)) * n)) = b (f₂ / f₁) := by sorry

end RobustBooking.TwoFare
Source
Ball, Queyranne, Toward Robust Revenue Management: Competitive Analysis of Online Booking, Oper. Res. 57(4), 2009, p. 953, Proposition 1
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Hypotheses. Let f1,f2,nf_1, f_2, nf1​,f2​,n be real numbers with

0<f2<f1,n>0.0 < f_2 < f_1, \qquad n > 0 .0<f2​<f1​,n>0.

Put

r=f2f1∈(0,1),b(r)=12−r,θ1=(1−b(r)) n.r = \frac{f_2}{f_1} \in (0,1), \qquad b(r) = \frac{1}{2-r}, \qquad \theta_1 = (1 - b(r))\,n .r=f1​f2​​∈(0,1),b(r)=2−r1​,θ1​=(1−b(r))n.

Then b(r)∈(12,1)b(r) \in (\tfrac12, 1)b(r)∈(21​,1). The low-fare threshold n−θ1n - \theta_1n−θ1​ equals b(r) nb(r)\,nb(r)n.

The policy. The statement is about the "nested" policy with parameters nnn and θ1\theta_1θ1​. For a current request (c,q)(c, q)(c,q) with q>0q > 0q>0, and a history of earlier (request, accepted-amount) pairs, it proposes:

  • qqq if ccc is high;
  • (n−θ1)−L(n - \theta_1) - L(n−θ1​)−L if ccc is low, where LLL is the sum of the recorded accepted amounts of all earlier low requests.

Running the policy. Run it with capacity nnn on a finite instance I=((c1,q1),…,(cm,qm))I = ((c_1,q_1),\dots,(c_m,q_m))I=((c1​,q1​),…,(cm​,qm​)), where each qi>0q_i > 0qi​>0 is an arbitrary real. Requests are processed in order, starting with used capacity u1=0u_1 = 0u1​=0. Request iii is accepted in amount

ai=max⁡(0,min⁡(pi, qi, n−ui)),a_i = \max\big(0, \min(p_i,\ q_i,\ n - u_i)\big),ai​=max(0,min(pi​, qi​, n−ui​)),

where pip_ipi​ is the proposal above. Then ui+1=ui+aiu_{i+1} = u_i + a_iui+1​=ui​+ai​. So:

  • a high request gets max⁡(0,min⁡(qi,n−ui))\max(0, \min(q_i, n - u_i))max(0,min(qi​,n−ui​));
  • a low request gets max⁡(0,min⁡(b(r)n−Li,qi,n−ui))\max(0, \min(b(r) n - L_i, q_i, n - u_i))max(0,min(b(r)n−Li​,qi​,n−ui​)), with LiL_iLi​ the total already accepted from low requests.

The online revenue is

R(I)=∑iϕ(ci) ai,ϕ(high)=f1, ϕ(low)=f2.R(I) = \sum_i \phi(c_i)\, a_i, \qquad \phi(\text{high}) = f_1,\ \phi(\text{low}) = f_2.R(I)=i∑​ϕ(ci​)ai​,ϕ(high)=f1​, ϕ(low)=f2​.

The optimal offline revenue R∗(I)R^*(I)R∗(I) is the supremum of ∑iϕ(ci)xi\sum_i \phi(c_i) x_i∑i​ϕ(ci​)xi​ over all real vectors xxx satisfying 0≤xi≤qi0 \le x_i \le q_i0≤xi​≤qi​ and ∑ixi≤n\sum_i x_i \le n∑i​xi​≤n.

Claim. The theorem asserts the exact equality

inf⁡{R(I)R∗(I)  :  I a finite list of requests with R∗(I)>0}=12−f2/f1.\inf\Big\{ \tfrac{R(I)}{R^*(I)} \;:\; I \text{ a finite list of requests with } R^*(I) > 0 \Big\} = \frac{1}{2 - f_2/f_1}.inf{R∗(I)R(I)​:I a finite list of requests with R∗(I)>0}=2−f2​/f1​1​.

The infimum is over all finite request sequences, of any length, order and real positive quantities. It is not claimed that any instance attains the value.

Degenerate cases. The hypotheses rule out each default value:

  • f1>0f_1 > 0f1​>0, so f2/f1f_2/f_1f2​/f1​ is an ordinary division.
  • r<1r < 1r<1, so 2−r≠02 - r \ne 02−r=0.
  • Fares are positive and n>0n > 0n>0, so R∗(I)>0R^*(I) > 0R∗(I)>0 exactly when III is non-empty. The empty instance has R∗(I)=0R^*(I) = 0R∗(I)=0 and is excluded. The set of ratios is therefore non-empty.
  • Accepted amounts are ≥0\ge 0≥0, so every ratio is ≥0\ge 0≥0. The infimum is therefore a genuine infimum, not the default value 000.
Human review
  • Endorsed by Shuze Chen · Oct 21, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 21, 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