|
5 | 5 |
|
6 | 6 | - Travis Scrimshaw (08-04-2013): Initial version
|
7 | 7 | """
|
8 |
| -#***************************************************************************** |
| 8 | +# **************************************************************************** |
9 | 9 | # Copyright (C) 2013 Travis Scrimshaw <tscrim at ucdavis.edu>
|
10 | 10 | #
|
11 | 11 | # Distributed under the terms of the GNU General Public License (GPL)
|
12 |
| -# http://www.gnu.org/licenses/ |
13 |
| -#***************************************************************************** |
| 12 | +# https://www.gnu.org/licenses/ |
| 13 | +# **************************************************************************** |
14 | 14 |
|
15 | 15 | from sage.misc.lazy_attribute import lazy_attribute
|
16 | 16 | from sage.misc.misc_c import prod
|
@@ -50,7 +50,7 @@ def __init__(self, R):
|
50 | 50 | # change the line below to assert(R in Rings()) once MRO issues from #15536, #15475 are resolved
|
51 | 51 | assert(R in Fields() or R in Rings()) # side effect of this statement assures MRO exists for R
|
52 | 52 | self._base = R # Won't be needed once CategoryObject won't override base_ring
|
53 |
| - category = GradedHopfAlgebras(R) # TODO: .Commutative() |
| 53 | + category = GradedHopfAlgebras(R).Commutative() |
54 | 54 | Parent.__init__(self, category=category.WithRealizations())
|
55 | 55 |
|
56 | 56 | # Bases
|
@@ -103,7 +103,7 @@ def dual(self):
|
103 | 103 |
|
104 | 104 | class w(NCSymBasis_abstract):
|
105 | 105 | r"""
|
106 |
| - The Hopf algebra of symmetric functions in non-commuting variables |
| 106 | + The dual Hopf algebra of symmetric functions in non-commuting variables |
107 | 107 | in the `\mathbf{w}` basis.
|
108 | 108 |
|
109 | 109 | EXAMPLES::
|
@@ -134,10 +134,14 @@ def __init__(self, NCSymD):
|
134 | 134 | """
|
135 | 135 | def key_func_set_part(A):
|
136 | 136 | return sorted(map(sorted, A))
|
137 |
| - CombinatorialFreeModule.__init__(self, NCSymD.base_ring(), SetPartitions(), |
| 137 | + |
| 138 | + R = NCSymD.base_ring() |
| 139 | + category = GradedHopfAlgebras(R).Commutative() |
| 140 | + category &= NCSymDualBases(NCSymD) |
| 141 | + CombinatorialFreeModule.__init__(self, R, SetPartitions(), |
138 | 142 | prefix='w', bracket=False,
|
139 | 143 | sorting_key=key_func_set_part,
|
140 |
| - category=NCSymDualBases(NCSymD)) |
| 144 | + category=category) |
141 | 145 |
|
142 | 146 | @lazy_attribute
|
143 | 147 | def to_symmetric_function(self):
|
|
0 commit comments