#5453: [with patch, needs review] Create a ring for working with polynomials in
countably infinitely many variables
---------------------------------+------------------------------------------
 Reporter:  mhansen              |       Owner:  mhansen   
     Type:  enhancement          |      Status:  assigned  
 Priority:  major                |   Milestone:  sage-3.4.2
Component:  commutative algebra  |    Keywords:            
---------------------------------+------------------------------------------

Comment(by SimonKing):

 (Concerning the patches: Please first apply {{{trac_5453.patch}}} and then
 {{{symmetric_polynomial.patch}}}. The third patch is now obsolete.)

 I sorted the above mentioned import problem out (import of
 {{{Permutation_class}}}). Instead of importing this class and doing
 {{{is_instance}}}, I now test the presence of the attribute
 {{{to_cycles()}.

 And, to my surprise, the arithmetics is faster than the "dense"
 implementation. I don't know the reason.
 Here, I make some very basic timings for {{{InfinitePolynomialRing}}}
 versus {{{SymmetricPolynomialRing}}}:
 {{{
 sage: X.<x,y> = SymmetricPolynomialRing(QQ)
 sage: Y.<a,b> = InfinitePolynomialRing(QQ)
 sage: p=x[10]*y[2]^3+2*x[1]*y[3]
 sage: p2=x[100]*y[20]^3+2*x[10]*y[30]
 sage: q=a[10]*b[2]^3+2*a[1]*b[3]
 sage: q2=a[100]*b[20]^3+2*a[10]*b[30]
 sage: timeit('r=p*p2')
 625 loops, best of 3: 1.15 ms per loop
 sage: timeit('r=q*q2')
 125 loops, best of 3: 3.68 ms per loop
 sage: timeit('r=p+p2')
 625 loops, best of 3: 1.14 ms per loop
 sage: timeit('r=q+q2')
 125 loops, best of 3: 3.69 ms per loop
 }}}

 Cheers,
   Simon

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5453#comment:17>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
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