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

primary decomposition: provide a descriptive error message for illegal algorithm choice #17723

Open
sagetrac-jakobkroeker mannequin opened this issue Feb 3, 2015 · 0 comments

Comments

@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Feb 3, 2015

sage: R.<x,y>=QQ[]
sage: I = R.ideal(x)
sage: I.primary_decomposition("elephants")
---------------------------------------------------------------------------
UnboundLocalError                         Traceback (most recent call last)
<ipython-input-3-640b8340fda6> in <module>()
----> 1 I.primary_decomposition("elephants")

/home/kroeker/Projects/sage/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in __call__(self, *args, **kwds)
    603         if not R.base_ring().is_field():
    604             raise ValueError("Coefficient ring must be a field for function '%s'."%(self.f.__name__))
--> 605         return self.f(self._instance, *args, **kwds)
    606 
    607 require_field = RequireField

/home/kroeker/Projects/sage/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in primary_decomposition(self, algorithm)
   1159           York 1993.
   1160         """
-> 1161         return [I for I, _ in self.complete_primary_decomposition(algorithm)]
   1162 
   1163     @require_field

/home/kroeker/Projects/sage/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in __call__(self, *args, **kwds)
    603         if not R.base_ring().is_field():
    604             raise ValueError("Coefficient ring must be a field for function '%s'."%(self.f.__name__))
--> 605         return self.f(self._instance, *args, **kwds)
    606 
    607 require_field = RequireField

/home/kroeker/Projects/sage/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in wrapper(*args, **kwds)
    503         """
    504         with LibSingularDefaultContext():
--> 505             return func(*args, **kwds)
    506     return wrapper
    507 

/home/kroeker/Projects/sage/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in complete_primary_decomposition(self, algorithm)
   1086 
   1087         R = self.ring()
-> 1088         V = [(R.ideal(X[0]), R.ideal(X[1])) for X in P]
   1089         V = Sequence(V)
   1090         self.__complete_primary_decomposition[algorithm] = V

UnboundLocalError: local variable 'P' referenced before assignment

CC: @nathanncohen @tom111

Component: commutative algebra

Keywords: primary decomposition error message

Issue created by migration from https://trac.sagemath.org/ticket/17723

@sagetrac-jakobkroeker sagetrac-jakobkroeker mannequin added this to the sage-6.5 milestone Feb 3, 2015
@mkoeppe mkoeppe removed this from the sage-6.5 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant