#!/usr/bin/python # outputs Macaulay 2 Code for the ideal I_{mn} # as defined in Evans/Sturmfels/Uhler 08 import sys print "-- Macaulay 2 Code for the Commuting Birth and Death Ideal:" # Catching arguments: try: m = int(sys.argv[1]) n = int(sys.argv[2]) except IndexError: print '-- Please give 2 integer arguments' m = 1; n = 1; print ('-- m = %i ,n = %i ' % (m,n)) # Generating the variable list: varlist = [] for i in range(m+1): for j in range (n+1): if i0: varlist.append(''.join(["L",str(i),str(j)])) if j>0: varlist.append(''.join(["D",str(i),str(j)])) if j