sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.33k stars 453 forks source link

Fixes to symmetric functions #13399

Closed anneschilling closed 12 years ago

anneschilling commented 12 years ago

This patch implements the following fixes to symmetric functions:

Apply:

Depends on #13404

CC: @sagetrac-sage-combinat @zabrocki

Component: combinatorics

Keywords: symmetric functions

Author: Anne Schilling, Mike Zabrocki

Reviewer: Mike Zabrocki, Anne Schilling

Merged: sage-5.4.beta2

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

anneschilling commented 12 years ago

Description changed:

--- 
+++ 
@@ -1 +1 @@
-This patch fixes some bugs related to symmetric functions.
+Implementation of the HL creation operator for k-Schur functions.
nthiery commented 12 years ago
comment:2

Speaking of fixes/improvements for symmetric functions: the current code is not perfectly consistent for the naming of the bases:

sage: S = SymmetricFunctions(QQ['q,t'].fraction_field())
sage: S.s()
Symmetric Function Algebra over Fraction Field of Multivariate Polynomial Ring in q, t over Rational Field, Schur symmetric functions as basis
sage: S.macdonald().P()
Symmetric Functions over Fraction Field of Multivariate Polynomial Ring in q, t over Rational Field in the realization MacdonaldPolynomials_p

And indeed in the code, S.s().repr comes from SymmetricFunctionAlgebra_classical, where as S.macdonald().P().repr comes from generic with_realization code.

What about moving (in this ticket, or later), the _repr_ from SymmetricFunctionAlgebra_classical to SymmetricFunctionsBases?

A bit of fiddling with ._basis might be needed to get the string 'Macdonald P symmetric functions' right, but this should not be too bad.

Cheers, Nicolas

PS: as a side effect, this would help me a bit with my functorial construction patch, as it currently breaks the naming of the macdo/llt/hl basis, and would not anymore with the changes above.

anneschilling commented 12 years ago

Description changed:

--- 
+++ 
@@ -1 +1,6 @@
-Implementation of the HL creation operator for k-Schur functions.
+This patch implements the HL creation operator for k-Schur functions, it fixes
+omega for k-Schur functions for generic t, and changes the multiplication for
+k-Schur functions for generic t, so that the result stays in the k-bounded
+subspace if possible and lifts to symmetric functions otherwise.
+
+
anneschilling commented 12 years ago
comment:4

Hi Mike,

I made all changes we discussed by e-mail. Could you have a look?

Anne

d4d9e38a-6e64-40d7-a7f7-bd828eb9e0db commented 12 years ago
comment:5

All tests pass and the documentation looks good. Nicolas, we can address the !repr! changes in another patch. -Mike

anneschilling commented 12 years ago
comment:6

Thank you, Mike! Same comments as on 12140.

anneschilling commented 12 years ago
comment:7

Removed trailing white spaces.

anneschilling commented 12 years ago

Dependencies: #5457

d4d9e38a-6e64-40d7-a7f7-bd828eb9e0db commented 12 years ago
comment:9

After discussion, another addition to make will be coproduct method on k-Schur bases.

d4d9e38a-6e64-40d7-a7f7-bd828eb9e0db commented 12 years ago

Description changed:

--- 
+++ 
@@ -1,6 +1,10 @@
 This patch implements the HL creation operator for k-Schur functions, it fixes
 omega for k-Schur functions for generic t, and changes the multiplication for
 k-Schur functions for generic t, so that the result stays in the k-bounded
-subspace if possible and lifts to symmetric functions otherwise.
+subspace if possible and lifts to symmetric functions otherwise.  A second
+patch adds the coproduct function to the k-Schur and k-homogeneous bases

