diff --git a/M2/Macaulay2/packages/PositivityToricBundles.m2 b/M2/Macaulay2/packages/PositivityToricBundles.m2 index 8186e235b8a..569b2e08baa 100644 --- a/M2/Macaulay2/packages/PositivityToricBundles.m2 +++ b/M2/Macaulay2/packages/PositivityToricBundles.m2 @@ -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 => "andreas.hochenegger@polimi.it"}}, @@ -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 ) )) @@ -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 @@ -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); @@ -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); @@ -1221,9 +1220,9 @@ assert(isVeryAmple V); assert(isNef V); assert(isAmple V); - /// +-- Test 3 TEST /// -- This is [RJS, Example 4.2] -- auxiliary methods @@ -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 @@ -1313,9 +1311,9 @@ assert(isVeryAmple V); assert(isNef V); assert(isAmple V); - /// +-- Test 5 TEST /// -- This is [RJS, Example 6.4] -- auxiliary methods @@ -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 @@ -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 @@ -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 @@ -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..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