Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
330 stars 227 forks source link

gin (QuotientRing) fails #941

Open aarondall opened 5 years ago

aarondall commented 5 years ago
i1 : S = kk[a];

i2 : Q = S / ideal "a2";

i3 : gin Q
stdio:3:1:(3): error: no method found for applying ideal to:
     argument   :  OptionTable{AttemptCount => 7    } (of class OptionTable)
                               Modular => false
                               MonomialOrder => null
                               Verbose => false

The issue seems to be that gin (QuotientRing) does not pass options onto gin (Ideal).

i4 : options gin

o4 = OptionTable{AttemptCount => 7    }
                 Modular => false
                 MonomialOrder => null
                 Verbose => false

o4 : OptionTable

i5 : code (gin, QuotientRing)

o5 = -- code for method: gin(QuotientRing)
     /Applications/Macaulay2-1.12/share/Macaulay2/GenericInitialIdeal.m2:86:34-88:16: --source code:
     gin(QuotientRing) :=Ideal => (R) -> (
          gin(ideal R)
          );

Here's a simple fix:

i6 : gin (QuotientRing) := Ideal => opts -> R -> gin (ideal R, opts)

o6 = Ideal => -*Function[stdio:6:37-6:59]*-

o6 : Option

Now we have

i7 : gin Q

            2
o7 = ideal a

o7 : Ideal of S           
aarondall commented 5 years ago

The same error occurs for lexgin (QuotientRing) method in the GenericInitialIdeal package. The same fix remedies the situation.

DanGrayson commented 5 years ago

@aseceleanu -- a fix would be welcome soon, as we will release the next version probably May 24.

DanGrayson commented 5 years ago

@aseceleanu -- what about these fixes?