Project

General

Profile

Bug #1714

IsDivisible error (in QuotRing)

Added by John Abbott over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bug
Target version:
Start date:
24 Nov 2022
Due date:
% Done:

100%

Estimated time:
1.99 h
Spent time:

Description

Bernhard Andraschko reported by email the folllowing:

Use R ::= ZZ/(2)[x,y];
I := ideal(R, [i^2-i | i in indets(R)]);
S := R/I;
Use S;
IsDivisible(x+y,x+y); // works OK
IsDivisible(x+y,x+y+1); // index error!?!

The error is

--> ERROR: Row index out of range
--> [CoCoALib] M(i,j)
--> WHERE: at line 6 (column 6) of Anfdraschko-bug.cocoa5
--> /**/ IsDivisible(x+y,x+y+1);
-->      ^^^^^^^^^^^^^^^^^^^^^^

History

#1 Updated by John Abbott over 1 year ago

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

Bug confirmed with current internal version.

Does not depend on char; same bug with other chars.

#2 Updated by John Abbott over 1 year ago

Simpler failing case:

p := 2;
Use R ::= ZZ/(p)[x];
I := ideal(x^p-x);
S := R/I;
Use S;
IsDivisible(x+1,x+1); // works OK
IsDivisible(x,x+1); // index error!?!

#3 Updated by John Abbott over 1 year ago

The problem exists also in char 0

p := 3;
Use R ::= QQ[x];
I := ideal(x^p-x);
S := R/I;
Use S;
IsDivisible(x+1,x+1); // works OK
IsDivisible(x,x+1); // index error!?!

#4 Updated by John Abbott over 1 year ago

I can also trigger NYI:

/**/ I := ideal(x^2);
/**/ S := R/I;
/**/ use S;
/**/ IsDivisible(x, x+1);
--> ERROR: NOT YET IMPLEMENTED -- please be patient, we're working on it
--> [CoCoALib] SparsePolyRingBase::IdealImpl::myDivMod
--> IsDivisible(x, x+1);
--> ^^^^^^^^^^^^^^^^^^^

#5 Updated by John Abbott over 1 year ago

  • Status changed from In Progress to Feedback
  • Assignee set to John Abbott
  • % Done changed from 10 to 90

Problem was in SparsePolyRingBase::IdealImpl::myDivMod (in file SparsePolyOps-idea.C)
We did not check for the case that there was no soln to the linear system.

BTW this function is very incomplete -- whence the NYI error above.

I'll check in shortly.

#6 Updated by John Abbott over 1 year ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100
  • Estimated time set to 1.99 h

Added test (to exbugs.cocoa5).
Closing.

Also available in: Atom PDF