On Sep 14, 3:47 pm, Sebastian Pancratz <s...@pancratz.org> wrote:
> 1.
>
> Given rational polynomials a and b, what should gcd(a,b) return?  The
> problem arises since the gcd is only defined up to rational units.  I
> think the two sound options are either the monic normalisation, or a

I think any mathematician would first expect a monic polynomial to be
returned and be quite surprised by a non-monic answer.

> Personally, I would be in favour of the second choice, because in the
> new implementation using FLINT, the polynomial is represented as an
> integer polynomial with a positive integer denominator coprime to the
> content of the numerator.  If in a higher level block of code calls
> are made to gcd on a frequent basis, this would be faster than if gcd
> always had to return the monic version.

So perhaps also offer integral_gcd and document that this is faster
because it is closer to the internal representation?

>   - Polynomials over Z/nZ via FLINT:  Not quite sure, except that gcd
> (a,0) == a and gcd(0,b) == b.  By the way, working in (Z/27Z)[t], gcd
> (3*t+2, (3*t+2)*(t^3 + t - 1)) returns 1, which looks like a bug.  In

If n is not prime then $Z/nZ$ is not a PID anymore, so you can't
really expect that the gcd can be represented by a single generator.
The same problem arises over Z, but there people seem to be content
with getting back the biggest principal ideal that extends to the
correct ideal over $Q$.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to