Function: algmultable
Section: algebras
C-Name: gp_algmultable
Prototype: GDG
Help: algmultable(al,x): left multiplication table of x.
Doc: Given an element \var{x} in \var{al}, computes its left multiplication
 table. If \var{x} is given in basis form, returns its multiplication table on
 the integral basis; if \var{x} is given in algebraic form, returns its
 multiplication table on the basis corresponding to the algebraic form of
 elements of \var{al}. In every case, if \var{x} is a \typ{COL} of length $n$,
 then the output is a $n\times n$ \typ{MAT}.
 Also accepts a square matrix with coefficients in \var{al}.

 If \var{x} is not set, returns a multiplication table of \var{al} over its
 prime subfield ($\Q$ or $\F_p$), as a \typ{VEC} of \typ{MAT}: the left
 multiplication tables of basis elements. If \var{al} was output by
 \tet{algtableinit}, returns the multiplication table used to define \var{al}.
 If \var{al} was output by \tet{alginit}, returns the multiplication table of
 the order~${\cal O}_0$ stored in \var{al}.
 \bprog
 ? A = alginit(nfinit(y), [-1,-1]);
 ? algmultable(A,[0,1,0,0]~)
 %2 =
 [0 -1  1  0]

 [1  0  1  1]

 [0  0  1  1]

 [0  0 -2 -1]
 @eprog

 Another example:

 \bprog
 ? A = alginit(nfinit(y), [-1,-1]);
 ? M = algmultable(A);
 ? #M
 %3 = 4
 ? M[1]
 %4 =
 [1 0 0 0]

 [0 1 0 0]

 [0 0 1 0]

 [0 0 0 1]

 ? M[2]
 %5 =
 [0 -1  1  0]

 [1  0  1  1]

 [0  0  1  1]

 [0  0 -2 -1]
 @eprog
