up previous next
CanonicalBasis    --    canonical basis of a free module


Syntax
CanonicalBasis(F: MODULE): LIST of MODULEELEM

Description
CanonicalBasis(F) return a list of the canonical basis elements of the free module F: i.e. the k-th element in the list is the unit vector with a 1 in the k-th coordinate.

Example
/**/  use R ::= QQ[x,y];
/**/  F := NewFreeModule(R,2);
/**/  e := CanonicalBasis(F);
/**/  e[2];
[0, 1]

See Also