NLA-lib Explorer

NLAlib.IsQR.exists_hasOrthonormalCols_mul_isUpperTrapezoidal

Library · theorem

A thin QR factorization extends to a full one, the converse of NLAlib.HasOrthonormalCols.isQR_submatrix_castLE: for a thin QR factorization \mathbf{A} = \mathbf{Q}\mathbf{R} of an m \times n matrix, n \le m, there are a square unitary \mathbf{Q}' whose first n columns are \mathbf{Q} and an upper trapezoidal \mathbf{R}' whose first n rows are \mathbf{R} (the others vanish), with \mathbf{A} = \mathbf{Q}'\mathbf{R}'.

NLAlib.IsQR.exists_hasOrthonormalCols_mul_isUpperTrapezoidal.{u_1} {𝕜 : Type u_1} [RCLike 𝕜]
  {m n : ℕ} {A Q : Matrix (Fin m) (Fin n) 𝕜} {R : Matrix (Fin n) (Fin n) 𝕜} (h : IsQR A Q R)
  (hnm : n ≤ m) :
  ∃ Q' R',
    HasOrthonormalCols Q' ∧
      IsUpperTrapezoidal R' ∧
        A = Q' * R' ∧ Q'.submatrix id (Fin.castLE hnm) = Q ∧ R'.submatrix (Fin.castLE hnm) id = R

Full source on GitHub

Import NLAlib.Matrix.Factorizations.QR.