PartialFraction(R)

pfr.spad line 1 [edit on github]

The domain PartialFraction implements partial fractions over a euclidean domain R. This requirement on the argument domain allows us to normalize the fractions. Of particular interest are the 2 forms for these fractions. The ``compact'' form has only one fractional term per prime in the denominator, while the ``p-adic'' form expands each numerator p-adically via the prime p in the denominator. For computational efficiency, the compact form is used, though the p-adic form may be gotten by calling the function padicFraction. For a general euclidean domain, it is not known how to factor the denominator. Thus the function partialFraction takes an element of Factored(R) as its second argument.

* : (%, %) -> %
from Magma
* : (%, R) -> %
from RightModule(R)
* : (%, Fraction(Integer)) -> %
from RightModule(Fraction(Integer))
* : (R, %) -> %
from LeftModule(R)
* : (Fraction(Integer), %) -> %
from LeftModule(Fraction(Integer))
* : (Integer, %) -> %
from AbelianGroup
* : (NonNegativeInteger, %) -> %
from AbelianMonoid
* : (PositiveInteger, %) -> %
from AbelianSemiGroup
+ : (%, %) -> %
from AbelianSemiGroup
- : % -> %
from AbelianGroup
- : (%, %) -> %
from AbelianGroup
/ : (%, %) -> %
from Field
0 : () -> %
from AbelianMonoid
1 : () -> %
from MagmaWithUnit
= : (%, %) -> Boolean
from BasicType
^ : (%, Integer) -> %
from DivisionRing
^ : (%, NonNegativeInteger) -> %
from MagmaWithUnit
^ : (%, PositiveInteger) -> %
from Magma
annihilate? : (%, %) -> Boolean
from Rng
antiCommutator : (%, %) -> %
from NonAssociativeSemiRng
associates? : (%, %) -> Boolean
from EntireRing
associator : (%, %, %) -> %
from NonAssociativeRng
characteristic : () -> NonNegativeInteger
from NonAssociativeRing
coerce : % -> %
from Algebra(%)
coerce : R -> %
from Algebra(R)
coerce : Fraction(Factored(R)) -> %

coerce(f) takes a fraction with numerator and denominator in factored form and creates a partial fraction. It is necessary for the parts to be factored because it is not known in general how to factor elements of R and this is needed to decompose into partial fractions.

coerce : Fraction(Integer) -> %
from Algebra(Fraction(Integer))
coerce : Integer -> %
from NonAssociativeRing
coerce : % -> Fraction(R)

coerce(p) sums up the components of the partial fraction and returns a single fraction.

coerce : % -> OutputForm
from CoercibleTo(OutputForm)
commutator : (%, %) -> %
from NonAssociativeRng
compactFraction : % -> %

compactFraction(p) normalizes the partial fraction p to the compact representation. In this form, the partial fraction has only one fractional term per prime in the denominator.

divide : (%, %) -> Record(quotient : %, remainder : %)
from EuclideanDomain
euclideanSize : % -> NonNegativeInteger
from EuclideanDomain
expressIdealMember : (List(%), %) -> Union(List(%), "failed")
from PrincipalIdealDomain
exquo : (%, %) -> Union(%, "failed")
from EntireRing
extendedEuclidean : (%, %) -> Record(coef1 : %, coef2 : %, generator : %)
from EuclideanDomain
extendedEuclidean : (%, %, %) -> Union(Record(coef1 : %, coef2 : %), "failed")
from EuclideanDomain
factor : % -> Factored(%)
from UniqueFactorizationDomain
fractionalTerms : % -> List(Record(num : R, d_fact : R, d_exp : NonNegativeInteger))

fractionalTerms(p) extracts the fractional part of p to a list of Record(num : R, den : Factored R). This returns [] if there is no fractional part.

gcd : (%, %) -> %
from GcdDomain
gcd : List(%) -> %
from GcdDomain
gcdPolynomial : (SparseUnivariatePolynomial(%), SparseUnivariatePolynomial(%)) -> SparseUnivariatePolynomial(%)
from GcdDomain
group_terms : List(Record(num : R, d_fact : R, d_exp : NonNegativeInteger)) -> List(Record(num : R, d_fact : R, d_exp : NonNegativeInteger))

Should be local but conditional.

