Feature #1645
Implement monic0(f) for the case monic(0)?
Description
/**/ monic(RingElem(P,0));
throws the error "Non-zero RingElem required". That's OK.
But the manual for
monic
says "if "F" is zero, it returns just zero."
Should we implement monic0
as well (analogue of preimage0
) returning 0 for convenience?
Think of the case ideal([ monic(f) | f in phi(L) ])
: here 0 might occur without being a real problem.
Related issues
History
#1 Updated by John Abbott over 2 years ago
Right now I would be inclined to change the manual.
I am not yet convinced that monic0
is a good idea. Can you convince me?
#2 Updated by Anna Maria Bigatti over 2 years ago
John Abbott wrote:
Right now I would be inclined to change the manual.
I am not yet convinced thatmonic0
is a good idea. Can you convince me?
I would keep monic
as is, changing the manual.
I would add the function monic0
for the case in the description:
[ monic(f) | f in phi(L) ]
Quite often
monic
is used just for beautifying the output, and not for the mathematical properties. In such cases it is a nuisance to uglify the code.
We have encountered similar dilemmas for other functions: the "0", could be a handy way of unifying the look and behaviour of these functions.
#3 Updated by John Abbott over 2 years ago
- Status changed from New to In Progress
monic0(f)
would givef
deg0(f)
would give 0 or -1?LC0(f)
would give 0 of coeffring?LT0(f)
would give 1 (PP) maybe ??LF0(f)
would give 0
I do still feel uneasy about this proposal: all of the above fns "feel unclean".
#4 Updated by John Abbott over 2 years ago
- Related to Design #1647: Suppress zero from ideal generators? Detect 1 and simplify generators? added
#5 Updated by John Abbott over 2 years ago
Anna says it is OK to have these "dirty" functions because their names are strange.
She suggests that they each have separate manual pages (so as not to spoil the "pure" pages of the "good" functions).
#6 Updated by John Abbott about 2 years ago
Since I am hoping to make a release quite quickly, I prefer to postpone this issue to the next release (so we have time to discuss it a bit more).
#7 Updated by Anna Maria Bigatti about 2 years ago
- Target version changed from CoCoALib-0.99800 to CoCoALib-0.99850
John Abbott wrote:
Since I am hoping to make a release quite quickly, I prefer to postpone this issue to the next release (so we have time to discuss it a bit more).
ok, postponed
#8 Updated by John Abbott almost 2 years ago
#9 Updated by John Abbott 2 months ago
- Target version changed from CoCoALib-0.99850 to CoCoALib-0.99900