+**Apply**:
+* [attachment: trac_13399-sf-as.patch](https://github.com/sagemath/sage/files/ticket13399/trac_13399-sf-as.patch.gz)
+* [attachment: trac_13399_coproduct_additions-mz.patch](https://github.com/sagemath/sage/files/ticket13399/trac_13399_coproduct_additions-mz.patch.gz)
d4d9e38a-6e64-40d7-a7f7-bd828eb9e0db commented 12 years ago
comment:10

I implemented coproduct on k-Schur functions. This required moving coproduct_by_coercion to the class SymmetricFunctionAlgebra_generic. Please test and review.

anneschilling commented 12 years ago

Changed author from Anne Schilling to Anne Schilling, Mike Zabrocki

anneschilling commented 12 years ago

Description changed:

--- 
+++ 
@@ -6,5 +6,5 @@

 **Apply**:
 * [attachment: trac_13399-sf-as.patch](https://github.com/sagemath/sage/files/ticket13399/trac_13399-sf-as.patch.gz)
-* [attachment: trac_13399_coproduct_additions-mz.patch](https://github.com/sagemath/sage/files/ticket13399/trac_13399_coproduct_additions-mz.patch.gz)

+
anneschilling commented 12 years ago

Changed reviewer from Mike Zabrocki to Mike Zabrocki, Anne Schilling

anneschilling commented 12 years ago
comment:12

Hi Mike,

Thanks for the addition! I made some more changes to the doc explanations (there was still a reference to monomial symmetric functions even though coproduct_by_coercion was moved to sfa.py). I also added some further tests for k-Schurs and LLTs. Both patches are now folded, so please only

Apply: trac_13399-sf-as.patch

All tests pass on sage_5.3.rc0 + two additional 5457 patches. No idea what the current version of sage is that we are supposed to test against!

Best,

Anne

anneschilling commented 12 years ago

Changed dependencies from #5457 to #13404

anneschilling commented 12 years ago
comment:14

Rebased with respect to #13404. More additions regarding Jack polynomials are pending!

anneschilling commented 12 years ago

Description changed:

--- 
+++ 
@@ -1,8 +1,22 @@
-This patch implements the HL creation operator for k-Schur functions, it fixes
-omega for k-Schur functions for generic t, and changes the multiplication for
-k-Schur functions for generic t, so that the result stays in the k-bounded
-subspace if possible and lifts to symmetric functions otherwise.  A second
-patch adds the coproduct function to the k-Schur and k-homogeneous bases
+This patch implements the following fixes to symmetric functions:
+- HL creation operator for k-Schur functions
+- it fixes omega for k-Schur functions for generic t
+- it changes the multiplication for k-Schur functions for generic t, so that
+  the result stays in the k-bounded subspace if possible and lifts to symmetric functions otherwise
+- it moves coproduct_by_coercion to SymmetricFunctionAlgebra_generic and
+  inserts a coproduct function in KBoundedSubspaceBases, ElementMethods
+- it fixes the coersion between the Jack P and Pq basis; this was previously extremely slow,
+  for example for
+
+  ```
+      sage: Sym = SymmetricFunctions(FractionField(QQ['t']))
+      sage: Qp = Sym.jack().Qp()
+      sage: P = Sym.jack().P()
+      sage: P(Qp[2,1])
+      ((-192*t^3+192*t^2-192*t+192)/(-64*t^3-224*t^2-224*t-64))*JackP[1, 1, 1]
+      + ((128*t^2-64*t+80)/(64*t^2+64*t+16))*JackP[2, 1] + ((8*t-8)/(8*t+4))*JackP[3]
+   ```
+- it fixes the coproduct for Jack symmetric functions

 **Apply**:
 * [attachment: trac_13399-sf-as.patch](https://github.com/sagemath/sage/files/ticket13399/trac_13399-sf-as.patch.gz)
anneschilling commented 12 years ago
comment:16

Hi Mike,

I folded the previous 13399 patch with the changes to jack.py. For me all tests pass and the documentation looks good. Please set a positive review if you are satisfied!

Anne

d4d9e38a-6e64-40d7-a7f7-bd828eb9e0db commented 12 years ago
comment:17

I changed two minor things in the doc strings indicating that coercion was done through the homogeneous basis. All doc tests pass on sage-5.3.rc1 + dependency patches. It looks good and I give it a positive review.

d4d9e38a-6e64-40d7-a7f7-bd828eb9e0db commented 12 years ago

Description changed:

--- 
+++ 
@@ -19,6 +19,6 @@
 - it fixes the coproduct for Jack symmetric functions

 **Apply**:
-* [attachment: trac_13399-sf-as.patch](https://github.com/sagemath/sage/files/ticket13399/trac_13399-sf-as.patch.gz)
+* [attachment: trac_13399-sf-as.3.patch](https://github.com/sagemath/sage-prod/files/10656251/trac_13399-sf-as.3.patch.gz)
anneschilling commented 12 years ago
comment:18

Apply: trac_13399-sf-as.3.patch

jdemeyer commented 12 years ago

Attachment: trac_13399-sf-as.3.patch.gz

same patch with minor doc changes

jdemeyer commented 12 years ago

Merged: sage-5.4.beta2