Ticket #2153 (needs_work enhancement)

Opened 5 years ago

Last modified 5 years ago

[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

group_homs.hg Download (4.7 KB) - added by kohel 5 years ago.
9271.patch Download (8.5 KB) - added by wdj 5 years ago.
tried to create patch based on sage-3.0.alphaa0 from code D Kohel sent

Change History

Changed 5 years ago by kohel

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:5 Changed 5 years ago by mabshoff

  • Description modified (diff)

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

comment:7 Changed 5 years ago by rlm

  • Milestone changed from sage-2.11 to sage-2.10.4

Changed 5 years ago by wdj

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....

Note: See TracTickets for help on using tickets.