basis

basis(i,M) -- produce a map (of degree i) from a free k-module to M whose image is the degree i part of the module (or ring) M.
basis M -- produce a map from a free k-module to M whose image is the finite dimensional module (or ring) M.

The field k is the coefficient ring of the ring of M. The degree i may be a multi-degree, represented as a list of integers.

Alternatively, if the coefficient ring of the ring of M is ZZ, then the basis returned is a basis only modulo torsion.

i1 : R = ZZ/101[a..c];
i2 : f = basis(2,R)

o2 = {0} | a2 ab ac b2 bc c2 |

             1        ZZ 6
o2 : Matrix R  <--- (---)
                     101

A map of R-modules can be obtained by tensoring.

i3 : f ** R

o3 = {0} | a2 ab ac b2 bc c2 |

             1       6
o3 : Matrix R  <--- R
i4 : basis(2, ideal(a,b,c)/ideal(a^2,b^2,c^2))

o4 = {1} | b c 0 |
     {1} | 0 0 c |
     {1} | 0 0 0 |

o4 : Matrix
i5 : basis(R/(a^2-a*b, b^2-c^2, b*c))

o5 = {0} | 1 a ab ac ac2 b c c2 |

                         R            1        ZZ 8
o5 : Matrix (------------------------)  <--- (---)
               2         2    2               101
             (a  - a*b, b  - c , b*c)

i6 : S = ZZ/101[x,y,z,Degrees=>{{1,3},{1,4},{1,-1}}]

o6 = S

o6 : PolynomialRing
i7 : basis({7,24}, S)

o7 = {0, 0} | x4y3 |

             1        ZZ 1
o7 : Matrix S  <--- (---)
                     101

Here is another example.

i8 : R = ZZ/101[a..d]

o8 = R

o8 : PolynomialRing
i9 : f = basis(3, ideal(a^2, b^2))

o9 = {2} | a b c d 0 0 0 0 |
     {2} | 0 0 0 0 a b c d |

o9 : Matrix

Notice that the matrix of f is expressed in terms of the generators of the ideal. The reason is that the ideal is the target of f, and matrices are always expressed in terms of the generators of the target.

i10 : target f

o10 = image {0} | a2 b2 |

                                1
o10 : R - module, submodule of R

The command super is useful for getting around this.

i11 : super f

o11 = {0} | a3 a2b a2c a2d ab2 b3 b2c b2d |

              1        ZZ 8
o11 : Matrix R  <--- (---)
                      101


topindexpreviousupnext