rf.spad line 1 [edit on github]
coerce : P -> %
numer : % -> P
denom : % -> P
This package transforms multivariate polynomials or fractions into univariate polynomials or fractions, and back.
isExpt(p)
returns [x, n]
if p = x^n
and n ~= 0
, "failed" otherwise.
isPlus(p)
returns [m1
, ..., mn
] if p = m1 + ... + mn
and n > 1
, "failed" otherwise.
isPower(p)
returns [x, n]
if p = x^n
and n ~= 0
, "failed" otherwise.
isTimes(p)
returns [a1, ..., an]
if p = a1 ... an
and n > 1
, "failed" otherwise.
mainVariable(f)
returns the highest variable appearing in the numerator or the denominator of f
, "failed" if f
has no variables.
multivariate(f, v)
applies both the numerator and denominator of f
to v
.
univariate(f, v)
returns f
viewed as a univariate rational function in v
.
univariate(f, x, p)
returns f
viewed as a univariate polynomial in x
, using the side-condition p(x) = 0
.
variables(f)
returns the list of variables appearing in the numerator or the denominator of f
.