<?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>fraction fields</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_finite_spfield_spextensions.html">next</a> | <a href="_factoring_sppolynomials.html">previous</a> | <a href="_finite_spfield_spextensions.html">forward</a> | <a href="_factoring_sppolynomials.html">backward</a> | <a href="_rings.html">up</a> | <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> <div><a href="index.html" title="">Macaulay2Doc</a> > <a href="_rings.html" title="">rings</a> > <a href="_fraction_spfields.html" title="">fraction fields</a></div> <hr/> <div><h1>fraction fields</h1> <div>The fraction field of a ring (which must be an integral domain) is obtained with the function <a href="_frac.html" title="construct a fraction field">frac</a>.<table class="examples"><tr><td><pre>i1 : frac ZZ o1 = QQ o1 : Ring</pre> </td></tr> <tr><td><pre>i2 : R = ZZ/101[x,y]/(x^3 + 1 + y^3) o2 = R o2 : QuotientRing</pre> </td></tr> <tr><td><pre>i3 : frac R o3 = frac(R) o3 : FractionField</pre> </td></tr> </table> After defining a ring such as <tt>R</tt>, fractions in its fraction field can be obtained by writing them explicitly.<table class="examples"><tr><td><pre>i4 : x o4 = x o4 : R</pre> </td></tr> <tr><td><pre>i5 : 1/x 1 o5 = - x o5 : frac(R)</pre> </td></tr> <tr><td><pre>i6 : x/1 o6 = x o6 : R</pre> </td></tr> </table> Alternatively, after applying the function <a href="_use.html" title="install or activate object">use</a>, or assigning the fraction ring to a global variable, the symbols you used become associated with the corresponding elements of the fraction field.<table class="examples"><tr><td><pre>i7 : use frac R o7 = frac(R) o7 : FractionField</pre> </td></tr> <tr><td><pre>i8 : x o8 = x o8 : frac(R)</pre> </td></tr> </table> Fractions are reduced to the extent possible. This is done by computing the syzygies between the numerator and denominator, and picking one of low degree.<table class="examples"><tr><td><pre>i9 : f = (x-y)/(x^6-y^6) -1 o9 = ------------- 2 2 x + x*y + y o9 : frac(R)</pre> </td></tr> <tr><td><pre>i10 : (x^3 - y^3) * f o10 = - x + y o10 : frac(R)</pre> </td></tr> </table> The parts of a fraction may be extracted.<table class="examples"><tr><td><pre>i11 : numerator f o11 = -1 o11 : R</pre> </td></tr> <tr><td><pre>i12 : denominator f 2 2 o12 = x + x*y + y o12 : R</pre> </td></tr> </table> Alternatively, the functions <a href="_lift.html" title="lift to another ring">lift</a> and <a href="_liftable.html" title="whether lifting to another ring is possible">liftable</a> can be used.<table class="examples"><tr><td><pre>i13 : liftable(1/f,R) o13 = true</pre> </td></tr> <tr><td><pre>i14 : liftable(f,R) o14 = false</pre> </td></tr> <tr><td><pre>i15 : lift(1/f,R) 2 2 o15 = - x - x*y - y o15 : R</pre> </td></tr> </table> Note that computations, such as Gröbner bases, over fraction fields can be quite slow.</div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_frac.html" title="construct a fraction field">frac</a> -- construct a fraction field</span></li> <li><span><a href="_numerator.html" title="numerator of a fraction">numerator</a> -- numerator of a fraction</span></li> <li><span><a href="_denominator.html" title="denominator of a fraction">denominator</a> -- denominator of a fraction</span></li> <li><span><a href="_liftable.html" title="whether lifting to another ring is possible">liftable</a> -- whether lifting to another ring is possible</span></li> <li><span><a href="_lift.html" title="lift to another ring">lift</a> -- lift to another ring</span></li> <li><span><a href="_kernel_lp__Ring__Map_rp.html" title="kernel of a ringmap">kernel(RingMap)</a> -- kernel of a ringmap</span></li> </ul> </div> </div> </body> </html>