-- Here are simple expressions that can be evaluated with Macaulay 2+2 20! 4 + 5*2^20 2^100 3/5+7/11 --this is in QQ 1234//10 -- division with remainder; quotient 1234%10 -- remainder 2+2==4 --equality testing 1+2;3+4; oo {1,2,s} cube = i-> i^3 cube 5 mult = (x,y) -> x*y mult(3,4) apply({1,2,3,4}, cube) scan({1,2,3,4}, i-> print(i, i^3)) --analogous to apply but no value is returned R=QQ[X] f=X^100+X+1 f//(X^2+X-1) f%(X^2+X-1) ff = matrix({{1,x,x^2}, {x,x^2,x^3}}) rank ff kernel ff S=QQ[l,x,y,z, MonomialOrder=>Lex] f=x^3+2*x*y*z-z^2 g=x^2+y^2+z^2-1 lagrange=ideal(compress(diff(f)-l*diff(g)))+ideal(g) eqs=transpose gens gb lagrange A={{1,1,1,1},{1,5,10,25}} R=QQ[p,n,d,q, Degrees => transpose A] degree d degree q degree(p^4*n^8*d^10*q^3) h=basis({20,135},R) rank source h h rank source basis({100,1000},R) S=QQ[x,y,d,p,n,q, MonomialOrder=>Lex, MonomialSize =>16] I=ideal(p-x*y, n-x*y^5, d-x*y^10, q-x*y^25) transpose gens gb I Sq=S/I -- express one dollar in 10 coins x^10*y^100 -- we don't need any dime to express 10 dollars with 100 coins x^100*y^1000 -- we cannot express 10 dollars with less then forty coins x^39*y^1000