Project

General

Profile

Design #1617

UnivariateIndetIndex: exact semantics

Added by John Abbott over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tidying
Target version:
Start date:
13 Oct 2021
Due date:
% Done:

100%

Estimated time:
1.66 h
Spent time:

Description

What are the exact semantics of UnivariateIndetIndex?

In particular what should the function return if passed a constant polynomial (i.e. 0 or deg=0) in a polyring with more than 1 indet?

Currently it returns the index 0; but perhaps an error is more appropriate (since the answer is not uniquely defined).


Related issues

Related to CoCoA-5 - Feature #1616: UnivariateIndetIndex: remove cocoa-5 implementation and use CoCoALib'sClosed2021-10-13

History

#1 Updated by John Abbott over 2 years ago

  • Related to Feature #1616: UnivariateIndetIndex: remove cocoa-5 implementation and use CoCoALib's added

#2 Updated by John Abbott over 2 years ago

What about the case of a constant poly in a polyring with just 1 indet?
Error or not? (assuming we opt for an error if there are several indets)

Hmmm

#3 Updated by John Abbott over 2 years ago

Mmm, should it be an error to call UnivariateIndetIndex if the polyring has just 1 indet?
After all, the answer is obvious in this case.

#4 Updated by John Abbott over 2 years ago

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

I have just modified the imple of UnivariateIndetIndex so that it produces an error if the input is constant or if the polyring has just 1 indet.
Some tests fail. I'll investigate (later).

#5 Updated by John Abbott over 2 years ago

If we do change the semantics, don't forget to change the doc as well! And perhaps also change the tests!

#6 Updated by John Abbott over 2 years ago

I tried throwing an exception if the arg was a constant or if the polyring had just 1 indet, but several tests failed.
I checked just test-RingFq1, and the problem was that there was just a single indet.
Making the caller handle specially the case of a single indet would make the caller's code rather messier.

If I allow polyrings with just 1 indet, but throw when the arg is a constant poly then all tests pass!

#7 Updated by John Abbott over 2 years ago

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

I have checked in the version which rejects constant but accepts polyrings with 1 indet.

#8 Updated by John Abbott over 2 years ago

  • Status changed from Resolved to Feedback
  • % Done changed from 80 to 90

#9 Updated by John Abbott over 2 years ago

I have updated the documentation to the current behaviour.

#10 Updated by John Abbott over 2 years ago

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

Also available in: Atom PDF