The fractional algorithm's dual solution is feasible
ProvedPrimalDualOnline.SkiRental.alg_dual_feasibleLet be the purchase price and the number of ski days. The dual solution produced by the fractional algorithm is feasible for the dual packing program of Figure 3.1:
The box constraints are settled by the shape of the variable, which is on an active day and afterwards. The budget constraint is the substantive half. Since each is or , the sum counts the days on which the buy variable is still below , so the claim is a counting bound:
Dual feasibility is what licenses comparing the algorithm against the offline optimum at all: a feasible dual solution has objective value at most that of every feasible primal solution, hence at most the optimum. Without the budget constraint the accumulated dual objective would be an arbitrary number rather than a certified lower bound.
Source correspondence.
- What the thesis states (p. 19): "to show feasibility of the dual solution, we need to show . We prove after at most days of ski." The dual constraints themselves are those printed in Figure 3.1 (p. 18).
- What this Lean theorem states: the two-clause dual-feasibility predicate for the algorithm's dual solution, at every horizon .
- Introduced by the formalization: nothing beyond making the quantification over explicit.
Formalization Note. For the budget constraint follows from counting alone, so the content of the statement lies in the regime , where it amounts to the assertion that the buy variable has reached by day . Each dual variable consults the trajectory at its own index; the value is never consulted.
import Definitions.Def_PrimalDualOnline_SkiRentalLP import Definitions.Def_PrimalDualOnline_SkiRentalAlg import Mathlib.Tactic open PrimalDualOnline.SkiRental
theorem PrimalDualOnline.SkiRental.alg_dual_feasible
(B : ℕ) (hB : 0 < B) (k : ℕ) :
DualFeasible (B : ℝ) k (fun j : Fin k => algY B (cOpt B) (j : ℕ)) := by sorryRead-back
What the Lean code literally says, in plain math · claude-opus-5
The declaration takes three inputs: a natural number , a proof that , and a natural number . There is no hypothesis relating to , no hypothesis on the sign or nonvanishing of any other quantity, and no typeclass assumption; the conclusion is asserted for every and every simultaneously.
First, for a real parameter the trajectory is defined by recursion over all of :
appears as a real via the cast; the divisions are total, so would be if were (excluded by ) and would be if were . The second branch returns unchanged, so once an index has value every later index has that same value.
Second, the dual variable at index is the indicator if and if , i.e. it consults the trajectory at index itself — not , not . In particular consults , so unconditionally; the last dual variable in the statement, , consults . The value is never consulted.
Third, the parameter is fixed to . The statement carries no hypothesis and makes no claim about the value, positivity, or optimality of this constant.
The conclusion unfolds to the conjunction of two clauses: (1) for every , and , both non-strict; (2) , non-strict, with the budget taken to be the real cast of the same natural that parameterizes the trajectory.
Clause 1 is a statement about numbers that are already either or , so it is settled by the definition alone and involves no property of the trajectory. Clause 2, given summands, is exactly a counting bound: the sum equals the number of indices in whose trajectory value lies strictly below , and the claim is that this count is at most :
Degenerate and boundary cases: — the index type is empty, clause 1 is vacuous, the sum is , so clause 2 reads , true with no reference to the trajectory. — the count is at most by cardinality alone, hence at most ; these instances hold for any -valued family and say nothing about the recursion. The only instances in which the trajectory matters are . — , the recursion reads while , and the budget is ; the claim is that at most one index has , for every . rules out , where both and the budget would be .
Not asserted. Nothing about the trajectory values themselves — no bound such as or , no monotonicity, no claim about which index first reaches . No lower bound on the sum, no exactness or tightness of clause 2, no complementary-slackness or binding-constraint claim. No primal object: no primal feasibility, cost, objective value, weak- or strong-duality inequality, and no relation between and anything computed from . No optimality or competitive-ratio property of , and no claim that it is nonzero. No claim for parameters other than . Nothing about indices or any limit over all of — only the finite initial segment of length is constrained. No interpretation of as the dual of a linear program: "dual feasible" is here nothing more than the two-clause conjunction. No algorithmic, online, or problem-specific property.
Confirmed by the mission captain (proposal self-audit).