Ask Your Question

Revision history [back]

Coordinates in a free submodule

I am working with free ZZ-modules that are presented a submodules of ZZ^n, for example :

A = Matrix([[1,1,1]]) ; V = A.right_kernel()

When creating this ZZ-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?

Coordinates in a free submodule

I am working with free ZZ-modules ℤ-modules that are presented a submodules of ZZ^n, ℤ^n, for example : example:

A = Matrix([[1,1,1]]) ; Matrix([[1, 1, 1]])
V = A.right_kernel()

A.right_kernel()

When creating this ZZ-module ℤ-module Sage computes a basis basis (in this case [(1,0,-1), (0,1-1)]). [(1, 0, -1), (0, 1, -1)]).

I can also create elements of V V as follows :

v = V([2,-1,-1])

V([2, -1, -1])

but then I could not find a way to get the coordinates of v v in the basis of V. V.

Is there a function somewhere in Sage that does this? this?