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.127869 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 12.1946 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 11.1671 seconds |
i9 : time reflexify( M, Strategy=>ModuleStrategy ); -- used 0.973304 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.114457 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.0311816 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.312636 seconds |
i17 : time reflexify( M, Strategy=>ModuleStrategy ); -- used 0.013062 seconds |