Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strange behavior in kernel (identified in PushForward) #3284

Open
kschwede opened this issue Jun 5, 2024 · 3 comments
Open

strange behavior in kernel (identified in PushForward) #3284

kschwede opened this issue Jun 5, 2024 · 3 comments

Comments

@kschwede
Copy link
Contributor

kschwede commented Jun 5, 2024

I've discovered this in the PushForward package, but I believe the issue is with kernel. Notably, sometimes pushFwd gives the wrong answer and other times it has an error. This is an issue on both 1.24.05 and 1.22.

For instance, using a multi-graded setup,

Macaulay2, version 1.24.05
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems,
               Isomorphism, LLLBases, MinimalPrimes, OnlineLookup,
               PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone,
               Truncations, Varieties
loadPackage("PushForward", DebuggingMode=>true);

i1 :
i2 : R = QQ[x,y, Degrees=>{{1,0},{0,1}}]/ideal(x^3-2, y^2+y+1);

i3 : psi = map(R, QQ[]);

o3 : RingMap R <-- QQ[]                                                         

i4 : pushFwd(psi)
/usr/share/Macaulay2/PushForward.m2:193:10:(3):[4]: error: not implemented yet:$
/usr/share/Macaulay2/PushForward.m2:193:10:(3):[4]: --entering debugger (type h$
/usr/share/Macaulay2/PushForward.m2:193:9-193:16: --source code:                
     ke:=kernel mp;

In a singly graded setup, I get the right answer.

Macaulay2, version 1.24.05
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems,
               Isomorphism, LLLBases, MinimalPrimes, OnlineLookup,
               PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone,
               Truncations, Varieties

i1 : loadPackage("PushForward", DebuggingMode=>true);

i2 : S = QQ[x,y]/ideal(x^3-2, y^2+y+1);

i3 : psi = map(S, QQ[]);

o3 : RingMap S <-- QQ[]                                                         

i4 : pushFwd(psi)

            6
o4 = ((QQ[]) , | 1 x x2 x2y xy y |,
     --------------------------------------------------------------------------
     FunctionClosure[/usr/share/Macaulay2/PushForward.m2:101:17-101:31])

o4 : Sequence

What's worse though, in the multi-graded setup, sometimes I get no error but instead the wrong answer if the source is QQ (instead of QQ[]). In the singly graded setup I don't have this issue.

Macaulay2, version 1.24.05
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems,
               Isomorphism, LLLBases, MinimalPrimes, OnlineLookup,
               PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone,
               Truncations, Varieties

i1 : loadPackage("PushForward", DebuggingMode=>true);

i2 : R = QQ[x]/ideal(x^3-2);

i3 : S = R[y]/ideal(y^2+y+1);

i4 : U = (flattenRing S)#0;

i5 : pushFwd(map(U, QQ))

o5 = (cokernel | 0 0 0 0 |, | 1 y yx yx2 x x2 |,
               | 0 0 0 0 |
               | 1 0 0 0 |
               | 0 1 0 0 |
               | 0 0 1 0 |
               | 0 0 0 1 |
     --------------------------------------------------------------------------
     FunctionClosure[/usr/share/Macaulay2/PushForward.m2:101:17-101:31])

o5 : Sequence

i6 : degrees U

o6 = {{1, 0}, {0, 1}}

o6 : List

i7 : describe U

           QQ[y, x]
o7 = --------------------                                                       
       3       2
     (x  - 2, y  + y + 1)

You can see in the above I am getting the wrong module out of pushFwd

@mahrud
Copy link
Member

mahrud commented Jun 5, 2024

I wonder if this is related to #3165 (comment), since kernel also calls the pushForward from Core.

Is there a homogeneous version of this issue you've observed, or does it happen only in the inhomogeneous case?

cc: @Devlin-Mallory

@kschwede
Copy link
Contributor Author

kschwede commented Jun 5, 2024

I had a conversation with Claudiu Raicu about especially the third example.

He provided the following minimal code showing the kernel giving an incorrect answer that didn't need pushFwd.

i2 :  R = QQ[x]/ideal(x^3-2);

i3 :       S = R[y]/ideal(y^2+y+1);

i4 :       U = (flattenRing S)#0;

i5 :       A = QQ;

i6 :       f = map(U, A)

o6 = map (U, QQ, {})

o6 : RingMap U <-- QQ                                                            

i7 :       g = map(U^1,A^6,f,matrix{{1,y,y*x,y*x^2,x,x^2}})

o7 = | 1 y yx yx2 x x2 |

             1       6
o7 : Matrix U  <-- QQ                                                            

i8 :       ker g

o8 = image | 0 0 0 0 |
           | 0 0 0 0 |
           | 1 0 0 0 |
           | 0 1 0 0 |
           | 0 0 1 0 |
           | 0 0 0 1 |

                               6
o8 : QQ-module, submodule of QQ

@pzinn
Copy link
Contributor

pzinn commented Jun 6, 2024

could it be related to #2004 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants