AFTD Auto-Formalizing Theoretical Domains

water_filling_lp_opt

def

The optimal value of the water-filling linear programming relaxation for scheduling $n$ jobs with processing times $p$ and weights $w$ on $m$ identical machines, minimizing $\sum_{j} w_j C_j$ subject to $\sum_{j \in S} p_j C_j \ge \frac{1}{2} \sum_{j \in S} p_j^2 + \frac{1}{2} g(p_S)$ for all $S \subseteq \mathrm{Fin}\,n$, where $g(p_S)$ is the infimum of $\sum_{i \in \mathrm{Fin}\,m} L_i^2$ over machine load vectors $L : \mathrm{Fin}\,m \to \mathbb{R}$ with $\sum_{i} L_i = \sum_{j \in S} p_j$ and $L_i \ge \mathrm{kth\_largest}(p_S, i)$.

Statement

noncomputable def water_filling_lp_opt (m n : ℕ) (p w : Fin n → ℝ) : ℝ
Defined in
arXiv:2611.30731 Sec. 2
Verified
26 Nov 2026
Axioms
none listed
Built on 1
  • kth_largestThe $i$-th largest entry of a vector $x : \mathrm{Fin}\,n \to \mathbb{R}$, indexed from 0, padded with 0 if $i \ge n$.

Read back from the Lean

water_filling_lp_opt m n p w defines the real number obtained as the infimum (sInf) of the set of all cost : ℝ for which there exists a completion time vector C : Fin n → ℝ satisfying two conditions: 1. For every subset S : Finset (Fin n), (1 / 2) * (∑_{j ∈ S} (p j)²) + (1 / 2) * sInf { s : ℝ | ∃ L : Fin m → ℝ, (∑_{i : Fin m} L i = ∑_{j ∈ S} p j) ∧ (∀ i : Fin m, kth_largest (fun j => if j ∈ S then p j else 0) i.1 ≤ L i) ∧ s = ∑_{i : Fin m} (L i)² } ≤ ∑_{j ∈ S} p j * C j 2. cost = ∑_{j : Fin n} w j * C j.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The optimal objective value of the water-filling LP relaxation for identical parallel machines. -/
noncomputable def water_filling_lp_opt (m n : ℕ) (p w : Fin n → ℝ) : ℝ := sInf { cost : ℝ | ∃ C : Fin n → ℝ,
    (∀ S : Finset (Fin n),
      (1 / 2 : ℝ) * (∑ j ∈ S, (p j) ^ 2) +
      (1 / 2 : ℝ) * sInf { s : ℝ | ∃ L : Fin m → ℝ,
        (∑ i : Fin m, L i = ∑ j ∈ S, p j) ∧
        (∀ i : Fin m, kth_largest (fun j => if j ∈ S then p j else 0) i.1 ≤ L i) ∧
        s = ∑ i : Fin m, (L i) ^ 2 } ≤
      ∑ j ∈ S, p j * C j) ∧
    cost = ∑ j : Fin n, w j * C j }
See it in the graphDiscuss this resultChallenge it