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

write a construction for permutation groups so that the coercion system can find a common parent #3461

Closed
mwhansen opened this issue Jun 18, 2008 · 7 comments

Comments

@mwhansen
Copy link
Contributor

This happens in the coercion branch:

sage: P1 = PermutationGroup([[(1,2)]]); P1
Permutation Group with generators [(1,2)]
sage: P2 = PermutationGroup([[(1,3)]]); P2
Permutation Group with generators [(1,3)]
sage: p1 = P1.gen(); p2 = P2.gen()
sage: p1*p2
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/opt/sage-3.0.3.rc0/devel/sage-main/sage/combinat/matrices/<ipython console> in <module>()

/opt/sage-3.0.3.rc0/devel/sage-main/sage/combinat/matrices/element.pyx in sage.structure.element.MonoidElement.__mul__ (sage/structure/element.c:7517)()

TypeError: unsupported operand parent(s) for '*': 'Permutation Group with generators [(1,2)]' and 'Permutation Group with generators [(1,3)]'

Component: group theory

Author: Mike Hansen

Reviewer: David Loeffler

Merged: sage-4.4.4.alpha0

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

@mwhansen
Copy link
Contributor Author

Attachment: trac_3461.patch.gz

@mwhansen
Copy link
Contributor Author

Author: Mike Hansen

@loefflerd
Copy link
Mannequin

loefflerd mannequin commented May 17, 2010

Attachment: trac_3461_new.patch.gz

replaces previous patch

@loefflerd
Copy link
Mannequin

loefflerd mannequin commented May 17, 2010

Reviewer: David Loeffler

@loefflerd
Copy link
Mannequin

loefflerd mannequin commented May 17, 2010

comment:2

The original patch suffered from a particularly evil piece of bitrotting: since the patch was written, some change somewhere has meant that the trivial permutation now has truth value True, not False, which meant that the pushout code would never terminate -- it would keep on returning bigger and bigger towers of (empty) construction functors!

The new patch I've just uploaded gets around this by using the is_one method, instead of a plain truth value test. It passes doctests under 4.4.1. Anyone willing to sign off on my tiny changes, and maybe we can get this into Sage 5.0?

@mwhansen
Copy link
Contributor Author

comment:3

Looks good to me. Thanks David!

@mwhansen
Copy link
Contributor Author

mwhansen commented Jun 6, 2010

Merged: sage-4.4.4.alpha0

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