next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Divisor :: reflexify(..., Strategy => ...)

reflexify(..., Strategy => ...) -- specify a strategy for the reflexification

Synopsis

Description

There are two strategies for computing a reflexification (at least if the module embeds as an ideal).

IdealStrategy. In the case that R is a domain, and our module is isomorphic to an ideal I, then one can compute the reflexification by computing colons.

ModuleStrategy. This computes the reflexification simply by computing Hom twice.

ModuleStrategy is the default strategy for modules, IdealStrategy is the default Strategy for Ideals. In our experience, IdealStrategy is faster on average. Note that calling ModuleStrategy for Ideals or IdealStrategy for modules creates overhead which can slow things down substantially (since we must embed various modules as ideals).

i1 : R = ZZ/13[x,y,z]/ideal(x^3 + y^3-z^11*x*y);
i2 : I = ideal(x-4*y, z);

o2 : Ideal of R
i3 : J = I^20;

o3 : Ideal of R
i4 : M = J*R^1;
i5 : J1 = time reflexify( J, Strategy=>IdealStrategy )
     -- used 0.066818 seconds

             2            2     9       9   11
o5 = ideal (x  + 5x*y + 3y , x*z  - 4y*z , z   + x - 4y)

o5 : Ideal of R
i6 : J2 = time reflexify( J, Strategy=>ModuleStrategy )
     -- used 9.84486 seconds

             2            2     9       9      11
o6 = ideal (x  + 5x*y + 3y , x*z  - 4y*z , - 4z   - 4x + 3y)

o6 : Ideal of R
i7 : J1 == J2

o7 = true
i8 : time reflexify( M, Strategy=>IdealStrategy );
     -- used 10.4829 seconds
i9 : time reflexify( M, Strategy=>ModuleStrategy );
     -- used 0.610596 seconds

However, sometimes ModuleStrategy is faster, especially for Monomial ideals.

i10 : R = QQ[x,y,u,v]/ideal(x*y-u*v);
i11 : I = ideal(x,u);

o11 : Ideal of R
i12 : J = I^20;

o12 : Ideal of R
i13 : M = I^20*R^1;
i14 : time reflexify( J, Strategy=>IdealStrategy )
     -- used 0.0905526 seconds

              20     19   2 18   3 17   4 16   5 15   6 14   7 13   8 12 
o14 = ideal (u  , x*u  , x u  , x u  , x u  , x u  , x u  , x u  , x u  ,
      -----------------------------------------------------------------------
       9 11   10 10   11 9   12 8   13 7   14 6   15 5   16 4   17 3   18 2 
      x u  , x  u  , x  u , x  u , x  u , x  u , x  u , x  u , x  u , x  u ,
      -----------------------------------------------------------------------
       19    20
      x  u, x  )

o14 : Ideal of R
i15 : time reflexify( J, Strategy=>ModuleStrategy )
     -- used 0.0232873 seconds

              20     19   2 18   3 17   4 16   5 15   6 14   7 13   8 12 
o15 = ideal (u  , x*u  , x u  , x u  , x u  , x u  , x u  , x u  , x u  ,
      -----------------------------------------------------------------------
       9 11   10 10   11 9   12 8   13 7   14 6   15 5   16 4   17 3   18 2 
      x u  , x  u  , x  u , x  u , x  u , x  u , x  u , x  u , x  u , x  u ,
      -----------------------------------------------------------------------
       19    20
      x  u, x  )

o15 : Ideal of R
i16 : time reflexify( M, Strategy=>IdealStrategy );
     -- used 0.211075 seconds
i17 : time reflexify( M, Strategy=>ModuleStrategy );
     -- used 0.00874458 seconds

Further information

See also