Opened 2 years ago
Last modified 5 months ago
#24149 new defect
roots of zero polynomial over finite ring
Reported by: | zimmerma | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.4 |
Component: | finite rings | Keywords: | padicBordeaux |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
currently we get with Sage 8.0:
sage: R.<x> = IntegerModRing(4)[] sage: R(0).roots(multiplicities=False) [0, 1, 2, 3]
but:
sage: R.<x> = ZZ[] sage: R(0).roots(ring=IntegerModRing(4),multiplicities=False) ... ValueError: roots of 0 are not defined
The second answer is inconsistent with the first one, and in this case the roots are well defined: all elements of the finite ring are roots.
Change History (7)
comment:1 Changed 2 years ago by
comment:2 Changed 2 years ago by
There is certainly a bug here. The ArithmeticError
is for consistency with non-finite rings, where we can't return a list of all elements. Certainly
sage: S.<x> = IntegerModRing(3)[] sage: S(0).roots(multiplicities=False) []
should be fixed, but I would say that we should raise an ArithmeticError
in every case.
comment:3 follow-up: ↓ 4 Changed 2 years ago by
In the case of an infinite base ring, one can still return the base ring (thought as an infinite set). I would also prefer an ArithmeticError
in every case.
comment:4 in reply to: ↑ 3 Changed 2 years ago by
Replying to vdelecroix:
In the case of an infinite base ring, one can still return the base ring (thought as an infinite set).
True, but the expectation is for a list.
I would also prefer an
ArithmeticError
in every case.
Let's do that then. :-)
comment:5 Changed 20 months ago by
- Milestone changed from sage-8.1 to sage-8.3
comment:6 Changed 18 months ago by
- Milestone changed from sage-8.3 to sage-8.4
update milestone 8.3 -> 8.4
comment:7 Changed 5 months ago by
- Keywords padicBordeaux added
moreover the first way does not work properly for 2:
and the answer is wrong for other prime cardinalities: