I would define the span over the integers differently, using
"span_of_basis" to make sure it uses the basis you specify:
sage: V = ZZ^2
sage: W = V.span_of_basis(R)
sage: W
Free module of degree 2 and rank 2 over Integer Ring
User basis matrix:
[1 3]
[1 0]
sage: W.coordinates([0,3])
[1, -1]
Hi,
I take two vectors as follows:
R=[(1, 3), (1, 0)]
Then I span it over integers like
R=(ZZ^2).span(R)
It is clear that vector([0,3]) is in R.
I want to find corresponding coordinates i.e,
(1,-1). How can I find this using Sage?
Instead of integers, is it possible to span over the ring