#20370: generic GCD-free basis
-------------------------------------+-------------------------------------
       Reporter:  mmezzarobba        |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.2
      Component:  algebra            |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Marc Mezzarobba    |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/mmezzarobba/20370-gcd_free_basis |  a0a246ad399f4e2bd9c69d32e91fd8de1321c7fa
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by bruno):

 Replying to [comment:3 mmezzarobba]:
 > Hi Bruno,
 >
 > Replying to [comment:2 bruno]:
 > > Salut Marc ! I have doubts concerning the return type of this new
 function. First, I always wonder one should use Python's `set` or Sage's
 `Set`. But also I wonder whether these bases should be returned as sets:
 In all cases I've found (≠ all cases, probably), bases are returned as
 lists (or `PolynomialSequence_generic` for polynomials) and not sets.
 Wouldn't it be more consistent to return a list there too?
 >
 > Thanks for your comment. I have no opinion on the matter, and I'd be
 happy to change the return type to whatever you prefer.

 I propose you to return a `Sequence` with `universe=self`.

 Another (minor) point: If the elements in the sequence do not belong to
 `self`, the exception is not very clear. For instance:

 {{{#!python
 sage: R.<x> = QQ[]
 sage: QQ.gcd_free_basis([x+1,x+2])
 Traceback (most recent call last):
 ...
 TypeError: not a constant polynomial
 }}}

 You may catch the exception and raise your own `TypeError: the elements
 you provided do not belong to QQ` (or something similar). Actually I ran
 into the exact example I paste above...

 Apart from this remarks, this looks good to me!

--
Ticket URL: <http://trac.sagemath.org/ticket/20370#comment:4>
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