Ilya Zakharevich on Tue, 19 Jan 1999 09:58:27 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: nf.sign in 2.0.12


On Tue, Jan 19, 1999 at 11:15:23AM +0100, Karim BELABAS wrote:
> > Or better, nfinit() should be fixed to always return nf - unless flag=3.
> 
> Since this behaviour is shared by the other *init functions, it is documented
> only once, at the beginning of the section (III.6). [Since at least version
> 2.0.10 (I think)]. From ??nf, or ??bnf [, or (2.0.14) ??"Functions related to
> general number fields"]: 
> ============================================================================
>    P  is  the defining polynomial for the number field,  which must be in
> Z[X], irreducible  and,   preferably,   monic.    In fact,  if you supply a
> non-monic polynomial  at  this  point,   GP  will  issue  a warning,  then
> transform your polynomial so that it becomes monic. Instead of the normal
> result, say res, you then get a vector [res,Mod(a,Q)], where Mod(a,Q) =
> Mod(X,P) gives the change of variables.
> ============================================================================
> 
> In ??nfinit you just have "preferably monic", as a reminder.
> 
> I don't consider nfinit to be broken. The output is tricky to use otherwise
> in case you were not expecting your polynomial to be changed: all
> elements/ideal/... will be given with respect to a different basis than the
> one you supplied. Mostly, you'll only be able to check the invariants
> (discriminant, etc), and for that you're probably better off using a
> specialized function: polsturm, nfdisc, nfbasis, etc.

I see no purpose for the current user interface without (..., 3).  The
result cannot be used without an additional check for the polynomial
to be monic, or the length of the result to be 2.  Thus the automatic
conversion to monic does not simplify the program at all, but makes it
harder to understand.

The only acceptable explanation for the current behaviour I can see
now would be something like

   "We are working over making all the places which accept nf to
   accept [nf,var_change] too."

but apparenlty it is not so.

> If you expect to use non-monic polynomials and insist on forgetting about the
> change of basis, use nfinit(..., 2)

But suppose I do not know?  Even in interactive mode, you may get 7
screenfuls of the output for the polynomial.

I made an experiment: I had the documentation before my eyes, but
could not understand how to use nfinit().  This is a serious datapoint
against the current user interface.  ;-)

Ilya