Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions Binomials.m2
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ isBinomial Ideal := Ideal => o -> I -> (
if not o#GroebnerFree then return isBinomialGroebner I;

isB := (isBinomialGroebnerFree I)#0;
if isB then return isB;
if isHomogeneous I then return isB;
if not isB then
print "Gröbner free method failed.\nStarting computation of Gröbner basis...\n";
Expand Down Expand Up @@ -532,8 +533,9 @@ monomialParameterization = I ->(
if not char R == 0 then eligible = false;
if not isBinomial I then eligible = false;
if not binomialIsPrime I then eligible = false;
if dim I == 0 then eligible = false;
if not eligible then (
error "Sorry, only implemented for prime binomial ideals in characteristic zero";
error "Sorry, only implemented for prime binomial ideals of dimension greater than zero in characteristic zero.";
);

n := numgens R;
Expand Down Expand Up @@ -561,12 +563,12 @@ monomialParameterization = I ->(
imageDimension := rank exponentMatrix_{0..(numColumns exponentMatrix-2)};
i := 0;
while (imageDimension =!= numRows exponentMatrix) do (
if rank submatrix'(exponentMatrix,{i},) == imageDimension then (
exponentMatrix = submatrix'(exponentMatrix,{i},);
i = i-1;
if rank (submatrix'(exponentMatrix,{i},))_{0..(numColumns matrix exponentList-2)} == imageDimension then (
exponentMatrix = (submatrix'(exponentMatrix,{i},));
i = i-1;
);
i = i+1;
);
i = i+1;
);
r := numRows exponentMatrix;
v := symbol v;
S := R[v_1..v_r,MonomialOrder => Lex];
Expand All @@ -587,8 +589,8 @@ monomialParameterization = I ->(
-- construct the Laurent polynomial ring by hand.
numv := numColumns solution-r;
G := K[tt_1..tt_numv, ti_1..ti_numv];
posvars := unique (gens G)_{0, numv-1}; -- unique solves the case L_{0,0};
invvars := unique (gens G)_{numv, 2*numv-1};
posvars := unique (gens G)_{0..numv-1}; -- unique solves the case L_{0,0};
invvars := unique (gens G)_{numv..2*numv-1};
laurentRels := ideal for i from 1 to (numColumns solution-r) list tt_i*ti_i - 1;
H := G/laurentRels;
charValues := flatten entries sub(sub(vars S, storeVarMap),K);
Expand Down Expand Up @@ -2369,6 +2371,11 @@ K = frac(QQ[a,b])
R = K[x,y]
I = ideal(a*x-b*y)
assert (ker monomialParameterization I == I)

R = QQ[a,b,c,d,e,f]
A = matrix {{1,1,1,1,1,1},{1,2,3,5,7,11},{1,2,4,6,8,10}}
I = toricMarkov_A R
assert (ker monomialParameterization I == I)
///


Expand Down Expand Up @@ -2454,4 +2461,4 @@ end
restart
uninstallPackage "Binomials"
installPackage "Binomials"
check "Binomials"
check "Binomials"