Project

General

Profile

Bug #1790

saturate with zero ideals

Added by John Abbott about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Maths Bugs
Target version:
Start date:
13 Mar 2024
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

The following two bugs were also present in Singular...

I := ideal(R,[]);
I:I; // --> ideal(1)
saturate(I,I); // --> ERROR
J := ideal(zero(R));
J:J; // --> ideal(1)
saturate(J,J); // --> ERROR, but a different error from above!


Related issues

Related to CoCoALib - Slug #967: Improve saturateResolved2016-11-10

History

#1 Updated by John Abbott about 1 month ago

It should be easy to fix these two cases. Are there any others involving the zero ideal?
Make several tests and adjoin them to the test suite!

#2 Updated by John Abbott about 1 month ago

  • Related to Slug #967: Improve saturate added

#3 Updated by John Abbott about 1 month ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

The relevant source code is in TmpGOperations.C near line 864.
One problem is that an empty PolyList does know to which ring its elements belong, so the function ComputeSaturation cannot return ideal(1) since it does not have the information needed to know which ring the ideal is in.

It really would be helpful to have a RingElemVector which guarantees that all its elements are in the same ring, and even knows the ring when the list is empty!

#4 Updated by John Abbott about 1 month ago

The code probably needs to be redesigned: we spoke about this last time, that ideals should not be modifiable, but that an operation should (almost?) always produce a new ideal object.

#5 Updated by John Abbott about 1 month ago

  • Status changed from In Progress to Resolved
  • Assignee set to John Abbott
  • % Done changed from 10 to 80

The problem was that in BuiltInFunctions-CoCoALib.C there was a call to I->mySaturate(J) instead of saturate(I,J), which was not declared in ideal.H.
I have also inserted CoCoA_ASSERT in mySaturate and myColon so that the rings are checked when debugging is active.

#6 Updated by Anna Maria Bigatti about 1 month ago

John Abbott wrote:

The problem was that in BuiltInFunctions-CoCoALib.C there was a call to I->mySaturate(J) instead of saturate(I,J), which was not declared in ideal.H.

Now moved to BuiltInOneLiner-CoCoALib.C

#7 Updated by Anna Maria Bigatti about 1 month ago

  • Status changed from Resolved to Closed
  • % Done changed from 80 to 100

Also available in: Atom PDF