RISC-Linz RISC-Linz Research Institute for Symbolic Computation  
about
|
people
|
publications
|
research
|
education
|
industry
|
conferences
|
media
|
projects
internal
description  |  subgroups  |  members  |  seminar  |  publications  |  software  |  events  |  links
  
search:
  

generalized_series

class generalized_series.ContinuousGeneralizedSeries(parent, tail, exp=0, ramification=1, make_monic=False)

Objects of this class represent generalized series objects.

See the docstring of GeneralizedSeriesMonoid for further information.

base()

Returns the parent’s coefficient domain.

base_extend(ext, name='a')

Lifts self to a domain with an enlarged coefficient domain.

INPUT:

  • ext – either a univariate irreducible polynomial over self.base() or an algebraic extension field of self.base()
  • name (optional) – if ext is a polynomial, this is used as a name for the generator of the algebraic extension.

EXAMPLES:

sage: G = GeneralizedSeriesMonoid(QQ, 'x')
sage: s = G(1+x+x^2, exp=3*x^2, ramification=3)
sage: s.parent()
Monoid of continuous generalized series in x over Rational Field
sage: x = ZZ['x'].gen()
sage: s.base_extend(x^2 + 2, 'a')
exp(-9/2*x^(-2/3))*(1 + x^(1/3) + x^(2/3))
sage: _.parent()
Monoid of continuous generalized series in x over Number Field in a with defining polynomial x^2 + 2
sage: s == s.base_extend(x^2 + 2, 'a')
True
sage: s is s.base_extend(x^2 + 2, 'a')
False 
derivative()

Returns the derivative of self

EXAMPLE:

sage: G = GeneralizedSeriesMonoid(QQ, 'x')
sage: G(1+x+x^2, exp=1+x+x^2, ramification=2)
exp(-x^(-2/2) - 2*x^(-1/2))*x*(1 + x^(1/2) + x^(2/2))
sage: _.derivative()
exp(-x^(-2/2) - 2*x^(-1/2))*x^(-1)*(1 + 2*x^(1/2) + 3*x^(2/2) + 5/2*x^(3/2) + 2*x^(4/2))
sage: G([0,0,0,1])
log(x)^3
sage: _.derivative()
x^(-1)*3*log(x)^2
exponential_part()

Returns the exponential part of this series.

This is the series obtained from self by discarding the tail.

EXAMPLES:

sage: G = GeneralizedSeriesMonoid(QQ, 'x')
sage: G(1+x+x^2, exp=2*x+x^2)
exp(-1/2*x^(-2) - 2*x^(-1))*(1 + x + x^2)
sage: _.exponential_part()
exp(-1/2*x^(-2) - 2*x^(-1))
sage: G(x^3+x^4+x^5)
x^3*(1 + x + x^2)
sage: _.exponential_part()
x^3
has_exponential_part()

True if self has a nontrivial exponential part.

Note that the exponential part may not show up in form of an “exp” term in the printout, but may also simply consist of some power \(x^lpha\) with nonzero \(lpha\).

EXAMPLES:

sage: G = GeneralizedSeriesMonoid(QQ, 'x')
sage: G(1+x+x^2).has_exponential_part()
False
sage: G(1+x+x^2, exp=2*x+x^2).has_exponential_part()
True
sage: G(x+x^2).has_exponential_part()
True
sage: G(x+x^2) == G(1+x, exp=1)
True 
has_logarithms()

True if self contains logarithmic terms.

is_one()

True if self is the monoid’s one element.

is_zero()

True if self is the monoid’s zero element.

order()

Returns the order of this series.

The order is defined as the maximal coefficient ring element \(\alpha\) such that for all terms \(x^i\log(x)^j\) appearing in this series we have \(i - \alpha\) is a nonnegative rational number whose denominator divides the ramification. Note that \(\alpha\) itself may be a complex number.

The order is also the constant coefficient of the polynomial used to represent the exponential part.

The order of the zero series is infinity.

EXAMPLES:

sage: G = GeneralizedSeriesMonoid(QQ, 'x')
sage: G(1+x+x^2,exp=17/24+5*x+7*x^2, ramification=9)
exp(-63/2*x^(-2/9) - 45*x^(-1/9))*x^(17/24)*(1 + x^(1/9) + x^(2/9))
sage: _.order()
17/24
sage: G(x^5+x^6, exp=-3)
x^2*(1 + x)
sage: _.order()
2
prec()

The precision of self is the minimum of the precisions of all the power series objects contained in it.

ramification()

Returns the ramification of this series object.

This is the smallest positive integer \(r\) such that replacing \(x\) by \(x^r\) in the series clears the denominators of all exponents.

EXAMPLES:

sage: G = GeneralizedSeriesMonoid(QQ, 'x')
sage: G(1+x+x^2, ramification=2)
1 + x^(1/2) + x^(2/2)
sage: _.ramification()
2
sage: G(1+x^2+x^4, ramification=2)
1 + x + x^2
sage: _.ramification()
1
similar(other, reference=Integer Ring)

Checks whether self and other are similar.

