Am Montag, 17. Juni 2019 14:27:40 UTC+2 schrieb luisfe: > > On Mon, Jun 17, 2019 at 5:18 AM Peter Luschny <peter....@gmail.com> wrote: >> >>> def ib(m, n): return sum(binomial(m*n-1, m*k)*OmegaPolynomial(m,k) for k >>> in (0..n-1)) >>> >>> The terms "binomial(m*n-1, m*k)*OmegaPolynomial(m,k)" are of type >>> <type >>> 'sage.rings.polynomial.polynomial_integer_dense_flint.Polynomial_integer_dense_flint' >>> >> >> But shouldn't it return the null polynomial in this case? >> And isn't the null polynomial represented by the empty list? >> >> No, because sum has no way to know that you are expecting a polynomial. >
How that? Look at the output above. Sage *knows* that the terms of the sum are polynomials. So it should return the zero of that ring, which is the null polynomial. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/234ad335-771b-48ff-86c3-ab392a274ac0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.