The fractional solution is primal feasible
ProvedPrimalDualOnline.SkiRental.alg_primal_feasibleLet be the purchase price and the number of ski days. The solution the fractional algorithm holds after days — the buy level together with the rent variables of source days — is feasible for the canonical fractional primal program:
Note which buy level appears in the covering constraints: the final one, , and not the value current on day . That is the correct reading of feasibility for an online algorithm whose primal variables only increase — the solution that must be feasible is the one the algorithm ends with, and an early day's constraint is satisfied a fortiori by the larger final value.
Source correspondence.
- What the thesis states (p. 18): the primal half of claim (i), justified in one line — "since we set whenever , the primal solution produced is feasible."
- What this Lean theorem states: the three-part box-feasibility predicate, at every horizon .
- Introduced by the formalization: two things. First, the upper bounds and are part of the claim, because the canonical program of this mission is the relaxation of the source's prose; the source's one-line justification addresses only the covering constraint. Second, because the statement is asserted at every and the recursion freezes the trajectory at the first value reaching , the conjunct taken over all has the effect of asserting that the frozen value is exactly — that is, that the last update does not overshoot. That no-overshoot consequence is genuine content of this formalization and is not something the source states.
Formalization Note. For the bound holds strictly; at it holds with equality. The statement asserts nothing about monotonicity of the trajectory, nothing about the closed form, and nothing of the form at a common index.
import Definitions.Def_PrimalDualOnline_SkiRentalLP import Definitions.Def_PrimalDualOnline_SkiRentalAlg import Mathlib.Tactic open PrimalDualOnline.SkiRental
theorem PrimalDualOnline.SkiRental.alg_primal_feasible
(B : ℕ) (hB : 0 < B) (k : ℕ) :
PrimalFeasibleBox k (algX B (cOpt B) k)
(fun j : Fin k => algZ B (cOpt B) (j : ℕ)) := by sorryRead-back
What the Lean code literally says, in plain math · claude-opus-5
Setting and notation. Two natural numbers are quantified over: a parameter , subject to the single hypothesis , and an index , subject to no hypothesis at all. Write , where is cast to a real number (the hypothesis is what makes an ordinary reciprocal rather than the value total division returns at ; for every this gives ).
With fixed, define a real sequence by
so the sequence grows by a geometric factor plus a fixed additive increment for as long as it is strictly below , and is frozen forever at its value from the first index onward at which that value is . Define a second sequence by if , and if . Both are total functions on ; the same and are used in both.
What the theorem asserts. For every and every , the following five statements all hold. The first two concern the single real number ; the last three are universally quantified over the indices :
- ;
- ;
- for every ;
- for every ;
- for every .
All five are conjoined; none is a hypothesis, and there is no implication in the conclusion. All inequalities are non-strict; the only strict comparison in the development is the internal test inside the definitions.
The index mismatch. The scalar argument is evaluated at index , whereas the family argument supplies at indices — index is never used for , and indices are never used for . Consequently conjunct 5 does not assert for matching indices. It asserts that the single value , together with each earlier , sums to at least . Unfolding : for every , if then ; and if then . So for each fixed the covering conjunct compares against all strictly earlier terms, not a per-index pairing. Because is universally quantified, the family of instances collectively yields for all pairs ; the instance at pairs with , but no instance ever pairs with .
Degenerate cases.
- . The index type is empty, so conjuncts 3, 4, 5 are vacuously true. The entire content collapses to , and , so this instance asserts and nothing else.
- . The only index is , with . Conjuncts 3 and 4 read ; conjunct 5 reads , i.e. , where .
- . , the update is , and ; the sequence is frozen at from index , with and for .
- . The statement singles out no index; and are independent, and nothing in the conclusion changes form at . enters only through the recursion coefficients and .
- much larger than . Since the recursion freezes at the first value , the sequence is eventually constant. Conjunct 2 is asserted at every , including all past that freezing point; combined with the freeze, asserting for all pins the frozen value to be exactly — i.e. the assertion covers the case of the recursion overshooting rather than excluding it by hypothesis.
- is excluded by the hypothesis, and nothing is asserted there.
What is not asserted. Nothing about any cost, objective value, competitive ratio, or performance guarantee; nothing about being optimal or extremal; nothing about any dual object, duality relation, or linear program; nothing about any online input sequence, request, or adversary. It does not assert monotonicity of , that reaches at any particular index (in particular nothing about ), that for , or any closed form. It makes no claim about or for indices within a given instance, and no claim of the form at a common index. It gives no bounds on the increment, no telescoping identity, and no relation between and beyond the five inequalities. It says nothing for .
Confirmed by the mission captain (proposal self-audit).