Linear programming (1.1), LP inputs, and the matrices of (11.1)
DefinitionExtendedSmale9_LinearProgramAn LP input is . Its evaluations are the entries and .
The feasible set is , and the solution set of (1.1) is . The LP solution map uses and takes values in .
For (11.1),
That is, the first row of is and row is .
import Mathlib
/-!
# Linear programming (1.1) and the inputs of §11.1
Bastounis–Hansen–Vlačić, *The extended Smale's 9th problem*:
* problem (1.1): `z ∈ argmin_x ⟨x, c⟩` subject to `Ax = y`, `x ≥ 0`;
* the input sets `Ω_{m,N} ⊆ ℝ^m × ℝ^{m×N}` of (9.13), with evaluations the entries of
`y` and `A`, and `c = (1, …, 1)`;
* the output space `M_N = ℝ^N` with the `‖·‖_p` norm;
* the matrices `A(α, β, m, N)` and vectors `y^A(y₁, m)` of (11.1).
-/
open scoped ENNReal
namespace ExtendedSmale9
/-- An LP input `ι = (y, A) ∈ ℝ^m × ℝ^{m×N}`. -/
abbrev LPInput (m N : ℕ) : Type := (Fin m → ℝ) × Matrix (Fin m) (Fin N) ℝ
/-- The evaluation family on LP inputs: the coordinates `y_i` and entries `A_{ij}`
(regarded as complex numbers). -/
noncomputable def lpEval {m N : ℕ} : Fin m ⊕ (Fin m × Fin N) → LPInput m N → ℂ
| Sum.inl i, ι => (ι.1 i : ℂ)
| Sum.inr ij, ι => (ι.2 ij.1 ij.2 : ℂ)
/-- The feasible set `{x ∈ ℝ^N | Ax = y, x ≥ 0}` of (1.1). -/
def lpFeasible {m N : ℕ} (y : Fin m → ℝ) (A : Matrix (Fin m) (Fin N) ℝ) : Set (Fin N → ℝ) :=
{x | A.mulVec x = y ∧ ∀ i, 0 ≤ x i}
/-- The solution set of (1.1): `argmin_x ⟨x, c⟩` subject to `Ax = y`, `x ≥ 0`. -/
def lpArgmin {m N : ℕ} (c : Fin N → ℝ) (y : Fin m → ℝ) (A : Matrix (Fin m) (Fin N) ℝ) :
Set (Fin N → ℝ) :=
{z | z ∈ lpFeasible y A ∧ ∀ x ∈ lpFeasible y A, c ⬝ᵥ z ≤ c ⬝ᵥ x}
/-- The LP solution map `Ξ(y, A)` with `c = 1_N = (1, …, 1)`, as a subset of
`M_N = (ℝ^N, ‖·‖_p)`. -/
def lpSolution {m N : ℕ} (p : ℝ≥0∞) (ι : LPInput m N) :
Set (PiLp p (fun _ : Fin N => ℝ)) :=
WithLp.toLp p '' lpArgmin (fun _ => 1) ι.1 ι.2
/-- The matrix `A(α, β, m, N) = ((α β −1) ⊕ I_{m−1} 0)` of (11.1): its first row is
`(α, β, −1, 0, …, 0)` and, for `2 ≤ i ≤ m`, its `i`-th row is the standard basis row
`e_{i+2}` (zero-based: row `i ≥ 1` has a single `1` in column `i + 2`); all other entries
vanish. -/
def lpMatrixA (α β : ℝ) (m N : ℕ) : Matrix (Fin m) (Fin N) ℝ := fun i j =>
if (i : ℕ) = 0 then
(if (j : ℕ) = 0 then α else if (j : ℕ) = 1 then β else if (j : ℕ) = 2 then -1 else 0)
else if (j : ℕ) = (i : ℕ) + 2 then 1 else 0
/-- The vector `y^A(y₁, m) = y₁ e₁ ∈ ℝ^m` of (11.1). -/
def lpVectorA (y₁ : ℝ) (m : ℕ) : Fin m → ℝ := fun i => if (i : ℕ) = 0 then y₁ else 0
end ExtendedSmale9
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) - drafting agent, NON-BLIND
Non-blind read-back. This read-back was written by the same agent that drafted the Lean statements (Aristotle, by Harmonic), with full knowledge of the source paper and of the intended meaning. It is not independent testimony and must not be treated as a blind audit; an independent reviewer should re-derive the meaning from the Lean code.
This file makes the following definitions, for natural numbers .
- LP input. An LP input is a pair with and a real matrix.
- Evaluations. Index of the first kind gives , and index of the second kind gives . Both are viewed as complex numbers.
- Feasible set. It is .
- Minimiser set. For it is the set of feasible with for every feasible . It is empty if the LP is infeasible or unbounded below.
- LP solution set. For it is the image of the minimiser set with under the identification of with carrying the structure. No restriction is imposed in the definition itself.
- The matrix . Rows and columns are indexed from .
- Row has entries in columns (those that exist) and elsewhere.
- Row has entry in column (if ) and elsewhere.
- The vector . Its coordinate is and all other coordinates are .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.