[next][previous][up][top][index]
search for:

generators Module -- matrix of generators

Synopsis:

  • Usage: g = generators M
  • Function: generators -- matrix of generators
  • Input:
  • M, an instance of class Module.
  • Output:
  • g, an instance of class Matrix: the matrix of generators of M.
  • Every module in Macaulay2 has, at least implicitly, a generator matrix and a matrix of relations, both of which are matrices between free modules. This function returns the generator matrix.

    i1 : R = GF(8)

    o1 = R

    o1 : GaloisField

    i2 : f = R_0 ++ R_0^2 ++ R_0^3 ++ R_0^4

    o2 = | $a 0    0    0       |
         | 0  $a^2 0    0       |
         | 0  0    $a+1 0       |
         | 0  0    0    $a^2+$a |

                 4       4
    o2 : Matrix R  <--- R

    i3 : generators(image f)

    o3 = | $a 0    0    0       |
         | 0  $a^2 0    0       |
         | 0  0    $a+1 0       |
         | 0  0    0    $a^2+$a |

                 4       4
    o3 : Matrix R  <--- R

    i4 : generators(cokernel f)

    o4 = | 1 0 0 0 |
         | 0 1 0 0 |
         | 0 0 1 0 |
         | 0 0 0 1 |

                 4       4
    o4 : Matrix R  <--- R

    Caveat:

  • This function returns a matrix with the given generators. This set of generators may not be minimal, or sorted in any particular order. Use trim Module or mingens Module instead.
  • See also:

  • relations Module -- the defining relations
  • Code:

         -- ../../../Macaulay2/m2/matrix.m2:636
         generators Module := Matrix => M -> if M.?generators then M.generators else id_(ambient M)

    [next][previous][up][top][index]
    search for: