Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Linear programming (1.1), LP inputs, and the matrices A(α,β,m,N)A(\alpha,\beta,m,N)A(α,β,m,N) of (11.1)

Definition
ExtendedSmale9_LinearProgram

by LG · Sep 30, 2026 · Mathlib 777aaa6 (Lean v4.29.0-rc3)

computabilitylinear-programmingsci-hierarchysmale-9th-problem

An LP input is ι=(y,A)∈Rm×Rm×N\iota=(y,A)\in\mathbb R^m\times\mathbb R^{m\times N}ι=(y,A)∈Rm×Rm×N. Its evaluations are the entries yiy_iyi​ and AijA_{ij}Aij​.

The feasible set is {x∈RN:Ax=y, x≥0}\{x\in\mathbb R^N: Ax=y,\ x\ge0\}{x∈RN:Ax=y, x≥0}, and the solution set of (1.1) is argmin⁡{⟨x,c⟩:Ax=y, x≥0}\operatorname{argmin}\{\langle x,c\rangle : Ax=y,\ x\ge0\}argmin{⟨x,c⟩:Ax=y, x≥0}. The LP solution map uses c=1Nc=\mathbf 1_Nc=1N​ and takes values in MN=(RN,∥⋅∥p)M_N=(\mathbb R^N,\|\cdot\|_p)MN​=(RN,∥⋅∥p​).

For (11.1),

A(α,β,m,N)=((α  β  −1)⊕Im−10),yA(y1,m)=y1e1.A(\alpha,\beta,m,N) = \begin{pmatrix} (\alpha\ \ \beta\ \ {-1}) \oplus I_{m-1} & 0\end{pmatrix},\qquad y^A(y_1,m)=y_1e_1 .A(α,β,m,N)=((α  β  −1)⊕Im−1​​0​),yA(y1​,m)=y1​e1​.

That is, the first row of A(α,β,m,N)A(\alpha,\beta,m,N)A(α,β,m,N) is (α,β,−1,0,…,0)(\alpha,\beta,-1,0,\dots,0)(α,β,−1,0,…,0) and row i≥2i\ge2i≥2 is ei+2⊤e_{i+2}^\topei+2⊤​.

Definition code
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

Source
A. Bastounis, A. C. Hansen, V. Vlačić, *The extended Smale's 9th problem — On computational barriers and paradoxes in estimation, regularisation, computer-assisted proofs, and learning* (preprint, 126 pp., version of 28 Jan 2021), §1.1 problem (1.1) (p. 4), (9.13) (p. 29), §11.1 display (11.1) (p. 45).
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 m,Nm,Nm,N.

  • LP input. An LP input is a pair (y,A)(y,A)(y,A) with y:{0,…,m−1}→Ry:\{0,\dots,m-1\}\to\mathbb Ry:{0,…,m−1}→R and AAA a real m×Nm\times Nm×N matrix.
  • Evaluations. Index iii of the first kind gives yiy_iyi​, and index (i,j)(i,j)(i,j) of the second kind gives AijA_{ij}Aij​. Both are viewed as complex numbers.
  • Feasible set. It is {x∈RN:Ax=y, xi≥0 ∀i}\{x\in\mathbb R^N: Ax=y,\ x_i\ge0\ \forall i\}{x∈RN:Ax=y, xi​≥0 ∀i}.
  • Minimiser set. For c∈RNc\in\mathbb R^Nc∈RN it is the set of feasible zzz with c⋅z≤c⋅xc\cdot z\le c\cdot xc⋅z≤c⋅x for every feasible xxx. It is empty if the LP is infeasible or unbounded below.
  • LP solution set. For p∈[0,∞]p\in[0,\infty]p∈[0,∞] it is the image of the minimiser set with c=(1,…,1)c=(1,\dots,1)c=(1,…,1) under the identification of RN\mathbb R^NRN with RN\mathbb R^NRN carrying the ℓp\ell^pℓp structure. No restriction p≥1p\ge1p≥1 is imposed in the definition itself.
  • The matrix A(α,β,m,N)A(\alpha,\beta,m,N)A(α,β,m,N). Rows and columns are indexed from 000.
    • Row 000 has entries α,β,−1\alpha,\beta,-1α,β,−1 in columns 0,1,20,1,20,1,2 (those that exist) and 000 elsewhere.
    • Row i≥1i\ge1i≥1 has entry 111 in column i+2i+2i+2 (if i+2<Ni+2<Ni+2<N) and 000 elsewhere.
  • The vector yA(y1,m)y^A(y_1,m)yA(y1​,m). Its coordinate 000 is y1y_1y1​ and all other coordinates are 000.
Human review
  • Endorsed by Shuze Chen · Sep 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by LG · Sep 30, 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