Opened 7 years ago

# primary decomposition doesn't work when ideal is in a quotient polynomial ring

Reported by: Owned by: was malb minor sage-6.4 commutative algebra sd59 Martin Albrecht Reported upstream. Developers acknowledge bug. u/malb/trac_16381 c237b07be5568f9f19b2333f12dc46efe8a82ea5

### Description

I was trying to do a simple example on page 51 of Atiyah-Macdonald using Sage, and it fails:

```R.<x,y,z> = QQ[]
I = R.ideal([x*y - z^2])
A.<xbar,ybar,zbar> = R.quotient(I)
p = A.ideal([x,z])
p.primary_decomposition()
```

boom! ---

```Error in lines 5-5
Traceback (most recent call last):
File "/projects/71755b5a-fde1-45bc-9ca8-d06d5b9749f1/.sagemathcloud/sage_server.py", line 733, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
File "/usr/local/sage/sage-6.2.rc0/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py", line 604, in __call__
return self.f(self._instance, *args, **kwds)
File "/usr/local/sage/sage-6.2.rc0/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py", line 1146, in primary_decomposition
return [I for I, _ in self.complete_primary_decomposition(algorithm)]
File "/usr/local/sage/sage-6.2.rc0/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py", line 604, in __call__
return self.f(self._instance, *args, **kwds)
File "/usr/local/sage/sage-6.2.rc0/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py", line 505, in wrapper
return func(*args, **kwds)
File "/usr/local/sage/sage-6.2.rc0/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py", line 1068, in complete_primary_decomposition
P = primdecSY(self)
File "function.pyx", line 1285, in sage.libs.singular.function.SingularFunction.__call__ (sage/libs/singular/function.cpp:13025)
TypeError: Cannot call Singular function 'primdecSY' with ring parameter of type '<class 'sage.rings.quotient_ring.QuotientRing_generic_with_category'>'
```

### comment:1 Changed 7 years ago by malb

So we'd want somthing like this?

```sage: R.<x,y,z> = QQ[]
sage: I = R.ideal([x*y - z^2])
sage: A.<xbar,ybar,zbar> = R.quotient(I)
sage: J = A.ideal([x,z])
# primary decomposition starts here
sage: J = Ideal(f.lift() for f in p.gens())
sage: Q = Sequence(Ideal(A(f) for f in q.gens()) for q in (I + J).primary_decomposition())
```

### comment:2 Changed 7 years ago by malb

• Authors set to Martin Albrecht
• Status changed from new to needs_review

### comment:4 Changed 7 years ago by malb

• Branch set to u/malb/trac_16381
• Commit set to c237b07be5568f9f19b2333f12dc46efe8a82ea5

New commits:

 ​c237b07 `fixing #16381: primary decomposition for quotient rings`

### comment:5 Changed 7 years ago by mmarco

Am i missing something or singular can give incorrect anwers in this case? :

```                     SINGULAR                                 /  Development
A Computer Algebra System for Polynomial Computations       /   version 3-1-6
0<
by: W. Decker, G.-M. Greuel, G. Pfister, H. Schoenemann     \   Dec 2012
FB Mathematik der Universitaet, D-67653 Kaiserslautern        \
> ring r=0,(x,y,z),dp;
> ideal i=z2-x2-y2;
> qring  q = i;
> setring q;
> ideal j0=y2;
> ideal j1=x-z;
> ideal j2=x+z;
> LIB "primdec.lib";
> primdecGTZ(j0);
[1]:
[1]:
_[1]=y2
[2]:
_[1]=y
```

but j0 is the inttersection of j1 and j2, which are prime ideals:

```> intersect(j1,j2);
_[1]=x2-z2
_[2]=xy2+y2z
> factorize(xy2+y2z);
[1]:
_[1]=1
_[2]=x+z
_[3]=y
[2]:
1,1,2
> primdecGTZ(j1);
[1]:
[1]:
_[1]=x-z
[2]:
_[1]=x-z
> primdecGTZ(j2);
[1]:
[1]:
_[1]=x+z
[2]:
_[1]=x+z

```

### comment:6 Changed 7 years ago by malb

• Report Upstream changed from N/A to Reported upstream. No feedback yet.
• Status changed from needs_review to needs_info

### comment:7 Changed 7 years ago by malb

• Report Upstream changed from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.

It's confirmed as a bug in upstream.

### comment:8 Changed 7 years ago by vbraun_spam

• Milestone changed from sage-6.3 to sage-6.4

### comment:9 Changed 6 years ago by jakobkroeker

Primary decomposition in quotient rings is not yet supported by Singular, see documentation.

Consider that Singular usually never checks if used parameters are valid or allowed!! Their philosophy is/was that the user should know what he is doing, a very unfortunate one from my point of view.

Parameter check is now (since ver 4.0 ) done for primary decomposition. Maybe I will add support for primary decomposition in quotient rings, so bug me continuously to get this done.

Note: See TracTickets for help on using tickets.