-*- M2 -*-

QQ[x,Weights=>{2^30}]
sum(10,i->x^i)


weight = (5,7,13,17)
A = QQ[x, y, p, n, d, q, 
     MonomialOrder=>{
	  Weights=>{1,1,0,0,0,0},
	  Weights=>splice{0,0,weight}},
     MonomialSize => 16]

A = QQ[x, y, p, n, d, q, 
          Weights => {{1,1,0,0,0,0},splice{0,0,weight}},
          MonomialSize => 16]
I = ideal(p - x*y, n - x*y^5, d - x*y^10, q - x*y^25);



weight = (5,7,13,17)
T = QQ[x, y, p, n, d, q, 
          Weights => {{1,1,0,0,0,0},{0,0,weight}},
          MonomialSize => 16]/
      (p - x*y, n - x*y^5, d - x*y^10, q - x*y^25);
x^10 * y^100
x^100 * y^1000
x^234 * y^5677
end
-----------------------------------------------------------------------------
Date: Wed, 12 Jul 2006 15:44:08 -0500 (CDT)
From: Dan Grayson <dan@math.uiuc.edu>
To: mike@math.cornell.edu
CC: dan@math.uiuc.edu
Subject: monomial overflow
Reply-to: dan@math.uiuc.edu


The code below is from ComputationsBook/varieties/, so it better still work.
There are three problems:

      (1) a monomial overflow occurs

      (2) it only happens in the debug version -- it's important that
          overflow tests be always active, but more likely is that the
	  debug version is falsely claiming there is an overflow (?)

      (3) your code keeps going after a monomial overflow, and the 
	  error message doesn't get printed until later

I'll add this to mike/bugs.

=============================================================================

+ M2.debug --no-readline --print-width 189
Macaulay 2, version 0.9.20
--warning: map checksum has changed, file /capybara/encap/gcc-4.1.1/lib/libstdc++.so.6.0.8
--warning: map checksum has changed, file /capybara/encap/gcc-4.1.1/lib/libgcc_s.so.1
--warning: map checksum has changed, file /lib/tls/libc-2.3.5.so
--warning: map checksum has changed, file /lib/tls/libc-2.3.5.so
--warning: map checksum has changed, file /lib/tls/libc-2.3.5.so
--warning: memory maps have changed, can't load cached data: /home/dan/src/M2/BUILD/debug/Macaulay2/cache/Macaulay2-i686-data
with packages: Classic, Elimination, LLLBases, PrimaryDecomposition, SchurRings, TangentCone

i1 : input "foo.m2"

ii2 : weight = (5,7,13,17)

oo2 = (5, 7, 13, 17)

oo2 : Sequence

ii3 : T = QQ[x, y, p, n, d, q, 
                Weights => {{1,1,0,0,0,0},{0,0,weight}},
                MonomialSize => 16]/
            (p - x*y, n - x*y^5, d - x*y^10, q - x*y^25);
monomial overflow has occurred
--error message bumped: monomial overflow
monomial overflow has occurred
--error message bumped: monomial overflow
monomial overflow has occurred
--error message bumped: monomial overflow
monomial overflow has occurred
foo.m2:5:13:(1):[3]: monomial overflow
foo.m2:5:13:(1):[3]: --entering debugger--

 -- useful debugger commands:
     break                  -- leave the debugger, returning to top level
     end                    -- abandon the code, enter debugger one level up
     listLocalSymbols       -- display local symbols and their values
     listUserSymbols        -- display user symbols and their values
     continue               -- execute the code and continue
     continue n             -- execute the code, stop after n microsteps
     return                 -- bypass code, return 'null', and continue
     return x               -- bypass code, return 'x', and continue
     value errorCode        -- execute the code, returning its value

 -- code just attempted: -- foo.m2:5
                               (p - x*y, n - x*y^5, d - x*y^10, q - x*y^25);

iii4 : exit

Process M2 finished

+ M2 --no-readline --print-width 189
Macaulay 2, version 0.9.20
with packages: Classic, Elimination, LLLBases, PrimaryDecomposition, SchurRings, TangentCone

i1 : input "foo.m2"

ii2 : weight = (5,7,13,17)

oo2 = (5, 7, 13, 17)

oo2 : Sequence

ii3 : T = QQ[x, y, p, n, d, q, 
                Weights => {{1,1,0,0,0,0},{0,0,weight}},
                MonomialSize => 16]/
            (p - x*y, n - x*y^5, d - x*y^10, q - x*y^25);

ii4 : x^10 * y^100

       5 2 3
oo4 = p d q

oo4 : T

ii5 : x^100 * y^1000

       60 3 37
oo5 = p  n q

oo5 : T

ii6 : x^234 * y^5677

       2 4 3 225
oo6 = p n d q

oo6 : T

ii7 : 

