NLA-lib Explorer

NLAlib.Krylov.CG.sum_self_mul_eq_norm_sq

Library · theorem

The self-product sum is the squared Euclidean norm, also for the empty vector.

NLAlib.Krylov.CG.sum_self_mul_eq_norm_sq (r : ℕ → ℝ) (n : ℕ) :
  ∑ i ∈ Finset.range n, r i * r i = ‖WithLp.toLp 2 fun i ↦ r ↑i‖ ^ 2

Full source on GitHub

Import NLAlib.Krylov.CG.ResidualCache.