Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
338 stars 228 forks source link

Package "ToricVectorBundles" returns wrong Cartier index of a Weil divisor #1508

Open dimitrim2010 opened 3 years ago

dimitrim2010 commented 3 years ago

Example

loadPackage Polyhedra;
loadPackage "ToricVectorBundles";
RayMatrix=transpose matrix{{1,0,0},{0,1,0},{1,2,4},{-1,-2,-2}};
FanFromRays=ccRefinement RayMatrix;
print rays FanFromRays;
cartierIndex({0,1,0,0},FanFromRays)
--
-- Returns 4, though the correct index is 2.
-- Compare with the other toric package:
--
loadPackage "NormalToricVarieties";
X=normalToricVariety(FanFromRays);
rays X 
--
-- We have checked that the order of rays is the same as in the previous
-- package, so the weights {0,1,0,0} represent the same Weil divisor
-- D1 in both computations.
--
D1=toricDivisor({0,1,0,0},X);
isCartier D1 -- false
isCartier (2*D1) -- true
-- The last two commands show that the Cartier index of D1 is 2
a-hochenegger commented 4 months ago

The method cartierIndex works well in principle, only that when internally setting up the toric reflexive sheaf (of rank 1), the rays get mixed up. One can see this by continuing your example with the following code : D = {0,1,0,0} L = toricVectorBundle(1, FanFromRays, apply(D, l->matrix{{1_QQ}}), apply(D, l->matrix{{-l}})); rays L details L Here you can see the internal order of the rays (different from the one of FanFromRays) and that L corresponds to the Weil divisor for the ray {1,2,4}, which has cartierIndex four. Now you can check that this coincides with the results from isCartier toricDivisor({0,0,0,2},X) isCartier toricDivisor({0,0,0,4},X) So the actual error is that cartierIndex might return the correct result for a different Weil divisor.

To get the internally used order of rays for toricVectorBundles, you can use rays toricVectorBundle(1, FanFromRays) which gets the order of rays of the structure sheaf (obviously, this solution is not ideal).

a-hochenegger commented 3 months ago

With the new version 1.24, the package ToricVectorBundles provides the method raySortOfFan which returns the precise order of the rays used for the bundles. So in your example use raySortOfFan FanFromRays

I think this resolves the reported issue.

dimitrim2010 commented 3 months ago

Thank you, good to know that the internal order of rays differs from the one displayed by the "rays" command!

Le sam. 18 mai 2024 à 12:31, Andreas Hochenegger @.***> a écrit :

With the new version 1.24, the package ToricVectorBundles provides the method raySortOfFan which returns the precise order of the rays used for the bundles. So in your example use raySortOfFan FanFromRays

— Reply to this email directly, view it on GitHub https://github.com/Macaulay2/M2/issues/1508#issuecomment-2118767537, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5MBJC3MGXE4CLSPOE3VULZC4UYLAVCNFSM4RU3YVQKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJRHA3TMNZVGM3Q . You are receiving this because you authored the thread.Message ID: @.***>