Ralf Hemmecke <[EMAIL PROTECTED]> writes: > On 02/29/2008 09:27 AM, Martin Rubey wrote: > > make SQMATCAT inherit from MATCAT. > > I am sure you don't want that.
I'm not so sure... > We have > > MatrixCategory(R,Row,Col): Category == Definition where > R : Ring > Row : FiniteLinearAggregate R > Col : FiniteLinearAggregate R > > Definition ==> TwoDimensionalArrayCategory(R,Row,Col) with > ... > coerce: Col -> % > transpose: Row -> % > horizConcat: (%,%) -> % > vertConcat: (%,%) -> % > ... > > There are even more functions that allow the result to be a non-square > matrix. I know that. However, MatrixCategory also contains many functions that only make sense for square matrices. > The better way would be to factor out a subcategory that doesn't change the > structure of the matrix and let SquareMatrix and MatrixCategory inherit from > that. This is probably a good possibility, I'll look into it. The other one is to throw errors when dimensions do not fit, which is the current approach. One problem is the "categorical" definition of multiplication of rectangular matrices - what should it's signature be? For me, it's fine to have multiplication in MatrixCategory... In Aldor it might be possible to do better, but not in SPAD: (M: RectangularMatrix(n, m, R)) * (N: RectangularMatrix(m, k, R)) -> RectangularMatrix(n, k, R) To be honest, I doubt that this would be very useful. Martin _______________________________________________ Axiom-developer mailing list Axiom-developer@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-developer