#16613: fix content of polynomials
---------------------------------------+--------------------------
       Reporter:  vdelecroix           |        Owner:
           Type:  defect               |       Status:  needs_info
       Priority:  major                |    Milestone:  sage-6.4
      Component:  commutative algebra  |   Resolution:
       Keywords:                       |    Merged in:
        Authors:  Vincent Delecroix    |    Reviewers:
Report Upstream:  N/A                  |  Work issues:
         Branch:                       |       Commit:
   Dependencies:                       |     Stopgaps:
---------------------------------------+--------------------------

Comment (by bruno):

 I am trying to provide some code for this. I'd like opinions on two
 points:

 1. To avoid future inconsistencies, I plan to implement not only `content`
 and `content_ideal`, but also the related `primitive_part` and
 `is_primitive` for all polynomial rings with consistent semantics. Do you
 think it is appropriate to do so in this ticket, or do you think that it's
 better to stick with `content` and `content_ideal` only?

 2. What should it be the semantic for fields?

 ------
 ==== Remarks for the semantics for fields:

 Currently, there is a method `is_primitive` which uses three distinct (and
 documented!) semantics:
    * An irreducible polynomial of degree ''m'' over **F**,,p,, is
 primitive if its roots generate **F**,,p^m,,;
    * A polynomial over a ring is primitive if its coefficients generate
 the unit ideal;
    * Primitivity is undefined for polynomials over an infinite field, that
 is an exception is raised.

 I guess that there should not be any opposition for `content_ideal` to
 return the unit ideal. For `content`, I see three possibilities (there may
 be more):
    * Raise an exception;
    * Return `1` (or more precisely `self._parent.one()`);
    * Return `gcd(self.coefficients())` (knowing that `gcd(2/3,4/5)=2/15`
 with the current semantics for `gcd`.
 And I would say that in all three cases, `primitive_part` should return
 `self` divided by its content, using for content the same semantic as
 above. Finally, the case of `is_primitive` is complicated because of the
 semantic for finite fields. One possibility could be to find another name
 for this semantic for finite fields but 1. I guess that "primitive" is
 really the word used in mathematics for this property, and 2. this may
 break some existing code (and given the current discussions on sage-devel,
 I doubt the community would favor this!).

--
Ticket URL: <http://trac.sagemath.org/ticket/16613#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to