id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
11411 some q binomial coefficients should be zero chapoton sage-combinat "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]
" defect closed minor sage-4.7.2 combinatorics fixed chapoton sage-combinat sage-4.7.2.alpha0 Frédéric Chapoton Florent Hivert N/A