#16464: cyclotomic_cosets for any finite ring
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  vdelecroix             |       Status:  needs_info
           Type:         |    Milestone:  sage-6.3
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:         |    Reviewers:
  number theory          |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  b07ad014b69fc326233a570e41fbdad93402049c
  Vincent Delecroix      |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  public/16464           |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by vdelecroix):

 Replying to [comment:12 ncohen]:
 > A new commit, with two questions :
 >
 > 1)
 >
 > {{{
 > +    if n <= 2 or not n.is_prime():
 > +        raise ValueError("the argument n must be an odd prime")
 > }}}
 >
 > Why don't you test that `n` is odd ?

 Hum. If n is prime and not 2 it is necessarily odd.

 > 2) Why would this be allowed ? It really does NOT have the same
 behaviour.
 >
 > {{{
 > -    n = max(S1+S2)+1
 > -    if not(is_a_splitting(S1,S2,n)):
 > +    n = len(S1) + len(S2) + 1
 > +    if not is_a_splitting(S1,S2,n):
 > }}}

 It does. `is_a_splitting(S1,S2,n)` answers `True` if the input is a
 partition `(S1,S2)` of `{1,...,n-1}` (+ a condition on the partition). So
 I just changed the code to avoid the concatenation and the max.

 Do you agree?

--
Ticket URL: <http://trac.sagemath.org/ticket/16464#comment:15>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to