// Setting up the Polynomial ring and ideal R := PolynomialRing(RationalField(), 3); MyIdeal := ideal; print "==TRIANGULATION" cat "=BEGINS=="; print "% Triangulation\nm003\ngeometric_solution 2.02988321\noriented_manifold\nCS_known -0.0000000000000000\n\n1 0\n torus 0.000000000000 0.000000000000\n\n2\n 1 1 1 1 \n 0132 2103 0321 1023\n 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 -1 1 0 1 0 0 -1 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.500000000000 0.866025403784\n\n 0 0 0 0 \n 0132 2103 0321 1023\n 0 0 0 0 \n 0 0 0 0 0 0 1 -1 -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 -1 0 1 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.500000000000 0.866025403784\n\n"; print "==TRIANGULATION" cat "=ENDS=="; print "PY=EVAL=SECTION" cat "=BEGINS=HERE"; print "{'variable_dict' : (lambda d, negation = (lambda x:-x): { 's_3_1' : d['1'], 's_3_0' : d['1'], 'c_0101_1' : negation(d['c_0101_0']), 'c_1010_1' : negation(d['c_0101_0']), 's_2_0' : d['1'], 's_2_1' : d['1'], 'c_1010_0' : d['c_0101_0'], 'c_1100_1' : negation(d['c_0011_0']), 'c_1100_0' : d['c_0011_0'], 'c_1001_0' : negation(d['c_0011_0']), 'c_1001_1' : d['c_0011_0'], 'c_0101_0' : d['c_0101_0'], 's_1_1' : d['1'], 's_1_0' : d['1'], 'c_0110_1' : d['c_0101_0'], 'c_0110_0' : negation(d['c_0101_0']), 'c_0011_1' : negation(d['c_0011_0']), 'c_0011_0' : d['c_0011_0'], 's_0_0' : d['1'], 's_0_1' : d['1']})}"; print "PY=EVAL=SECTION=ENDS=HERE"; // Value indicating failure P := -1; // Computing the primary decomposition P,Q := PrimaryDecomposition(MyIdeal); 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"; end if;