Where to put height function for polynomials

42 views
Skip to first unread message

Jing Guo

unread,
Jun 23, 2022, 12:24:41 AM6/23/22
to sage-devel
Hi,

I am contributing to Sage via GSoC this summer. As part of my work, I am implementing the (global) height on polynomials for number fields. After looking into relevant functions, such as degrees and coefficients, my mentors and I think the following three files can be the candidates:

multi_polynomial_element.py
multi_polynomial_libsingular.pyx
polynomial_element.pyx

So I was wondering which one of them would be the best place to put (global) height function on polynomials for number fields?

Thank you for your time.


Jing

John Cremona

unread,
Jun 23, 2022, 3:58:01 AM6/23/22
to SAGE devel
If there was a specific class for polynomials over number fields, it
would go there, but I don't think there is. I suggest putting the
code into a new file in rings/number_field, but then adding a method
to the relevant polynomial classes which checks that the base ring is
a number field and calls the new function if so, raising an error if
not.

It is probably worth looking at the factor() method in
rings/polynomial/polynomial_element.pyx and reading the comments
there, for a model of a rather bad way to do this.

John

>
> Jing
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/a37e5961-e3f9-49d5-b251-2e7bd5573cf2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages