Function: algcenter
Section: algebras
C-Name: algcenter
Prototype: mG
Help: algcenter(al): center of the algebra al.
Doc: If \var{al} is a table algebra output by \tet{algtableinit}, returns a
 basis of the center of the algebra~\var{al} over its prime field ($\Q$ or
 $\F_{p}$). If \var{al} is a central simple algebra output by \tet{alginit},
 returns the center of~\var{al}, which is stored in \var{al}.

 A simple example: the $2\times 2$ upper triangular matrices over $\Q$,
 generated by $I_{2}$, $a = \kbd{[0,1;0,0]}$ and $b = \kbd{[0,0;0,1]}$,
 such that $a^{2} = 0$, $ab = a$, $ba = 0$, $b^{2} = b$: the diagonal matrices
 form the center.
 \bprog
 ? mt = [matid(3),[0,0,0;1,0,1;0,0,0],[0,0,0;0,0,0;1,0,1]];
 ? A = algtableinit(mt);
 ? algcenter(A) \\ = (I_2)
 %3 =
 [1]

 [0]

 [0]
 @eprog

 An example in the central simple case:

 \bprog
 ? nf = nfinit(y^3-y+1);
 ? A = alginit(nf, [-1,-1]);
 ? algcenter(A).pol
 %3 = y^3 - y + 1
 @eprog
