Definition (Hessenberg reduction). For a square \mathbf{A}, accumulate Householder similarities to obtain a unitary \mathbf{Q} and upper-Hessenberg \mathbf{H}=\mathbf{Q}^{\mathsf{H}}\mathbf{A}\mathbf{Q}. The mathematical construction uses n-2 similarities; for n\le2 it returns (\mathbf{I},\mathbf{A}). It changes the representation of the eigenproblem, not its eigenvalues.
Lean statement and details
NLAlib.hessenbergReduction.{u_1} {๐ : Type u_1} [RCLike ๐] {n : โ} (A : Matrix (Fin n) (Fin n) ๐) :
Matrix (Fin n) (Fin n) ๐ ร Matrix (Fin n) (Fin n) ๐