Home Online Manual
Top
Back: gcd
Forward: getdump
FastBack: Functions and system variables
FastForward: Control structures
Up: Functions
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

5.1.49 gen

Syntax:
gen ( int_expression )
Type:
vector
Purpose:
returns the i-th free generator of a free module.
Example:
 
  ring r=32003,(x,y,z),(c,dp);
  gen(3);
==> [0,0,1]
  vector v=gen(5);
  poly f=xyz;
  v=v+f*gen(4); v;
==> [0,0,0,xyz,1]
  ring rr=32003,(x,y,z),dp;
  fetch(r,v);
==> xyz*gen(4)+gen(5)
See freemodule; int; vector.