Element Operations

Contents

Arithmetic

+ a : FldFunRatElt -> FldFunRatElt
- a : FldFunRatElt -> FldFunRatElt
a + b : FldFunRatElt, FldFunRatElt -> FldFunRatElt
a - b : FldFunRatElt, FldFunRatElt -> FldFunRatElt
a * b : FldFunRatElt, FldFunRatElt -> FldFunRatElt
a / b : FldFunRatElt, FldFunRatElt -> FldFunRatElt
a ^ k : FldFunRatElt, RngIntElt -> FldFunRatElt

Equality and Membership

a eq b : FldFunRatElt, FldFunRatElt -> BoolElt
a ne b : FldFunRatElt, FldFunRatElt -> BoolElt
a in F : FldFunRatElt, FldFunRat -> BoolElt
a notin F : FldFunRatElt, FldFunRat -> BoolElt

Numerator, Denominator and Degree

Numerator(f) : FldFunRatElt -> RngElt
Numerator(f) : RngUPolElt -> RngUPolElt
Numerator(f) : RngMPolElt -> RngMPolElt
Given a rational function f∈K, the field of fractions of R, return the numerator P of f=P/Q as an element of the polynomial ring R.
Denominator(f) : FldFunRatElt -> RngElt
Denominator(f) : RngUPolElt -> RngUPolElt
Denominator(f) : RngMPolElt -> RngMPolElt
Given a rational function f∈K, the field of fractions of R, return the denominator Q of f=P/Q as an element of the polynomial ring R.
Degree(f) : FldFunRatElt -> RngIntElt
Given a rational function f in a univariate function field, return the degree of f as an integer (the maximum of the degree of the numerator of f and the degree of the denominator of f).
TotalDegree(f) : FldFunRatElt -> RngIntElt
Given a rational function f in a multivariate function field, return the total degree of f as an integer (the total degree of the numerator of f minus the total degree of the denominator of f).
WeightedDegree(f) : FldFunRatElt -> RngIntElt
Given a rational function f in a multivariate function field, return the weighted degree of f as an integer (the weighted degree of the numerator of f minus the weighted degree of the denominator of f).
Numerator(f, R) : FldFunRatElt -> RngElt
Denominator(f, R) : FldFunRatElt -> RngElt
Return the numerator or denominator of f with respect to the ring of integers R of the rational function field F containing f. The ring R may be a polynomial ring or a valuation ring.

Predicates on Ring Elements

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

Evaluation

Evaluate(f, r) : FldFunRatUElt, RngElt -> FldFunRatUElt
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) : FldFunRatMElt, RngIntElt, RngElt -> FldFunRatMElt
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.
Evaluate(f, S) : FldFunRatMElt, [RngElt] -> RngElt
Given a multivariate rational function f in F return the result of evaluating the v-th variable at the v-th element of the sequence S which should be a sequence of elements coercible into the coefficient ring of the integers of F.

Decomposition

The following function provides an inverse operation to composing rational functions.

Decomposition(f) : FldFunRatUElt -> [[FldFunRatUElt]]
    All: BoolElt                        Default: true
