NLA-lib Explorer

The matrix–vector complexity of linear systems

Library · Result group

Theorem (mul_log_le_of_forall_le_measureReal_norm_sub_mulVec_le). The matrix–vector complexity of linear systems (Shamir's theorem): let \kappa \ge 2, \varepsilon > 0 and \lvert n \rvert \ge 20(q + 3)^2. If a randomized algorithm (a measurable seeded family, seed law \rho) making q adaptive matrix–vector products, with a fixed known right-hand side \mathbf{b} \ne \mathbf{0} on which the algorithm may depend, returns for every symmetric \mathbf{A} \in \mathbb{R}^{n \times n} with spectrum in [-\kappa, -1] \cup [1, \kappa] (condition number at most \kappa), an \hat{\mathbf{x}} with \|\mathbf{b} - \mathbf{A}\hat{\mathbf{x}}\| \le \varepsilon\|\mathbf{b}\| with probability at least \tfrac23, then \kappa\log\frac{1}{4\varepsilon} \le 2(q + 1) \,. For symmetric \mathbf{A} the products \mathbf{A}^{\mathsf{H}}\mathbf{x} are the same, so this covers the oracle \mathbf{x} \mapsto (\mathbf{A}\mathbf{x}, \mathbf{A}^{\mathsf{H}}\mathbf{x}) of the source. MINRES needs O(\kappa\log(1/\varepsilon)) products on these spectra (Matrix.IsHermitian.norm_sub_mulVec_gmresIterate_le_two_mul_pow_div_two), so the bound is sharp up to the constant. [Shamir2026, Theorem 1]; there T \ge c\kappa\log(1/\varepsilon), for \kappa \ge C, \varepsilon \le c and n = \Omega(T^2) with unspecified constants; here explicit; in the source the output is the last query (one query fewer).

Headline General form: sizes are index types

Lean statement and details
NLAlib.mul_log_le_of_forall_le_measureReal_norm_sub_mulVec_le.{u_2, u_3} {n : Type u_2} [Fintype n]
  [DecidableEq n] {κ ε : ℝ} {q : ℕ} (hκ : 2 ≤ κ) (hε : 0 < ε)
  (hn : 20 * (q + 3) ^ 2 ≤ Fintype.card n) {b : n → ℝ} (hb : b ≠ 0) {S : Type u_3}
  [MeasurableSpace S] {alg : S → QueryAlgorithm (n → ℝ) (n → ℝ) q (n → ℝ)}
  (halg : QueryAlgorithm.IsMeasurableFamily alg) (ρ : Measure S) [IsProbabilityMeasure ρ]
  (hsucc :
    ∀ (A : Matrix n n ℝ),
      A.IsHermitian →
        spectrum ℝ A ⊆ Set.Icc (-κ) (-1) ∪ Set.Icc 1 κ →
          2 / 3 ≤
            ρ.real {s | ‖WithLp.toLp 2 (b - A *ᵥ (alg s).run A.mulVec)‖ ≤ ε * ‖WithLp.toLp 2 b‖}) :
  κ * Real.log (1 / (4 * ε)) ≤ 2 * (↑q + 1)

Full source on GitHub

Copy link

General form: sizes are index types. A size is carried by a finite index type: |k| is the number of elements of the index type k, and "k nonempty" means k ≥ 1.