Similarity is defined as follows. Let \(A\) and \(B\) be two generalized series objects with exponential part \(\exp(\int_0^x a(t^{1/r})/t dt)\) and \(\exp(\int_0^x b(t^{1/r})/t dt)\) respectively. Then \(A\) and \(B\) are called similar if \(r*(a-b)\) is an integer.

An alternative reference set can be specified as optional argument.

EXAMPLE:

sage: G = GeneralizedSeriesMonoid(QQ, 'x')
sage: A = G(1+x+x^2, exp=1+x+x^2, ramification=2)
sage: B = G(1+x+x^2, exp=-3/2+x+x^2, ramification=2)
sage: A.similar(B)
True
sage: B.similar(A)
True
sage: C = G(1+x+x^2, exp=-2/3+x+x^2, ramification=2)
sage: A.similar(C)
False
sage: A.similar(C, reference=QQ)
True
sage: D = G(1+x+x^2, exp=1+x^2+x^4, ramification=4)
sage: A.similar(D)
True
substitute(e)

Returns the series object obtained from self by replacing \(x\) by \(x^e\), where \(e\) is a positive rational number.

EXAMPLES:

sage: G = GeneralizedSeriesMonoid(QQ, 'x')
sage: G(1+x+x^2, ramification=2)
1 + x^(1/2) + x^(2/2)
sage: _.substitute(3/5)
1 + x^(3/10) + x^(6/10)
sage: _.substitute(10/3)
1 + x + x^2
sage: _.ramification()
1
sage: G(1, exp=1+x+x^2, ramification=2)
exp(-x^(-2/2) - 2*x^(-1/2))*x
sage: _.substitute(3/5)
exp(-x^(-6/10) - 2*x^(-3/10))*x^(3/5)
sage: G([1,x,x^2], ramification=2)
x^(2/2)*log(x)^2 + x^(1/2)*log(x) + 1
sage: _.substitute(3/5)
9/25*x^(6/10)*log(x)^2 + 3/5*x^(3/10)*log(x) + 1
tail()

Returns the tail of this series.

This is the series object which is obtained from self by dropping the exponential part.

EXAMPLES:

sage: G = GeneralizedSeriesMonoid(QQ, 'x')
sage: G(1+x+x^2, exp=2*x+x^2)
exp(-1/2*x^(-2) - 2*x^(-1))*(1 + x + x^2)
sage: _.tail()
1 + x + x^2
sage: G(x+x^2)
x*(1 + x)
sage: _.tail()
1 + x
class generalized_series.DiscreteGeneralizedSeries(parent, data, make_monic=False)

Objects of this class represent generalized series objects.

See the docstring of GeneralizedSeriesMonoid for further information.

base_extend(ext, name='a')

Lifts self to a domain with an enlarged coefficient domain.

INPUT:

  • ext – either a univariate irreducible polynomial over self.base() or an algebraic extension field of self.base()
  • name (optional) – if ext is a polynomial, this is used as a name for the generator of the algebraic extension.

EXAMPLES:

sage: G = GeneralizedSeriesMonoid(QQ, 'x')
sage: s = G(1+x+x^2, exp=3*x^2, ramification=3)
sage: s.parent()
Monoid of continuous generalized series in x over Rational Field
sage: x = ZZ['x'].gen()
sage: s.base_extend(x^2 + 2, 'a')
exp(-9/2*x^(-2/3))*(1 + x^(1/3) + x^(2/3))
sage: _.parent()
Monoid of continuous generalized series in x over Number Field in a with defining polynomial x^2 + 2
sage: s == s.base_extend(x^2 + 2, 'a')
True
sage: s is s.base_extend(x^2 + 2, 'a')
False 
prec()

The precision of self is the minimum of the precisions of all the power series objects contained in it.

generalized_series.GeneralizedSeriesMonoid(base, x, type='continuous')

Creates a monoid of generalized series objects.

INPUT:

  • base – constant field, may be either QQ or a number field.
  • x – name of the variable, must not contain the substring "log".
  • type (optional) – either "continuous" or "discrete".

If the type is "continuous", the domain contains series objects of the form

\(\exp(\int_0^x \frac{p(t^{-1/r})}t dt)*q(x^{1/r},\log(x))\)

where

  • \(r\) is a positive integer (the object’s “ramification”)
  • \(p\) is in \(K[x]\) (the object’s “exponential part”)
  • \(q\) is in \(K[[x]][y]\) with \(x\nmid q\) unless \(q\) is zero (the object’s “tail”)
  • \(K\) is the base ring.

Any two such objects can be multiplied and differentiated. Objects whose exponential parts differ by an integer (“similar” series) can also be added.

If the type is "discrete", the domain contains series objects of the form

\((x/e)^{x u/v}\rho^x\exp\bigl(c_1 x^{1/(m*v)} +...+ c_{v-1} x^{1-1/(m*v)}\bigr)x^\alpha p(x^{-1/(m*v)},\log(x))\)

