<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>numgens(Ring) -- number of generators of a polynomial ring</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_num__Rows_lp__Matrix_rp.html">next</a> | <a href="_numgens_lp__Module_rp.html">previous</a> | <a href="_num__Rows_lp__Matrix_rp.html">forward</a> | <a href="_numgens_lp__Module_rp.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <hr/> <div><h1>numgens(Ring) -- number of generators of a polynomial ring</h1> <div class="single"><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>numgens R</tt></div> </dd></dl> </div> </li> <li><span>Function: <a href="_numgens.html" title="the number of generators">numgens</a></span></li> <li><div class="single">Inputs:<ul><li><span><tt>R</tt>, <span>a <a href="___Ring.html">ring</a></span></span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span><span>an <a href="___Z__Z.html">integer</a></span>, number of generators of R over the coefficient ring</span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div>If the ring <tt>R</tt> is a fraction ring or a (quotient of a) polynomial ring, the number returned is the number of generators of <tt>R</tt> over the coefficient ring. In all other cases, the number of generators is zero.<table class="examples"><tr><td><pre>i1 : numgens ZZ o1 = 0</pre> </td></tr> <tr><td><pre>i2 : A = ZZ[a,b,c];</pre> </td></tr> <tr><td><pre>i3 : numgens A o3 = 3</pre> </td></tr> <tr><td><pre>i4 : KA = frac A o4 = KA o4 : FractionField</pre> </td></tr> <tr><td><pre>i5 : numgens KA o5 = 3</pre> </td></tr> </table> If the ring is polynomial ring over another polynomial ring, then only the outermost variables are counted.<table class="examples"><tr><td><pre>i6 : B = A[x,y];</pre> </td></tr> <tr><td><pre>i7 : numgens B o7 = 2</pre> </td></tr> <tr><td><pre>i8 : C = KA[x,y];</pre> </td></tr> <tr><td><pre>i9 : numgens C o9 = 2</pre> </td></tr> </table> In this case, use the <a href="___Coefficient__Ring.html" title="name for an optional argument">CoefficientRing</a> option to <a href="_generators.html" title="provide matrix or list of generators">generators</a> to obtain the complete set of generators.<table class="examples"><tr><td><pre>i10 : g = generators(B, CoefficientRing=>ZZ) o10 = {x, y, a, b, c} o10 : List</pre> </td></tr> <tr><td><pre>i11 : #g o11 = 5</pre> </td></tr> </table> Galois fields created using <a href="___G__F.html" title="make a finite field">GF</a> have zero generators, but their underlying polynomial ring has one generators.<table class="examples"><tr><td><pre>i12 : K = GF(9,Variable=>a) o12 = K o12 : GaloisField</pre> </td></tr> <tr><td><pre>i13 : numgens K o13 = 1</pre> </td></tr> <tr><td><pre>i14 : R = ambient K o14 = R o14 : QuotientRing</pre> </td></tr> <tr><td><pre>i15 : numgens R o15 = 1</pre> </td></tr> </table> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_generators.html" title="provide matrix or list of generators">generators</a> -- provide matrix or list of generators</span></li> <li><span><a href="_minimal__Presentation.html" title="compute a minimal presentation">minimalPresentation</a> -- compute a minimal presentation</span></li> <li><span><a href="___G__F.html" title="make a finite field">GF</a> -- make a finite field</span></li> <li><span><a href="_ambient.html" title="ambient free module of a subquotient, or ambient ring">ambient</a> -- ambient free module of a subquotient, or ambient ring</span></li> </ul> </div> </div> </body> </html>