On 2/29/08, Ralf Hemmecke wrote: > > On 02/29/2008 09:27 AM, Martin Rubey wrote: > > make SQMATCAT inherit from MATCAT. > > > I am sure you don't want that. > > 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.
Perhaps I am missing something but I do not understand why you think that if MatrixCategory is used in the definition of SquareMatrix that these operations would result in a non-square matrix. % means "this *domain* ", not "this category". > > SquareMatrix *should not* inherit from MatrixCategory!!! > That does not make any sense. Surely a SquareMatrix (no matter exactly whatever that is) is a sub-type of MatrixCategory (whatever that is). So it makes perfectly good sense for SquareMatrix to be a sub-category of MatrixCategory category. > 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. > I do not see any structure of SquareMatrix that is in conflict with MatrixCategory. SquareMatrix is just something that has more structure, i.e. it has some more operations and some of the inherited operations become degenerate (since nrows=ncols). It seems to me that this is quite normal in the Axiom library. Regards, Bill Page. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel