A pair (rayList, coneList) of lists correspond to a well-defined normal toric variety if the following conditions hold:
The first examples illustrate that small projective spaces are well-defined.
i1 : assert all (5, d -> isWellDefined toricProjectiveSpace (d+1)) |
The second examples show that a randomly selected Kleinschmidt toric variety and a weighted projective space are also well-defined.
i2 : setRandomSeed (currentTime ()); |
i3 : a = sort apply (3, i -> random (7)) o3 = {0, 2, 5} o3 : List |
i4 : assert isWellDefined kleinschmidt (4,a) |
i5 : q = sort apply (5, j -> random (1,9)); |
i6 : while not all (subsets (q,#q-1), s -> gcd s === 1) do q = sort apply (5, j -> random (1,9)); |
i7 : q o7 = {3, 4, 5, 8, 9} o7 : List |
i8 : assert isWellDefined weightedProjectiveSpace q |
The next ten examples illustrate various ways that two lists can fail to define a normal toric variety. By making the current debugging level greater than one, one gets some addition information about the nature of the failure.
i9 : X = new MutableHashTable; |
i10 : coneList = max toricProjectiveSpace 2; |
i11 : X#1 = normalToricVariety ({{-1,-1},{1,0},{0,1},{-1,0}}, coneList); |
i12 : isWellDefined X#1 o12 = false |
i13 : debugLevel = 1; |
i14 : isWellDefined X#1 -- some ray does not appear in maximal cone o14 = false |
i15 : X#2 = normalToricVariety ({},{}); |
i16 : isWellDefined X#2 -- expected `rays' to be a list of lists o16 = false |
i17 : X#3 = normalToricVariety ({{}},{}); |
i18 : isWellDefined X#3 -- expected `max' to be a list of lists o18 = false |
i19 : X#4 = normalToricVariety ({{}},{{}}); |
i20 : isWellDefined X#4 -- some ray does not appear in maximal cone o20 = false |
i21 : coneList' = {{0,1},{0,3},{1,2},{2,3},{3}}; |
i22 : X#5 = normalToricVariety ({{-1,0},{0,-1},{1,-1},{0,1}}, coneList'); |
i23 : isWellDefined X#5 -- some cone is not maximal o23 = false |
i24 : X#6 = normalToricVariety ({{-1,-1},{1,0},{0,1,1}},coneList); |
i25 : isWellDefined X#6 -- expected `rays' to be a list of equal length lists o25 = false |
i26 : X#7 = normalToricVariety ({{-1,-1/1},{1,0},{0,1}},coneList); |
i27 : isWellDefined X#7 -- expected `rays' to be a list of lists of integers o27 = false |
i28 : X#8 = normalToricVariety ({{1,0},{0,1},{-1,0}},{{0,1,2}}); |
i29 : isWellDefined X#8 -- not all maximal cones are strongly convex o29 = false |
i30 : X#9 = normalToricVariety ({{1,0,0},{0,1,0},{0,0,2}},{{0,1,2}}); |
i31 : isWellDefined X#9 -- the rays are not the primitive generators o31 = false |
i32 : X#10 = normalToricVariety ({{1,0},{0,1},{1,1}},{{0,1},{1,2}}); |
i33 : isWellDefined X#10 -- intersection of cones is not a cone o33 = false |
i34 : debugLevel = 0; |
i35 : assert all (keys X, k -> not isWellDefined X#k) |
This method also checks that the following aspects of the data structure: