# 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)

Abstract base class for binary operators.

INPUT:

• left – series on the left side of the binary operator

• right – series on the right side of the binary operator

class sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator

Bases: object

Base 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_apply(series, function)

Operator for applying a function.

INPUT:

• series – a lazy Laurent series

• function – a Python function to apply to each coefficient of the series

class sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_change_ring(series, ring)

Operator for changing the base ring of the series to ring.

INPUT:

• series – a lazy Laurent series

• ring – a ring

class sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_constant(ring, constant)

Operator for the generator element.

INPUT:

• ring – a lazy Laurent series ring

• constant – a constant of the base ring of ring

class sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_div(left, right)

Operator for division.

class sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_gen(ring)

Operator for the generator element.

INPUT:

• ring – a lazy Laurent series ring

class sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_inv(series)

Operator for inversion.

INPUT:

• series – a lazy Laurent series

class sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_list(ring, l, v)

Operator for the series defined by a list.

INPUT:

• l – list

• v – integer

class sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_mul(left, right)

Operator for multiplication.

class sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_neg(series)

Operator for negation.

INPUT:

• series – a lazy Laurent series

class sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_polynomial(ring, poly)

Operator for the series coerced from a polynomial or a Laurent polynomial.

INPUT:

• ring – a lazy Laurent series ring

• poly – a polynomial or a Laurent polynomial

class sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_scale(series, scalar)

Operator for scalar multiplication of series with scalar.

INPUT:

• series – a lazy Laurent series

• scalar – an element of the base ring

class sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_sub(left, right)

Operator for subtraction.

class sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesOperator_truncate(series, d)

Operator for truncation.

INPUT:

• series – a lazy Laurent series

• d – an integer; the series is truncated the terms of degree $$> d$$

class sage.rings.lazy_laurent_series_operator.LazyLaurentSeriesUnaryOperator(series)

Abstract base class for unary operators.

INPUT:

• series – series upon which the operator operates