Skip to content

Commit bad6489

Browse files
committed
Adding some doctests and documentation on the plethysm output.
1 parent c501119 commit bad6489

File tree

1 file changed

+33
-7
lines changed

1 file changed

+33
-7
lines changed

src/sage/combinat/sf/sfa.py

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3031,28 +3031,48 @@ def plethysm(self, x, include=None, exclude=None):
30313031
30323032
- ``x`` -- a symmetric function over the same base ring as
30333033
``self``
3034-
30353034
- ``include`` -- a list of variables to be treated as
30363035
degree one elements instead of the default degree one elements
3037-
30383036
- ``exclude`` -- a list of variables to be excluded
30393037
from the default degree one elements
30403038
3039+
OUTPUT:
3040+
3041+
An element in the parent of ``x`` or the base ring `R` of ``self``
3042+
when ``x`` is in `R`.
3043+
30413044
EXAMPLES::
30423045
30433046
sage: Sym = SymmetricFunctions(QQ)
30443047
sage: s = Sym.s()
30453048
sage: h = Sym.h()
3046-
sage: s(h[3](h[2]))
3049+
sage: h3h2 = h[3](h[2]); h3h2
3050+
h[2, 2, 2] - 2*h[3, 2, 1] + h[3, 3] + h[4, 1, 1] - h[5, 1] + h[6]
3051+
sage: s(h3h2)
30473052
s[2, 2, 2] + s[4, 2] + s[6]
30483053
sage: p = Sym.p()
3049-
sage: p(p[3](s[2,1]))
3054+
sage: p3s21 = p[3](s[2,1]); p3s21
3055+
s[2, 2, 2, 1, 1, 1] - s[2, 2, 2, 2, 1] - s[3, 2, 1, 1, 1, 1]
3056+
+ s[3, 2, 2, 2] + s[3, 3, 1, 1, 1] - s[3, 3, 2, 1] + 2*s[3, 3, 3]
3057+
+ s[4, 1, 1, 1, 1, 1] - s[4, 3, 2] + s[4, 4, 1] - s[5, 1, 1, 1, 1]
3058+
+ s[5, 2, 2] - s[5, 4] + s[6, 1, 1, 1] - s[6, 2, 1] + s[6, 3]
3059+
sage: p(p3s21)
30503060
1/3*p[3, 3, 3] - 1/3*p[9]
30513061
sage: e = Sym.e()
30523062
sage: e[3](e[2])
30533063
e[3, 3] + e[4, 1, 1] - 2*e[4, 2] - e[5, 1] + e[6]
30543064
3055-
::
3065+
Note that the output is in the basis of the input ``x``::
3066+
3067+
sage: s[2,1](h[3])
3068+
h[4, 3, 2] - h[4, 4, 1] - h[5, 2, 2] + h[5, 3, 1] + h[5, 4]
3069+
+ h[6, 2, 1] - 2*h[6, 3] - h[7, 1, 1] + h[7, 2] + h[8, 1] - h[9]
3070+
3071+
sage: h[2,1](s[3])
3072+
s[4, 3, 2] + s[4, 4, 1] + s[5, 2, 2] + s[5, 3, 1] + s[5, 4]
3073+
+ s[6, 2, 1] + 2*s[6, 3] + 2*s[7, 2] + s[8, 1] + s[9]
3074+
3075+
Examples over a polynomial ring::
30563076
30573077
sage: R.<t> = QQ[]
30583078
sage: s = SymmetricFunctions(R).s()
@@ -3069,6 +3089,12 @@ def plethysm(self, x, include=None, exclude=None):
30693089
sage: s(1).plethysm(s(0))
30703090
s[]
30713091
3092+
When ``x`` is a constant, then it is returned as an element
3093+
of the base ring::
3094+
3095+
sage: s[3](2).parent() is R
3096+
True
3097+
30723098
Sage also handles plethysm of tensor products of symmetric functions::
30733099
30743100
sage: s = SymmetricFunctions(QQ).s()
@@ -3080,8 +3106,8 @@ def plethysm(self, x, include=None, exclude=None):
30803106
s[1, 1, 1] # s[3] + s[2, 1] # s[2, 1] + s[3] # s[1, 1, 1]
30813107
30823108
One can use this to work with symmetric functions in two sets of
3083-
commuting variables. For example, we verify the Cauchy identities (in
3084-
degree 5)::
3109+
commuting variables. For example, we verify the Cauchy identities
3110+
(in degree 5)::
30853111
30863112
sage: m = SymmetricFunctions(QQ).m()
30873113
sage: P5 = Partitions(5)

0 commit comments

Comments
 (0)