Closed mantepse closed 1 year ago
Branch pushed to git repo; I updated commit sha1. New commits:
55761b8 | better derivative for LazyLaurentSeries |
Commit: 55761b8
Branch pushed to git repo; I updated commit sha1. New commits:
50ce450 | derivative for LazyTaylorSeries |
Changed keywords from none to LazyPowerSeries
Description changed:
---
+++
@@ -1 +1 @@
-
+We implement derivatives for LazyLaurentSeries, LazyTaylorSeries and LazySymmetricFunctions
Author: Martin Rubey
Branch pushed to git repo; I updated commit sha1. New commits:
10cfc11 | derivative for LazySymmetricFunctions |
Dependencies: #32324
Changed dependencies from #32324 to #34383
I don't think there is anything we need to worry about with regards to analytic stuff (since there is an assumption the derivatives commute), but I want to confirm you also think so too.
Also you have empty INPUT:
blocks. Either remove, add the inputs, or provide a link to something that explains how to parse the inputs.
Reviewer: Travis Scrimshaw
Replying to @tscrim:
I don't think there is anything we need to worry about with regards to analytic stuff (since there is an assumption the derivatives commute), but I want to confirm you also think so too.
That's correct.
Also you have empty
INPUT:
blocks. Either remove, add the inputs, or provide a link to something that explains how to parse the inputs.
Done.
Besides, I now know of a way to make sense of
sage: L.<x,y> = LazySymmetricFunction(SymmetricFunctions(QQ).s())
sage: f = 1/(1-x*y)
The natural thing is to set x = tensor([s[1], s[0]])
and y = tensor([s[0], s[1]])
. Doing so, also
sage: f.derivative(x, 2, y)
makes sense. In fact, this is what we do all the time in the doctests anyway.
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
07ca029 | add a consistency check |
1d559cc | improve composing Taylor series, start making plethysm more general |
c47b060 | Doing some changes to normal symmetric functions plethysm to support coefficients and lazy symmetric functions. |
5776c61 | Adding the category of commutative rings to the category of tensor products of commutative algebras. |
5f21f3d | Merge branch 'public/categories/tensor_commutative_rings-34453' into public/rings/lazy_series_revert-34383 |
a2e9ed7 | Making the test for coercion of plethysms wrt tesnor products more robust. |
94219d4 | fix plethysm with f having finite support |
6745cf1 | Some last details and optimizations to Stream_plethysm. |
3d6d39f | fix typo in comment |
ee35418 | Merge branch 'public/rings/lazy_series_revert-34383' of trac.sagemath.org:sage into t/34413/implement_derivatives_of_lazy_series |
Replying to @mantepse:
Replying to @tscrim: Besides, I now know of a way to make sense of
sage: L.<x,y> = LazySymmetricFunction(SymmetricFunctions(QQ).s()) sage: f = 1/(1-x*y)
The natural thing is to set
x = tensor([s[1], s[0]])
andy = tensor([s[0], s[1]])
. Doing so, alsosage: f.derivative(x, 2, y)
makes sense. In fact, this is what we do all the time in the doctests anyway.
I agree that it makes a little bit of sense to think of the variable as a the unique degree one element (up to scalar). However, this would be a hack IMO because the degree one elements do not generate the ring of symmetric functions (as it is a freely generated by ei). So the result of gens()
would be wrong if it was the degree one elements. Now a way to explain yourself out of this is that the R.<x,y>
type syntax returns the first (in some ordering) n
generators.
I still do not think this extra little agreement with a completely different class (where I expect no such compatibility) and implementation is worth all of this extra complexity and effort. Although I won’t oppose it because you are not going to create some extra class for the variables (at least, judging by what you’re saying). However, to me it adds to maintenance costs without a clear benefit.
Actually, isn’t what is happening just a renaming of “skew_by“? Will that be implemented here too?
you never sleep, do you?
Yes, this is skey_by(p[1])
.
Indeed, it is a bit unclear to me whether it makes sense to implement all the methods on SymmetricFunctions
also on LazySymmetricFunctions
. It would be nicer to have an automatism for those which are graded maps.
However, that's almost certainly for a different project.
Replying to @mantepse:
you never sleep, do you?
I wanted to convey my thoughts while you were still awake in case you wanted to respond.
Yes, this is
skey_by(p[1])
.
It seems like that is your mathematical model is disguise. It just happens to have all of the other usual derivative properties when doing p[1]
.
Indeed, it is a bit unclear to me whether it makes sense to implement all the methods on
SymmetricFunctions
also onLazySymmetricFunctions
. It would be nicer to have an automatism for those which are graded maps.However, that's almost certainly for a different project.
I think we can port them over as we find them to be useful.
Anyways, for follow-up tickets.
Can you add the following tests:
(For exact series with nonzero constant)
sage: L.<z> = LazyLaurentSeriesRing(ZZ)
sage: f = L([1,2], valuation=-2, constant=1)
sage: f
z^-2 + 2*z^-1 + 1 + z + z^2 + O(z^3)
sage: f.derivative()
-2*z^-3 - 2*z^-2 + 1 + 2*z + 3*z^2 + 4*z^3 + O(z^4)
Calculus rules (up to an implicit sign choice):
sage: L.<z> = LazyLaurentSeriesRing(QQ)
sage: log(1-z).derivative()
-1 - z - z^2 - z^3 - z^4 - z^5 - z^6 + O(z^7)
Side note: This doesn't work over ZZ
because we are too greedy about converting things to the ring. Indeed, the failure for ZZ
stems from
sage: L.<z> = LazyLaurentSeriesRing(ZZ)
sage: log(1-z)
<repr(<sage.rings.lazy_series_ring.LazyLaurentSeriesRing_with_category.element_class at 0x7f2c90572c80>) failed: TypeError: no conversion of this rational to integer>
This is the only stream that is forcing the output to be in a particular ring and an explicit example about why we shouldn't do that in Stream
s. We should change this on a separate ticket (or here if you want).
Branch pushed to git repo; I updated commit sha1. New commits:
610078f | add doctests |
Branch pushed to git repo; I updated commit sha1. New commits:
731072a | remove unnecessary code leftover from merge, and remove unneccesary import detected by pyflakes |
5666eae | Merge branch 'public/rings/lazy_series_revert-34383' of trac.sagemath.org:sage into t/34413/implement_derivatives_of_lazy_series |
Thank you.
sage -t --long --warn-long 46.9 --random-seed=123 src/sage/combinat/sf/sfa.py
**********************************************************************
File "src/sage/combinat/sf/sfa.py", line 3139, in sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element.plethysm
Failed example:
s(2*T.one())
Expected:
(2*B[word:]#B[word:])*s[]
Got:
(2*B[]#B[])*s[]
^CKilling test src/sage/combinat/sf/sfa.py
----------------------------------------------------------------------
Doctests interrupted: 0/1 files tested
----------------------------------------------------------------------
Changed branch from u/mantepse/implement_derivatives_of_lazy_series to u/tscrim/derivatives_lazy_series-34413
Changed dependencies from #34383 to #34383, #34494
The doctest fails due to changes in #34494. Trivial doctest update.
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. Last 10 new commits:
ee35418 | Merge branch 'public/rings/lazy_series_revert-34383' of trac.sagemath.org:sage into t/34413/implement_derivatives_of_lazy_series |
dafdcb4 | fix doctests |
9124987 | Merge branch 'public/rings/lazy_series_revert-34383' of trac.sagemath.org:sage into t/34413/implement_derivatives_of_lazy_series |
610078f | add doctests |
731072a | remove unnecessary code leftover from merge, and remove unneccesary import detected by pyflakes |
5666eae | Merge branch 'public/rings/lazy_series_revert-34383' of trac.sagemath.org:sage into t/34413/implement_derivatives_of_lazy_series |
1729827 | Merge branch 'u/mantepse/implement_derivatives_of_lazy_series' of https://github.com/sagemath/sagetrac-mirror into u/tscrim/derivatives_lazy_series-34413 |
ab98f2e | less verbose monomials in shuffle algebras |
5d76825 | Merge branch 'u/chapoton/34494' of https://github.com/sagemath/sagetrac-mirror into u/tscrim/derivatives_lazy_series-34413 |
97df300 | Updating sf/sfa.py doctest due to #34494. |
Commit: 97df300
Slightly too fast with updating the ticket.
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. Last 10 new commits:
fbccb39 | normalize degree in Stream_exact for correct equality |
b930f58 | Merge branch 'u/mantepse/categories_of_lazy_series' of https://github.com/sagemath/sagetrac-mirror into u/tscrim/categories_lazy_series-34470 |
b47407b | Implementing `_floordiv_`, Stream._true_order to boolean, first fraction field, more tests, marking long tests. |
e077b66 | Using dynamic classes for FPS gcd. |
ddc04a1 | Fixing last pyflakes things. |
9260d14 | Merge branch 'u/tscrim/categories_lazy_series-34470' of https://github.com/sagemath/sagetrac-mirror into u/tscrim/derivatives_lazy_series-34413 |
1388b8a | Merge branch 'u/chapoton/34494' of https://github.com/sagemath/sagetrac-mirror into public/rings/lazy_series_revert-34383 |
7bfe5f7 | Merge branch 'public/rings/lazy_series_revert-34383' of https://github.com/sagemath/sagetrac-mirror into public/rings/lazy_series_revert-34383 |
2039990 | Updating doctest due to changes from #34494. |
1b9897d | Merge branch 'public/rings/lazy_series_revert-34383' into u/tscrim/derivatives_lazy_series-34413 |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
cdea820 | Merge branch 'public/rings/lazy_series_revert-34383' of https://github.com/sagemath/sagetrac-mirror into u/tscrim/derivatives_lazy_series-34413 |
Changed dependencies from #34383, #34494 to #34383
Trivial update of #34383, which should have had the #34494 change instead.
Changed branch from u/tscrim/derivatives_lazy_series-34413 to u/mantepse/derivatives_lazy_series-34413
Changed branch from u/mantepse/derivatives_lazy_series-34413 to cdea820
We implement derivatives for LazyLaurentSeries, LazyTaylorSeries and LazySymmetricFunctions
Depends on #34383
CC: @tscrim
Component: combinatorics
Keywords: LazyPowerSeries
Author: Martin Rubey
Branch/Commit:
cdea820
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/34413