-
-
Notifications
You must be signed in to change notification settings - Fork 510
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
revert for LazyTaylorSeries and LazySymmetricFunction is missing #34383
Comments
comment:1
Unfortunately, there seems to be an inaccuracy in
|
comment:2
In the example, |
comment:3
An easy fix is as follows: diff --git a/src/sage/data_structures/stream.py b/src/sage/data_structures/stream.py
index e54a90b8b88..b61d29544c2 100644
--- a/src/sage/data_structures/stream.py
+++ b/src/sage/data_structures/stream.py
@@ -1763,6 +1763,14 @@ class Stream_plethysm(Stream_binary):
p = self._p
ret = p.zero()
for mu in wt_int_vec_iter(n, la):
+ if any(j < self._gv for j in mu):
+ continue
temp = c
for i, j in zip(la, mu):
gs = self._right[j]
if not gs:
temp = p.zero()
break
temp *= p[i](gs)
ret += temp
return ret However, it would probably be better not to generate these integer vectors in the first place. Moreover, it is possibly a waste to compute |
comment:4
I have to leave now, but I just saw that possibly the implementation of plethysm in the species directory is more efficient. |
comment:5
I slightly improved the implementation. In particular, we can now specify degree one elements in the same way as for plethysm, and it is (slightly :-) faster now:
|
Last 10 new commits:
|
Changed keywords from none to LazyPowerSeries |
Commit: |
Author: Martin Rubey |
comment:8
Next I'd like to implement revert for TaylorSeries, derivative, derivative_with_respect_to_p1. Still missing: functorial_composition, arithmetic_product, logarithm for SymmetricFunctions. All of these are needed for #32367. |
comment:9
Should we |
comment:10
I agree that we should throw out integer vectors that are asking for things less than the valuation. Actually, this is simple to modify with the current code. Just subtract It sure looks like you have just essentially duplicated the plethysm code, which I don't think we should do, especially for marginal speed gains. I think you are better off improving the symmetric functions code directly. Another micro-optimization that can be done is to store |
comment:11
Replying to @mantepse:
It doesn't make any difference to me. |
comment:12
I don't understand. My code is quite different, and I gain a factor 20 on the original example. |
comment:13
Sorry, I just read what you wrote and took it at face value rather than actually reading the example. Indeed, that is quite an impressive speedup. I think my comment still holds about integrating it directly into the symmetric functions code. Superficially it still looks generally like the symmetric functions code. What have you changed to get that improvement? |
comment:14
Oh, i am sorry, that teaches me a lesson! Could we perhaps do a zoom meeting today? Maybe at 5pm Japan time? |
comment:15
Sounds good. I responded via email as well. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Dependencies: #32324 |
comment:18
NB: the new implementation of plethysm appears to be faster than the one in sage.combinat.sf.sfa! |
comment:19
Some things that should be fixed:
However, there is also a decent part of me that would like to see the code duplication with Lastly, shouldn't the compositional inverse also be implemented for lazy Laurent and Taylor series? |
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
|
comment:72
Back to positive review, these are only trivial modifications. Please excuse the noise. |
comment:74
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:76
Same trivial fix that ended up on the later ticket #34413. |
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
|
comment:78
Trivial merge, hence setting back to positive review. |
Changed branch from public/rings/lazy_series_revert-34383 to |
Same for
LazySymmetricFunctions
.compositional_inverse
might be a good alias.Depends on #32324
Depends on #34453
Depends on #34494
CC: @tscrim
Component: combinatorics
Keywords: LazyPowerSeries
Author: Martin Rubey
Branch/Commit:
f3f011f
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/34383
The text was updated successfully, but these errors were encountered: