The fraction field of a ring (which must be an integral domain) is obtained with the function frac.

After defining a ring such as `R`, fractions in its fraction field can be obtained by writing them explicitly.

Alternatively, after applying the function use, or assigning the fraction ring to a global variable, the symbols you used become associated with the corresponding elements of the fraction field.

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.

The parts of a fraction may be extracted.

Alternatively, the functions lift and liftable can be used.

Note that computations, such as GrÃ¶bner bases, over fraction fields can be quite slow.

i1 : frac ZZ o1 = QQ o1 : Ring |

i2 : R = ZZ/101[x,y]/(x^3 + 1 + y^3) o2 = R o2 : QuotientRing |

i3 : frac R o3 = frac R o3 : FractionField |

i4 : x o4 = x o4 : R |

i5 : 1/x 1 o5 = - x o5 : frac R |

i6 : x/1 o6 = x o6 : R |

i7 : use frac R o7 = frac R o7 : FractionField |

i8 : x o8 = x o8 : frac R |

i9 : f = (x-y)/(x^6-y^6) -1 o9 = ------------- 2 2 x + x*y + y o9 : frac R |

i10 : (x^3 - y^3) * f o10 = - x + y o10 : frac R |

i11 : numerator f o11 = -1 o11 : R |

i12 : denominator f 2 2 o12 = x + x*y + y o12 : R |

i13 : liftable(1/f,R) o13 = true |

i14 : liftable(f,R) o14 = false |

i15 : lift(1/f,R) 2 2 o15 = - x - x*y - y o15 : R |

- frac -- construct a fraction field
- numerator -- numerator of a fraction
- denominator -- denominator of a fraction
- liftable -- whether lifting to another ring is possible
- lift -- lift to another ring
- kernel(RingMap) -- kernel of a ringmap