#15369: groups.misc.AdditiveCyclic
-------------------------+-------------------------------------------------
Reporter: | Owner:
ncohen | Status: needs_review
Type: | Milestone: sage-5.13
defect | Resolution:
Priority: major | Merged in:
Component: | Reviewers:
combinatorics | Work issues:
Keywords: | Commit:
Authors: | 7df421a36ad515f6b2c3cf9178dbcccfb05161c8
Nathann Cohen | Stopgaps:
Report Upstream: N/A |
Branch: |
u/ncohen/15369 |
Dependencies: |
#15368 |
-------------------------+-------------------------------------------------
Changes (by ncohen):
* dependencies: => #15368
Old description:
> Following the discussion at https://groups.google.com/d/msg/sage-
> devel/tyAxhqxk3ZI/SuBg2Ukwwj4J
>
> When one creates the additive group `Z/nZ`, it would be nice to be able
> to use integers and cast them as members of this group. However :
>
> {{{
> sage: G=AdditiveAbelianGroup([5]); G(1)
> TypeError: can't initialize vector from nonzero non-list
> }}}
>
> The same way with free modules :
>
> {{{
> sage: G=FreeModule(ZZ,1); G(1)
> TypeError: can't initialize vector from nonzero non-list
> }}}
>
> This patch makes it possible :
>
> {{{
> sage: G=AdditiveAbelianGroup([5]); G(1)
> (1)
> sage: G=FreeModule(ZZ,1); G(1)
> (1)
> }}}
>
> Nathann
New description:
Following the discussion at https://groups.google.com/d/msg/sage-
devel/tyAxhqxk3ZI/SuBg2Ukwwj4J3
There is currently no way to create a group representing `Z/nZ` easily.
And the one acknowledged way to do that being `Integers(n)` (i.e.
`IntegerModRing(n)`), this patch exposes it as
`groups.misc.AdditiveCyclic`.
Nathann
--
Comment:
Done !
--
Ticket URL: <http://trac.sagemath.org/ticket/15369#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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-trac.
For more options, visit https://groups.google.com/groups/opt_out.