lp_weak_duality
std.optim.lp_weak_duality · Level L1Weak duality for max cᵀx, A·x ≤ b, x ≥ 0 and its dual min bᵀy, Aᵀy ≥ c, y ≥ 0: whether x and y are feasible, and the three numbers cᵀx ≤ yᵀAx ≤ bᵀy, which feasibility guarantees. Feasible x and y with cᵀx = bᵀy are both optimal, a certificate for each.
Signature
lp_weak_duality(A: f64[m, n], b: f64[m], c: f64[n], x: f64[n], y: f64[m]) → f64[], f64[], f64[], f64[], f64[]
Structure
The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.
- input
- operation
- constant
- call
- output
Verification
- Signature proven by NOVA’s shape solver, for every size.
- Equal to the reference
feasibility of x and y; c·x, y·A·x, b·yin exact rational arithmetic, on all 40 test cases. - All 200 float64 results inside the running error bound; the closest uses 62% of it.
- Interpreter and NumPy backend return bit-identical results.
- At float32 too: the 40 test cases rounded to float32, and 40 of them inside the running error bound at u = 2⁻²⁴; the closest uses 44% of it.
- correctly rounded (the float64 nearest the exact value)
- 81%
- bit-equal to the NumPy formula in float64
- 94%
- largest error, in units in the last place
- 45
Large ulp counts appear where a result is tiny next to the numbers it is computed from (after cancellation, for example), so one unit in the last place is tiny too; the absolute error is still inside the bound. Results within their own error of zero are not counted.
Control handle
- Symbol
- Ω:std.optim.lp_weak_duality · Ω:lp_weak_duality
- Pins
sha256:7ec020269667982405b1635343b041ced0f1a7babc2fc0c0c383a0353971e9ccthis graph and the 3 it reaches through calls- Evidence
sha256:1504a7e84377a03477cab34baf948468d1bd470a0c355a47fde8d31fc2368e0ethe hash of its verification record- Needs
- no capability: a pure function
Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.