Ticket #3127 (closed defect: fixed)
[duplicate] abelian groups (are lame?) -- bug in comparison of subgroups with group
| Reported by: | was | Owned by: | roed |
|---|---|---|---|
| Priority: | major | Milestone: | sage-3.0.3 |
| Component: | group theory | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
WARNINGS:
- David Roe is recently rumored to be rewriting abelian groups.
- I recently rewrote abelian groups but my patch rotted: #1849
- There are other known problems with subgroups of abelian groups: #2272
OK, now the bug report. This is inconsistent and lame:
sage: A = AbelianGroup(1,[6]) sage: A.subgroup(list(A.gens())) == A False sage: A = AbelianGroup(2,[2,3]) sage: A.subgroup(list(A.gens())) == A True
This is the original email reporting the bug:
Hi there, When I define an abelian group A = AbelianGroup(1,[6]) and then generate a subgroup that actually is the whole group itself, and then compare it to the original group: A.subgroup(list(A.gens())) == A the result may be either True or False. In this example it is False. When defining A as A = AbelianGroup(2,[3,2]) it is False as well, but when I define it as A = AbelianGroup(2,[2,3]) it is True. My guess is that this is because comparison of finite Abelian groups is implemented using their invariant factors, but when you create the group using factors that are not in canonical form or not in increasing order, these are used instead of the ordered list of invariant factors anyway. Greetings, Utpal Sarkar
Change History
comment:2 Changed 5 years ago by cremona
Is this actually a bug? It would certainly wrong if the test being performed was isomorphism rather than equality, but I think it is actually reasonable for two finite abelian groups to only be reported as "equal" when they are presented the same way.
Having said that I agree that is does not look right for a group to have a _subgroup_ which is isomorphic to but not equal to itself.
comment:3 Changed 5 years ago by wdj
Will all due respect to myself, I think it is better if someone like David Roe works on this package than the original author, who seems to have created a mess of things:-). Can someone (Michael?) please change the owner from "joyner" to "David Roe" or whatever abbreviation he likes to use?

I am working on rewriting, but won't be able to work on it for the next week (I'm at a conference then need to finish a final). If someone else wants to do something in this direction, let me (or sage-devel) know.