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.9 #3402

Merged
merged 6 commits into from
Aug 15, 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
100 changes: 93 additions & 7 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.8",
Date => "July, 2024",
Version => "1.9",
Date => "August, 2024",
Authors => {
{Name => "Andreas Hochenegger",
Email => "[email protected]"}},
Expand All @@ -33,6 +33,7 @@ export {
"isNef",
"isAmple",
"drawParliament2Dtikz",
"wellformedBundleFiltrations",
-- Options
"Verbosity",
"DrawCohomology",
Expand Down Expand Up @@ -420,7 +421,8 @@ separatesJetsLocally (ToricVectorBundleKlyachko,Cone) := {Verbosity => 0} >> opt
-- [RJS, Thm 6.2, condition (ii+iii)]
sigmaDual := dualCone sigma;
-- gives u=> {e's} such that u vertex of P(e) and u+sigma^vee contains P(e)
uSigmaPE := applyPairs(uSigmaAreVertices, (u,eAV) -> (u, keys selectPairs(eAV, (e,AV) -> AV and contains(convexHull u + sigmaDual, par#e) ) ));
--uSigmaPE := applyPairs(uSigmaAreVertices, (u,eAV) -> (u, keys selectPairs(eAV, (e,AV) -> AV and contains(convexHull u + sigmaDual, par#e) ) ));
uSigmaPE := applyPairs(uSigmaAreVertices, (u,eAV) -> (u, keys hashTable select(pairs eAV, (e,AV) -> AV and contains(convexHull u + sigmaDual, par#e) ) ));
uSigmaPEnumber := applyValues(uSigmaPE, Ps -> #Ps);
-- [RJS, Thm 6.2, condition (iv)]
if min values uSigmaPEnumber == 0 then (
Expand Down Expand Up @@ -480,7 +482,8 @@ if separatesJets(tvb, Verbosity=>opts#Verbosity) >= 0 then true else false;
-- check if the vector bundle is very ample, using [RJS, Cor. 6.7]
-- INPUT : 'tvb', toric vector bundle
-- OUTPUT : 'true' if very ample, otherwise 'false'
isVeryAmple ToricVectorBundleKlyachko := true >> opts -> tvb -> if separatesJets(tvb, opts) >= 1 then true else false
--isVeryAmple = method( Options => true ) -- already defined in Polyhedra
isVeryAmple (ToricVectorBundleKlyachko) := {Verbosity => 0} >> opts -> tvb -> separatesJets(tvb, opts) >= 1

------------------------------------------------------------------------------
-- METHOD: restrictToInvCurves, isNef, isAmple
Expand Down Expand Up @@ -687,6 +690,40 @@ f << ///\end{tikzpicture}/// << endl;

f << close;
)


--- METHOD: wellformedBundleFiltrations -----------------------------------

-- PURPOSE: ensures ascending entries in the filtration matrices of a toric vector bundle
-- INPUT: 'tvb', toric vector bundle
-- OUTPUT: a toric vector bundle, whose filtation matrices have ascending entries

wellformedBundleFiltrations = method ()
wellformedBundleFiltrations (ToricVectorBundleKlyachko) := tvb -> (
fMTlist := applyValues(filtration tvb, f -> sort flatten entries f );
fMT := applyValues(fMTlist, f -> matrix {f});
fMTunique := applyValues(fMTlist, unique);
permutations := applyPairs(fMTunique, (rho,f)-> rho => apply(f, i-> positions(flatten entries (filtration tvb)#rho, j->i==j)) );
bT := applyPairs(base tvb, (rho,m) -> rho => fold(apply(permutations#rho, i -> m_i), (i,j) -> i|j));
-- the following is taken from ToricVectorBundles#makeVBKlyachko
fT := hashTable apply(pairs fMT, p -> (
L := flatten entries p#1;
L1 := sort unique L;
p#0 => hashTable ({(min L1-1) => {}} | apply(L1, l -> l => positions(L,e -> e == l)))));
new ToricVectorBundleKlyachko from {
"ring" => tvb#"ring",
"rayTable" => tvb#"rayTable",
"baseTable" => bT,
"filtrationMatricesTable" => fMT,
"filtrationTable" => fT,
"ToricVariety" => tvb#"ToricVariety",
"number of affine charts" => tvb#"number of affine charts",
"dimension of the variety" => tvb#"dimension of the variety",
"rank of the vector bundle" => tvb#"rank of the vector bundle",
"number of rays" => tvb#"number of rays",
symbol cache => new CacheTable}
)


---------------------------------------------------------------------------
-- DOCUMENTATION
Expand Down Expand Up @@ -759,7 +796,7 @@ document {
"The description of a toric variety and a toric vector bundle by filtrations involves the choice of signs. ", TT "PositivityToricBundles", " follows the same choice of signs as ", TT "ToricVectorBundles", ", which are",
UL {
{"the fan associated to a polytope will be generated by inner normals,"},
{"the filtrations for describing a toric vector bundle are increasing."},
{"the filtrations for describing a toric vector bundle are increasing and that the filtration steps are stored in that way, see ", TO "wellformedBundleFiltrations", "."},
},
"Unfortunately, the above cited articles use decreasing filtrations and, moreover, [HMP], [P] and [RJS] use outer normals.",
PARA{},
Expand Down Expand Up @@ -1069,7 +1106,7 @@ document {
},

"In this example, the vector bundle ", TEX ///$\mathcal E$///, " separates 1-jets, hence is very ample.",
Caveat => {"This methods work for toric vector bundles on a complete simplicial toric variety.",
Caveat => {"These methods work for toric vector bundles on a complete simplicial toric variety.",
BR{},
"[RJS, Theorem 6.2, condition (iv)] is not checked, which might give a wrong result in special cases (too many polytopes of the parliament share common vertices). If this happens, the method ", TT "separatesJets", " will print a warning. In these cases, also the results of ", TT "isGloballyGenerated", " and ", TT "isVeryAmple", " might be wrong."},

Expand Down Expand Up @@ -1105,14 +1142,46 @@ document {
"isAmple E"
},
"In this example we see that the vector bundle is ample, as all integers are positive.",
Caveat => {"This methods work for toric vector bundles on a complete simplicial toric variety."},
Caveat => {"These methods work for toric vector bundles on a complete simplicial toric variety."},


SeeAlso => {"ToricVectorBundles::ToricVectorBundleKlyachko", parliament, compatibleBases, toricChernCharacter}
}



document {
Key => { wellformedBundleFiltrations, (wellformedBundleFiltrations, ToricVectorBundleKlyachko) },
Headline => "produces the same toric vector bundle, but where the filtration steps are stored in matrices with ascending entries.",
Usage => "F = wellformedBundleFiltrations E",
Inputs => {
"E" => ToricVectorBundleKlyachko },
Outputs => {
"F" => ToricVectorBundleKlyachko },

"A toric vector bundle in Klyachko's description as used in ", TO "ToricVectorBundles", " is given by ascending filtrations. Unfortunately, the filtration steps are not always stored in an ascending way by certain methods, like ", TO "ToricVectorBundles::dual(ToricVectorBundle)", " or ", TO "ToricVectorBundles::tensor(ToricVectorBundle,ToricVectorBundle)", " (and maybe others). This may cause problems in some methods of ", TT "PositivityToricBundles", ", for example in ", TO "toricChernCharacter", ". This method ensures that the filtration steps are stored in an ascending way and therefore, that the methods of this package can be used safely.",

EXAMPLE {
"T = tangentBundle projectiveSpaceFan 2",
"E = T ** (dual T)",
"details E",
"toricChernCharacter E"
},
"Note that the filtration steps of E are neither ascending nor descending. The method ", TO "toricChernCharacter", " produces nonsense here: ", TEX ///$\mathcal{O}_{\mathbb P^2}$///, " is a direct summand of E, so 0 has to appear in the toric Chern character.",

EXAMPLE {
"F = wellformedBundleFiltrations E",
"details F",
"toricChernCharacter F"
},
"By passing to ascending filtration steps, the result becomes correct.",

Caveat => {"This method works for any toric reflexive sheaf."},

SeeAlso => {"ToricVectorBundles::dual(ToricVectorBundle)", "ToricVectorBundles::tensor(ToricVectorBundle,ToricVectorBundle)"}
}



---------------------------------------------------------------------------
-- TESTS
Expand Down Expand Up @@ -1564,5 +1633,22 @@ applyPairs(filtFromTCC, (cone, filts) -> (
)
///

-- Test 10
TEST ///
-- the methods dual, tensor (and maybe others?) from ToricVectorBundles
-- may produce a ToricVectorBundleKlyachko whose matrices containing the filtration steps
-- have not ascending entries.
-- The method wellformedBundleFiltrations (added in version 1.9) ensures ascending entries.
-- The following test fails when omitting this method.
T = tangentBundle projectiveSpaceFan 2
E = wellformedBundleFiltrations( T ** (dual T))
F = wellformedBundleFiltrations((dual T) ** T)

origin = matrix map(ZZ^2,ZZ^1,0)

assert( all(values toricChernCharacter E, L -> isMember(origin, L)) )
assert( all(values toricChernCharacter F, L -> isMember(origin, L)) )
///

end

Loading