#9108: Mark long doctests in rings/polynomial/symmetric_ideal
-----------------------------------+----------------------------------------
   Reporter:  leif                 |       Owner:  malb                         
                      
       Type:  defect               |      Status:  positive_review              
                      
   Priority:  minor                |   Milestone:  sage-4.4.3                   
                      
  Component:  commutative algebra  |    Keywords:  time-out, doctest, symmetric 
ideal, symmetric_ideal
     Author:                       |    Upstream:  N/A                          
                      
   Reviewer:                       |      Merged:                               
                      
Work_issues:                       |  
-----------------------------------+----------------------------------------

Comment(by SimonKing):

 Replying to [comment:5 cremona]:
 > Interesting to note that it is essentially just one test which takes the
 time!

 Off list, Leif just sent me some timings:

 There is one symmetric Groebner basis computation that takes 73 seconds,
 but most of the time is actually spent for testing whether all variable
 permutations of all basis elements do indeed have symmetric reduction zero
 modulo the symmetric Groebner basis: 130 s.

 I see two ways to proceed, depending on how soon the next release is due:

  1. Leif's patch could go in, as John gave it a positive review, and it is
 certainly harmless and solves the problem.
  2. I could try to find a solution for the one offending doc test. For
 example, the long Groebner basis computation could be replaced by
 something else, such us the following, of course without the timings that
 I just inserted for demonstration:
  {{{
 sage: R.<x,y> = InfinitePolynomialRing(GF(5),order='degrevlex')
 sage: I = [2*x[4]*x[3]*y[4] - 2*y[0]^3]*R
 sage: %time G = I.groebner_basis()
 CPU times: user 1.70 s, sys: 0.01 s, total: 1.71 s
 Wall time: 1.71 s
 sage: G
 [x_2*x_1*y_1 - y_0^3, x_2*x_1*y_2 - y_0^3, y_2*y_0^3 - y_1*y_0^3]
 sage: %time [[(p^P).reduce(G) for p in G] for P in
 Permutations(Integer(3))]
 CPU times: user 1.38 s, sys: 0.00 s, total: 1.38 s
 Wall time: 1.38 s
 [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]]
  }}}

 I think this example would actually be a good one, as it shows:

  * Even a "principal" symmetric ideal may have a reduced symmetric
 Groebner basis formed by more than one element.
  * The test whether the elements still reduce to zero after variable
 permutation is easier, since the maximal variable index can be smaller (3
 instead of 4; it should be bigger than the maximal index 2 that occurs in
 the symmetric Groebner basis).

 So, if the next release will be soon, I suggest to take Leif's patch as it
 is. But I think in the long run, a new example (like the one above) is
 needed.

 Concerning line lengths: Does this only concern the first line of the doc
 strings? I know that my first lines tend to be rather lengthy, as I learnt
 that the basic description of the functionality should be given in the
 first line of the doc string (this is why I don't do a line wrap).

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9108#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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to