\\ mkCarleman (vector-of-coefficients, seriesprecision = n)
\\ creates from a vector of coefficients (assumed to be of the power series of some function f(x))
\\ a matrix of the Carleman-type (transposed to the wikipedia-convention
\\ serprec : if dimension should other than order of supplied polynomial, give it in "serprec"

uv=vectorv(dim,r,U[r,r]);
UEW=numfmt*matid(dim); \\ is also the Carlemanmatrix for Schröder-function
for(c=1,dim-1,
for(r=c+1,dim,
UEW[r,c]=sum(k=c,r-1,U[r,k]*UEW[k,c])/(uv[c]-uv[r])
));

UEWi=numfmt*matid(dim); \\ UEWi shall become the inverse of UEW, is also the
\\ Carleman-matrix of the inverse Schröder-function
for(r=2,dim,
forstep(c=r-1,1,-1,
UEWi[r,c]=sum(k=0,r-1-c,U[r-k,c]*UEWi[r,r-k])/(uv[r]-uv[c])
));

return([[u,t,exp(u/t)],UEW,uv,UEWi]);}

\\ tri_eigen(U, dim=9999, numfmt=1) - performs diagonalization of lower triangular matrices
\\ if inputmatrix is of Carlemantype, then the Eigenmatrices are of the Carlemantype as well
\\ returns vector of [coeffs, M, D, M^-1] M being eigenvectors, D being diagonalmatrix of eigenvalues
\\ coeffs being [u=log(t), t, u/t = log(b)] where b=t^(1/t)
\\ diagonalization can also be performed if input matrix is Carleman and has parameter u only symbolic
\\
\\ dim : if 9999 use size of input matrix
\\ : if smaller use size of top-left sumbatrix
\\
\\ numfmt : 1 : return integer values if possible ; sometimes faster, sometimes slower than with real values
\\ 1.0 : compute in float format (with stadard-precision in Pari/GP). If large factorials
\\ occur in large dimension matrices Ut then using numfmt=1.0 prevents gigantic integers
\\ or rational numbers with gigantic components.

\\ additional remarks:
\\ I use the global variable "n" for default size for matrices and vectors. (This is "n"
\\ simply I'm an old statistician... )
\\ By default, I set in my session-initialization n=32 . With this size all standard
\\ matrix-constants are also precomputed to be permanently available in the session.
\\ If "n" should be changed either then the session-initialization should
\\ be recalled so the matrix-constants are recomputed too (if they are needed at all).
\\
\\ I've implemented the short routine "fmt(internal-precision,display-precision)" and
\\ initialize sessions with "fmt(200,12)" to have by default 200 dec digits precision for
\\ real-arithmetic. This can be changed at any time, but remember that possibly used
\\ real constant (like bases for exponentiation, computed fixpoints etc) should then
\\ recomputed as well.
\\
\\ The full set of routines for my (dynamical) matrix-toolbox-procedures is too large
\\ to be added here, I might send it on personal request.