NLA-lib Explorer

NLAlib.Computation.RelErr.norm_sub_smul_inv_norm_le

Library · theorem

Rounded componentwise normalization need not preserve the exact input direction. If the stored scale q is nonnegative and approximates the input norm with relative bound g, and each rescaled component has relative error at most u, the initial-direction mismatch obeys \|\mathbf{x}-q\mathbf{y}/\|\mathbf{y}\|\|\le(2u+g)\|\mathbf{x}\|. The statement also permits zero vectors; normalization uses total real inversion.

NLAlib.Computation.RelErr.norm_sub_smul_inv_norm_le.{u_1} {ι : Type u_1} [Fintype ι] {u q g : ℝ}
  {x y : ι → ℝ} (hu : 0 ≤ u) (hq : 0 ≤ q) (hscale : |‖WithLp.toLp 2 x‖ - q| ≤ g * ‖WithLp.toLp 2 x‖)
  (h : ∀ (i : ι), Computation.RelErr u (x i) (q * y i)) :
  ‖WithLp.toLp 2 (x - q • ‖WithLp.toLp 2 y‖⁻¹ • y)‖ ≤ (2 * u + g) * ‖WithLp.toLp 2 x‖

Full source on GitHub

Import NLAlib.Matrix.FinitePrecision.Normalization.