| Home | Trees | Indices | Help |
|---|
|
|
Fraction Field of Integral Domains
AUTHOR: William Stein (with input from David Joyner, David Kohel, and
Joe Wetherell)
EXAMPLES:
Quotienting is a constructor for an element of the fraction field:
sage: R.<x> = QQ[]
sage: (x^2-1)/(x+1)
x - 1
sage: parent((x^2-1)/(x+1))
Fraction Field of Univariate Polynomial Ring in x over Rational Field
The GCD is not taken (since it doesn't converge sometimes) in the inexact case.
sage: Z.<z> = CC[]
sage: I = CC.gen()
sage: (1+I+z)/(z+0.1*I)
(1.00000000000000*z + 1.00000000000000 + 1.00000000000000*I)/(1.00000000000000*z + 0.100000000000000*I)
sage: (1+I*z)/(z+1.1)
(1.00000000000000*I*z + 1.00000000000000)/(1.00000000000000*z + 1.10000000000000)
TESTS:
sage: F = FractionField(IntegerRing())
sage: F == loads(dumps(F))
True
sage: F = FractionField(PolynomialRing(RationalField(),'x'))
sage: F == loads(dumps(F))
True
sage: F = FractionField(PolynomialRing(IntegerRing(),'x'))
sage: F == loads(dumps(F))
True
sage: F = FractionField(PolynomialRing(RationalField(),2,'x'))
sage: F == loads(dumps(F))
True
|
|||
|
FractionField_generic The fraction field of an integral domain. |
|||
|
|||
|
|||
|
|||
|
|||
Create the fraction field of the integral domain R.
INPUT:
R -- an integral domain
names -- ignored
EXAMPLES:
We create some example fraction fields.
sage: FractionField(IntegerRing())
Rational Field
sage: FractionField(PolynomialRing(RationalField(),'x'))
Fraction Field of Univariate Polynomial Ring in x over Rational Field
sage: FractionField(PolynomialRing(IntegerRing(),'x'))
Fraction Field of Univariate Polynomial Ring in x over Integer Ring
sage: FractionField(PolynomialRing(RationalField(),2,'x'))
Fraction Field of Multivariate Polynomial Ring in x0, x1 over Rational Field
Dividing elements often implicitly creates elements of the fraction field.
sage: x = PolynomialRing(RationalField(), 'x').gen()
sage: f = x/(x+1)
sage: g = x**3/(x+1)
sage: f/g
1/x^2
sage: g/f
x^2
The input must be an integral domain.
sage: Frac(Integers(4))
Traceback (most recent call last):
...
TypeError: R must be an integral domain.
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:28 2008 | http://epydoc.sourceforge.net |