2020-04-19 05:05:21 -0500 received badge ● Good Question (source) 2020-04-17 15:46:25 -0500 received badge ● Nice Question (source) 2020-04-17 15:31:48 -0500 received badge ● Student (source) 2020-04-17 14:18:47 -0500 asked a question Error with rational input in IntegerVectors I discovered the following unexpected behavior of IntegerVectors: sage: IntegerVectors(2,3).list() [[2, 0, 0], [1, 1, 0], [1, 0, 1], [0, 2, 0], [0, 1, 1], [0, 0, 2]] sage: IntegerVectors(2,3/1).list() [[2, 0, 0], [1, 1, 0]]  The relevant code block in the implementation of IntegerVectors seems to be the following:  try: return IntegerVectors_nnondescents(n, tuple(k)) except TypeError: pass return IntegerVectors_nk(n, k)  For k=3/1 one has that tuple(k) does not give a TypeError (as opposed to tuple(3)) and thus the code never tries to interpret k as an integer. 2020-01-19 22:36:59 -0500 received badge ● Notable Question (source) 2017-09-12 09:00:05 -0500 received badge ● Popular Question (source) 2014-01-27 02:39:44 -0500 received badge ● Supporter (source) 2014-01-27 00:12:44 -0500 asked a question Linear subspace of polynomial ring I am trying to compute a QQ-linear subspace W of a polynomial ring R over QQ. However, R does not seem to have a method like subspace. So what I would like to do is R=PolynomialRing(QQ,'x',3) x=R.gens() W=R.subspace([x[0]^2,3*x[1]+x[0]])  For further purposes I still want to apply functions defined on the ring R to elements of W but also apply linear algebra methods (linear maps, eigenspaces, ...) to W. I am sorry to bother you with this, it should be very easy, but I did not find a way to do it.