Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Non-homogeneous state-affine systems: matrix polynomials, the system equation, the governing bounds

Definition
ReservoirSAS

by olivier · Sep 11, 2026 · Mathlib 0df444a (Lean v4.33.1)

dynamical-systemsmachine-learningreservoir-computingstate-affine-system

This module fixes the objects of Section 3 of Grigoryeva-Ortega, building on the reservoir vocabulary already published on the platform.

Polynomials with matrix coefficients. A polynomial is given by its coefficient family and evaluated as p(z)=∑jzjPjp(z) = \sum_j z^j P_jp(z)=∑j​zjPj​, with matrix coefficients for the state part and vector coefficients for the affine part. These are the objects of equation (2.1) of the source.

Non-homogeneous state-affine systems. Definition 3.6 of the source is the reservoir

xt=p(zt) xt−1+q(zt),x_t = p(z_t)\,x_{t-1} + q(z_t),xt​=p(zt​)xt−1​+q(zt​),

affine in the state with coefficients depending polynomially on the input. Here time is indexed by N\mathbb{N}N, index kkk denoting the instant kkk steps into the past, so the equation reads xk=p(zk)xk+1+q(zk)x_k = p(z_k)x_{k+1} + q(z_k)xk​=p(zk​)xk+1​+q(zk​) — the same constraint under a relabelling.

The two governing constants. The behaviour of the system is controlled by upper bounds for ∥p(z)∥2\lVert p(z) \rVert_2∥p(z)∥2​ and ∥q(z)∥2\lVert q(z) \rVert_2∥q(z)∥2​ over the input range [−1,1][-1,1][−1,1], written MpM_pMp​ and MqM_qMq​ in the source. Both are recorded as predicates asserting that a supplied constant is a valid bound, rather than as maxima, so that any admissible bound may be used.

Formalization Note Inputs are scalar, following Section 3 of the source, which restricts to one-dimensional signals and defers the multidimensional case to a remark. The bound on the matrix polynomial is stated as an operator inequality valid for every vector, which is what the spectral norm provides; the vector bound is a plain norm inequality. The conversions between Euclidean space and coordinate functions are pure type transport and change only which norm the type carries. Note that the polynomial bounds constrain zzz to [−1,1][-1,1][−1,1] while the system equation itself places no constraint on the driving sequence: the two are linked by the hypotheses of the theorems, not by these definitions.

Definition code
import Mathlib
import Definitions.Def_ReservoirESN

set_option autoImplicit false

open Metric Matrix ReservoirESN

namespace ReservoirSAS

/-- Evaluation d'un polynome a coefficients matriciels : `p(z) = Σ_j z^j P_j`.
Les polynomes de la source (eq. (2.1)) sont donnes par leurs coefficients. -/
noncomputable def matPolyEval {N r : ℕ} (P : Fin r → Matrix (Fin N) (Fin N) ℝ) (z : ℝ) :
    Matrix (Fin N) (Fin N) ℝ :=
  ∑ j : Fin r, (z ^ (j : ℕ)) • P j

/-- Evaluation d'un polynome a coefficients vectoriels : `q(z) = Σ_j z^j Q_j`. -/
noncomputable def vecPolyEval {N s : ℕ} (Q : Fin s → EuclideanSpace ℝ (Fin N)) (z : ℝ) :
    EuclideanSpace ℝ (Fin N) :=
  ∑ j : Fin s, (z ^ (j : ℕ)) • Q j

/-- **Systeme d'etat affine non homogene** (Definition 3.6) : `x_t = p(z_t) x_{t-1} + q(z_t)`.
Indexation par le passe, comme partout : `x_k = p(z_k) x_{k+1} + q(z_k)`. -/
def IsSASSolution {N r s : ℕ} (P : Fin r → Matrix (Fin N) (Fin N) ℝ)
    (Q : Fin s → EuclideanSpace ℝ (Fin N))
    (z : ℕ → ℝ) (x : ℕ → EuclideanSpace ℝ (Fin N)) : Prop :=
  ∀ k, x k = (EuclideanSpace.equiv (Fin N) ℝ).symm
      (matPolyEval P (z k) *ᵥ (EuclideanSpace.equiv (Fin N) ℝ (x (k + 1))))
    + vecPolyEval Q (z k)

