Ticket #2153 (needs_work enhancement)
[with bundle, needs additional review] Defined Hom parent of group homomorphisms.
| Reported by: | kohel | Owned by: | joyner |
|---|---|---|---|
| Priority: | major | Milestone: | sage-5.11 |
| Component: | group theory | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description (last modified by mabshoff) (diff)
Defined parent of a group homomorphism such that the following example works (and similar for permutation groups):
sage: G.<x,y> = AbelianGroup(2,[2,3]); G Multiplicative Abelian Group isomorphic to C2 x C3 sage: H.<a,b,c> = AbelianGroup(3,[2,3,4]); H Multiplicative Abelian Group isomorphic to C2 x C3 x C4 sage: phi = AbelianGroupMorphism(G,H,[x,y],[a,b]) sage: phi AbelianGroup morphism: From: Multiplicative Abelian Group isomorphic to C2 x C3 To: Multiplicative Abelian Group isomorphic to C2 x C3 x C4 sage: phi.parent() Set of Morphisms from Multiplicative Abelian Group isomorphic to C2 x C3 to Multiplicative Abelian Group isomorphic to C2 x C3 x C4 in Category of groups sage: Hom(G,H) == phi.parent() True
Attachments
Change History
comment:1 Changed 5 years ago by mhansen
- Summary changed from Defined Hom parent of group homomorphisms. to [with bundle, needs review] Defined Hom parent of group homomorphisms.
comment:2 Changed 5 years ago by ncalexan
- Summary changed from [with bundle, needs review] Defined Hom parent of group homomorphisms. to [with bundle, with positive review] Defined Hom parent of group homomorphisms.
Apply aa5061b07eef. Documentation and tests are fantastic!
45b75671c677 and 25e03ebc5b0d appear to be the same. Whether it should be applied... I say yes, but I'm worried that it will fail on infinite domains.
02e052cfe50a should be applied, although I don't like leaving commented code around.
comment:3 Changed 5 years ago by ncalexan
BTW, why isn't the motivating example a doctest in the attached patch?
comment:4 Changed 5 years ago by ncalexan
#1840 is aa5061b07eef.
#1893 is 45b75671c677 and 25e03ebc5b0d.
So the only new patch is 02e052cfe50a.
comment:6 Changed 5 years ago by mabshoff
- Summary changed from [with bundle, with positive review] Defined Hom parent of group homomorphisms. to [with bundle, needs additional review] Defined Hom parent of group homomorphisms.
There are various points raised in the previous comments which should be addressed.
Cheers,
Michael
Changed 5 years ago by wdj
-
attachment
9271.patch
added
tried to create patch based on sage-3.0.alphaa0 from code D Kohel sent
comment:8 Changed 5 years ago by wdj
Maybe others could apply the bundle but I could not. I asked David Kohel for his code, which he emailed me. I tried to create a patch from that. It seems to pass sage -t (I cannot get sage -testall to work without locking up on this machine). Since I get
sage: G.<x,y> = AbelianGroup(2,[2,3]); G Multiplicative Abelian Group isomorphic to C2 x C3 sage: H.<a,b,c> = AbelianGroup(3,[2,3,4]); H Multiplicative Abelian Group isomorphic to C2 x C3 x C4 sage: phi = AbelianGroupMorphism(G,H,[x,y],[a,b]) sage: phi <sage.groups.abelian_gps.abelian_group_morphism.AbelianGroupMorphism instance at 0x364cef0> sage: phi.parent() --------------------------------------------------------------------------- <type 'exceptions.AttributeError'> Traceback (most recent call last) /mnt/drive_hda1/sagefiles/sage-3.0.alpha0/<ipython console> in <module>() <type 'exceptions.AttributeError'>: AbelianGroupMorphism instance has no attribute 'parent'
I apparently made a mistake somewhere....
