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 projectiveSpace (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, 3, 6} 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 = {5, 5, 6, 6, 8} o7 : List |
i8 : assert isWellDefined weightedProjectiveSpace q |
The next eight 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 projectiveSpace 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 : coneList' = {{0,1},{0,3},{1,2},{2,3},{3}}; |
i16 : X#2 = normalToricVariety({{-1,0},{0,-1},{1,-1},{0,1}}, coneList'); |
i17 : isWellDefined X#2 -- some cone is not maximal o17 = false |
i18 : X#3 = normalToricVariety({{-1,-1},{1,0},{0,1,1}},coneList); |
i19 : isWellDefined X#3 -- expected `rays' to be a list of equal length lists o19 = false |
i20 : X#4 = normalToricVariety({{-1,-1/1},{1,0},{0,1}},coneList); |
i21 : isWellDefined X#4 -- expected `rays' to be a list of lists of integers o21 = false |
i22 : X#5 = normalToricVariety({{1,0},{0,1},{-1,0}},{{0,1,2}}); |
i23 : isWellDefined X#5 -- not all maximal cones are strongly convex o23 = false |
i24 : X#6 = normalToricVariety({{1,0,0},{0,1,0},{0,0,2}},{{0,1,2}}); |
i25 : isWellDefined X#6 -- the rays are not the primitive generators o25 = false |
i26 : X#7 = normalToricVariety({{1,0},{0,1},{1,1}},{{0,1},{1,2}}); |
i27 : isWellDefined X#7 -- intersection of cones is not a cone o27 = false |
i28 : debugLevel = 0; |
i29 : assert all(keys X, k -> not isWellDefined X#k) |
This method also checks that the following aspects of the data structure: