Description
Steps To Reproduce
O=OctonionAlgebra(SR)
M=MatrixSpace(O,2,2)
Expected Behavior
Matrices are defined so long as multiplication and addition make sense.
Actual Behavior
Running the above code results in the TypeError
base_ring (=Octonion algebra over Symbolic Ring) must be a ring
Additional Information
This is somewhere between a bug report and a feature request. Matrix multiplication is well defined so long as addition and multiplication are defined; an associative ring is not required. So are many other operations (e.g. trace, transpose, conjugate) but not all (e.g. determinant). Having Matrix_Spaces test for an (associative) ring prevents access to those operations that are defined. Ideally, there should probably be a separate matrix class for the nonassociative case. But I'd rather have to deal with unreliable results of poorly-defined operations (e.g. determinant) than be blocked from multiplying nonassociative matrices altogether.
As a workaround, is there a reasonably simple way to disable the test in Matrix_Spaces? Perhaps by manually adding my instance of an octonion algebra to Rings? Something else?
Environment
- **OS**: (browser-based)
- **Sage Version**: sagecell.sagemath.org
Checklist
- I have searched the existing issues for a bug report that matches the one I want to file, without success.
- I have read the documentation and troubleshoot guide
Activity