Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit fea1743

Browse files
committed
left-padded Kronecker product on Sym too, and fixes for my own bugs:
1 parent 13e33bf commit fea1743

File tree

2 files changed

+274
-45
lines changed

2 files changed

+274
-45
lines changed

src/sage/combinat/ncsf_qsym/ncsf.py

+80-42
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ def verschiebung(self, n):
737737
738738
.. SEEALSO::
739739
740-
:meth:`sage.combinat.ncsf_qsym.qsym.QSym.Bases.ElementMethods.frobenius`,
740+
:meth:`sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Bases.ElementMethods.frobenius`,
741741
:meth:`sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element.verschiebung`
742742
743743
INPUT:
@@ -852,8 +852,8 @@ def star_involution(self):
852852
853853
.. SEEALSO::
854854
855-
:meth:`sage.combinat.ncsf_qsym.qsym.QSym.Bases.ElementMethods.star_involution`,
856-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.psi_involution`.
855+
:meth:`sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Bases.ElementMethods.star_involution`,
856+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmetricFunctions.Bases.ElementMethods.psi_involution`.
857857
858858
EXAMPLES::
859859
@@ -1004,9 +1004,9 @@ def omega_involution(self):
10041004
10051005
.. SEEALSO::
10061006
1007-
:meth:`sage.combinat.ncsf_qsym.qsym.QSym.Bases.ElementMethods.omega_involution`,
1008-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.psi_involution`,
1009-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.star_involution`.
1007+
:meth:`sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Bases.ElementMethods.omega_involution`,
1008+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmetricFunctions.Bases.ElementMethods.psi_involution`,
1009+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmetricFunctions.Bases.ElementMethods.star_involution`.
10101010
10111011
EXAMPLES::
10121012
@@ -1105,8 +1105,8 @@ def psi_involution(self):
11051105
11061106
.. SEEALSO::
11071107
1108-
:meth:`sage.combinat.ncsf_qsym.qsym.QSym.Bases.ElementMethods.psi_involution`,
1109-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.star_involution`.
1108+
:meth:`sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Bases.ElementMethods.psi_involution`,
1109+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmetricFunctions.Bases.ElementMethods.star_involution`.
11101110
11111111
EXAMPLES::
11121112
@@ -1227,10 +1227,24 @@ def left_padded_kronecker_product(self, x):
12271227
extends to a definition of a left-padded Kronecker product
12281228
of any two non-commutative symmetric functions.
12291229
1230-
.. WARNING::
1230+
The left-padded Kronecker product on the non-commutative
1231+
symmetric functions lifts the left-padded Kronecker
1232+
product on the symmetric functions. More precisely: Let
1233+
`\pi` denote the canonical projection
1234+
(:meth:`to_symmetric_function`) from the non-commutative
1235+
symmetric functions to the symmetric functions. Then, any
1236+
two non-commutative symmetric functions `f` and `g`
1237+
satisfy
12311238
1232-
This is *not* a lift of the reduced Kronecker product
1233-
operation on the symmetric functions!
1239+
.. MATH::
1240+
1241+
\pi(f \overline{*} g) = \pi(f) \overline{*} \pi(g),
1242+
1243+
where the `\overline{*}` on the left-hand side denotes the
1244+
left-padded Kronecker product on the non-commutative
1245+
symmetric functions, and the `\overline{*}` on the
1246+
right-hand side denotes the left-padded Kronecker product
1247+
on the symmetric functions.
12341248
12351249
INPUT:
12361250
@@ -1278,7 +1292,7 @@ def left_padded_kronecker_product(self, x):
12781292
`S_1` (this is the same as `S^{(1)}`) with any complete
12791293
homogeneous function: Let `I` be a composition.
12801294
Then, the left-padded Kronecker product of `S_1` and
1281-
`S^I` is `\sum_K a_K s_K`, where the sum runs
1295+
`S^I` is `\sum_K a_K s^K`, where the sum runs
12821296
over all compositions `K`, and the coefficient `a_K` is
12831297
defined as the number of ways to obtain `K` from `I` by
12841298
one of the following two operations:
@@ -1308,7 +1322,7 @@ def left_padded_kronecker_product(self, x):
13081322
A similar rule can be made for the left-padded Kronecker
13091323
product of any complete homogeneous function with `S_1`:
13101324
Let `I` be a composition. Then, the left-padded Kronecker
1311-
product of `S^I` and `S_1` is `\sum_K b_K s_K`, where the
1325+
product of `S^I` and `S_1` is `\sum_K b_K s^K`, where the
13121326
sum runs over all compositions `K`, and the coefficient
13131327
`b_K` is defined as the number of ways to obtain `K` from
13141328
`I` by one of the following two operations:
@@ -1334,7 +1348,31 @@ def left_padded_kronecker_product(self, x):
13341348
....: for i in range(5) for I in Compositions(i) )
13351349
True
13361350
1337-
TESTS:
1351+
Checking the
1352+
`\pi(f \overline{*} g) = \pi(f) \overline{*} \pi(g)`
1353+
equality::
1354+
1355+
sage: NSym = NonCommutativeSymmetricFunctions(ZZ)
1356+
sage: R = NSym.R()
1357+
sage: def testpi(n):
1358+
....: for I in Compositions(n):
1359+
....: for J in Compositions(n):
1360+
....: a = R[I].to_symmetric_function()
1361+
....: b = R[J].to_symmetric_function()
1362+
....: x = a.left_padded_kronecker_product(b)
1363+
....: y = R[I].left_padded_kronecker_product(R[J])
1364+
....: y = y.to_symmetric_function()
1365+
....: if x != y:
1366+
....: return False
1367+
....: return True
1368+
sage: testpi(3)
1369+
True
1370+
1371+
TESTS::
1372+
1373+
sage: S = NonCommutativeSymmetricFunctions(QQ).S()
1374+
sage: (2*S([])).left_padded_kronecker_product(3*S([]))
1375+
6*S[]
13381376
13391377
Different bases and base rings::
13401378
@@ -1381,13 +1419,13 @@ def left_padded_kronecker_product(self, x):
13811419
# Special handling for the empty composition. The left-padded
13821420
# Kronecker product of 1 with any non-commutative symmetric
13831421
# function f is f.
1384-
result += comp_x
1422+
result += a * comp_x
13851423
continue
13861424
for mu, b in comp_x.monomial_coefficients().items():
13871425
# mu is a composition, b is an element of the base ring.
13881426
if len(mu) == 0:
13891427
# Special handling for the empty composition.
1390-
result += a * comp_parent(lam)
1428+
result += a * b * comp_parent(lam)
13911429
continue
13921430
# Now, both lam and mu are nonempty.
13931431
stab = 1 + sum(lam) + sum(mu)
@@ -2215,8 +2253,8 @@ def verschiebung(self, n):
22152253
22162254
.. SEEALSO::
22172255
2218-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.verschiebung`,
2219-
:meth:`sage.combinat.ncsf_qsym.qsym.QSym.Bases.ElementMethods.frobenius`,
2256+
:meth:`sage.combinat.ncsf_qsym.qsym.NonCommutativeSymmetricFunctions.Bases.ElementMethods.verschiebung`,
2257+
:meth:`sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Bases.ElementMethods.frobenius`,
22202258
:meth:`sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element.verschiebung`
22212259
22222260
INPUT:
@@ -2337,9 +2375,9 @@ def star_involution(self):
23372375
23382376
.. SEEALSO::
23392377
2340-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.star_involution`,
2341-
:meth:`sage.combinat.ncsf_qsym.qsym.QSym.Bases.ElementMethods.star_involution`,
2342-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.psi_involution`.
2378+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmetricFunctions.Bases.ElementMethods.star_involution`,
2379+
:meth:`sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Bases.ElementMethods.star_involution`,
2380+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmetricFunctions.Bases.ElementMethods.psi_involution`.
23432381
23442382
EXAMPLES::
23452383
@@ -2674,9 +2712,9 @@ def psi_involution(self):
26742712
26752713
.. SEEALSO::
26762714
2677-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.psi_involution`,
2678-
:meth:`sage.combinat.ncsf_qsym.qsym.QSym.Bases.ElementMethods.psi_involution`,
2679-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.star_involution`.
2715+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmetricFunctions.Bases.ElementMethods.psi_involution`,
2716+
:meth:`sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Bases.ElementMethods.psi_involution`,
2717+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmetricFunctions.Bases.ElementMethods.star_involution`.
26802718
26812719
EXAMPLES::
26822720
@@ -2872,8 +2910,8 @@ def verschiebung(self, n):
28722910
28732911
.. SEEALSO::
28742912
2875-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.verschiebung`,
2876-
:meth:`sage.combinat.ncsf_qsym.qsym.QSym.Bases.ElementMethods.frobenius`,
2913+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmetricFunctions.Bases.ElementMethods.verschiebung`,
2914+
:meth:`sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Bases.ElementMethods.frobenius`,
28772915
:meth:`sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element.verschiebung`
28782916
28792917
INPUT:
@@ -2991,9 +3029,9 @@ def star_involution(self):
29913029
29923030
.. SEEALSO::
29933031
2994-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.star_involution`,
2995-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.psi_involution`,
2996-
:meth:`sage.combinat.ncsf_qsym.qsym.QSym.Bases.ElementMethods.star_involution`.
3032+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmeticFunctions.Bases.ElementMethods.star_involution`,
3033+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmeticFunctions.Bases.ElementMethods.psi_involution`,
3034+
:meth:`sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Bases.ElementMethods.star_involution`.
29973035
29983036
EXAMPLES::
29993037
@@ -3063,9 +3101,9 @@ def psi_involution(self):
30633101
30643102
.. SEEALSO::
30653103
3066-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.psi_involution`,
3067-
:meth:`sage.combinat.ncsf_qsym.qsym.QSym.Bases.ElementMethods.psi_involution`,
3068-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.star_involution`.
3104+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmeticFunctions.Bases.ElementMethods.psi_involution`,
3105+
:meth:`sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Bases.ElementMethods.psi_involution`,
3106+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmeticFunctions.Bases.ElementMethods.star_involution`.
30693107
30703108
EXAMPLES::
30713109
@@ -3478,8 +3516,8 @@ def verschiebung(self, n):
34783516
34793517
.. SEEALSO::
34803518
3481-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.verschiebung`,
3482-
:meth:`sage.combinat.ncsf_qsym.qsym.QSym.Bases.ElementMethods.frobenius`,
3519+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmeticFunctions.Bases.ElementMethods.verschiebung`,
3520+
:meth:`sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Bases.ElementMethods.frobenius`,
34833521
:meth:`sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element.verschiebung`
34843522
34853523
INPUT:
@@ -3749,8 +3787,8 @@ def verschiebung(self, n):
37493787
37503788
.. SEEALSO::
37513789
3752-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.verschiebung`,
3753-
:meth:`sage.combinat.ncsf_qsym.qsym.QSym.Bases.ElementMethods.frobenius`,
3790+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmeticFunctions.Bases.ElementMethods.verschiebung`,
3791+
:meth:`sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Bases.ElementMethods.frobenius`,
37543792
:meth:`sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element.verschiebung`
37553793
37563794
INPUT:
@@ -3868,9 +3906,9 @@ def star_involution(self):
38683906
38693907
.. SEEALSO::
38703908
3871-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.star_involution`,
3872-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.psi_involution`,
3873-
:meth:`sage.combinat.ncsf_qsym.qsym.QSym.Bases.ElementMethods.star_involution`.
3909+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmeticFunctions.Bases.ElementMethods.star_involution`,
3910+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmeticFunctions.Bases.ElementMethods.psi_involution`,
3911+
:meth:`sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Bases.ElementMethods.star_involution`.
38743912
38753913
EXAMPLES::
38763914
@@ -3940,9 +3978,9 @@ def psi_involution(self):
39403978
39413979
.. SEEALSO::
39423980
3943-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.psi_involution`,
3944-
:meth:`sage.combinat.ncsf_qsym.qsym.QSym.Bases.ElementMethods.psi_involution`,
3945-
:meth:`sage.combinat.ncsf_qsym.qsym.NCSF.Bases.ElementMethods.star_involution`.
3981+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmeticFunctions.Bases.ElementMethods.psi_involution`,
3982+
:meth:`sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Bases.ElementMethods.psi_involution`,
3983+
:meth:`sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmeticFunctions.Bases.ElementMethods.star_involution`.
39463984
39473985
EXAMPLES::
39483986

0 commit comments

Comments
 (0)