<?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>codim(Ideal) -- compute the codimension</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_codim_lp__Ideal_cm_sp__Generic_sp_eq_gt_sp..._rp.html">next</a> | <a href="_codim_lp__Coherent__Sheaf_rp.html">previous</a> | <a href="_codim_lp__Ideal_cm_sp__Generic_sp_eq_gt_sp..._rp.html">forward</a> | <a href="_codim_lp__Coherent__Sheaf_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>codim(Ideal) -- compute the codimension</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>codim I</tt></div> </dd></dl> </div> </li> <li><span>Function: <a href="_codim.html" title="compute the codimension">codim</a></span></li> <li><div class="single">Inputs:<ul><li><span><tt>I</tt>, <span>an <a href="___Ideal.html">ideal</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>, <tt>dim(R) - dim(R/I)</tt>, where <tt>R</tt> is the ring containing <tt>I</tt>.</span></li> </ul> </div> </li> <li><div class="single"><a href="_using_spfunctions_spwith_spoptional_spinputs.html">Optional inputs</a>:<ul><li><span><a href="_codim_lp__Ideal_cm_sp__Generic_sp_eq_gt_sp..._rp.html">Generic => ...</a>, </span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div><p>When R is equidimensional, this quantity is the codimension of the ideal <tt>I</tt>.</p> <table class="examples"><tr><td><pre>i1 : R = ZZ/101[a..e];</pre> </td></tr> <tr><td><pre>i2 : I = monomialCurveIdeal(R,{2,3,5,7}) 2 2 2 3 3 2 o2 = ideal (d - c*e, b*d - a*e, b*c - a*d, c d - b e, c - a*b*e, b - a*c ) o2 : Ideal of R</pre> </td></tr> <tr><td><pre>i3 : J = ideal presentation singularLocus(R/I); o3 : Ideal of R</pre> </td></tr> <tr><td><pre>i4 : codim J o4 = 4</pre> </td></tr> <tr><td><pre>i5 : radical J o5 = ideal (d, c, b, a*e) o5 : Ideal of R</pre> </td></tr> </table> The following may not be the expected result, because the ring is not equidimensional.<table class="examples"><tr><td><pre>i6 : R = QQ[x,y]/(ideal(x,y) * ideal(x-1)) o6 = R o6 : QuotientRing</pre> </td></tr> <tr><td><pre>i7 : codim ideal(x,y) o7 = 1</pre> </td></tr> </table> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_dim_lp__Ideal_rp.html" title="compute the Krull dimension">dim(Ideal)</a> -- compute the Krull dimension</span></li> <li><span><a href="_dim_lp__Ideal_rp.html" title="compute the Krull dimension">dim(MonomialIdeal)</a> -- compute the Krull dimension</span></li> <li><span><a href="_codim_lp__Monomial__Ideal_rp.html" title="compute the codimension">codim(MonomialIdeal)</a> -- compute the codimension</span></li> </ul> </div> </div> </body> </html>