/-- Borne uniforme de la norme d'operateur d'un polynome matriciel sur `[-1,1]` :
le `M_p := max_{z ∈ I} ‖p(z)‖₂` de la source. -/
def MatPolyOpBound {N r : ℕ} (P : Fin r → Matrix (Fin N) (Fin N) ℝ) (K : ℝ) : Prop :=
  ∀ z : ℝ, z ∈ Set.Icc (-1 : ℝ) 1 → ∀ v : EuclideanSpace ℝ (Fin N),
    ‖(EuclideanSpace.equiv (Fin N) ℝ).symm
      (matPolyEval P z *ᵥ (EuclideanSpace.equiv (Fin N) ℝ v))‖ ≤ K * ‖v‖

/-- Borne uniforme de la norme d'un polynome vectoriel sur `[-1,1]` : le `M_q` de la source. -/
def VecPolyBound {N s : ℕ} (Q : Fin s → EuclideanSpace ℝ (Fin N)) (K : ℝ) : Prop :=
  ∀ z : ℝ, z ∈ Set.Icc (-1 : ℝ) 1 → ‖vecPolyEval Q z‖ ≤ K

end ReservoirSAS
Source
L. Grigoryeva, J.-P. Ortega, Universal discrete-time reservoir computers with stochastic inputs and linear readouts using non-homogeneous state-affine systems, Journal of Machine Learning Research 19(24) (2018), 1-40, https://arxiv.org/abs/1712.00754, Section 2 (eq. (2.1)) and Section 3 (Definition 3.6, condition (3.13)).
Read-back

What the Lean code literally says, in plain math · claude-opus-5

matPolyEval

For natural numbers NNN and rrr, given a family of N×NN \times NN×N real matrices P=(Pj)j∈Fin rP = (P_j)_{j \in \mathrm{Fin}\,r}P=(Pj​)j∈Finr​ indexed by j∈{0,…,r−1}j \in \{0,\dots,r-1\}j∈{0,…,r−1}, and a real number zzz, this defines the N×NN \times NN×N real matrix

pP(z)  =  ∑j=0r−1zj Pj,p_P(z) \;=\; \sum_{j=0}^{r-1} z^{j}\, P_j ,pP​(z)=j=0∑r−1​zjPj​,

the scalar multiples being taken entrywise. The exponent is the numeral value of the index jjj. Both NNN and rrr are implicit and arbitrary natural numbers: if r=0r = 0r=0 the sum is empty and pP(z)p_P(z)pP​(z) is the zero matrix for every zzz; if N=0N = 0N=0 the value is the unique 0×00 \times 00×0 matrix. The j=0j = 0j=0 term is z0⋅P0z^0 \cdot P_0z0⋅P0​, which equals P0P_0P0​ even at z=0z = 0z=0, since 00=10^0 = 100=1 here. Nothing restricts zzz to any interval.

vecPolyEval

Symmetrically, for a family Q=(Qj)j=0s−1Q = (Q_j)_{j=0}^{s-1}Q=(Qj​)j=0s−1​ of vectors of the Euclidean space RN\mathbb{R}^NRN (carrying the ℓ2\ell^2ℓ2 norm) and a real zzz, this is the vector

qQ(z)  =  ∑j=0s−1zj Qj.q_Q(z) \;=\; \sum_{j=0}^{s-1} z^{j}\, Q_j .qQ​(z)=j=0∑s−1​zjQj​.

Again s=0s = 0s=0 gives the zero vector identically, and zzz ranges over all of R\mathbb{R}R.

IsSASSolution

