NLA-lib Explorer

NLAlib.exists_hasOrthonormalCols_rotateTo

Library · theorem

Rotating \mathbf{e}_N to a computed vector: let n adjacent rotations, step j by the exact Givens rotation \mathbf{G}_j of the coefficients (c_j, s_j) that NLAlib.givensCoeffs computes from (\bar g^{(j)}_{j+1}, -\bar g^{(j)}_j) (so that \mathbf{G}_j zeros entry j of \mathbf{g}^{(j)}), take the vectors \mathbf{g}^{(j+1)} within \eta\|\mathbf{g}^{(j)}\| of \mathbf{G}_j\mathbf{g}^{(j)}, and the matrices \mathbf{A}_{j+1} by a rounded rotation of the rows j, j + 1 and then of the columns j, j + 1 of \mathbf{A}_j (NLAlib.IsRoundedRowRotation, NLAlib.IsRoundedColRotation, relative error \eta \ge 0), with n\eta \le 1/8 and \mathbf{g}^{(0)} \ne 0. Then there are a unitary \mathbf{Q} and \lvert c\rvert = 1 with \|\mathbf{Q}\mathbf{e}_N - c\,\mathbf{g}^{(0)}/\|\mathbf{g}^{(0)}\|\| \le 5n\eta, \qquad \|\mathbf{A}_n - \mathbf{Q}^{\mathsf{H}}\mathbf{A}_0\mathbf{Q}\|_2 \le 8n\eta\|\mathbf{A}_0\|_2\,. The rounded coefficients and their application meet the hypotheses with \eta = 12\boldsymbol{u} (NLAlib.Ops.StdModel.norm_rotatePair_sub_le). The last column is close to the direction of \mathbf{g}^{(0)}, not equal to it: the computed rotations do not zero their entries exactly. No printed source.

NLAlib.exists_hasOrthonormalCols_rotateTo {n : ℕ} {η : ℝ} (hη : 0 ≤ η) (hnη : ↑n * η ≤ 1 / 8)
  {cs : ℕ → ℂ × ℂ} {g : ℕ → Fin (n + 1) → ℂ} {A : ℕ → Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ}
  (hcs : ∀ (j : Fin n), cs ↑j = givensCoeffs (star (g (↑j) j.succ)) (-star (g (↑j) j.castSucc)))
  (hg :
    ∀ (j : Fin n),
      ‖WithLp.toLp 2 (g (↑j + 1) - givens j.castSucc j.succ (cs ↑j).1 (cs ↑j).2 *ᵥ g ↑j)‖ ≤
        η * ‖WithLp.toLp 2 (g ↑j)‖)
  (hA :
    ∀ (j : Fin n),
      ∃ A',
        IsRoundedRowRotation η j.castSucc j.succ (cs ↑j).1 (cs ↑j).2 (A ↑j) A' ∧
          IsRoundedColRotation η j.castSucc j.succ (cs ↑j).1 (cs ↑j).2 A' (A (↑j + 1)))
  (hg0 : g 0 ≠ 0) :
  ∃ Q c,
    HasOrthonormalCols Q ∧
      ‖c‖ = 1 ∧
        ‖WithLp.toLp 2 ((fun k ↦ Q k (Fin.last n)) - (c * ↑‖WithLp.toLp 2 (g 0)‖⁻¹) • g 0)‖ ≤
            5 * ↑n * η ∧
          specNorm (A n - Qᴴ * A 0 * Q) ≤ 8 * ↑n * η * specNorm (A 0)

Full source on GitHub

Import NLAlib.Matrix.FinitePrecision.GivensChain.