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: sage-9.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:

Status badges

Description (last modified by Frédéric Chapoton)

fixing a very wrong coproduct

enhancing the category

some pep8 changes

Change History (15)

comment:1 Changed 3 years ago by Frédéric Chapoton

Branch: u/chapoton/28881
Cc: Travis Scrimshaw Jori Mäntysalo added
Commit: 3631eea64aad0ade4ca0d733bbcbfb8b170fb3e6
Status: newneeds_review

New commits:

3631eearefreshing the shuffle algebra file

comment:2 Changed 3 years ago by Travis Scrimshaw

Status: needs_reviewneeds_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 git

Commit: 3631eea64aad0ade4ca0d733bbcbfb8b170fb3e67056cc149c62882b2dab1f27948f66ba05a4d251

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

7056cc1more work on shuffle Hopf algebra

comment:4 Changed 3 years ago by Frédéric Chapoton

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

comment:5 Changed 3 years ago by Travis Scrimshaw

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 git

Commit: 7056cc149c62882b2dab1f27948f66ba05a4d2510722049f68b4bd11f7d5b4c71c28dbf4ee0d442a

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

0722049some more care for shuffle counit

comment:7 Changed 3 years ago by git

Commit: 0722049f68b4bd11f7d5b4c71c28dbf4ee0d442a065860acee634345916225b3567a9d4c098e6585

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

065860afix coproduct for shuffle algebra

comment:8 Changed 3 years ago by Frédéric Chapoton

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

comment:9 Changed 3 years ago by Travis Scrimshaw

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 Travis Scrimshaw

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 Travis Scrimshaw

Authors: Frédéric ChapotonFrédéric Chapoton, Travis Scrimshaw
Branch: u/chapoton/28881public/algebras/refresh_shuffle_algebras-28881
Commit: 065860acee634345916225b3567a9d4c098e6585abccb825b933e17c2db6c53b505746f8b60cb455
Reviewers: Travis Scrimshaw, Frédéric Chapoton
Status: needs_infoneeds_review

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


New commits:

d29de54Fixing dual PBW coproduct and adding grading.
9d8dceeA few other little PEP8 tweaks.
abccb82Added connected to the category.

comment:12 Changed 3 years ago by git

Commit: abccb825b933e17c2db6c53b505746f8b60cb4553787e452e3db8a54bb7baba27f2ff4c21acece47

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

3787e45trac 28881 fixing the pyflakes warning

comment:13 Changed 3 years ago by Frédéric 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.

comment:14 Changed 3 years ago by Travis Scrimshaw

Status: needs_reviewpositive_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 Volker Braun

Branch: public/algebras/refresh_shuffle_algebras-288813787e452e3db8a54bb7baba27f2ff4c21acece47
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.