#14496: unify the three implementations of gaussian q-binomial coefficients
-----------------------------+----------------------------------------------
   Reporter:  chapoton       |             Owner:  tbd              
       Type:  task           |            Status:  new              
   Priority:  major          |         Milestone:  sage-5.10        
  Component:  PLEASE CHANGE  |          Keywords:  gaussian binomial
Work issues:                 |   Report Upstream:  N/A              
  Reviewers:                 |           Authors:                   
  Merged in:                 |      Dependencies:                   
   Stopgaps:                 |  
-----------------------------+----------------------------------------------
 In sage 5.8, one can find the gaussian q-binomial coefficients in (at
 least) '''three''' places :

 - sage.combinat.sf.kfpoly.q_bin
 - sage.combinat.q_analogues.q_binomial
 - sage.rings.arith.gaussian_binomial

 The syntax is not quite the same for q_bin as for the two others.

 Some timings:
 {{{
 sage: timeit("sage.combinat.sf.kfpoly.q_bin(7,5)")
 625 loops, best of 3: 819 µs per loop
 sage: timeit("sage.combinat.q_analogues.q_binomial(12,5)")
 625 loops, best of 3: 1.12 ms per loop
 sage: timeit("sage.rings.arith.gaussian_binomial(12,5)")
 625 loops, best of 3: 294 µs per loop
 }}}
 The parents :
 {{{
 sage: sage.combinat.sf.kfpoly.q_bin(7,5).parent()
 Fraction Field of Univariate Polynomial Ring in t over Integer Ring
 sage: sage.combinat.q_analogues.q_binomial(12,5).parent()
 Univariate Polynomial Ring in q over Integer Ring
 sage: sage.rings.arith.gaussian_binomial(12,5).parent()
 Fraction Field of Univariate Polynomial Ring in q over Integer Ring
 }}}
 The behaviour with an added integer parameter
 {{{
 sage: sage.combinat.sf.kfpoly.q_bin(7,5,2)
 114429029715
 sage: sage.combinat.q_analogues.q_binomial(12,5,2)
 DOES NOT WORK
 sage: sage.rings.arith.gaussian_binomial(12,5,2)
 114429029715
 }}}
 The behaviour with a polynomial parameter
 {{{
 sage: w=polygen(ZZ,'w')
 sage: sage.combinat.sf.kfpoly.q_bin(4,2,w)
 w^8 + w^7 + 2*w^6 + 2*w^5 + 3*w^4 + 2*w^3 + 2*w^2 + w + 1
 sage: sage.combinat.q_analogues.q_binomial(6,2,w)
 w^8 + w^7 + 2*w^6 + 2*w^5 + 3*w^4 + 2*w^3 + 2*w^2 + w + 1
 sage: sage.rings.arith.gaussian_binomial(6,2,w)
 w^8 + w^7 + 2*w^6 + 2*w^5 + 3*w^4 + 2*w^3 + 2*w^2 + w + 1
 sage: sage.combinat.sf.kfpoly.q_bin(4,2,w).parent()
 Univariate Polynomial Ring in w over Integer Ring
 sage: sage.combinat.q_analogues.q_binomial(6,2,w).parent()
 Univariate Polynomial Ring in w over Integer Ring
 sage: sage.rings.arith.gaussian_binomial(6,2,w).parent()
 Fraction Field of Univariate Polynomial Ring in w over Integer Ring
 }}}

 Maybe it would be better to have a single function ?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14496>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to