Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 5 — first-come, first-served has competitive ratio r

Proved
RobustBooking.TwoFare.fcfs_ratio

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

competitive-ratiop2o-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. The first-come, first-served policy (accept every request in full while capacity remains) has competitive ratio exactly the discount ratio:

inf⁡I:v∗(I)>0vFCFS′(I)v∗(I)=r=f2f1.\inf_{I : v^*(I) > 0} \frac{v'_{\mathrm{FCFS}}(I)}{v^*(I)} = r = \frac{f_2}{f_1}.I:v∗(I)>0inf​v∗(I)vFCFS′​(I)​=r=f1​f2​​.

Since r<1/(2−r)r < 1/(2-r)r<1/(2−r) for 0<r<10 < r < 10<r<1, FCFS is strictly worse than the best nested policy.

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

/-- Proposition 5 (Ball–Queyranne 2009, p. 955). For the continuous two-fare booking problem with
fares `f₁ > f₂ > 0` and capacity `n > 0`, first-come first-served has competitive ratio exactly
`r = f₂ / f₁`. -/
theorem fcfs_ratio (f₁ f₂ n : ℝ) (hf₂ : 0 < f₂) (hf₁₂ : f₂ < f₁) (hn : 0 < n) :
    competitiveRatio f₁ f₂ n fcfs = 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. 955, Proposition 5
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.

The policy. The statement is about the first-come first-served policy. For every history and every current request (c,q)(c, q)(c,q) it proposes qqq, the full requested quantity.

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 cic_ici​ is high or low and each qi>0q_i > 0qi​>0 is real. Requests are processed in order with u1=0u_1 = 0u1​=0. The accepted amounts are

ai=max⁡(0,min⁡(qi, n−ui)),ui+1=ui+ai.a_i = \max\big(0,\min(q_i,\ n - u_i)\big), \qquad u_{i+1} = u_i + a_i .ai​=max(0,min(qi​, n−ui​)),ui+1​=ui​+ai​.

So requests are accepted in full until the remaining capacity is too small. Then one request is partially accepted, and all later requests get 000.

Revenues. 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 real vectors with 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}=f2f1.\inf\Big\{ \tfrac{R(I)}{R^*(I)} \;:\; I \text{ a finite list of requests with } R^*(I) > 0 \Big\} = \frac{f_2}{f_1}.inf{R∗(I)R(I)​:I a finite list of requests with R∗(I)>0}=f1​f2​​.

It is not claimed that the infimum is attained.

Degenerate cases. The hypotheses rule out each default value:

  • f1>0f_1 > 0f1​>0, so the division f2/f1f_2/f_1f2​/f1​ is genuine.
  • With positive fares and n>0n > 0n>0, exactly the non-empty instances have R∗(I)>0R^*(I) > 0R∗(I)>0. The empty instance is excluded, and the set of ratios is non-empty.
  • All ratios are ≥0\ge 0≥0, so the infimum is genuine rather than 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