Project

General

Profile

Bug #178

IsHomog: should it throw an error when there is no grading?

Added by Anna Maria Bigatti almost 12 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Safety
Target version:
Start date:
07 Jun 2012
Due date:
% Done:

90%

Estimated time:
Spent time:

Description

Here is a piece of code from CoCoA-5

/**/ Use QQ[x,y], Lex;
/**/ IsHomog(x-1);
true

It is correct because GradingDim = 0, but a naive user might think in terms of standard grading.
An expert user instead should not even ask that question (like gcd in a field)

I think it should throw an error. Comments?

12 feb 2013: now throws an error


Related issues

Related to CoCoA-5 - Bug #162: RegularityIndex <= 0Closed2012-05-17

Related to CoCoA-5 - Support #181: Functions throwing error even though (trivially) definedNew2012-06-08

History

#1 Updated by John Abbott almost 12 years ago

Yes, I think throwing an error is best(=safest) in this case. Same applies to any other "homog" function.
2013-02-11 Also JAA cannot think of any plausible situation when it is genuinely useful to have a grading over ZZ^0.

JAA wonders whether we should make a catalogue of cases where we choose to throw an error even though there is a well-defined mathematical result. If we should make one, what form should it have?

#2 Updated by Anna Maria Bigatti almost 12 years ago

  • Subject changed from IsHomog: should it trhow an error when there is no grading? to IsHomog: should it throw an error when there is no grading?

#3 Updated by Anna Maria Bigatti about 11 years ago

  • Status changed from New to Feedback
  • Assignee set to Anna Maria Bigatti
  • Target version set to CoCoALib-0.9953

#4 Updated by Anna Maria Bigatti about 11 years ago

  • % Done changed from 0 to 90

#5 Updated by John Abbott about 11 years ago

ex-PolyRing1 with debugging active fails:

***ERROR***  UNCAUGHT CoCoA error

***************************************************************************
****CoCoA ERROR****  ErrCode: CoCoA::ERR::ZeroGradingDim
****CoCoA ERROR****  Message: GradingDim (grading dimension) is 0
****CoCoA ERROR****  Context: IsHomog(RingElem)
****CoCoA ERROR****  File:    SparsePolyRing.C
****CoCoA ERROR****  Line:    936
***************************************************************************

#6 Updated by Anna Maria Bigatti over 10 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF