Theorem (conjTranspose_mul_self_eq_iff_exists_mul). Equal Gram matrices. \mathbf{A}^{\mathsf{H}}\mathbf{A} = \mathbf{B}^{\mathsf{H}}\mathbf{B} exactly when \mathbf{A} = \mathbf{W}\mathbf{B} for some \mathbf{W} with orthonormal columns, provided \mathbf{A} has at least as many rows as \mathbf{B}. [HornJohnson2013, Theorem 7.3.11].
Headline General form: sizes are index types
Lean statement and details
NLAlib.conjTranspose_mul_self_eq_iff_exists_mul.{u_1, u_2, u_3, u_4} {𝕜 : Type u_1} [RCLike 𝕜]
{m : Type u_2} {n : Type u_3} {p : Type u_4} [Fintype m] [Fintype p] [Finite n] [DecidableEq p]
{A : Matrix m n 𝕜} {B : Matrix p n 𝕜} (hcard : Fintype.card p ≤ Fintype.card m) :
Aᴴ * A = Bᴴ * B ↔ ∃ W, HasOrthonormalCols W ∧ A = W * B