-- -*- M2-comint -*- hash: 16408385764843695632

i1 : assert all (5, d -> isWellDefined toricProjectiveSpace (d+1))

i2 : setRandomSeed (currentTime ());
 -- setting random seed to 1770553148

i3 : a = sort apply (3, i -> random (7))

o3 = {0, 3, 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 = {5, 6, 7, 7, 8}

o7 : List

i8 : assert isWellDefined weightedProjectiveSpace q

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)

i36 : 
