Opened 3 years ago
Closed 3 years ago
#28881 closed enhancement (fixed)
refresh the shuffle algebra file
Reported by:  Frédéric Chapoton  Owned by:  

Priority:  major  Milestone:  sage9.0 
Component:  combinatorics  Keywords:  
Cc:  Travis Scrimshaw, Jori Mäntysalo  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 3 years ago by
Branch:  → u/chapoton/28881 

Cc:  Travis Scrimshaw Jori Mäntysalo added 
Commit:  → 3631eea64aad0ade4ca0d733bbcbfb8b170fb3e6 
Status:  new → needs_review 
comment:2 Changed 3 years ago by
Status:  needs_review → 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 3 years ago by
Commit:  3631eea64aad0ade4ca0d733bbcbfb8b170fb3e6 → 7056cc149c62882b2dab1f27948f66ba05a4d251 

Branch pushed to git repo; I updated commit sha1. New commits:
7056cc1  more work on shuffle Hopf algebra

comment:5 Changed 3 years ago by
Hmm...maybe the product and coproduct implemented are not compatible? I will check it on Monday (Australian time).
comment:6 Changed 3 years ago by
Commit:  7056cc149c62882b2dab1f27948f66ba05a4d251 → 0722049f68b4bd11f7d5b4c71c28dbf4ee0d442a 

Branch pushed to git repo; I updated commit sha1. New commits:
0722049  some more care for shuffle counit

comment:7 Changed 3 years ago by
Commit:  0722049f68b4bd11f7d5b4c71c28dbf4ee0d442a → 065860acee634345916225b3567a9d4c098e6585 

Branch pushed to git repo; I updated commit sha1. New commits:
065860a  fix coproduct for shuffle algebra

comment:9 Changed 3 years 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 3 years 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 3 years ago by
Authors:  Frédéric Chapoton → Frédéric Chapoton, Travis Scrimshaw 

Branch:  u/chapoton/28881 → public/algebras/refresh_shuffle_algebras28881 
Commit:  065860acee634345916225b3567a9d4c098e6585 → abccb825b933e17c2db6c53b505746f8b60cb455 
Reviewers:  → Travis Scrimshaw, Frédéric Chapoton 
Status:  needs_info → needs_review 
comment:12 Changed 3 years ago by
Commit:  abccb825b933e17c2db6c53b505746f8b60cb455 → 3787e452e3db8a54bb7baba27f2ff4c21acece47 

Branch pushed to git repo; I updated commit sha1. New commits:
3787e45  trac 28881 fixing the pyflakes warning

comment:13 Changed 3 years 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 3 years ago by
Status:  needs_review → positive_review 

Worked locally for me, so I am going to assume the patchbot comes back green. Thank you.
comment:15 Changed 3 years ago by
Branch:  public/algebras/refresh_shuffle_algebras28881 → 3787e452e3db8a54bb7baba27f2ff4c21acece47 

Resolution:  → fixed 
Status:  positive_review → closed 
New commits:
refreshing the shuffle algebra file