This is a correct but very expensive way to construct the basis. I would rather create s * t HomalgInitialMatrix, then make the matrices immutable. If this is not compilable, then we need homalg commands to create these matrices as immutable matrices immediately.
Originally posted by @mohamed-barakat in homalg-project/CAP_project#1146 (comment)