How can I specify a (possibly non-associative) algebra over a finite (small) set of generators by means of structure constants?
I am looking for something similar to the Axiom/FriCAS domain AlgebraGivenByStructuralConstants which implements finite rank algebras over a commutative ring, given by the structural constants with respect to a fixed basis [a1,..,an] or equivalently in terms of generating equations of the form
a_i * a_j = gamma_ij1 * a_1 + ... + gamma_ijn * a_n
where gamma is a vector/list of length n of n by n matrices.
In particular I would like to be able to easily compute various properties of such algebras such as the conditions for idempotents etc. For example: