CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418346
1
\\ calculates the exponentsvectors of the fractional ideals
2
\\ generated by elms corresponding to the prime ideals
3
\\ arrissing in the factorization
4
5
nf = nfinit(f);
6
7
\\ factorize all ideals generated by the elements of a and collect all
8
\\ primideals which occur
9
primId=eval(Set(concat(vector(#elms-1,i,idealfactor(nf,Polrev(elms[i]))[,1]))));
10
11
\\ write for every element in a the exponentfactor corresponding to the
12
\\ ideals in primId in a row
13
\\ so we will have a matrix
14
mat = matrix(#elms-1,#primId,i,j,idealval(nf,Polrev(elms[i]),primId[j]));
15
print("[ ");
16
{
17
for(i=1,matsize(mat)[1],
18
print(mat[i,],",");
19
);
20
print("];");
21
}
22
23