Lazy Laurent Series Operators¶
This module implements operators internally used to construct lazy Laurent series. The job of an operator attached to a series is to compute the \(n\)-th coefficient of the series if \(n\) is not less than the valuation of the series and the \(n\)-th coefficient is not declared to be a constant.
If a new operator is added to this module, an example of how it is used should be added below.
EXAMPLES:
sage: L.<z> = LazyLaurentSeriesRing(ZZ)
sage: f = 1/(1 - 2*z)
sage: g = 1/(1 + z^2)
Constructors:
sage: L(1)
1
sage: L.series([1,2,3,4], -10)
z^-10 + 2*z^-9 + 3*z^-8 + 4*z^-7
sage: L.gen()
z
sage: P.<x> = LaurentPolynomialRing(ZZ)
sage: p = (1 + 1/x)^3 + (1 + x)^4
sage: L(p)
z^-3 + 3*z^-2 + 3*z^-1 + 2 + 4*z + 6*z^2 + 4*z^3 + z^4
Unary operators:
sage: -f
-1 - 2*z - 4*z^2 - 8*z^3 - 16*z^4 - 32*z^5 - 64*z^6 + ...
sage: ~f
1 - 2*z + ...
Binary operators:
sage: f + g
2 + 2*z + 3*z^2 + 8*z^3 + 17*z^4 + 32*z^5 + 63*z^6 + ...
sage: f - g
2*z + 5*z^2 + 8*z^3 + 15*z^4 + 32*z^5 + 65*z^6 + 128*z^7 + ...
sage: f * g
1 + 2*z + 3*z^2 + 6*z^3 + 13*z^4 + 26*z^5 + 51*z^6 + ...
sage: f / g
1 + 2*z + 5*z^2 + 10*z^3 + 20*z^4 + 40*z^5 + 80*z^6 + ...
Transformers:
sage: 2*f
2 + 4*z + 8*z^2 + 16*z^3 + 32*z^4 + 64*z^5 + 128*z^6 + ...
sage: f.change_ring(GF(3))
1 + 2*z + z^2 + 2*z^3 + z^4 + 2*z^5 + z^6 + ...
sage: f.apply_to_coefficients(lambda c: c^2)
1 + 4*z + 16*z^2 + 64*z^3 + 256*z^4 + 1024*z^5 + 4096*z^6 + ...
sage: f.truncate(5)
1 + 2*z + 4*z^2 + 8*z^3 + 16*z^4
AUTHORS:
- Kwankyu Lee (2019-02-24): initial version
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesBinaryOperator(left, right)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperatorAbstract base class for binary operators.
INPUT:
left– series on the left side of the binary operatorright– series on the right side of the binary operator
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator¶ Bases:
objectBase class for operators computing coefficients of a lazy Laurent series.
Subclasses of this class are used to implement arithmetic operations for lazy Laurent series. These classes are not to be used directly by the user.
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_add(left, right)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesBinaryOperatorOperator for addition.
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_apply(series, function)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperatorOperator for applying a function.
INPUT:
series– a lazy Laurent seriesfunction– a Python function to apply to each coefficient of the series
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_change_ring(series, ring)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperatorOperator for changing the base ring of the
seriestoring.INPUT:
series– a lazy Laurent seriesring– a ring
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_constant(ring, constant)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperatorOperator for the generator element.
INPUT:
ring– a lazy Laurent series ringconstant– a constant of the base ring ofring
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_div(left, right)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesBinaryOperatorOperator for division.
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_gen(ring)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperatorOperator for the generator element.
INPUT:
ring– a lazy Laurent series ring
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_inv(series)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesUnaryOperatorOperator for inversion.
INPUT:
series– a lazy Laurent series
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_list(ring, l, v)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperatorOperator for the series defined by a list.
INPUT:
l– listv– integer
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_mul(left, right)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesBinaryOperatorOperator for multiplication.
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_neg(series)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesUnaryOperatorOperator for negation.
INPUT:
series– a lazy Laurent series
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_polynomial(ring, poly)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperatorOperator for the series coerced from a polynomial or a Laurent polynomial.
INPUT:
ring– a lazy Laurent series ringpoly– a polynomial or a Laurent polynomial
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_scale(series, scalar)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperatorOperator for scalar multiplication of
serieswithscalar.INPUT:
series– a lazy Laurent seriesscalar– an element of the base ring
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_sub(left, right)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesBinaryOperatorOperator for subtraction.
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_truncate(series, d)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperatorOperator for truncation.
INPUT:
series– a lazy Laurent seriesd– an interger; the series is truncated the terms of degree \(> d\)
-
class
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesUnaryOperator(series)¶ Bases:
sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperatorAbstract base class for unary operators.
INPUT:
series– series upon which the operator operates