Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

A.3: the marginal cost Φi(S∪{v})−Φi(S)\Phi_i(S\cup\{v\}) - \Phi_i(S)Φi​(S∪{v})−Φi​(S) of adding a facility

Proved
ReliableFacilityLoc.Supermod.marginal

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

facility-locationoperations-researchp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1reliability

Assume λi≥0\lambda_i \ge 0λi​≥0, 0≤qj<10 \le q_j < 10≤qj​<1 and R≥1R \ge 1R≥1. Let SSS be a set of regular facilities, v∉Sv \notin Sv∈/S a regular facility with ∣S∣+1≤R|S| + 1 \le R∣S∣+1≤R, and list SSS as j1,…,jnj_1, \dots, j_nj1​,…,jn​ in nondecreasing order of distance. Let nˉ\bar nnˉ and ttt be the numbers of facilities of SSS with dij≤φid_{ij} \le \varphi_idij​≤φi​, resp. dij≤divd_{ij} \le d_{iv}dij​≤div​, and PkP_kPk​, CkC_kCk​ as in the proof of Proposition 3.

  1. If div≤φid_{iv} \le \varphi_idiv​≤φi​, then
Φi(S∪{v})−Φi(S)=λi(1−qv)[Pt div−∑k=t+1nˉ+1Ck]+μiv.\Phi_i(S\cup\{v\}) - \Phi_i(S) = \lambda_i (1-q_v)\Big[P_t\, d_{iv} - \sum_{k=t+1}^{\bar n+1} C_k\Big] + \mu_{iv}.Φi​(S∪{v})−Φi​(S)=λi​(1−qv​)[Pt​div​−k=t+1∑nˉ+1​Ck​]+μiv​.
  1. If div≥φid_{iv} \ge \varphi_idiv​≥φi​, then Φi(S∪{v})−Φi(S)=μiv\Phi_i(S\cup\{v\}) - \Phi_i(S) = \mu_{iv}Φi​(S∪{v})−Φi​(S)=μiv​.

The new facility is inserted into the level-by-level assignment after the ttt facilities that are at least as close; the formula records the resulting change in expected cost.

Formalization Note The paper treats only div<φid_{iv} < \varphi_idiv​<φi​, setting the other case aside "without loss of generality"; both cases are stated, and they agree at div=φid_{iv} = \varphi_idiv​=φi​. The hypothesis ∣S∣+1≤R|S| + 1 \le R∣S∣+1≤R is constraint (6c) for S∪{v}S \cup \{v\}S∪{v}.

Preamble
import Mathlib
import Definitions.Def_ReliableFacilityLoc_Supermod_RSP
import Definitions.Def_ReliableFacilityLoc_Supermod_ClosedForm

open Finset
Formal statement
namespace ReliableFacilityLoc.Supermod

/-- **Marginal cost of adding one facility** (Cui, Ouyang & Shen, UCTC-FR-2010-02 (Feb. 2010),
Appendix A.3, p. 36, PDF 38). Let `S` be a set of regular facilities, `v ∉ S` a regular facility
with `|S| + 1 ≤ R`, and `L = [j_1, …, j_n]` a list of `S` in nondecreasing order of distance;
let `n̄`, `t` be the numbers of elements of `S` with `d_ij ≤ φ_i`, resp. `d_ij ≤ d_iv`.
1. If `d_iv ≤ φ_i`, then
   `Φ_i(S ∪ {v}) − Φ_i(S) = λ_i (1 − q_v) [P_t d_iv − Σ_{k=t+1}^{n̄+1} C_k] + µ_iv`.
2. If `d_iv ≥ φ_i`, then `Φ_i(S ∪ {v}) − Φ_i(S) = µ_iv`.

Printed (p. 36): "Without loss of generality, we assume that diu and div are less than the penalty
cost φi, i.e. s ≤ n̄ and t ≤ n̄. It follows that Φi(S ∪ {v}) − Φi(S) = λi[Σ_{k=1}^{t} Ck +
Pt(1 − qv)div + qv Σ_{k=t+1}^{n̄+1} Ck] + Σ_{j∈S∪{v}} µij − λi Σ_{k=1}^{n̄+1} Ck − Σ_{j∈S} µij
= λi[Pt(1 − qv)div − (1 − qv) Σ_{k=t+1}^{n̄+1} Ck] + µiv = λi(1 − qv)[Ptdiv − Σ_{k=t+1}^{n̄+1} Ck] + µiv."

Formalization Note: part 1 is the printed formula, stated for `d_iv ≤ φ_i` (the printed "less
than" plus the boundary case, where both parts agree). Part 2 is the case the paper sets aside
"without loss of generality": a facility farther than the penalty is never used, so only its
multiplier changes the value. `|S| + 1 ≤ R` is the cardinality constraint (6c) of (MSF_i) for
`S ∪ {v}`, under which the closed form of `Φ_i` applies to both sets. `0 ≤ λ_i`,
`0 ≤ q_j < 1`, `R ≥ 1` are the standing assumptions of §3.1. -/
theorem marginal {J R : ℕ} (lam : ℝ) (d : Fin J → ℝ) (phi : ℝ) (q : Fin J → ℝ)
    (mu : Fin J → ℝ) (hlam : 0 ≤ lam) (hq0 : ∀ j, 0 ≤ q j) (hq1 : ∀ j, q j < 1) (hR : 1 ≤ R)
    (S : Finset (Fin J)) (v : Fin J) (hv : v ∉ S) (hS : S.card + 1 ≤ R) (L : List (Fin J))
    (hLnd : L.Nodup) (hLS : L.toFinset = S) (hLsort : L.Pairwise (fun a b => d a ≤ d b)) :
    (d v ≤ phi →
      Phi lam d phi q mu R (insert v S) - Phi lam d phi q mu R S =
        lam * (1 - q v) * (prodQ q L (countLE d (d v) L) * d v -
          ∑ k ∈ Icc (countLE d (d v) L + 1) (countLE d phi L + 1), Ck d phi q L k) + mu v) ∧
    (phi ≤ d v →
      Phi lam d phi q mu R (insert v S) - Phi lam d phi q mu R S = mu v) := by sorry

end ReliableFacilityLoc.Supermod
Source
Cui, Ouyang, Shen, Reliable Facility Location Design under the Risk of Disruptions, UCTC-FR-2010-02 (Feb. 2010), p. 36 (PDF 38), Appendix A.3, second display
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 7, 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