On Sunday, June 3, 2012 12:41:26 PM UTC-7, Nils Bruin wrote: > > On Jun 3, 10:03 am, John H Palmieri <[email protected]> wrote: > > > As far as I understand it, there are two approaches to linear algebra in > > Sage: the one you describe, and then "CombinatorialFreeModule". The > latter > > is good for working with the vector space spanned by symbols 'u', 'v', > and > > 'w', for example, or the vector space spanned by all partitions of 35, > or > > all permutations of [1,2,3,4], or all simplices in some simplicial > complex, > > and as such it is good for constructing algebras and modules. > > Thanks for pointing out its existence. Are you sure it really supports > linear *algebra* though? It seems to support basic arithmetic, but > operations like finding kernels and linear subspaces do not seem to be > directly supported. >
Its support of basic algebra makes defining an algebra easy; you need to give it the family indexing the basis, and then tell it how to multiply two basis elements together (by defining a method "product_on_basis"), and it takes care of distributivity -- you don't need to define "_mul_". Once you have two algebras, the product on their tensor product is defined automatically. If you tell it that you're defining a Hopf algebra, then you define "antipode_on_basis" and it defines "antipode" automatically. By the way, you can also define infinite-dimensional vector spaces this way. One of the frustrating things is precisely that this is so convenient and easy, but morphisms, subspaces, etc., are missing or are lacking in features. As I said in my post, I wish the two approaches were unified. Then we would have the strengths of both. -- John -- To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
