Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » lists and sequences » BasicList » RingElement » RingElement / RingElement
next | previous | forward | backward | up | index | toc

RingElement / RingElement -- fraction

Description

If either f or g is in a base ring of the other, then that one is promoted so that both are elements in the same ring R.

The fraction will be an element of the fraction field, frac R, of R. If R is already a field, then this means that the fraction will be an element of R.
i1 : 4/2

o1 = 2

o1 : QQ
i2 : R = GF(9,Variable=>a);
i3 : (a/a^3) * a^2 == 1

o3 = true
i4 : S = ZZ[a,b]

o4 = S

o4 : PolynomialRing
i5 : (a^6-b^6)/(a^9-b^9)

          3    3
         a  + b
o5 = --------------
      6    3 3    6
     a  + a b  + b

o5 : frac S
If the ring contains zero divisors, the fraction field is not defined. Macaulay2 will not inform you of this right away. However, if computation finds a zero-divisor, an error message is generated.
i6 : A = ZZ/101[a,b]/(a*b)

o6 = A

o6 : QuotientRing
i7 : (a+b)/(a-b)

     -b
o7 = --
      b

o7 : frac A
At this point, if one types a/b, then Macaulay2 would give an error saying that a zero divisor was found in the denominator.

See also

Ways to use this method:


The source of this document is in Macaulay2Doc/operators/division.m2:187:0.