Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » Type » Ring » generators(Ring)
next | previous | forward | backward | up | index | toc

# generators(Ring) -- the list of generators of a ring

- Function: generators
- Usage:
    `generators R`
    `gens R`
- Inputs:
  - R, a ring
- Optional inputs:
  - CoefficientRing => a ring, default value null, the coefficient ring over which to provide the generators of R, if different from the most recent one
- Outputs:
  - a list, of generators

## Description

    i1 : A = QQ[x,y];

    i2 : gens A

    o2 = {x, y}

    o2 : List

    i3 : kk = toField(QQ[t]/(t^3-t-1));

    i4 : B = kk[x,y,z];

    i5 : generators B

    o5 = {x, y, z}

    o5 : List

    i6 : generators(B, CoefficientRing => QQ)

    o6 = {x, y, z, t}

    o6 : List

## Ways to use this method:

- generators(Ring) -- the list of generators of a ring

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/functions/generators-doc.m2:164:0.