Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PositivityToricBundles to v1.8 #3357

Merged
merged 3 commits into from
Aug 5, 2024
Merged
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
63 changes: 42 additions & 21 deletions M2/Macaulay2/packages/PositivityToricBundles.m2
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

newPackage("PositivityToricBundles",
Headline => "check positivity of toric vector bundles",
Version => "1.7",
Date => "April, 2024",
Version => "1.8",
Date => "July, 2024",
Authors => {
{Name => "Andreas Hochenegger",
Email => "[email protected]"}},
Expand Down Expand Up @@ -100,9 +100,11 @@ flags = method()
flags (ToricVectorBundleKlyachko) := (cacheValue symbol filtrationFlags) ( tvb -> (
hashTable for rho in rays tvb list (
filtSteps := flatten entries (filtration tvb)#rho;
rho => for i in unique filtSteps list (
rayFlag := for i in unique filtSteps list (
((base tvb)#rho)_(positions(filtSteps, j->j<=i))
)
);
rayFlag = sort(rayFlag, mat -> numgens source mat);
rho => rayFlag
)
))

Expand Down Expand Up @@ -1125,8 +1127,6 @@ document {
-- If this changes at some point in the future, all tests will fail.

-- Test 0
-- [RJS, Example 3.7]

TEST ///
-- This is [RJS, Example 3.7]
-- auxiliary methods
Expand Down Expand Up @@ -1164,7 +1164,7 @@ assert(
set {{0,2},{-1,0},{1,1}} } );
///


-- Test 1
TEST ///
-- This is [RJS, Example 3.8] for d=2
V = tangentBundle(projectiveSpaceFan 2);
Expand All @@ -1190,10 +1190,9 @@ assert(isVeryAmple V);

assert(isNef V);
assert(isAmple V);

///


-- Test 2
TEST ///
-- This is [RJS, Example 3.8] for d=3
V = tangentBundle(projectiveSpaceFan 3);
Expand Down Expand Up @@ -1221,9 +1220,9 @@ assert(isVeryAmple V);

assert(isNef V);
assert(isAmple V);

///

-- Test 3
TEST ///
-- This is [RJS, Example 4.2]
-- auxiliary methods
Expand Down Expand Up @@ -1267,10 +1266,9 @@ assert(not isVeryAmple V);

assert(isNef V);
assert(isAmple V);


///

-- Test 4
TEST ///
-- This is [RJS, Example 4.4]
-- auxiliary methods
Expand Down Expand Up @@ -1313,9 +1311,9 @@ assert(isVeryAmple V);

assert(isNef V);
assert(isAmple V);

///

-- Test 5
TEST ///
-- This is [RJS, Example 6.4]
-- auxiliary methods
Expand Down Expand Up @@ -1358,10 +1356,9 @@ assert(not isVeryAmple V);

assert(isNef V);
assert(isAmple V);

///


-- Test 6
TEST ///
-- Test with a randomized vector bundle on 3-dim variety

Expand Down Expand Up @@ -1420,11 +1417,9 @@ foundList = for i in 0 ..< #cList list (
)

assert(all(foundList, i->i>=0))


///


-- Test 7
TEST ///
-- Test with a randomized vector bundle of rank 3 on hirzebruch

Expand Down Expand Up @@ -1480,11 +1475,9 @@ foundList = for i in 0 ..< #cList list (
)

assert(all(foundList, i->i>=0))


///


-- Test 8
TEST ///
-- Test with a randomized vector bundle of rank 4 on hirzebruch

Expand Down Expand Up @@ -1540,7 +1533,35 @@ foundList = for i in 0 ..< #cList list (
)

assert(all(foundList, i->i>=0))
///

-- Test 9
TEST ///
-- Test whether the filtration steps obtained from the toric Chern character are correct
-- Such a test would have failed before version 1.8,
-- because of a bug in the internal method flags:
-- the method made an assumption on the form how the filtration steps are ordered
-- in the bundles generated by the package ToricVectorBundles.
-- Usually true, this assumption does not apply, if the bundle arises
-- by using the method dual of ToricVectorBundles (e.g. cotangent bundles).

E = dual tangentBundle projectiveSpaceFan 2

getCols = mat -> toList apply( 0..<numgens source mat, i->mat_i )

filtE = applyValues(filtration E, filt -> flatten entries filt);
raysE = keys filtE;
filtFromTCC := applyPairs( toricChernCharacter E, (cone,us) ->
cone => (
filtRay := for ray in getCols cone list sort apply(us, u -> ( (transpose matrix ray)*u)_(0,0))
)
);

applyPairs(filtFromTCC, (cone, filts) -> (
cone => for ray in getCols cone do
assert isMember( sort filtE#(matrix ray), filts)
)
)
///

end
Expand Down