NLA-lib Explorer

NLAlib.uncurry_mul_mul

Library · theorem

Row-major vectorisation of a two-sided product: flattening \mathbf{S}\mathbf{X}\mathbf{T} by Function.uncurry is (\mathbf{S} \otimes \mathbf{T}^{\mathsf{T}}) applied to the flattened \mathbf{X}. The identity is about the transpose over any commutative semiring, so it is stated with \mathbf{T}^{\mathsf{T}}; Mathlib's Matrix.kronecker_mulVec_vec is the column-major form.

NLAlib.uncurry_mul_mul.{u_2, u_3, u_8, u_9, u_10} {m : Type u_2} {n : Type u_3} {R : Type u_8}
  [CommSemiring R] {a : Type u_9} {b : Type u_10} [Fintype m] [Fintype n] (S : Matrix a m R)
  (X : Matrix m n R) (T : Matrix n b R) :
  Function.uncurry (S * X * T) = kroneckerMap (fun x1 x2 ↦ x1 * x2) S Tᵀ *ᵥ Function.uncurry X

Full source on GitHub

Import NLAlib.Matrix.Structured.Kronecker.