Ask Your Question

Johannes Schmitt's profile - activity

2020-04-19 12:05:21 +0200 received badge  Good Question (source)
2020-04-17 22:46:25 +0200 received badge  Nice Question (source)
2020-04-17 22:31:48 +0200 received badge  Student (source)
2020-04-17 21:18:47 +0200 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:

        return IntegerVectors_nnondescents(n, tuple(k))
    except TypeError:

    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-20 05:36:59 +0200 received badge  Notable Question (source)
2017-09-12 16:00:05 +0200 received badge  Popular Question (source)
2014-01-27 09:39:44 +0200 received badge  Supporter (source)
2014-01-27 07:12:44 +0200 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


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.