where

  • \(e\) is Euler’s constant (2.71...)
  • \(v\) is a positive integer (the object’s “ramification”)
  • \(u\) is an integer; the term \((x/e)^(v/u)\) is called the “superexponential part” of the solution
  • \(\rho\) is an element of an algebraic extension of the coefficient field \(K\) (the algebra’s base ring’s base ring); the term \(\rho^x\) is called the “exponential part” of the solution
  • \(c_1,...,c_{v-1}\) are elements of \(K(\rho)\); the term \(\exp(...)\) is called the “subexponential part” of the solution
  • \(m\) is a positive integer
  • \(\alpha\) is an element of some algebraic extension of \(K(\rho)\); the term \(n^\alpha\) is called the “polynomial part” of the solution (even if \(\alpha\) is not an integer)
  • \(p\) is an element of \(K(\rho)(\alpha)[[x]][y]\). It is called the “expansion part” of the solution.

Any two such objects can be multiplied and shifted. Objects with the same superexponential, exponential, and subexponential part can also be added.

Also there is also a zero element which acts neutrally with respect to addition, and whose product with any other object is zero. In a strict mathematical sense, the set of all generalized series therefore does not form a monoid.

Nonzero objects involving no logariths (i.e., deg(q)==0) admit a multiplicative inverse if the series part has finite precision.

Coercion is supported from constants, polynomials, power series and Laurent series and other generalized series, provided that the respective coefficient domains support coercion.

There are functions for lifting the coefficient field to some algebraic extension.

EXAMPLES:

sage: G = GeneralizedSeriesMonoid(QQ, 'x')
sage: G
Monoid of continuous generalized series in x over Rational Field
sage: x = QQ['x'].gen()
sage: G(x+2*x^3 + 4*x^4 + O(x^5))
x*(1 + 2*x^2 + 4*x^3 + O(x^4))
sage: G(x+2*x^3 + 4*x^4 + O(x^5), ramification=2)
x^(1/2)*(1 + 2*x^(2/2) + 4*x^(3/2) + O(x^(4/2)))
sage: G(x+2*x^3 + 4*x^4 + O(x^5), ramification=3)
x^(1/3)*(1 + 2*x^(2/3) + 4*x^(3/3) + O(x^(4/3)))
sage: f = _
sage: f.derivative()
x^(-2/3)*(1/3 + 2*x^(2/3) + 16/3*x^(3/3) + O(x^(4/3)))
sage: _*f
x^(-1/3)*(1/3 + 8/3*x^(2/3) + 20/3*x^(3/3) + O(x^(4/3)))
sage: (G(1+x, ramification=2)*G(1+x, ramification=3)).ramification()
6
sage: K = QQ.extension(x^2-2, 'a'); a = K.gen()
sage: a*G(x)
x*a
sage: _.parent()
Monoid of continuous generalized series in x over Number Field in a with defining polynomial x^2 - 2
sage: G(x).base_extend(x^3+5, 'b')
x
sage: _.parent()
Monoid of continuous generalized series in x over Number Field in b with defining polynomial x^3 + 5
class generalized_series.GeneralizedSeriesMonoid_class(base, x, type)

Objects of this class represent parents of generalized series objects. They depend on a coefficient ring, which must be either QQ or a number field, and a variable name. The type must be “continuous” or “discrete”

base_extend(ext, name='a')

Returns a monoid with an extended coefficient domain.

INPUT:

  • ext – either a univariate irreducible polynomial over self.base() or an algebraic extension field of self.base()
  • name (optional) – if ext is a polynomial, this is used as a name for the generator of the algebraic extension.

EXAMPLES:

sage: G = GeneralizedSeriesMonoid(QQ, 'x', 'continuous')
sage: G
Monoid of continuous generalized series in x over Rational Field
sage: x = ZZ['x'].gen()
sage: G1 = G.base_extend(x^2 + 2, 'a')
sage: G1
Monoid of continuous generalized series in x over Number Field in a with defining polynomial x^2 + 2
sage: G2 = G1.base_extend(x^3 + 5, 'b')
sage: G2
Monoid of continuous generalized series in x over Number Field in b with defining polynomial x^3 + 5 over its base field
sage: G2(G1.random_element()).parent() is G2
True
sage: G1.random_element().parent() is G2
False 
exp_ring()

Returns the ring which is used to store the exponential part of a generalized series. It is the univariate polynomial ring in over self.base() in the variable self.var().

A polynomial \(p\) represents the exponential part \(\exp(\int_0^x p(t^{1/r})/t dt)\), where \(r\) is the object’s ramification.

In particular, a constant polynomial \(\alpha\) represents exp(alphalog(x))=x^alpha`.

gen()

Returns the generator of this monoid

is_commutative()

Returns True.

is_exact()

Returns False, because series objects are inherently approximate.

random_element()

Returns a random element of this monoid.

tail_ring()

Returns the ring which is used to store the non-exponential part (the tail) of a generalized series. It is the univariate polynomial ring in the variable “LOG” over the power series ring in self.var() over self.base().

A polynomial \(p(x,y)\) represents the tail \(p(x^{1/r}, \log(x))\).

var()

Returns the variable name associated to this monoid.

Previous topic

guessing

Next topic

nullspace