Opened 3 years ago

Last modified 2 years ago

#27401 new defect

Clarify or fix ideal mod in SR

Reported by: kcrisman Owned by:
Priority: major Milestone:
Component: symbolics Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


See this SO question.

        from sage.rings.ideal import is_Ideal
        if not is_Ideal(I) or not I.ring() is self._parent:
            I = self._parent.ideal(I)
            #raise TypeError, "I = %s must be an ideal in %s"%(I, self.parent())
        return I.reduce(self)

Why the commented error? Was that supposed to be raised in certain cases?

Anyway, the real problem (if it's a problem) is here:

sage: I = SR.ideal(x)
sage: I.reduce??
return f       # default


Change History (3)

comment:1 Changed 3 years ago by kcrisman

(By the way, I recognize that this may not really be 'fixable' given that the symbolic ring isn't really one, but at least we can perhaps have a warning - or even raise a NotImplementedError for SR, as this is the sort of silent behavior that causes trouble. If f(x)=x^2, then both f(3).mod(7) and f(x+1).mod(x) give something that might cause nasty sorts of bugs. I don't think we can call this solely user error if someone runs into trouble here.)

comment:2 Changed 3 years ago by embray

  • Milestone changed from sage-8.7 to sage-8.8

Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)

comment:3 Changed 2 years ago by embray

  • Milestone sage-8.8 deleted

As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).

Note: See TracTickets for help on using tickets.