Given a rational function f defined over a field k, return all complete decompositions [f1, ..., fr] of f such that f(t) = fr( ... (f1(t)). These decompositions are found, as explained in [ACvHS17], by computing the subfield lattice of k(t)/k(f), which in turn, is found by first computing the principal subfields of this extension and then computing all intersections of principal subfields. These intersections are computed by joining partitions.

The routines in this package are those developed by Peter Fleischmann and Jonas Szutkoski.

Example FldFunRat_decomp-ex (H44E3)

We show a decomposition of a rational function and the corresponding evaluations which retrieve the function which was decomposed.
> k:=GF(3);
> F<t>:=FunctionField(k);
> f:=(t^10 + 2*t^8 + 2*t^4 + t^2)/(t^12 + 2*t^6 + 1);
> Decomposition(f);
[
    [
        t^2,
        t/(t^2 + 1),
        (2*t^3 + t^2 + 2*t)/(t^3 + 2)
    ],
    [
        t/(t^2 + 2),
        t^2,
        t/(t^3 + 1)
    ],
    [
        t/(t^2 + 1),
        t^3 + 2*t,
        t^2
    ],
    [
        t/(t^2 + 1),
        t^2 + t,
        t^3 + t^2
    ],
    [
        t/(t^2 + 1),
        t^2 + 2*t,
        t^3 + t^2
    ],
    [
        t/(t^2 + 1),
        t^2,
        t^3 + t^2 + t
    ]
]
> Decomposition(f : All := false);
[
    [
        t^2,
        t/(t^2 + 1),
        (2*t^3 + t^2 + 2*t)/(t^3 + 2)
    ]
]
> Evaluate($1[1][3], Evaluate($1[1][2], $1[1][1])) eq f;
true

Derivative

Derivative(f) : FldFunRatUElt -> FldFunRatUElt
Given a univariate rational function f, return the first derivative of f with respect to its variable.
Derivative(f, k) : FldFunRatUElt, RngIntElt -> FldFunRatUElt
Given a univariate rational function f, return the k-th derivative of f with respect to its variable. k must be non-negative.
Derivative(f, v) : FldFunRatMElt, RngIntElt -> FldFunRatMElt
Given a multivariate rational function f, return the first derivative of f with respect to variable number v.
Derivative(f, v, k) : FldFunRatMElt, RngIntElt, RngIntElt -> FldFunRatMElt
Given a multivariate rational function f, return the k-th derivative of f with respect to variable number v. k must be non-negative.

Partial Fraction Decomposition

PartialFractionDecomposition(f) : FldFunRatUElt -> [ <RngUPolElt, RngIntElt, RngUPolElt> ]
Given a univariate rational function f in F=K(x), return the (unique) complete 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 irreducible and the degree of n is strictly less than the degree of d. Thus f equals the sum of the nt/(dt)kt, 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.
SquarefreePartialFractionDecomposition(f) : FldFunRatUElt -> [ <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 nt/(dt)kt, 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 FldFunRat_PartialFractionDecomposition (H44E4)

We compute the squarefree and complete (irreducible) partial fraction decompositions of a fraction in Q(t).
> F<t> := FunctionField(RationalField());
> P<x> := IntegerRing(F);
> f := ((t + 1)^8 - 1) / ((t^3 - 1)*(t + 1)^2*(t^2 - 4)^2);
> SD := SquarefreePartialFractionDecomposition(f);
> SD;
[
    <x^4 + 2*x^3 - x - 2, 1, 467/196*x^3 + 1371/196*x^2 +
        1391/196*x + 234/49>,
    <x^2 - x - 2, 1, -271/196*x + 505/98>,
    <x^2 - x - 2, 2, 271/14*x + 139/7>
]
> // Check appropriate sum equals f:
> &+[F!t[3] / F!t[1]^t[2]: t in SD] eq f;
> D := PartialFractionDecomposition(f);
> D;
[
    <x - 2, 1, -3683/2646>,
    <x - 2, 2, 410/63>,
    <x - 1, 1, 85/36>,
    <x + 1, 1, 1/108>,
    <x + 1, 2, 1/18>,
    <x + 2, 1, 1/18>,
    <x^2 + x + 1, 1, -5/147*x - 8/147>
]
> // 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)^8 - 1) / ((t^3 - 1)*(t + 1)^2*(t^2 - 4)^2);
> D := PartialFractionDecomposition(f);
> D;
[
    <2646*x - 5292, 1, -3683>,
    <63*x - 126, 2, 25830>,
    <36*x - 36, 1, 85>,
    <108*x + 108, 1, 1>,
    <18*x + 18, 2, 18>,
    <18*x + 36, 1, 1>,
    <147*x^2 + 147*x + 147, 1, -5*x - 8>
]
> // 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 function field.
> R<a, b> := FunctionField(IntegerRing(), 2);
> F<t> := FunctionField(R);
> P<x> := IntegerRing(F);
> f := 1 / ((t^2 - a)^2*(t + b)^2*t^3);
> SD := SquarefreePartialFractionDecomposition(f);
> SD;
[
    <x^3 + b*x^2 - a*x - a*b, 1, (-3*a - 2*b^2)/(a^3*b^4)*x^2 +
        (-a - 2*b^2)/(a^3*b^3)*x + (3*a + 3*b^2)/(a^2*b^4)>,
    <x^3 + b*x^2 - a*x - a*b, 2, (a + b^2)/(a^2*b^3)*x^2 +
        1/a^2*x + (-a - b^2)/(a*b^3)>,
    <x, 1, (3*a + 2*b^2)/(a^3*b^4)>,
    <x, 2, -2/(a^2*b^3)>,
    <x, 3, 1/(a^2*b^2)>
]
> // Check appropriate sum equals f:
> &+[F!t[3] / F!t[1]^t[2]: t in SD] eq f;
true
> D := PartialFractionDecomposition(f);
> D;
[
    <x, 1, (3*a + 2*b^2)/(a^3*b^4)>,
    <x, 2, -2/(a^2*b^3)>,
    <x, 3, 1/(a^2*b^2)>,
    <x + b, 1, (-3*a + 7*b^2)/(a^3*b^4 - 3*a^2*b^6 + 3*a*b^8 -
        b^10)>,
    <x + b, 2, -1/(a^2*b^3 - 2*a*b^5 + b^7)>,
    <x^2 - a, 1, (-3*a^2 - 3*a*b^2 + 2*b^4)/(a^6 - 3*a^5*b^2 +
        3*a^4*b^4 - a^3*b^6)*x + (6*a*b - 2*b^3)/(a^5 - 3*a^4*b^2
        + 3*a^3*b^4 - a^2*b^6)>,
    <x^2 - a, 2, (a + b^2)/(a^4 - 2*a^3*b^2 + a^2*b^4)*x -
        2*b/(a^3 - 2*a^2*b^2 + a*b^4)>
]
> // Check appropriate sum equals f:
> &+[F!t[3] / F!t[1]^t[2]: t in D] eq f;
true
V2.28, 13 July 2023