[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] Re: [fricas-devel] Re: [Axiom-mail] Setting elements i

From: Bill Page
Subject: [Axiom-developer] Re: [fricas-devel] Re: [Axiom-mail] Setting elements in a matrix
Date: Fri, 29 Feb 2008 10:24:15 -0500

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.

Bill Page.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]