begin changes to work modulo ideal

This commit is contained in:
Nelynx 2025-02-27 11:22:05 +01:00
parent add55746c4
commit 69b39c01b6

View File

@ -58,7 +58,6 @@ MalgrFormPoly((y+x)^18+t17y,Gens,GW);
proc AeCod(ideal f)
{
int aecodf = ncols(AeNormal(f));
return(aecodf);
}
@ -113,7 +112,7 @@ proc AeNormalModk(ideal f, int k)
//////////////////////////////////////////////////////////////////////////////
proc AeNormal(ideal f)
proc AeNormal(ideal f, list #)
{
/*
f: Cn -> Cp is a map-germ with p >= n
@ -134,6 +133,7 @@ proc AeNormal(ideal f)
execute("def f = imap("+RName+",f)");
execute("def jf = imap("+RName+",jf)");
execute("def # = imap("+RName+",#)");
module wf = freemodule(p);
int m = ncols(Gens);
@ -150,8 +150,12 @@ proc AeNormal(ideal f)
}
}
module NAef = NormalOYModule(jf,wf);
if (size(#)>0)
{
jf = jf + #[1]*freemodule(p);
}
module NAef = NormalOYModule(jf, wf, #);
execute("setring(" + RName + ")");
module NAef = imap(Raux, NAef);
@ -160,7 +164,7 @@ proc AeNormal(ideal f)
//////////////////////////////////////////////////////////////////////////////
proc NormalOYModule(matrix GOX, matrix GOY)
proc NormalOYModule(matrix GOX, matrix GOY, list #)
{
/*
WARNING:
@ -170,13 +174,16 @@ proc NormalOYModule(matrix GOX, matrix GOY)
The GOX and GOY columns are generators of modules over OX and OY respectively
with the same number of rows. Returns generators of M/ (<GOX>_OX+<GOY>_OY) where M
is a free O_X-module.
# is an optional ideal so that computations are made modulo this ideal.
*/
int i;
int a = nrows(GOX);
int p = ncols(mappingf);
int m = ncols(Gens);
module T = GenerateOYModule(GOX,GOY);
module T = GenerateOYModule(GOX, GOY, #);
//basering;//
int nx = nvars(basering) - p;
@ -302,7 +309,7 @@ proc oldAeNormal(ideal f)
//////////////////////////////////////////////////////////////////////////////
proc GenerateOYModule(matrix GOX, matrix GOY)
proc GenerateOYModule(matrix GOX, matrix GOY, list #)
{
/*
WARNING:
@ -311,6 +318,8 @@ proc GenerateOYModule(matrix GOX, matrix GOY)
The GOX and GOY columns are generators of modules over OX and OY respectively
with the same number of rows.
# is an optional ideal so that computations are made modulo this ideal.
*/
int i;
int j;
@ -327,7 +336,7 @@ proc GenerateOYModule(matrix GOX, matrix GOY)
for (i=1; i<= ny; i++)
{
col = submat(GOY,intvec(1..a),intvec(i));
M = M + MatrixToVector(MalgrFormVect(col));
M = M + MatrixToVector(MalgrFormVect(col, #));
}
for (i=1; i <= nx; i++)
@ -335,7 +344,7 @@ proc GenerateOYModule(matrix GOX, matrix GOY)
col = submat(GOX,intvec(1..a),intvec(i));
for (j=1; j<= m; j++)
{
M = M + MatrixToVector(MalgrFormVect(Gens[j]*col));
M = M + MatrixToVector(MalgrFormVect(Gens[j]*col, #));
}
}
@ -356,11 +365,13 @@ proc MalgrRing(ideal J, int n, ideal f)
int p = ncols(f);
string RName=nameof(basering);
ideal w = f[1..n];
// Compute generators of w_*O_X
ideal Gens = kbase(std(w+J));
int nGens = ncols(Gens);
ring R0 = changeord(list(list("dp",nvars(basering))));
// Create a ring with generators as variables and target variables.
string vaG ="G(";
def R1=extendring(nGens,vaG,"dp",1);
@ -393,10 +404,12 @@ proc MalgrRing(ideal J, int n, ideal f)
ideal GF = std(W+G+J);
/* This is now moved to the MalgrFormPoly procedure
for (i=n+1; i <= p; i++)
{
GF = GF + ideal(X(i) - reduce(f[i], GF));
}
*/
export(GF);
export(Gens);
@ -404,6 +417,8 @@ proc MalgrRing(ideal J, int n, ideal f)
ideal mappingf = f;
export(mappingf);
int dimX = n;
export(dimX);
return(R2);
}
@ -440,7 +455,9 @@ proc OldMalgrFormVect(matrix M, ideal Gens, ideal GW)
//////////////////////////////////////////////////////////////////////////////
proc MalgrFormPoly(poly h)
proc MalgrFormPoly(poly h, list #)
{
/*
WARNING:
@ -448,9 +465,25 @@ proc MalgrFormPoly(poly h)
ideal J, ideal Gens, ideal GF, and the appropriate variables.
Converts polynomial h to a row matrix of coefficients with respect to Gens.
# is an optional ideal so that computations are made modulo this ideal.
*/
int i;
poly hr = reduce(h,GF); // Obtain Malgrange form as a sum
ideal K = GF;
if (size(#)> 0)
{
K = std(#[1]+GF);
}
for (i=dimX+1; i <= size(mappingf); i++)
{
K = K + ideal(X(i) - reduce(mappingf[i], K));
}
poly hr = reduce(h,K); // Obtain Malgrange form as a sum
poly c;
int nGens = ncols(Gens);
@ -469,7 +502,7 @@ proc MalgrFormPoly(poly h)
}
//////////////////////////////////////////////////////////////////////////////
proc MalgrFormVect(matrix v)
proc MalgrFormVect(matrix v, list #)
{
/*
WARNING:
@ -478,17 +511,19 @@ proc MalgrFormVect(matrix v)
Converts column matrix v of size a x 1 to a matrix a x b. Each row contains
the coefficients of the Malgrange form with respect to Gens for each entry.
# is an optional ideal so that computations are made modulo this ideal.
*/
int a = nrows(v);
int i;
def m = MalgrFormPoly(v[1,1]);
def m = MalgrFormPoly(v[1,1], #);
for (i=2; i <= a; i++)
{
m = transpose(concat(transpose(m),transpose(MalgrFormPoly(v[i,1]))));
m = transpose(concat(transpose(m),transpose(MalgrFormPoly(v[i,1], #))));
}
return(m);