For implicit naturals N,r,sN, r, sN,r,s, a matrix family P=(Pj)j<rP = (P_j)_{j<r}P=(Pj​)j<r​, a vector family Q=(Qj)j<sQ = (Q_j)_{j<s}Q=(Qj​)j<s​, a real-valued sequence z:N→Rz : \mathbb{N} \to \mathbb{R}z:N→R and a sequence x:N→RNx : \mathbb{N} \to \mathbb{R}^Nx:N→RN, this is the proposition

∀k∈N,xk  =  pP(zk) xk+1  +  qQ(zk),\forall k \in \mathbb{N}, \qquad x_k \;=\; p_P(z_k)\, x_{k+1} \;+\; q_Q(z_k),∀k∈N,xk​=pP​(zk​)xk+1​+qQ​(zk​),

where pP(zk) xk+1p_P(z_k)\,x_{k+1}pP​(zk​)xk+1​ is the matrix-vector product: the Euclidean vector xk+1x_{k+1}xk+1​ is transported to the plain coordinate tuple, multiplied on the left by the matrix pP(zk)p_P(z_k)pP​(zk​), and transported back to Euclidean space (this transport is the identity on coordinates and changes nothing but the norm carried by the type). Note the index direction: the value at step kkk is determined by the value at step k+1k+1k+1, so the recurrence runs from larger indices toward 000, and the condition is imposed at every k∈Nk \in \mathbb{N}k∈N, k=0k = 0k=0 included. No initial or terminal condition is imposed, no boundedness of xxx or zzz is assumed, and in particular zkz_kzk​ is unconstrained — it need not lie in [−1,1][-1,1][−1,1]. If r=0r = 0r=0 and s=0s = 0s=0 the condition reduces to xk=0x_k = 0xk​=0 for all kkk; if N=0N = 0N=0 it holds vacuously for any z,xz, xz,x.

MatPolyOpBound

For a matrix family P=(Pj)j<rP = (P_j)_{j<r}P=(Pj​)j<r​ and a real number KKK, this is the proposition

∀z∈[−1,1],  ∀v∈RN:∥pP(z) v∥2  ≤  K ∥v∥2.\forall z \in [-1,1],\; \forall v \in \mathbb{R}^N: \quad \bigl\lVert p_P(z)\, v \bigr\rVert_2 \;\le\; K\,\lVert v \rVert_2 .∀z∈[−1,1],∀v∈RN:​pP​(z)v​2​≤K∥v∥2​.

The quantification over zzz is restricted to the closed interval [−1,1][-1,1][−1,1], endpoints included, and KKK is a single constant independent of both zzz and vvv; equivalently, KKK dominates the ℓ2\ell^2ℓ2 operator norm of pP(z)p_P(z)pP​(z) uniformly on [−1,1][-1,1][−1,1]. The bound is non-strict. KKK is not assumed nonnegative, though for N≥1N \ge 1N≥1 nonnegativity follows by taking v≠0v \ne 0v=0; for N=0N = 0N=0 the statement holds for every KKK, including negative ones. No claim is made that such a KKK exists.

VecPolyBound

For a vector family Q=(Qj)j<sQ = (Q_j)_{j<s}Q=(Qj​)j<s​ and a real KKK:

∀z∈[−1,1]:∥qQ(z)∥2  ≤  K,\forall z \in [-1,1]: \quad \bigl\lVert q_Q(z) \bigr\rVert_2 \;\le\; K,∀z∈[−1,1]:​qQ​(z)​2​≤K,

again non-strict, over the closed interval, with KKK uniform in zzz and not assumed nonnegative (nonnegativity is forced, since the left side is a norm). As above, this is a predicate on (Q,K)(Q,K)(Q,K), not an existence assertion.

None of these five declarations refers to any of the reservoir, contraction, weighting, fading-memory or squashing-function notions from the imported definitions file; nothing here mentions echo state networks, and no theorem is stated — all five are definitions only.

Human review
  • Endorsed by Shuze Chen · Sep 11, 2026

  • Endorsed by olivier · Sep 11, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me