On Saturday, April 26, 2014 8:16:58 AM UTC-7, Nathann Cohen wrote:
>
> Hello everybody !
>
> I  am back again with my group problems. I need to see 4-uples as elements 
> of the additive group Z/3Z x Z/2Z x Z/2Z x Z/2Z, how can I do that ? My 
> problem is that Sage converts the group  I  want into Z/2Z x Z/2Z x Z/6Z 
> and I don't want that ....
>

> sage: g=groups.misc.AdditiveAbelian([2,2,2,3]); g
> Additive abelian group isomorphic to Z/2 + Z/2 + Z/6
> sage: g([1,1,1,1])
> ...
> TypeError: length of v must be at most the number of rows of self
>
> Thanks for your help !
>



Note:

sage: g.V() # the group of which you're taking a quotient
Ambient free module of rank 4 over the principal ideal domain Integer Ring 

So this is roundabout, but seems to work: turn (1,1,1,1) into an element of 
"V", then convert to an element of g:

sage: x = g(g.V()([1,1,1,1])); x
(1, 1, 1, 1)
sage: 3*x
(1, 1, 1, 0)
sage: 2*x
(0, 0, 0, 2)

(I agree that additive abelian groups in Sage have some frustrating 
aspects; I ran across some others, recently, but I can't remember them 
right now...)

 

>
> Nathann
>

-- 
John
 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to