[GAP Forum] Extending functionality for new kinds of algebraic structures

Nick Loughlin n.j.loughlin at ncl.ac.uk
Wed Apr 18 07:10:57 BST 2012


Hello forum,

I'm looking to do some computations with binary relations in GAP. There 
is a connection with the finite dimensional matrix algebras over the 
Boolean Semiring (i.e. {0,1} with *Minimum* and *Maximum* as *** and *+* 
respectively).

The standard output when computing a BinaryRelation in GAP is

     Binary Relation on 2 points

or similar. This is essentially without any sort of information, so I'd 
like to change the output slightly, to something more visual - 
explicitly presenting the output data in said matrix algebra even if not 
explicitly doing computations in that representation.

How would I go about getting GAP to "recognize" the Boolean structure as 
that of a semiring (/i.e. a GAP /*AdditiveMagma*/with a distributive 
multiplication on it/) and thereafter construct its matrix algebra?

I'd ideally like to do the former in a categorical manner (/in the sense 
of GAP categories, not in the technical sense/) since I'll probably use 
other semirings for related work, and so that I can, for instance, 
define the variable '*a*' to be 1 regarded as an element of this 
semiring, so evaluating that '*a+a*' returns 1 instead of 2 (akin, I'd 
imagine, to the way that GAP differentiates *LieMatrix*es from 
*OrdinaryMatrix*es).

I've implicitly assumed that the construction 
*FullMatrixAlgebra(<R>,<n>)* defined over a ring is defined in such a 
way that it would scale in its current form to accommodating what I've 
detailed; please correct me if this is not the case.

Many thanks in advance,
Nick Loughlin



More information about the Forum mailing list