Coordinates in a free submodule
I am working with free ℤ-modules that are presented a submodules of ℤ^n, for example:
A = Matrix([[1, 1, 1]])
V = A.right_kernel()
When creating this ℤ-module Sage computes a basis
(in this case [(1, 0, -1), (0, 1, -1)])
.
I can also create elements of V
as follows :
v = V([2, -1, -1])
but then I could not find a way to get the coordinates of v
in the basis of V
.
Is there a function somewhere in Sage that does this?