[GAP Forum] Data structures underlying algebra

Felix Rehren rehrenf at maths.bham.ac.uk
Fri Nov 30 02:14:29 GMT 2012


Dear all,

I am hoping for some advice about efficiency and good practice to implement
the algebras I am building in GAP. The overall method is building a larger
space, then finding a quotient which satisfies my axioms.

I have a vector space W over the rationals of (at least) several hundred
dimensions. It has a small subspace V (of dimension < sqrt(dim(W))) which
is endowed with an algebra product V x V -> W. To implement this product, I
keep a list of lists of elements of W, i.e. structure constants a
table---call it M---which has ~dim(W)^2 entries in the rationals. The
product of two vectors u, v is the naive implementation: u * v = Sum( u[i]
* v[j] * M[i][j] ). Typically M has not many zero entries, and few entries
which are entirely zero vectors. I would estimate around 25% of the
rationals are 0, but there are proportionally much fewer i,j for which
M[i][j] is the zero vector. I (at one stage) keep track of unknowns in the
algebra by unbound entries in M.

There is more information than this, because the algebra is linked to a
group, so I keep another list B whose elements I know are ordered to
correspond with the basis elements.

Often V, W (and M) will be modified. In particular, I take quotients by
subspaces. Currently I am doing this manually, i.e. rewriting the vectors
and tables myself. This is because I wanted to keep close control of the
basis, and the documentation of NaturalHomomorphismBySubspace didn't seem
to let me do that. Sometimes, I want to blow W up, maybe adding dim(V) or
maybe increasing by an order of magnitude, and of course all of the old
information should still be there, but the new dimensions correspond to new
unknowns, so again I keep my basis under close control.

I use quite a lot of products, so I am wondering if this is really a good
way of doing things. Is this a good way to store and use the table M?

I also have the action of my group G on W recorded; I take the generators
of G, build corresponding dim(W) x dim(W) matrices (these are relatively
sparse, but definitely in the rationals), and generate the matrix group
from these, then find the GroupHomomorphismByImagesNC. I very often take
orbits of vectors from W under the group G; the action is via this
homomorphism. Is this sensible?

I would be pleased to hear any suggestions. Also, of course I can provide
any further information.

Thanks,
Felix


More information about the Forum mailing list