next | previous | forward | backward | up | top | index | toc | Macaulay2 website
ExactCouples :: declareGenerators

declareGenerators -- builds a free module and names its generators

Synopsis

Description

Useful for declaring many variables at once.

i1 : declareGenerators(ZZ[x],{a => 1,b => 2,c => 3})

            3
o1 = (ZZ[x])

o1 : ZZ[x]-module, free, degrees {3, 1..2}
i2 : cospan(x*a-2*b,x*b-2*c)

o2 = cokernel {3} | 0  -2 |
              {1} | x  0  |
              {2} | -2 x  |

                                      3
o2 : ZZ[x]-module, quotient of (ZZ[x])

Caveat

This function gives an error if any of the variables already have values.

See also

Ways to use declareGenerators:

For the programmer

The object declareGenerators is a method function.