// Setting up the Polynomial ring and ideal R := PolynomialRing(RationalField(), 19); MyIdeal := ideal; print "==TRIANGULATION" cat "=BEGINS=="; print "% Triangulation\n11_362\ngeometric_solution 16.36894411\noriented_manifold\nCS_unknown\n\n1 0\n torus 0.000000000000 0.000000000000\n\n18\n 1 2 3 4 \n 0132 0132 0132 0132\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 -1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 1 -1 0 0 0 0 -2 2 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.611905764263 0.729083307975\n\n 0 5 6 6 \n 0132 0132 0213 0132\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 1 -1 0 0 0 1 -1 0 1 0 -1 2 0 -2 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.567971010692 0.722826789033\n\n 7 0 9 8 \n 0132 0132 0132 0132\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 -1 0 1 0 0 0 0 0 2 -2 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.397290606460 0.351895842466\n\n 10 11 8 0 \n 0132 0132 0132 0132\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 1 0 -1 0 0 0 0 0 0 0 0 1 0 -1 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.884707130642 1.098172523395\n\n 12 12 0 6 \n 0132 1230 0132 2103\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 1 -1 0 0 0 0 -1 0 0 1 3 -3 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.593755288085 0.955420028741\n\n 13 1 14 14 \n 0132 0132 0132 0321\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 -1 1 0 0 0 0 0 0 0 0 0 1 -1 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.494587126141 0.446033761496\n\n 9 1 1 4 \n 2103 0213 0132 2103\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 0 0 0 0 -1 1 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 1 0 -1 -1 0 1 0 0 -1 0 1 -3 2 1 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.609240114820 1.019318348639\n\n 2 15 16 10 \n 0132 0132 0132 3201\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 1 0 0 -1 -2 0 0 2 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.990109586445 1.122571703808\n\n 16 11 2 3 \n 0132 0213 0132 0132\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 -1 0 1 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.599406621889 0.646552815737\n\n 10 12 6 2 \n 2103 1302 2103 0132\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 -1 1 0 0 0 -1 1 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 1 -1 -3 3 0 0 0 -3 3 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.765636384142 1.335813095163\n\n 3 7 9 14 \n 0132 2310 2103 0132\n 0 0 0 0 \n 0 -1 1 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 -2 3 -1 0 0 0 0 -1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.519966397467 0.337096172622\n\n 13 3 8 17 \n 3012 0132 0213 0132\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 -1 0 1 0 0 1 -1 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.488158320441 0.397103045107\n\n 4 15 4 9 \n 0132 3201 3012 2031\n 0 0 0 0 \n 0 0 1 -1 0 0 0 0 -1 0 0 1 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 3 -3 0 0 0 0 -3 0 0 3 1 -1 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.530766505694 0.755050249846\n\n 5 17 16 11 \n 0132 3012 2310 1230\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 -1 1 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.696475736942 0.591865931501\n\n 16 5 10 5 \n 2103 0321 0132 0132\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n -0.115033573850 1.005571299478\n\n 17 7 12 17 \n 3012 0132 2310 2031\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 -1 0 1 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 1.127597935658 1.044931543445\n\n 8 13 14 7 \n 0132 3201 2103 0132\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0.666405696210 0.362360452006\n\n 13 15 11 15 \n 1230 1302 0132 1230\n 0 0 0 0 \n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n 0 0 -1 1 -1 0 1 0 0 0 0 0 0 0 0 0\n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n -0.115143635740 0.942940153311\n\n"; print "==TRIANGULATION" cat "=ENDS=="; print "PY=EVAL=SECTION" cat "=BEGINS=HERE"; print "{'variable_dict' : (lambda d, negation = (lambda x:-x): { 'c_0110_6' : d['c_0110_6'], 'c_1001_15' : negation(d['c_0011_9']), 'c_1001_14' : negation(d['c_0101_2']), 'c_1001_17' : d['c_0110_15'], 'c_1001_16' : d['c_0011_14'], 'c_1001_11' : d['c_1001_0'], 'c_1001_10' : d['c_0011_9'], 'c_1001_13' : negation(d['c_0011_17']), 'c_1001_12' : d['c_0011_12'], 's_0_10' : d['1'], 'c_1001_5' : d['c_1001_1'], 'c_1001_4' : d['c_1001_2'], 'c_1001_7' : d['c_0011_17'], 'c_1001_6' : d['c_1001_1'], 'c_1001_1' : d['c_1001_1'], 'c_1001_0' : d['c_1001_0'], 'c_1001_3' : d['c_0110_15'], 'c_1001_2' : d['c_1001_2'], 'c_1001_9' : d['c_0011_6'], 'c_1001_8' : d['c_1001_0'], 'c_1010_13' : negation(d['c_0011_16']), 'c_1010_12' : d['c_0011_9'], 'c_1010_11' : d['c_0110_15'], 'c_1010_10' : negation(d['c_0101_2']), 'c_1010_17' : negation(d['c_0011_12']), 'c_1010_16' : d['c_0011_17'], 'c_1010_15' : d['c_0011_17'], 'c_1010_14' : d['c_1001_1'], 's_3_11' : negation(d['1']), 's_0_11' : d['1'], 's_0_12' : d['1'], 's_0_13' : d['1'], 's_3_15' : d['1'], 's_0_15' : negation(d['1']), 's_0_16' : d['1'], 's_3_16' : d['1'], 's_2_8' : d['1'], 's_2_9' : d['1'], 'c_0101_11' : negation(d['c_0011_16']), 'c_0101_10' : d['c_0101_0'], 'c_0101_17' : d['c_0011_16'], 'c_0101_16' : d['c_0101_14'], 'c_0101_15' : negation(d['c_0011_12']), 'c_0101_14' : d['c_0101_14'], 's_2_0' : negation(d['1']), 's_2_1' : d['1'], 's_2_2' : d['1'], 's_2_3' : d['1'], 's_2_4' : d['1'], 's_2_5' : d['1'], 's_2_6' : d['1'], 's_2_7' : d['1'], 's_2_12' : d['1'], 's_2_13' : d['1'], 's_2_10' : d['1'], 's_2_11' : d['1'], 's_2_16' : d['1'], 's_2_17' : negation(d['1']), 's_2_14' : d['1'], 's_2_15' : d['1'], 's_0_6' : d['1'], 's_0_7' : negation(d['1']), 's_0_4' : d['1'], 's_0_5' : d['1'], 's_0_2' : negation(d['1']), 's_0_3' : d['1'], 's_0_0' : d['1'], 's_0_1' : d['1'], 'c_0011_15' : negation(d['c_0011_0']), 'c_0011_14' : d['c_0011_14'], 'c_0011_17' : d['c_0011_17'], 'c_0011_16' : d['c_0011_16'], 'c_0011_11' : d['c_0011_10'], 'c_0011_10' : d['c_0011_10'], 'c_0011_13' : negation(d['c_0011_0']), 'c_0011_12' : d['c_0011_12'], 'c_1100_5' : negation(d['c_0101_2']), 'c_1100_4' : negation(d['c_0110_6']), 'c_1100_7' : negation(d['c_0011_10']), 'c_1100_6' : negation(d['c_0101_12']), 'c_1100_1' : negation(d['c_0101_12']), 'c_1100_0' : negation(d['c_0110_6']), 'c_1100_3' : negation(d['c_0110_6']), 'c_1100_2' : negation(d['c_0110_6']), 'c_1100_15' : d['c_0011_12'], 'c_1100_14' : negation(d['c_0101_2']), 'c_1100_17' : d['c_0110_15'], 'c_1100_16' : negation(d['c_0011_10']), 'c_1100_11' : d['c_0110_15'], 'c_1100_10' : negation(d['c_0101_2']), 'c_1100_13' : d['c_0011_16'], 's_3_10' : d['1'], 'c_1100_9' : negation(d['c_0110_6']), 's_3_13' : d['1'], 'c_1010_7' : negation(d['c_0011_9']), 'c_1010_6' : negation(d['c_0101_12']), 'c_1010_5' : d['c_1001_1'], 's_3_12' : d['1'], 'c_1010_3' : d['c_1001_0'], 'c_1010_2' : d['c_1001_0'], 'c_1010_1' : d['c_1001_1'], 'c_1010_0' : d['c_1001_2'], 's_0_14' : d['1'], 'c_1010_9' : d['c_1001_2'], 's_3_14' : d['1'], 's_3_17' : negation(d['1']), 's_0_17' : d['1'], 's_3_1' : d['1'], 's_3_0' : d['1'], 's_3_3' : negation(d['1']), 's_3_2' : d['1'], 's_3_5' : d['1'], 's_3_4' : d['1'], 's_3_7' : d['1'], 's_3_6' : d['1'], 's_3_9' : d['1'], 's_3_8' : d['1'], 'c_1100_12' : negation(d['c_1001_2']), 's_1_7' : negation(d['1']), 's_1_6' : d['1'], 's_1_5' : d['1'], 's_1_4' : d['1'], 's_1_3' : negation(d['1']), 's_1_2' : negation(d['1']), 's_1_1' : d['1'], 's_1_0' : negation(d['1']), 's_1_9' : d['1'], 's_1_8' : d['1'], 'c_0011_9' : d['c_0011_9'], 'c_0011_8' : negation(d['c_0011_16']), 'c_0011_5' : d['c_0011_0'], 'c_0011_4' : negation(d['c_0011_12']), 'c_0101_13' : negation(d['c_0011_14']), 'c_0011_6' : d['c_0011_6'], 'c_0011_1' : negation(d['c_0011_0']), 'c_0011_0' : d['c_0011_0'], 'c_0011_3' : negation(d['c_0011_10']), 'c_0011_2' : negation(d['c_0011_0']), 'c_0110_11' : d['c_0011_16'], 'c_0110_10' : d['c_0101_14'], 'c_0110_13' : d['c_0011_10'], 'c_0110_12' : d['c_0011_6'], 'c_0110_15' : d['c_0110_15'], 'c_0110_14' : d['c_0011_10'], 'c_0110_17' : negation(d['c_0011_0']), 'c_0110_16' : d['c_0101_7'], 'c_1010_4' : d['c_0101_12'], 'c_0101_12' : d['c_0101_12'], 'c_0011_7' : d['c_0011_0'], 's_0_8' : d['1'], 's_0_9' : d['1'], 'c_1010_8' : d['c_0110_15'], 'c_0101_7' : d['c_0101_7'], 'c_0101_6' : d['c_0101_0'], 'c_0101_5' : d['c_0011_10'], 'c_0101_4' : d['c_0011_6'], 'c_0101_3' : d['c_0101_14'], 'c_0101_2' : d['c_0101_2'], 'c_0101_1' : d['c_0011_6'], 'c_0101_0' : d['c_0101_0'], 'c_0101_9' : d['c_0101_0'], 'c_0101_8' : d['c_0101_7'], 's_1_17' : d['1'], 's_1_16' : d['1'], 's_1_15' : negation(d['1']), 's_1_14' : d['1'], 's_1_13' : d['1'], 's_1_12' : d['1'], 's_1_11' : negation(d['1']), 's_1_10' : d['1'], 'c_0110_9' : d['c_0101_2'], 'c_0110_8' : d['c_0101_14'], 'c_0110_1' : d['c_0101_0'], 'c_0110_0' : d['c_0011_6'], 'c_0110_3' : d['c_0101_0'], 'c_0110_2' : d['c_0101_7'], 'c_0110_5' : negation(d['c_0011_14']), 'c_0110_4' : d['c_0101_12'], 'c_0110_7' : d['c_0101_2'], 'c_1100_8' : negation(d['c_0110_6'])})}"; print "PY=EVAL=SECTION=ENDS=HERE"; // Value indicating failure P := -1; // Computing the primary decomposition primTime := Cputime(); P, Q := PrimaryDecomposition(MyIdeal); print "PRIMARY_DECOMPOSITION_TIME: ", Cputime(primTime); if Type(P) eq RngIntElt then // Some error occured print "PRIMARY=DECOMPOSITION" cat "=FAILED"; exit; else // Success print "PRIMARY=DECOMPOSITION" cat "=BEGINS=HERE"; P; print "PRIMARY=DECOMPOSITION" cat "=ENDS=HERE"; print "FREE=VARIABLES=IN=COMPONENTS" cat "=BEGINS=HERE"; N := Names(R); isFirstComp := true; freeVarStr := "["; for Comp in P do if isFirstComp then isFirstComp := false; else freeVarStr := freeVarStr cat ","; end if; freeVarStr := freeVarStr cat " [ "; D, Vars := Dimension(Comp); isFirstVar := true; for Var in Vars do if isFirstVar then isFirstVar := false; else freeVarStr := freeVarStr cat ", "; end if; freeVarStr := freeVarStr cat "\"" cat N[Var] cat "\""; end for; freeVarStr := freeVarStr cat " ]"; end for; freeVarStr := freeVarStr cat " ]"; print freeVarStr; print "FREE=VARIABLES=IN=COMPONENTS" cat "=ENDS=HERE"; end if; print "CPUTIME: ", Cputime(primTime);