Theorem 1 — the nested two-fare protection level (1 − b(r))n is b(r)-competitive, and b(r) is best possible
ProvedRobustBooking.TwoFare.nested_protection_optimalConsider the continuous two-fare booking problem: capacity (real), fares , discount ratio , requests arriving online with positive real quantities that may be partially accepted, irrevocable decisions. Let (Eq. (1)). Then:
- the nested booking policy with protection level (low-fare booking limit ) has competitive ratio exactly ;
- every deterministic online booking policy has competitive ratio at most ;
- every randomized online booking policy — a random choice , , of deterministic policies with measurable for each instance — has competitive ratio at most :
So the nested policy is best possible among all online booking policies, deterministic or randomized, and the optimal competitive ratio of the continuous two-fare problem is .
Formalization Note. The competitive ratio is the infimum over instances with positive offline optimum; the randomized ratio uses the Bochner integral, which is well defined because revenue is bounded by and measurable by hypothesis. Clause 2 is the Dirac case of clause 3 and is stated separately for readability.
import Mathlib import Definitions.Def_RobustBooking_TwoFare_Booking import Definitions.Def_RobustBooking_TwoFare_BookingPolicies open MeasureTheory
namespace RobustBooking.TwoFare
/-- Theorem 1 (Ball–Queyranne 2009, p. 954). For the continuous two-fare booking problem with
fares `f₁ > f₂ > 0` (discount ratio `r = f₂ / f₁ ∈ (0, 1)`) and capacity `n > 0`, the nested policy
with protection level `θ₁ = (1 - b(r)) n` has competitive ratio exactly `b(r) = 1 / (2 - r)`, and no
online booking policy, deterministic or randomized, has a larger competitive ratio. -/
theorem nested_protection_optimal (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₁) ∧
(∀ A : DetPolicy, competitiveRatio f₁ f₂ n A ≤ b (f₂ / f₁)) ∧
(∀ {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ]
(A : Ω → DetPolicy), (∀ I : List Request, Measurable fun ω => revenue f₁ f₂ n (A ω) I) →
randCompetitiveRatio f₁ f₂ n μ A ≤ b (f₂ / f₁)) := by sorry
end RobustBooking.TwoFare
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Throughout, are arbitrary real numbers. The statement assumes
so as well. Write . Under these hypotheses and no division by zero occurs. Nothing else is assumed: in particular, need not be integers.
The statement uses several names that are defined in the imported files Definitions.Def_RobustBooking_TwoFare_Booking and Definitions.Def_RobustBooking_TwoFare_BookingPolicies. Their definitions are not part of the code under audit, so this read-back cannot expand them. Only their types can be read off from how they are used:
- is a function from real numbers to real numbers. Its formula is not shown.
- is a type of "deterministic policies". It takes no parameters, so it does not depend on , or .
- is a type, and is the type of finite sequences of requests, including the empty sequence.
- takes and a real number and produces a policy, which is then passed to .
- is a real number that depends on the fares, on and on a policy .
- is a value in some measurable space that depends on the fares, on , on a deterministic policy and on a request list . The code does not show which space.
- is a real number that depends on a probability measure and a random family of policies .
The docstring attached to the theorem makes informal claims about these objects, including a closed form for . The code itself does not establish those claims, and this read-back does not rely on them.
The theorem asserts that the following three statements hold together.
- The nested policy attains exactly. The nested policy built from and the protection level has competitive ratio equal to :
Nothing in the statement requires to lie in . Whether it does depends on the unseen value of .
- No deterministic policy exceeds . For every in ,
- No randomized policy exceeds . This holds for every type of any universe level, equipped with any σ-algebra, and for every probability measure on (so ). It also holds for every function , meaning a policy chosen according to the outcome . The claim applies only when a measurability condition holds: for every request list , including the empty list, the map
must be measurable. Whenever that condition holds,
Nothing is asserted about families that fail the condition. No other link between , and the booking problem is required.
Degenerate cases.
-
Zero capacity and equal fares are excluded. The hypotheses rule out , negative capacity, and . So is always a genuine ratio in , and the division never falls back to Lean's default value of .
-
The randomized part cannot be vacuous through . A probability measure cannot exist on an empty type, so is always nonempty.
-
One-point is included. When has a single point, or when is constant, the family behaves like a single deterministic policy. What part 3 then asserts depends on how the unseen treats such a family.
-
The measurability hypothesis cannot be judged. If the values of live in a space where constant maps are measurable, then every constant family meets the hypothesis. Whether non-constant families can meet it depends on the unseen σ-algebra on and on the definition of . The code does not show whether the hypothesis is easy, hard or impossible to satisfy for them.
-
Junk values in the unseen definitions cannot be ruled out. The code does not show whether or is an infimum or a supremum of a ratio taken over request lists. If it is, then:
- an empty or unbounded index set would give Lean's default value of ;
- a division by zero, for example when the optimal offline revenue on the empty request list is zero, would also give ;
- either kind of default value could make the equality in part 1, or the inequalities in parts 2 and 3, hold or fail for reasons unrelated to booking performance.
The same caution applies to any subtraction inside or . It also applies to at arguments where its unseen formula may divide by zero. Here , so is only ever evaluated at such an .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.