Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing Additional Features for Lazy Formal Laurent Series #31899

Closed
tejasvicsr1 opened this issue Jun 3, 2021 · 14 comments
Closed

Implementing Additional Features for Lazy Formal Laurent Series #31899

tejasvicsr1 opened this issue Jun 3, 2021 · 14 comments

Comments

@tejasvicsr1
Copy link
Contributor

This ticket deals with implementing composition for a formal Laurent Series.

Conditions:

Given two formal Laurent series - f and g

f o g exists, if and only if:

  • g = 0 and val(f) >= 0
  • g is non-zero and f has only finitely many nonzero coefficients
  • g is non-zero and val(g) > 0.

This ticket is part of the meta ticket #31651

CC: @mantepse

Component: combinatorics

Keywords: LazyPowerSeries, FormalSeries, gsoc2021

Branch/Commit: u/gh-tejasvicsr1/implementing_additional_features_for_lazy_formal_laurent_series @ f304cb7

Issue created by migration from https://trac.sagemath.org/ticket/31899

@mantepse
Copy link
Collaborator

mantepse commented Jun 4, 2021

Changed keywords from LazyPowerSeries, FormalSeries, GSoC to LazyPowerSeries, FormalSeries, GSoC21

@mantepse
Copy link
Collaborator

mantepse commented Jun 4, 2021

comment:2

Let me note that the second case works already:

sage: L.<z> = LaurentPolynomialRing(QQ)
sage: LS.<y> = LazyLaurentSeriesRing(QQ)
sage: f = z^-2 + 1 + z
sage: g = 1/(y*(1-y)); g
y^-1 + 1 + y + y^2 + y^3 + y^4 + y^5 + ...
sage: f(g)
y^-1 + 2 + y + 2*y^2 - y^3 + 2*y^4 + y^5 + ...

Here is, why this works: the relevant line in __call__ in LaurentPolynomial_univariate is

    return self.__u(x) * (x[0]**self.__n)
  • x is a singleton tuple with the Laurent series as its only element, that is, g from above.
  • self.__n is the valuation of the Laurent polynomial, that is -2 in our case
  • x[0]**self.__n therefore is the n-th power of the Laurent series
  • self.__u is the polynomial obtained by multiplying the Laurent polynomial with z^-n
  • self.__u(x) is therefore calling the __call__ method of the polynomial ring, and this works for similar reasons.

It might be a good idea to briefly doctest this in the future __call__ of LazyLaurentSeries.

I am not sure whether this is an efficient way to obtain the composition. But that's certainly not important now.

@tejasvicsr1 tejasvicsr1 changed the title Implementing Composition for Lazy Formal Laurent Series Implementing Additional Features for Lazy Formal Laurent Series Jun 9, 2021
@tejasvicsr1
Copy link
Contributor Author

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 10, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

350f2f9Cleaned code.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 10, 2021

Commit: 350f2f9

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 11, 2021

Changed commit from 350f2f9 to 7b231ec

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 11, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

7b231ecAdded integration for the Lazy Laurent Series Code.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 13, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

974b361Fixed change ring to ensure that the original implementation remains.
3f7b07bFixed integration.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 13, 2021

Changed commit from 7b231ec to 3f7b07b

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 14, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

f304cb7Formatting push.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 14, 2021

Changed commit from 3f7b07b to f304cb7

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@tscrim
Copy link
Collaborator

tscrim commented Aug 12, 2021

Changed keywords from LazyPowerSeries, FormalSeries, GSoC21 to LazyPowerSeries, FormalSeries, gsoc2021

@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@mantepse
Copy link
Collaborator

comment:13

superseded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants