Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 5289

Macaulay2-1.3.1-8.fc15.i686.rpm

<?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>use(Ring) -- install ring variables and ring operations</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="___Use__Hilbert__Function.html">next</a> | <a href="_use_lp__Package_rp.html">previous</a> | <a href="___Use__Hilbert__Function.html">forward</a> | <a href="_use_lp__Package_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>use(Ring) -- install ring variables and ring operations</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>use R</tt></div>
</dd></dl>
</div>
</li>
<li><span>Function: <a href="_use.html" title="install or activate object">use</a></span></li>
<li><div class="single">Inputs:<ul><li><span><tt>R</tt>, <span>a <a href="___Ring.html">ring</a></span> or <span>a <a href="___Monoid.html">monoid</a></span></span></li>
</ul>
</div>
</li>
<li><div class="single">Consequences:<ul><li>All variables of <tt>R</tt> are set to global variables.  Additionally, certain operations creating elements of <tt>R</tt> are installed globally.</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div>When a ring (or a monoid) is assigned to a global variable, this function is automatically called for it.<p/>
It is possible to have several polynomial rings defined, perhaps with a variable belonging to several rings.<table class="examples"><tr><td><pre>i1 : R = QQ[a..d]

o1 = R

o1 : PolynomialRing</pre>
</td></tr>
<tr><td><pre>i2 : S = QQ[b,c,d,e]

o2 = S

o2 : PolynomialRing</pre>
</td></tr>
<tr><td><pre>i3 : b

o3 = b

o3 : S</pre>
</td></tr>
</table>
At this point, b is thought to be a variable of S.  If one typed <tt>a+b</tt>, an error would occur, since Macaulay2 doesn't know how to add elements of R and S together.  This is fixed via:<table class="examples"><tr><td><pre>i4 : use R

o4 = R

o4 : PolynomialRing</pre>
</td></tr>
<tr><td><pre>i5 : b

o5 = b

o5 : R</pre>
</td></tr>
<tr><td><pre>i6 : a+b

o6 = a + b

o6 : R</pre>
</td></tr>
</table>
<p/>
There are several functions that create rings for you.  Generally, their variables are not globally visible.  However, once you 'use' the ring, the variables are available.For example, the numerator of the Hilbert function is a polynomial in a ring with a variable T.<table class="examples"><tr><td><pre>i7 : T

o7 = T

o7 : Symbol</pre>
</td></tr>
<tr><td><pre>i8 : hf = poincare ideal vars S

                2     3    4
o8 = 1 - 4T + 6T  - 4T  + T

o8 : ZZ[T]</pre>
</td></tr>
<tr><td><pre>i9 : T

o9 = T

o9 : Symbol</pre>
</td></tr>
<tr><td><pre>i10 : use ring hf

o10 = ZZ[T]

o10 : PolynomialRing</pre>
</td></tr>
<tr><td><pre>i11 : T

o11 = T

o11 : ZZ[T]</pre>
</td></tr>
</table>
</div>
</div>
<div class="single"><h2>Caveat</h2>
<div>Any values stored in the variables that have been assigned to are lost.</div>
</div>
<div class="single"><h2>See also</h2>
<ul><li><span><a href="___Global__Assign__Hook.html" title="hook for assignment to global variables">GlobalAssignHook</a> -- hook for assignment to global variables</span></li>
</ul>
</div>
</div>
</body>
</html>