ate: Fri, 15 Sep 2006 10:12:26 -0500 (CDT)
From: Dan Grayson <dan@math.uiuc.edu>
To: mike@math.cornell.edu
CC: dan@math.uiuc.edu
Subject: test/inverse.m2
Reply-to: dan@math.uiuc.edu


You asked be to fix the bug revealed by test/inverse.m2, but it's your problem.

Your code here contains a suspicious remark.

    RingElementOrNull *RingElement::power(int n) const
    {
      // What if n is negative?  Does R->power handle that correctly?
      ring_elem f = R->power(val,n);
      if (error()) return 0;
      return new RingElement(R, f);
    }

    RingElementOrNull *RingElement::power(mpz_t n) const
    {
      ring_elem f = R->power(val,n);
      if (error()) return 0;
      return new RingElement(R, f);
    }

Could you check?  If you don't want to handle inverses (taking relations into
account), then just return an error.    I can do 1 // x instead, at top level.

Let me know.
