Theorem 5 —
ProvedZhengQR.EOQHeuristic.eoq_relative_cost_increase_leConsider a single-item continuous-review inventory system with demand rate , leadtime , fixed ordering cost , holding cost rate and backorder penalty rate . The leadtime demand has mean , and the newsvendor cost attains its minimum at a unique point. For an order quantity let
be the average cost when the reorder point is chosen optimally for . Let be an optimal order quantity, , and let be the order quantity of the EOQ model with backorders. Then the relative cost increase from using instead of satisfies
Using the deterministic EOQ quantity in the stochastic model, with the reorder point re-optimised for it, therefore never costs more than above the optimum, for every leadtime-demand distribution.
Formalization Note is the stochastic cost at the EOQ quantity, with the reorder point chosen optimally for in the stochastic model (not the EOQ model's reorder point). is any order quantity with and for all ; its existence and uniqueness is the Lemma 6 milestone. No positivity of is assumed: it follows from the model.
import Mathlib import Definitions.Def_ZhengQR_EOQHeuristic_qrCost import Definitions.Def_ZhengQR_EOQHeuristic_costCurves import Definitions.Def_ZhengQR_EOQHeuristic_stochasticModel open MeasureTheory Filter Topology
namespace ZhengQR.EOQHeuristic
theorem eoq_relative_cost_increase_le {lam L K h p : ℝ} {μ : Measure ℝ} (hM : IsQRModel lam L h p μ) (hK : 0 < K) (Qs : ℝ)
(hQs : IsOptQty (newsvendorCost μ h p) lam K Qs) :
(optCost (newsvendorCost μ h p) lam K (eoqQty lam K h p) - optCost (newsvendorCost μ h p) lam K Qs) / optCost (newsvendorCost μ h p) lam K Qs
≤ 1 / 8 - 1 / 2 * (1 / 2 - eoqQty lam K h p / Qs) ^ 2 ∧
1 / 8 - 1 / 2 * (1 / 2 - eoqQty lam K h p / Qs) ^ 2 ≤ (1 / 8 : ℝ) := by sorry
end ZhengQR.EOQHeuristic
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
We assume real numbers and a measure on the real line. All of these are implicit parameters, so the statement covers every choice of them. We also assume a real number and three hypotheses:
- Model hypothesis: holds. This predicate comes from an imported definitions module whose body is not shown, so the read-back cannot say what it requires of , , , and . For example, it cannot say whether they must be positive, or whether must be a probability measure. Whatever it requires is the only constraint on these five parameters. is not an argument of this predicate. appears only here and nowhere in the conclusion.
- Positive setup cost: .
- Optimality of : holds. Here is a function built from , and . Neither nor is unfolded here, because their definitions are also in modules that are not shown. In particular, the read-back cannot say whether "optimal" means a global minimiser of the cost defined next, whether must be positive, or whether is required to be unique.
Write
for the cost of order quantity , where is an unseen imported definition. Write
for the quantity given by the imported definition , which depends on but not on . Set .
The theorem states both of the following inequalities:
The middle expression simplifies to . The second inequality holds for every real , because a square is never negative, so none of the hypotheses are needed for it. All the content is in the first inequality. It bounds the relative cost increase of over by , and taken together the two inequalities bound that increase by .
Where the right-hand side is negative, that is when or , the first inequality requires the relative change to be strictly negative. The statement does not rule these cases out itself. Whether they can happen depends on the hidden definitions.
Degenerate cases:
- : division by zero returns , so and the right-hand side is . The claim becomes: the relative change is .
- : the left-hand quotient is by the same rule, so the claim becomes , which is the same as .
- and together: the claim is , which holds automatically.
- : dividing by a negative number reverses the sense of the comparison between and . The statement allows this case unless the hidden definitions exclude it.
- Vacuous cases: if or cannot be satisfied for some parameter values, the theorem says nothing about those values. That cannot be checked without the definition bodies.
- Other defaults: whether the hidden definitions of , or use integrals of non-integrable functions, square roots of negative numbers, or other default-valued operations cannot be determined from the code shown.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.