#11411: some q binomial coefficients should be zero
------------------------------+---------------------------------------------
   Reporter:  chapoton        |          Owner:  sage-combinat     
       Type:  defect          |         Status:  needs_review      
   Priority:  minor           |      Milestone:                    
  Component:  combinatorics   |       Keywords:                    
Work_issues:                  |       Upstream:  N/A               
   Reviewer:  Florent Hivert  |         Author:  Frédéric  Chapoton
     Merged:                  |   Dependencies:                    
------------------------------+---------------------------------------------
Description changed by chapoton:

Old description:

> I have found the following behaviour:
>
> {{{
> sage: import sage.combinat.q_analogues as qa
> sage: qa.q_binomial(2,-1)
> 1/(q^2 + q + 1)
> sage: binomial(2,-1)
> 0
> sage: qa.q_binomial(2,3)
> 1/(q^2 + q + 1)
> sage: binomial(2,3)
> 0
> }}}
> I think these q-binomials should rather be zero. The q-binomial is based
> on the q-factorial, where one finds the following behaviour
>
> {{{
> sage: [qa.q_factorial(-i) for i in range(6)]
> [1, 1, 1, 1, 1, 1]
> }}}
>
> This seems to be rather wrong, as the factorial itself is infinite for
> negative integers.
>
> The patch restricts the q-factorial to nonnegative arguments and defines
> q-binomials outside of the correct range to be zero.
>
> Apply:
>
>   * [attachment:trac_11411-correction_q_analogues_fc.patch]
>   * [attachment:trac_11411-q_analogues-review-fh.patch]

New description:

 I have found the following behaviour:

 {{{
 sage: import sage.combinat.q_analogues as qa
 sage: qa.q_binomial(2,-1)
 1/(q^2 + q + 1)
 sage: binomial(2,-1)
 0
 sage: qa.q_binomial(2,3)
 1/(q^2 + q + 1)
 sage: binomial(2,3)
 0
 }}}
 I think these q-binomials should rather be zero. The q-binomial is based
 on the q-factorial, where one finds the following behaviour

 {{{
 sage: [qa.q_factorial(-i) for i in range(6)]
 [1, 1, 1, 1, 1, 1]
 }}}

 This seems to be rather wrong, as the factorial itself is infinite for
 negative integers.

 The patch restricts the q-factorial to nonnegative arguments and defines
 q-binomials outside of the correct range to be zero.

 Apply:
   * [attachment:trac_11411-correction_q_analogues_fc.patch]

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11411#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 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