The monomial order keys Lex and GRevLex allow packing. The MonomialSize => n option allows one to set the minimum packing size, in number of bits. Monomials are stored as signed exponent vectors, so maximum exponents of 2^(n1)1 are possible for packed variables. Useful values include 8, 16, 32, and (on 64bit machines) 64. The default monomial size is 32.


It is possible to pack different parts of the monomial with different sizes. For example, the following order has two blocks: a graded reverse lexicographic block of 3 variables, packed into one 32bit word, and a second lexicographic block for 4 variables, taking 4 32bit words. Each monomial will be packed into 5 32bit words (on a computer with a 32bit word size).



This exponent would give a monomial overflow error in the next two rings.