inv : % -> %
from DivisionRing
latex : % -> String
from SetCategory
lcm : (%, %) -> %
from GcdDomain
lcm : List(%) -> %
from GcdDomain
lcmCoef : (%, %) -> Record(llcm_res : %, coeff1 : %, coeff2 : %)
from LeftOreRing
leftPower : (%, NonNegativeInteger) -> %
from MagmaWithUnit
leftPower : (%, PositiveInteger) -> %
from Magma
leftRecip : % -> Union(%, "failed")
from MagmaWithUnit
multiEuclidean : (List(%), %) -> Union(List(%), "failed")
from EuclideanDomain
numberOfFractionalTerms : % -> Integer

numberOfFractionalTerms(p) computes the number of fractional terms in p. This returns 0 if there is no fractional part.

one? : % -> Boolean
from MagmaWithUnit
opposite? : (%, %) -> Boolean
from AbelianMonoid
padicFraction : % -> %

padicFraction(q) expands the fraction p-adically in the primes p in the denominator of q. For example, padicFraction(3/(2^2)) = 1/2 + 1/(2^2). Use compactFraction to return to compact form.

padicallyExpand : (R, R) -> SparseUnivariatePolynomial(R)

padicallyExpand(p, x) is a utility function that expands the second argument x ``p-adically'' in the first.

partialFraction : (R, Factored(R)) -> %

partialFraction(numer, denom) is the main function for constructing partial fractions. The second argument is the denominator and should be factored.

partialFraction : Fraction(R) -> % if R has UniqueFactorizationDomain

partialFraction(f) is a user friendly interface for partial fractions when f is a fraction of UniqueFactorizationDomain.

plenaryPower : (%, PositiveInteger) -> %
from NonAssociativeAlgebra(R)
prime? : % -> Boolean
from UniqueFactorizationDomain
principalIdeal : List(%) -> Record(coef : List(%), generator : %)
from PrincipalIdealDomain
quo : (%, %) -> %
from EuclideanDomain
recip : % -> Union(%, "failed")
from MagmaWithUnit
rem : (%, %) -> %
from EuclideanDomain
rightPower : (%, NonNegativeInteger) -> %
from MagmaWithUnit
rightPower : (%, PositiveInteger) -> %
from Magma
rightRecip : % -> Union(%, "failed")
from MagmaWithUnit
sample : () -> %
from AbelianMonoid
sizeLess? : (%, %) -> Boolean
from EuclideanDomain
squareFree : % -> Factored(%)
from UniqueFactorizationDomain
squareFreePart : % -> %
from UniqueFactorizationDomain
subtractIfCan : (%, %) -> Union(%, "failed")
from CancellationAbelianMonoid
unit? : % -> Boolean
from EntireRing
unitCanonical : % -> %
from EntireRing
unitNormal : % -> Record(unit : %, canonical : %, associate : %)
from EntireRing
wholePart : % -> R

wholePart(p) extracts the whole part of the partial fraction p.

zero? : % -> Boolean
from AbelianMonoid
~= : (%, %) -> Boolean
from BasicType

IntegralDomain

Module(Fraction(Integer))

noZeroDivisors

Algebra(R)

RightModule(%)

Monoid

Algebra(%)

LeftModule(Fraction(Integer))

AbelianMonoid

BiModule(R, R)

EuclideanDomain

EntireRing

NonAssociativeAlgebra(Fraction(Integer))

NonAssociativeAlgebra(R)

CancellationAbelianMonoid

MagmaWithUnit

NonAssociativeRing

AbelianGroup

RightModule(Fraction(Integer))

CommutativeStar

LeftModule(%)

LeftModule(R)

canonicalUnitNormal

Module(%)

SetCategory

LeftOreRing

Algebra(Fraction(Integer))

Rng

Field

CommutativeRing

SemiGroup

TwoSidedRecip

Magma

UniqueFactorizationDomain

BiModule(%, %)

unitsKnown

CoercibleTo(OutputForm)

AbelianSemiGroup

GcdDomain

NonAssociativeSemiRing

DivisionRing

canonicalsClosed

NonAssociativeAlgebra(%)

Ring

Module(R)

PrincipalIdealDomain

RightModule(R)

BiModule(Fraction(Integer), Fraction(Integer))

NonAssociativeRng

SemiRng

NonAssociativeSemiRng

BasicType

SemiRing