Opened 23 months ago
Closed 23 months ago
#28881 closed enhancement (fixed)
refresh the shuffle algebra file
Reported by:  chapoton  Owned by:  

Priority:  major  Milestone:  sage9.0 
Component:  combinatorics  Keywords:  
Cc:  tscrim, jmantysalo  Merged in:  
Authors:  Frédéric Chapoton, Travis Scrimshaw  Reviewers:  Travis Scrimshaw, Frédéric Chapoton 
Report Upstream:  N/A  Work issues:  
Branch:  3787e45 (Commits, GitHub, GitLab)  Commit:  3787e452e3db8a54bb7baba27f2ff4c21acece47 
Dependencies:  Stopgaps: 
Description (last modified by )
fixing a very wrong coproduct
enhancing the category
some pep8 changes
Change History (15)
comment:1 Changed 23 months ago by
 Branch set to u/chapoton/28881
 Cc tscrim jmantysalo added
 Commit set to 3631eea64aad0ade4ca0d733bbcbfb8b170fb3e6
 Status changed from new to needs_review
comment:2 Changed 23 months ago by
 Status changed from needs_review to needs_info
Well, technically the shuffle algebra should be in the category of commutative Hopf algebras, so it might be better to use the category of Bialgebras(R).Commutative()
. However, the antipode is easy to implement: reverse the order of the n
letters times (1)^{n} (see this MathOverflow post). So I would propose changing the category to HopfAlgebras(R).Commutative()
and adding
def antipode_on_basis(self, w): """ Return the antipode on the basis element ``w``. """ mone = self.base_ring().one() return self.term(w.reversal(), mone**len(w))
along with in the dual PBW basis
def antipode(self, elt): """ Return the antipode of the element ``elt``. """ return self(self.expansion(elt).antipode())
comment:3 Changed 23 months ago by
 Commit changed from 3631eea64aad0ade4ca0d733bbcbfb8b170fb3e6 to 7056cc149c62882b2dab1f27948f66ba05a4d251
Branch pushed to git repo; I updated commit sha1. New commits:
7056cc1  more work on shuffle Hopf algebra

comment:4 Changed 23 months ago by
mmm; not so easy. I am hitting problems in the testsuites.
comment:5 Changed 23 months ago by
Hmm...maybe the product and coproduct implemented are not compatible? I will check it on Monday (Australian time).
comment:6 Changed 23 months ago by
 Commit changed from 7056cc149c62882b2dab1f27948f66ba05a4d251 to 0722049f68b4bd11f7d5b4c71c28dbf4ee0d442a
Branch pushed to git repo; I updated commit sha1. New commits:
0722049  some more care for shuffle counit

comment:7 Changed 23 months ago by
 Commit changed from 0722049f68b4bd11f7d5b4c71c28dbf4ee0d442a to 065860acee634345916225b3567a9d4c098e6585
Branch pushed to git repo; I updated commit sha1. New commits:
065860a  fix coproduct for shuffle algebra

comment:8 Changed 23 months ago by
The coproduct was indeed broken. There still remains a failure..
comment:9 Changed 23 months ago by
It almost seems like the old coproduct is meant to be the inflation product. (The coproduct was added in #15212, but there is little information available there.)
comment:10 Changed 23 months ago by
So the problem seems to come from the coproduct in the dual PBW basis. It is only converting basis indices over (whereas the implementation was meant to be treating them as monomials). Here is a fix that doesn't try to be clever and just uses the coercion framework.
comment:11 Changed 23 months ago by
 Branch changed from u/chapoton/28881 to public/algebras/refresh_shuffle_algebras28881
 Commit changed from 065860acee634345916225b3567a9d4c098e6585 to abccb825b933e17c2db6c53b505746f8b60cb455
 Reviewers set to Travis Scrimshaw, Frédéric Chapoton
 Status changed from needs_info to needs_review
comment:12 Changed 23 months ago by
 Commit changed from abccb825b933e17c2db6c53b505746f8b60cb455 to 3787e452e3db8a54bb7baba27f2ff4c21acece47
Branch pushed to git repo; I updated commit sha1. New commits:
3787e45  trac 28881 fixing the pyflakes warning

comment:13 Changed 23 months ago by
 Description modified (diff)
Thanks a lot. Looks good now. I have fixed a pyflakes warning, and added some #long tags on the TestSuites?.
Now launching the bot.
comment:14 Changed 23 months ago by
 Status changed from needs_review to positive_review
Worked locally for me, so I am going to assume the patchbot comes back green. Thank you.
comment:15 Changed 23 months ago by
 Branch changed from public/algebras/refresh_shuffle_algebras28881 to 3787e452e3db8a54bb7baba27f2ff4c21acece47
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
refreshing the shuffle algebra file