Opened 2 years ago

# refresh the shuffle algebra file — at Version 13

Reported by: Owned by: chapoton major sage-9.0 combinatorics tscrim, jmantysalo Frédéric Chapoton, Travis Scrimshaw Travis Scrimshaw, Frédéric Chapoton N/A public/algebras/refresh_shuffle_algebras-28881 3787e452e3db8a54bb7baba27f2ff4c21acece47

fixing a very wrong coproduct

enhancing the category

some pep8 changes

### comment:1 Changed 2 years ago by chapoton

• Branch set to u/chapoton/28881
• Status changed from new to needs_review

New commits:

 ​3631eea `refreshing the shuffle algebra file`

### comment:2 Changed 2 years ago by tscrim

• 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 2 years ago by git

Branch pushed to git repo; I updated commit sha1. New commits:

 ​7056cc1 `more work on shuffle Hopf algebra`

### comment:4 Changed 2 years ago by chapoton

mmm; not so easy. I am hitting problems in the testsuites.

### comment:5 Changed 2 years ago by tscrim

Hmm...maybe the product and coproduct implemented are not compatible? I will check it on Monday (Australian time).

### comment:6 Changed 2 years ago by git

• 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 2 years ago by git

• 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 2 years ago by chapoton

The coproduct was indeed broken. There still remains a failure..

### comment:9 Changed 2 years ago by tscrim

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 2 years ago by tscrim

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 2 years ago by tscrim

• Authors changed from Frédéric Chapoton to Frédéric Chapoton, Travis Scrimshaw
• Branch changed from u/chapoton/28881 to public/algebras/refresh_shuffle_algebras-28881
• Commit changed from 065860acee634345916225b3567a9d4c098e6585 to abccb825b933e17c2db6c53b505746f8b60cb455
• Reviewers set to Travis Scrimshaw, Frédéric Chapoton
• Status changed from needs_info to needs_review

I fixed it, and I also made the shuffle algebra know it is a graded connected Hopf algebra.

New commits:

 ​d29de54 `Fixing dual PBW coproduct and adding grading.` ​9d8dcee `A few other little PEP8 tweaks.` ​abccb82 `Added connected to the category.`

### comment:12 Changed 2 years ago by git

• 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 2 years ago by chapoton

• 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.

Note: See TracTickets for help on using tickets.