Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loday-Ronco algebra doesn't allow some CHA methods #25452

Closed
amypang mannequin opened this issue May 28, 2018 · 7 comments
Closed

Loday-Ronco algebra doesn't allow some CHA methods #25452

amypang mannequin opened this issue May 28, 2018 · 7 comments

Comments

@amypang
Copy link
Mannequin

amypang mannequin commented May 28, 2018

I cannot define convolution products in Loday-Ronco. The following shows code that works for QSym but not Loday-Ronco:

LR = algebras.FreeDendriform(QQ)
P = LR.basis()
QSym=QuasiSymmetricFunctions(QQ)
F=QSym.F()

def identitymap():
    def identitymap_(x):
        return x
    return identitymap_

hopfsquareF=F.convolution_product([identitymap(),identitymap()])
hopfsquareP=P.convolution_product([identitymap(),identitymap()])

The last line results in error:

Traceback (most recent call last):
  File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1044, in execute
    exec compile(block+'\n', '', 'single', flags=compile_flags) in namespace, locals
  File "", line 1, in <module>
  File "sage/structure/category_object.pyx", line 856, in sage.structure.category_object.CategoryObject.__getattr__ (build/cythonized/sage/structure/category_object.c:8014)
    return self.getattr_from_category(name)
  File "sage/structure/category_object.pyx", line 871, in sage.structure.category_object.CategoryObject.getattr_from_category (build/cythonized/sage/structure/category_object.c:8177)
    attr = getattr_from_other_class(self, cls, name)
  File "sage/cpython/getattr.pyx", line 249, in sage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:1837)
    raise dummy_attribute_error
AttributeError: 'LazyFamily_with_category' object has no attribute 'convolution_product'

This may be related to the fact that the Loday-Ronco basis elements must be specified using square brackets and not round brackets:

sage: F[Compositions(4)[1]]
sage: F(Compositions(4)[1])

F[1, 1, 2]
F[1, 1, 2]

sage: P[BinaryTrees(4)[1]]
sage: P(BinaryTrees(4)[1])

B[[., [., [[., .], .]]]]
Error in lines 2-2
Traceback (most recent call last):
  File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1044, in execute
    exec compile(block+'\n', '', 'single', flags=compile_flags) in namespace, locals
  File "", line 1, in <module>
  File "sage/structure/parent.pyx", line 920, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9377)
    raise NotImplementedError
NotImplementedError

Thanks for your help!

CC: @fchapoton @tscrim @darijgr @saliola @alauve

Component: combinatorics

Keywords: chas

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/25452

@amypang amypang mannequin added this to the sage-8.3 milestone May 28, 2018
@amypang amypang mannequin added c: combinatorics labels May 28, 2018
@tscrim
Copy link
Collaborator

tscrim commented May 28, 2018

comment:1

That is because P is not what you want. basis returns the basis, not the LR algebra in a particular basis. What you want is

sage: def identity_map(x):
....:     return x
sage: LR.convolution_product([identity_map, identity_map])
Generic endomorphism of Free Dendriform algebra on one generator ['o'] over Rational Field

sage: LR
Free Dendriform algebra on one generator ['o'] over Rational Field
sage: P
Lazy family (Term map from Binary trees to Free Dendriform algebra on one generator ['o'] over Rational Field(i))_{i in Binary trees}

@tscrim tscrim removed this from the sage-8.3 milestone May 28, 2018
@amypang
Copy link
Mannequin Author

amypang mannequin commented May 28, 2018

comment:2

Travis, thanks for looking at this. Is there a way to get the LR algebra in the desired basis, so it is in the same style as the other combinatorial Hopf algebras and I can apply convolution_product to it?

@tscrim
Copy link
Collaborator

tscrim commented May 28, 2018

comment:3

LR currently only has 1 basis (implemented), so just use LR like you would, say, F.

@amypang
Copy link
Mannequin Author

amypang mannequin commented May 28, 2018

comment:4

Thank you Travis! Sorry for making a ticket.

@tscrim
Copy link
Collaborator

tscrim commented May 28, 2018

comment:5

No problem.

@tscrim
Copy link
Collaborator

tscrim commented May 28, 2018

Reviewer: Travis Scrimshaw

@embray
Copy link
Contributor

embray commented Feb 26, 2019

comment:6

Presuming these are all correctly reviewed as either duplicate, invalid, or wontfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants