[Next] [Prev] [_____] [Left] [Up] [Index] [Root]
Element Operations

Element Operations

Subsections

Arithmetic

+ a : FldFunElt -> FldFunElt
- a : FldFunElt -> FldFunElt
a + b : FldFunElt, FldFunElt -> FldFunElt
a - b : FldFunElt, FldFunElt -> FldFunElt
a * b : FldFunElt, FldFunElt -> FldFunElt
a / b : FldFunElt, FldFunElt -> FldFunElt
a ^ k : FldFunElt, RngIntElt -> FldFunElt
a +:= b : RngPolElt, RngPolElt -> RngPolElt
a -:= b : RngPolElt, RngPolElt -> RngPolElt
a *:= b : RngPolElt, RngPolElt -> RngPolElt

Equality and Membership

a eq b : FldFunElt, FldFunElt -> BoolElt
a ne b : FldFunElt, FldFunElt -> BoolElt
a in F : FldFunElt, FldFun -> BoolElt
a notin F : FldFunElt, FldFun -> BoolElt

Numerator and Denominator

Numerator(f) : FldFunElt -> AlgPolElt
Given a rational function f in K, the field of fractions of R, this function returns the numerator P of f=P/Q as an element of the polynomial ring R.
Denominator(f) : FldFunElt -> AlgPolElt
Given a rational function f in K, the field of fractions of R, this function returns the denominator Q of f=P/Q as an element of the polynomial ring R.

Predicates on Ring Elements

IsZero(a) : FldFunElt -> BoolElt
IsOne(a) : FldFunElt -> BoolElt
IsMinusOne(a) : FldFunElt -> BoolElt
IsNilpotent(a) : FldFunElt -> BoolElt
IsIdempotent(a) : FldFunElt -> BoolElt
IsUnit(a) : FldFunElt -> BoolElt
IsZeroDivisor(a) : FldFunElt -> BoolElt
IsRegular(a) : FldFunElt -> BoolElt

Evaluation

Evaluate(f, r) : FldFunUElt, RngElt -> FldFunUElt
Given a univariate rational function f in F, return the rational function in F obtained by evaluating the indeterminate in r, which must be from (or coercible into) the coefficient ring of the integers of F.
Evaluate(f, v, r) : FldFunMElt, RngIntElt, RngElt -> FldFunMElt
Given a multivariate rational function f in F, return the rational function in F obtained by evaluating the v-th variable in r, which must be from (or coercible into) the coefficient ring of the integers of F.

Partial Fraction Decomposition

PartialFractionDecomposition(f) : FldFunUElt -> [ <RngUPolElt, RngIntElt, RngUPolElt> ]
Given a univariate rational function f in F=K(x), return the (unique) complete squarefree partial fraction decomposition of f. The decomposition is returned as a (sorted) sequence Q consisting of triples, each of which is of the form <d, k, n> where d is the denominator, k is the multiplicity of the denominator, and n is the corresponding numerator, and also d is squarefree and the degree of n is strictly less than the degree of d. Thus f equals the sum of the n_t/(d_t)^k_t, where t ranges over the triples contained in Q. If f is improper (the degree of its numerator is greater than or equal to the degree of its denominator), then the first triple of Q will be of the form <1, 1, q> where q is the quotient of the numerator of f by the denominator of f.

Example FldFun_PartialFractionDecomposition (H31E3)

We compute the partial fraction decomposition of a fraction in Q(t).

> F<t> := FunctionField(RationalField());
> P<x> := IntegerRing(F);
> f := ((t+1)^10 - 1) / ((t-1)*(t+1)^2*(t^2+1)^5); 
> D := PartialFractionDecomposition(f);
> D;
[
    <x - 1, 1, 1023/128>,
    <x + 1, 1, 11/128>,
    <x + 1, 2, 1/64>,
    <x^2 + 1, 1, -517/64*x - 507/64>,
    <x^2 + 1, 2, -121/8*x - 55/8>,
    <x^2 + 1, 3, 29/16*x + 547/16>,
    <x^2 + 1, 4, 111/4*x - 15/4>,
    <x^2 + 1, 5, -33/4*x - 31/4>
]
> // Check appropriate sum equals f:
> &+[F!t[3] / F!t[1]^t[2]: t in D] eq f;  
true
Note that doing the same operation in the function field Z(t) must modify the numerators and denominators to be integral but the result is otherwise the same.

> F<t> := FunctionField(IntegerRing());
> P<x> := IntegerRing(F);
> f := ((t+1)^10 - 1) / ((t-1)*(t+1)^2*(t^2+1)^5); 
> D := PartialFractionDecomposition(f);
> D;
[
    <128*x - 128, 1, 1023>,
    <128*x + 128, 1, 11>,
    <64*x + 64, 2, 64>,
    <64*x^2 + 64, 1, -517*x - 507>,
    <8*x^2 + 8, 2, -968*x - 440>,
    <16*x^2 + 16, 3, 7424*x + 140032>,
    <4*x^2 + 4, 4, 7104*x - 960>,
    <4*x^2 + 4, 5, -8448*x - 7936>
]
> // Check appropriate sum equals f:
> &+[F!t[3] / F!t[1]^t[2]: t in D] eq f;  
true
Finally, we compute the partial fraction decomposition of a fraction in a function field whose coefficient ring is a multivariate polynomial ring Q(t).

> R<a, b, c> := FunctionField(IntegerRing(), 3);
> F<t> := FunctionField(R);
> P<x> := IntegerRing(F);
> f := (t^8 - a) / ((t^2-a)*(t+b)^2*t^3);
> D := PartialFractionDecomposition(f);
> D;
[
    <1, 1, x - 2*b>,
    <x^2 - a, 1, (a^4 + a^3*b^2 - a - b^2)/(a^3 - 2*a^2*b^2 + 
        a*b^4)*x + (-2*a^3*b + 2*b)/(a^2 - 2*a*b^2 + b^4)>,
    <x + b, 1, (-3*a^2 - 5*a*b^8 + 5*a*b^2 + 3*b^10)/(a^2*b^4 - 
        2*a*b^6 + b^8)>,
    <x + b, 2, (-a + b^8)/(a*b^3 - b^5)>,
    <x, 1, (3*a + b^2)/(a*b^4)>,
    <x, 2, -2/b^3>,
    <x, 3, 1/b^2>
]
> // Check appropriate sum equals f:
> &+[F!t[3] / F!t[1]^t[2]: t in D] eq f;  
true
[Next] [Prev] [_____] [Left] [Up] [Index] [Root]