On Thu, Apr 01, 2010 at 04:41:53PM -0700, Ross Kyprianou wrote:
> Id like to write a package that can do "pure"/"abstract" matrix
> expressions such as in the following examples
>
> ...
>
> This isnt a full specification - there are many issues not addressed
> and note we are considering "pure matrix" expressions only (i.e. no
> matrix components). Also the matrix size "N" is arbitrary - doesnt
> ever need to be assigned a value. I can think of two ways of doing
> this and just asking for peoples gut feeling which direction I should
> go in to implement this within Sage.
> 
> Possibility 1) We consider this a noncommutative algebra and look at
> GAP (are there other possiblilities?)

You may want to look at:

        sage: A = AlgebrasWithBasis(QQ).example()
        sage: A?

For how to easily implement things like free commutative algebras.
Here your basis could typically be indexed by a triple of the form:

        (name, nrows, ncols)

where name is a string, and nrows / ncols integer or anything else.
This triple should probably be wrapped as a python object in some new
class for nicer output.

Then the product of two such triples would just check equality of
ncols w.r.t. nrows, and throw an error if not (ok because of that, you
don't quite get an algebra, but that's good enough as a starter).

Feel free to ask for help if needed!

Best,
                                Nicolas
--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

To unsubscribe, reply using "remove me" as the subject.

Reply via email to