Skip to content

Commit

Permalink
Merge pull request #3208 from mgacummings/master
Browse files Browse the repository at this point in the history
minor update to GeometricDecomposability; bug fix in Quasidegrees
  • Loading branch information
DanGrayson authored May 7, 2024
2 parents ec65028 + 8d5952e commit 615b0e6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
42 changes: 33 additions & 9 deletions M2/Macaulay2/packages/GeometricDecomposability.m2
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

newPackage(
"GeometricDecomposability",
Version => "1.4",
Date => "February 7, 2024",
Version => "1.4.1",
Date => "May 7, 2024",
Headline => "A package to check whether ideals are geometrically vertex decomposable",
Authors => {
{
Expand Down Expand Up @@ -465,18 +465,18 @@ oneStepGVD(Ideal, RingElement) := opts -> (I, y) -> (
z := sub(y, lexRing);
G := if opts.UniversalGB then J_* else first entries gens gb J;

-- check whether the intersection condition holds
isValid := isValidOneStep(G, z);
if not isValid then (
printIf(opts.Verbose, "Warning: not a valid geometric vertex decomposition");
);

-- get N_{y,I}
NyI := ideal select(G, g -> degree(z, g) == 0);

-- get C_{y, I}
CyI := ideal apply(G, g -> getQ(g, z));

-- check whether the intersection condition holds
isValid := if opts.UniversalGB then isValidOneStepFromUGB(G, CyI, NyI, z) else isValidOneStep(G, z);
if not isValid then (
printIf(opts.Verbose, "Warning: not a valid geometric vertex decomposition");
);

-- sub C and N into original ring
-- by [CDSRVT, Theorem 2.9] variables in ring not appearing in the ideal do not matter
C := sub(CyI, givenRing);
Expand Down Expand Up @@ -625,7 +625,7 @@ isSquarefreeInY(RingElement, RingElement) := (m, y) -> (


-- determine whether the one-step geometric vertex decomposition holds
-- uses [KR, Lemmas 2.6 and 2.12] and generalizations thereof
-- uses [KR, Lemmas 2.6 and 2.12]
isValidOneStep = method(TypicalValue => Boolean)
isValidOneStep(List, RingElement) := (G, y) -> (
-- G is a list, whose elements form a reduced Gröbner basis
Expand All @@ -639,6 +639,19 @@ isValidOneStep(List, RingElement) := (G, y) -> (
)


isValidOneStepFromUGB = method(TypicalValue => Boolean)
isValidOneStepFromUGB(List, Ideal, Ideal, RingElement) := (G, C, N, y) -> (
-- G is a UGB for the ideal I it generates; C = C_{y, I} and N_{y, I}
-- the previous check may not work for UGBs because it requires the GB to be reduced
currentRing := ring y;
C1 := sub(C, currentRing);
N1 := sub(N, currentRing);

initYForms := sub(initialYForms(ideal G, y, UniversalGB=>true), currentRing);
return initYForms == intersect(C1, N1 + ideal(y));
)


lexOrderHelper = method(TypicalValue => List, Options => {CheckUnmixed => true})
lexOrderHelper(List, List) := opts -> (idealList, order) -> (
-- remove ideals that are trivially GVD
Expand Down Expand Up @@ -1918,6 +1931,17 @@ doc///
ideal $I$, then $\{ q_1, \ldots, q_s \}$ and $\{ q_i \mid d_i = 0 \}$ are universal
Gröbner bases for $C_{y,I}$ and $N_{y,I}$ in $k[x_1, \ldots, \hat y, \ldots, x_n]$,
respectively.

Caveat
If a universal Gr\"obner basis is not given, the intersection condition
${\rm in}_y(I) = C_{y,I} \cap (N_{y,I} + \langle y \rangle)$ via the results of
[KR, Lemmas 2.6 and 2.12], which looks at the degree of $y$ in the reduced
Gr\"obner basis of $I$.
In general, a universal Gr\"obner basis is not reduced, so the intersection condition
must be checked explicitly.
So, although providing a universal Gr\"obner basis will speed up computing the ideals
$C_{y, I}$ and $N_{y, I}$, it may take longer to verify the intersection condition.

SeeAlso
oneStepGVDCyI
findOneStepGVD
Expand Down
2 changes: 1 addition & 1 deletion M2/Macaulay2/packages/Quasidegrees.m2
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ toGradedRing(Matrix,PolynomialRing) := (A,R) -> (
toricIdeal = method()
toricIdeal(Matrix,Ring) := (A,R) -> (
m := product gens R;
saturate(toBinomial(transpose(syz(A)),R),m)
saturate(sub(toBinomial(transpose(syz(A)),R),R),m)
)


Expand Down

0 comments on commit 615b0e6

Please sign in to comment.