### 5.1.46 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.

User manual for Singular version 4-0-3, 2016, generated by texi2html.