|
|
Albert is an extremely useful and efficient C program for computations in relatively free nonassociative algebras. It was written around 1990 by David Pokrass Jacobs with help of few others. Albert version 3.0 was released at 1994 and since then, according to my understanding, there was no active Albert development. Albert version 4.0 was released at September 2008 with the sole change to be able to compile it with the modern gcc. Albert computes over a prime field of characteristic up to 251 and is an interactive program. I have slightly modified it in the following ways:
The library interface is rather limited and does not provide all Albert functionality, as my primary concern was to perform computations of dimensions of certain operads described in the paper The alternative operad is not Koszul. The following code snippet was used in computations of dimension of the alternative operad in degree 6 modulo different primes (supplied on the standard input) and may serve as an example of the Albert C++ library usage:
#include <stdlib.h>
#include <iostream>
#include "albert.h"
int main()
{
if (albert_init (3000, "/home/pasha/prj/albert/.albert", 0) != 1)
{
std::cerr << "albert_init() failed" << std::endl;
exit (-1);
}
// left alternative
if (albert_add_identity ("(xx)y-x(xy)") == 0)
{
std::cerr << "albert_add_identity() failed" << std::endl;
exit (-1);
}
// right alternative
if (albert_add_identity ("(xy)y-x(yy)") == 0)
{
std::cerr << "albert_add_identity() failed" << std::endl;
exit (-1);
}
albert_set_generators (6);
albert_set_sparse (0);
long long p;
while (! std::cin.eof())
{
std::cin >> p >> std::ws;
if (albert_set_field (p, 1) != 1)
{
std::cerr << "albert_set_field() failed" << std::endl;
exit (-1);
}
if (albert_build (0) != 1)
{
std::cerr << "albert_build() failed" << std::endl;
}
}
albert_free();
exit (0);
}
The following files are taken from the above-mentioned site and provided for archival and reference purposes:
Should you have comments or questions about this modified version of Albert, do not hesitate to contact me. |