Skip to content

Commit

Permalink
Implemented base locus ideal of toric linear series
Browse files Browse the repository at this point in the history
  • Loading branch information
Griffin Edwards committed Jun 2, 2024
1 parent 36b0950 commit 51a1f8e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ToricExtras.m2
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ newPackage(

export {
"ToricLinearSeries",
"toricLinearSeries"
"toricLinearSeries",
"baseLocusIdeal"
}


Expand Down
5 changes: 5 additions & 0 deletions ToricExtras/ToricLinearSeries.m2
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ isComplete ToricLinearSeries := linSeries -> (
setM == set degDMonomials
)

baseLocusIdeal = method(TypicalValue => Ideal)

baseLocusIdeal ToricLinearSeries := linSeries -> (
ideal monomials linSeries
)

-- -- helper for listing monomials of given degree in the ring
-- -- TODO: move to Core
Expand Down
15 changes: 15 additions & 0 deletions ToricExtras/ToricLinearSeriesTests.m2
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,19 @@ TEST ///
assert not isComplete M3;
assert not isComplete M4;
assert isComplete M5;
///

TEST ///
P2 = toricProjectiveSpace 2;
S = ring P2;
M1 = toricLinearSeries flatten entries basis(1,S);
M2 = toricLinearSeries {x_0};
M3 = toricLinearSeries {x_0, x_0, x_0};
M4 = toricLinearSeries {x_0, x_1, x_2, x_2};
M5 = toricLinearSeries {x_2, x_1, x_0};
assert (baseLocusIdeal M1 == ideal(x_0, x_1, x_2));
assert (baseLocusIdeal M2 == ideal(x_0));
assert (baseLocusIdeal M3 == ideal(x_0));
assert (baseLocusIdeal M4 == ideal(x_0, x_1, x_2));
assert (baseLocusIdeal M5 == ideal(x_0, x_1, x_2));
///

0 comments on commit 51a1f8e

Please sign in to comment.