# element's ring because the basis space might be an algebraic
# closure whereas the base ring of the 3-by-3 identity matrix
# could be QQ instead of QQbar.
# element's ring because the basis space might be an algebraic
# closure whereas the base ring of the 3-by-3 identity matrix
# could be QQ instead of QQbar.
- # the given basis.
- W = V.span_of_basis( vector_basis )
+ # the given basis. The "check" parameter here guarantees that
+ # the basis is linearly-independent.
+ W = V.span_of_basis( vector_basis, check=check_axioms)
# Note: the Jordan and inner-products are defined in terms
# of the ambient basis. It's important that their arguments
# Note: the Jordan and inner-products are defined in terms
# of the ambient basis. It's important that their arguments
# Normalize the "matrix" basis, too!
basis = vector_basis
if basis_is_matrices:
basis = tuple( map(_vec2mat,basis) )
# Normalize the "matrix" basis, too!
basis = vector_basis
if basis_is_matrices:
basis = tuple( map(_vec2mat,basis) )
# Now "W" is the vector space of our algebra coordinates. The
# variables "X1", "X2",... refer to the entries of vectors in
# W. Thus to convert back and forth between the orthonormal
# coordinates and the given ones, we need to stick the original
# basis in W.
# Now "W" is the vector space of our algebra coordinates. The
# variables "X1", "X2",... refer to the entries of vectors in
# W. Thus to convert back and forth between the orthonormal
# coordinates and the given ones, we need to stick the original
# basis in W.
- # Don't orthonormalize because our basis is already orthonormal
- # with respect to our inner-product.
+ # Don't orthonormalize because our basis is already
+ # orthonormal with respect to our inner-product. But also
+ # don't pass check_field=False here, because the user can pass
+ # in a field!
B = matrix.identity(field, n)
# Don't orthonormalize because our basis is already
B = matrix.identity(field, n)
# Don't orthonormalize because our basis is already
- # orthonormal with respect to our inner-product.
+ # orthonormal with respect to our inner-product. But
+ # also don't pass check_field=False here, because the
+ # user can pass in a field!